]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20200104
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.691 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20190901.
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 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-interop        compile-in interop bindings
840   --enable-safe-sprintf   compile with experimental safe-sprintf code
841   --disable-scroll-hints  compile without scroll-hints code
842   --enable-wgetch-events  compile with wgetch-events code
843 Testing/development Options:
844   --disable-echo          do not display "compiling" commands
845   --disable-stripping     do not strip (debug info) installed executables
846   --enable-warnings       build: turn on GCC compiler warnings
847   --enable-string-hacks   work around bogus compiler/loader warnings
848   --enable-assertions     test: turn on generation of assertion code
849   --with-dmalloc          test: use Gray Watson's dmalloc library
850   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851   --with-valgrind         test: use valgrind
852   --disable-leaks         test: free permanent memory, analyze leaks
853   --enable-expanded       test: generate functions for certain macros
854   --disable-macros        test: use functions rather than macros
855   --with-trace            test: add trace() function to all models of ncurses
856   --disable-gnat-projects test: disable GNAT projects even if usable
857 Ada Binding Options:
858   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862   --with-ada-libname=XXX  override default Ada library-name
863
864 Some influential environment variables:
865   CC          C compiler command
866   CFLAGS      C compiler flags
867   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
868               nonstandard directory <lib dir>
869   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
870               headers in a nonstandard directory <include dir>
871   CPP         C preprocessor
872   CXX         C++ compiler command
873   CXXFLAGS    C++ compiler flags
874   CXXCPP      C++ preprocessor
875
876 Use these variables to override the choices made by `configure' or to help
877 it to find libraries and programs with nonstandard names/locations.
878
879 EOF
880 fi
881
882 if test "$ac_init_help" = "recursive"; then
883   # If there are subdirs, report their specific --help.
884   ac_popdir=`pwd`
885   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
886     cd $ac_subdir
887     # A "../" for each directory in /$ac_subdir.
888     ac_dots=`echo $ac_subdir |
889              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
890
891     case $srcdir in
892     .) # No --srcdir option.  We are building in place.
893       ac_sub_srcdir=$srcdir ;;
894     [\\/]* | ?:[\\/]* ) # Absolute path.
895       ac_sub_srcdir=$srcdir/$ac_subdir ;;
896     *) # Relative path.
897       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
898     esac
899
900     # Check for guested configure; otherwise get Cygnus style configure.
901     if test -f $ac_sub_srcdir/configure.gnu; then
902       echo
903       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
904     elif test -f $ac_sub_srcdir/configure; then
905       echo
906       $SHELL $ac_sub_srcdir/configure  --help=recursive
907     elif test -f $ac_sub_srcdir/configure.ac ||
908            test -f $ac_sub_srcdir/configure.in; then
909       echo
910       $ac_configure --help
911     else
912       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
913     fi
914     cd $ac_popdir
915   done
916 fi
917
918 test -n "$ac_init_help" && exit 0
919 if $ac_init_version; then
920   cat <<\EOF
921
922 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
923 Free Software Foundation, Inc.
924 This configure script is free software; the Free Software Foundation
925 gives unlimited permission to copy, distribute and modify it.
926 EOF
927   exit 0
928 fi
929 exec 5>config.log
930 cat >&5 <<EOF
931 This file contains any messages produced by compilers while
932 running configure, to aid debugging if configure makes a mistake.
933
934 It was created by $as_me, which was
935 generated by GNU Autoconf 2.52.20190901.  Invocation command line was
936
937   $ $0 $@
938
939 EOF
940 {
941 cat <<_ASUNAME
942 ## ---------- ##
943 ## Platform.  ##
944 ## ---------- ##
945
946 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
947 uname -m = `(uname -m) 2>/dev/null || echo unknown`
948 uname -r = `(uname -r) 2>/dev/null || echo unknown`
949 uname -s = `(uname -s) 2>/dev/null || echo unknown`
950 uname -v = `(uname -v) 2>/dev/null || echo unknown`
951
952 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
953 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
954
955 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
956 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
957 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
958 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
959 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
960 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
961 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
962
963 PATH = $PATH
964
965 _ASUNAME
966 } >&5
967
968 cat >&5 <<EOF
969 ## ------------ ##
970 ## Core tests.  ##
971 ## ------------ ##
972
973 EOF
974
975 # Keep a trace of the command line.
976 # Strip out --no-create and --no-recursion so they do not pile up.
977 # Also quote any args containing shell meta-characters.
978 ac_configure_args=
979 ac_sep=
980 for ac_arg
981 do
982   case $ac_arg in
983   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984   | --no-cr | --no-c) ;;
985   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
986   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
987   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
988     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
989     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
990     ac_sep=" " ;;
991   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
992      ac_sep=" " ;;
993   esac
994   # Get rid of the leading space.
995 done
996
997 # When interrupted or exit'd, cleanup temporary files, and complete
998 # config.log.  We remove comments because anyway the quotes in there
999 # would cause problems or look ugly.
1000 trap 'exit_status=$?
1001   # Save into config.log some information that might help in debugging.
1002   echo >&5
1003   echo "## ----------------- ##" >&5
1004   echo "## Cache variables.  ##" >&5
1005   echo "## ----------------- ##" >&5
1006   echo >&5
1007   # The following way of writing the cache mishandles newlines in values,
1008 {
1009   (set) 2>&1 |
1010     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1011     *ac_space=\ *)
1012       sed -n \
1013         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1015       ;;
1016     *)
1017       sed -n \
1018         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1019       ;;
1020     esac;
1021 } >&5
1022   sed "/^$/d" confdefs.h >conftest.log
1023   if test -s conftest.log; then
1024     echo >&5
1025     echo "## ------------ ##" >&5
1026     echo "## confdefs.h.  ##" >&5
1027     echo "## ------------ ##" >&5
1028     echo >&5
1029     cat conftest.log >&5
1030   fi
1031   (echo; echo) >&5
1032   test "$ac_signal" != 0 &&
1033     echo "$as_me: caught signal $ac_signal" >&5
1034   echo "$as_me: exit $exit_status" >&5
1035   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1036     exit $exit_status
1037      ' 0
1038 for ac_signal in 1 2 13 15; do
1039   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1040 done
1041 ac_signal=0
1042
1043 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1044 rm -rf conftest* confdefs.h
1045 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1046 echo >confdefs.h
1047
1048 # Let the site file select an alternate cache file if it wants to.
1049 # Prefer explicitly selected file to automatically selected ones.
1050 if test -z "$CONFIG_SITE"; then
1051   if test "x$prefix" != xNONE; then
1052     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1053   else
1054     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055   fi
1056 fi
1057 for ac_site_file in $CONFIG_SITE; do
1058   if test -r "$ac_site_file"; then
1059     { echo "$as_me:1059: loading site script $ac_site_file" >&5
1060 echo "$as_me: loading site script $ac_site_file" >&6;}
1061     cat "$ac_site_file" >&5
1062     . "$ac_site_file"
1063   fi
1064 done
1065
1066 if test -r "$cache_file"; then
1067   # Some versions of bash will fail to source /dev/null (special
1068   # files actually), so we avoid doing that.
1069   if test -f "$cache_file"; then
1070     { echo "$as_me:1070: loading cache $cache_file" >&5
1071 echo "$as_me: loading cache $cache_file" >&6;}
1072     case $cache_file in
1073       [\\/]* | ?:[\\/]* ) . $cache_file;;
1074       *)                      . ./$cache_file;;
1075     esac
1076   fi
1077 else
1078   { echo "$as_me:1078: creating cache $cache_file" >&5
1079 echo "$as_me: creating cache $cache_file" >&6;}
1080   >$cache_file
1081 fi
1082
1083 # Check that the precious variables saved in the cache have kept the same
1084 # value.
1085 ac_cache_corrupted=false
1086 for ac_var in `(set) 2>&1 |
1087                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1088   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1089   eval ac_new_set=\$ac_env_${ac_var}_set
1090   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1091   eval ac_new_val="\$ac_env_${ac_var}_value"
1092   case $ac_old_set,$ac_new_set in
1093     set,)
1094       { echo "$as_me:1094: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1095 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1096       ac_cache_corrupted=: ;;
1097     ,set)
1098       { echo "$as_me:1098: error: \`$ac_var' was not set in the previous run" >&5
1099 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1100       ac_cache_corrupted=: ;;
1101     ,);;
1102     *)
1103       if test "x$ac_old_val" != "x$ac_new_val"; then
1104         { echo "$as_me:1104: error: \`$ac_var' has changed since the previous run:" >&5
1105 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1106         { echo "$as_me:1106:   former value:  $ac_old_val" >&5
1107 echo "$as_me:   former value:  $ac_old_val" >&2;}
1108         { echo "$as_me:1108:   current value: $ac_new_val" >&5
1109 echo "$as_me:   current value: $ac_new_val" >&2;}
1110         ac_cache_corrupted=:
1111       fi;;
1112   esac
1113   # Pass precious variables to config.status.  It doesn't matter if
1114   # we pass some twice (in addition to the command line arguments).
1115   if test "$ac_new_set" = set; then
1116     case $ac_new_val in
1117     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1118       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1119       ac_configure_args="$ac_configure_args '$ac_arg'"
1120       ;;
1121     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1122        ;;
1123     esac
1124   fi
1125 done
1126 if $ac_cache_corrupted; then
1127   { echo "$as_me:1127: error: changes in the environment can compromise the build" >&5
1128 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1129   { { echo "$as_me:1129: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1130 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1131    { (exit 1); exit 1; }; }
1132 fi
1133
1134 ac_ext=c
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140
1141 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1142   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1143                    ECHO_T='     ' ;;
1144   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1145   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1146 esac
1147 echo "#! $SHELL" >conftest.sh
1148 echo  "exit 0"   >>conftest.sh
1149 chmod +x conftest.sh
1150 if { (echo "$as_me:1150: PATH=\".;.\"; conftest.sh") >&5
1151   (PATH=".;."; conftest.sh) 2>&5
1152   ac_status=$?
1153   echo "$as_me:1153: \$? = $ac_status" >&5
1154   (exit $ac_status); }; then
1155   ac_path_separator=';'
1156 else
1157   ac_path_separator=:
1158 fi
1159 PATH_SEPARATOR="$ac_path_separator"
1160 rm -f conftest.sh
1161
1162 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1163
1164 top_builddir=`pwd`
1165
1166 echo "$as_me:1166: checking for egrep" >&5
1167 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1168 if test "${ac_cv_prog_egrep+set}" = set; then
1169   echo $ECHO_N "(cached) $ECHO_C" >&6
1170 else
1171   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1172                 then ac_cv_prog_egrep='grep -E'
1173                 else ac_cv_prog_egrep='egrep'
1174         fi
1175 fi
1176 echo "$as_me:1176: result: $ac_cv_prog_egrep" >&5
1177 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1178         EGREP=$ac_cv_prog_egrep
1179
1180         test -z "$EGREP" && { { echo "$as_me:1180: error: No egrep program found" >&5
1181 echo "$as_me: error: No egrep program found" >&2;}
1182    { (exit 1); exit 1; }; }
1183
1184 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1187 cf_cv_abi_version=${NCURSES_MAJOR}
1188 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1189 cf_cv_timestamp=`date`
1190 echo "$as_me:1190: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1191 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1192
1193 if test -f $srcdir/VERSION ; then
1194         echo "$as_me:1194: checking for package version" >&5
1195 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1196
1197         # if there are not enough fields, cut returns the last one...
1198         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1199         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1200         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1201
1202         # this is how CF_BUNDLED_INTL uses $VERSION:
1203         VERSION="$cf_field1"
1204
1205         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1206         test -z "$VERSION_MAJOR" && { { echo "$as_me:1206: error: missing major-version" >&5
1207 echo "$as_me: error: missing major-version" >&2;}
1208    { (exit 1); exit 1; }; }
1209
1210         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1211         test -z "$VERSION_MINOR" && { { echo "$as_me:1211: error: missing minor-version" >&5
1212 echo "$as_me: error: missing minor-version" >&2;}
1213    { (exit 1); exit 1; }; }
1214
1215         echo "$as_me:1215: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1216 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1217
1218         echo "$as_me:1218: checking for package patch date" >&5
1219 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1220         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1221         case .$VERSION_PATCH in
1222         (.)
1223                 { { echo "$as_me:1223: error: missing patch-date $VERSION_PATCH" >&5
1224 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1225    { (exit 1); exit 1; }; }
1226                 ;;
1227         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1228                 ;;
1229         (*)
1230                 { { echo "$as_me:1230: error: illegal patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         esac
1235         echo "$as_me:1235: result: $VERSION_PATCH" >&5
1236 echo "${ECHO_T}$VERSION_PATCH" >&6
1237 else
1238         { { echo "$as_me:1238: error: did not find $srcdir/VERSION" >&5
1239 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1240    { (exit 1); exit 1; }; }
1241 fi
1242
1243 # show the actual data that we have for versions:
1244 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1245
1246 echo "${as_me:-configure}:1246: testing ABI VERSION $VERSION ..." 1>&5
1247
1248 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1249
1250 echo "${as_me:-configure}:1250: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1251
1252 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1253
1254 echo "${as_me:-configure}:1254: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1255
1256 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1257
1258 echo "${as_me:-configure}:1258: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1259
1260         cf_PACKAGE=NCURSES
1261         PACKAGE=ncurses
1262
1263 cat >>confdefs.h <<EOF
1264 #define PACKAGE "$PACKAGE"
1265 EOF
1266
1267 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1268
1269         cat >>confdefs.h <<EOF
1270 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1271 EOF
1272
1273         cat >>confdefs.h <<EOF
1274 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1275 EOF
1276
1277 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1278
1279 # Check whether --with-rel-version or --without-rel-version was given.
1280 if test "${with_rel_version+set}" = set; then
1281   withval="$with_rel_version"
1282   { echo "$as_me:1282: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1283 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1284  cf_cv_rel_version=$withval
1285 fi;
1286
1287  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1288  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1289
1290 if test -n "$NCURSES_MAJOR" ; then
1291   case $NCURSES_MAJOR in
1292   ([0-9]*)
1293         ;;
1294   (*)
1295         { { echo "$as_me:1295: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1296 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1297    { (exit 1); exit 1; }; }
1298         ;;
1299   esac
1300 else
1301   { { echo "$as_me:1301: error: Release major-version value is empty" >&5
1302 echo "$as_me: error: Release major-version value is empty" >&2;}
1303    { (exit 1); exit 1; }; }
1304 fi
1305
1306 if test -n "$NCURSES_MINOR" ; then
1307   case $NCURSES_MINOR in
1308   ([0-9]*)
1309         ;;
1310   (*)
1311         { { echo "$as_me:1311: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1312 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1313    { (exit 1); exit 1; }; }
1314         ;;
1315   esac
1316 else
1317   { { echo "$as_me:1317: error: Release minor-version value is empty" >&5
1318 echo "$as_me: error: Release minor-version value is empty" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1323
1324 # Check whether --with-abi-version or --without-abi-version was given.
1325 if test "${with_abi_version+set}" = set; then
1326   withval="$with_abi_version"
1327
1328         if test "x$cf_cv_abi_version" != "x$withval"
1329         then
1330                 { echo "$as_me:1330: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1331 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1332                 case $cf_cv_rel_version in
1333                 (5.*)
1334                         cf_cv_rel_version=$withval.0
1335                         ;;
1336                 (6.*)
1337                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1338                         ;;
1339                 esac
1340         fi
1341         cf_cv_abi_version=$withval
1342 fi;
1343
1344 if test -n "$cf_cv_abi_version" ; then
1345   case $cf_cv_abi_version in
1346   ([0-9]*)
1347         ;;
1348   (*)
1349         { { echo "$as_me:1349: error: ABI version is not a number: $cf_cv_abi_version" >&5
1350 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1351    { (exit 1); exit 1; }; }
1352         ;;
1353   esac
1354 else
1355   { { echo "$as_me:1355: error: ABI version value is empty" >&5
1356 echo "$as_me: error: ABI version value is empty" >&2;}
1357    { (exit 1); exit 1; }; }
1358 fi
1359
1360 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1361 then
1362         case $cf_cv_rel_version in
1363         (5.*)
1364                 cf_cv_rel_version=$with_abi_version.0
1365                 ;;
1366         esac
1367 fi
1368
1369 ac_aux_dir=
1370 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1371   if test -f $ac_dir/install-sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install-sh -c"
1374     break
1375   elif test -f $ac_dir/install.sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install.sh -c"
1378     break
1379   elif test -f $ac_dir/shtool; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/shtool install -c"
1382     break
1383   fi
1384 done
1385 if test -z "$ac_aux_dir"; then
1386   { { echo "$as_me:1386: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1387 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1388    { (exit 1); exit 1; }; }
1389 fi
1390 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394 # Make sure we can run config.sub.
1395 $ac_config_sub sun4 >/dev/null 2>&1 ||
1396   { { echo "$as_me:1396: error: cannot run $ac_config_sub" >&5
1397 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 echo "$as_me:1400: checking build system type" >&5
1401 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1402 if test "${ac_cv_build+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_build_alias=$build_alias
1406 test -z "$ac_cv_build_alias" &&
1407   ac_cv_build_alias=`$ac_config_guess`
1408 test -z "$ac_cv_build_alias" &&
1409   { { echo "$as_me:1409: error: cannot guess build type; you must specify one" >&5
1410 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1411    { (exit 1); exit 1; }; }
1412 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1413   { { echo "$as_me:1413: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1414 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1415    { (exit 1); exit 1; }; }
1416
1417 fi
1418 echo "$as_me:1418: result: $ac_cv_build" >&5
1419 echo "${ECHO_T}$ac_cv_build" >&6
1420 build=$ac_cv_build
1421 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1422 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1423 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1424
1425 echo "$as_me:1425: checking host system type" >&5
1426 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1427 if test "${ac_cv_host+set}" = set; then
1428   echo $ECHO_N "(cached) $ECHO_C" >&6
1429 else
1430   ac_cv_host_alias=$host_alias
1431 test -z "$ac_cv_host_alias" &&
1432   ac_cv_host_alias=$ac_cv_build_alias
1433 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1434   { { echo "$as_me:1434: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1435 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1436    { (exit 1); exit 1; }; }
1437
1438 fi
1439 echo "$as_me:1439: result: $ac_cv_host" >&5
1440 echo "${ECHO_T}$ac_cv_host" >&6
1441 host=$ac_cv_host
1442 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1447         echo "$as_me:1447: checking target system type" >&5
1448 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1449 if test "${ac_cv_target+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   ac_cv_target_alias=$target_alias
1453 test "x$ac_cv_target_alias" = "x" &&
1454   ac_cv_target_alias=$ac_cv_host_alias
1455 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1456   { { echo "$as_me:1456: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1457 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1458    { (exit 1); exit 1; }; }
1459
1460 fi
1461 echo "$as_me:1461: result: $ac_cv_target" >&5
1462 echo "${ECHO_T}$ac_cv_target" >&6
1463 target=$ac_cv_target
1464 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468 # The aliases save the names the user supplied, while $host etc.
1469 # will get canonicalized.
1470 test -n "$target_alias" &&
1471   test "$program_prefix$program_suffix$program_transform_name" = \
1472     NONENONEs,x,x, &&
1473   program_prefix=${target_alias}-
1474         system_name="$host_os"
1475 else
1476         system_name="`(uname -s -r) 2>/dev/null`"
1477         if test -z "$system_name" ; then
1478                 system_name="`(hostname) 2>/dev/null`"
1479         fi
1480 fi
1481 test -n "$system_name" &&
1482 cat >>confdefs.h <<EOF
1483 #define SYSTEM_NAME "$system_name"
1484 EOF
1485
1486 if test "${cf_cv_system_name+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   cf_cv_system_name="$system_name"
1490 fi
1491
1492 test -z "$system_name" && system_name="$cf_cv_system_name"
1493 test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5
1494 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1495
1496 if test ".$system_name" != ".$cf_cv_system_name" ; then
1497         echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1498 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1499         { { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5
1500 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1501    { (exit 1); exit 1; }; }
1502 fi
1503
1504 # Check whether --with-system-type or --without-system-type was given.
1505 if test "${with_system_type+set}" = set; then
1506   withval="$with_system_type"
1507   { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5
1508 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1509         cf_cv_system_name=$withval
1510         host_os=$withval
1511
1512 fi;
1513
1514 ###     Save the given $CFLAGS to allow user-override.
1515 cf_user_CFLAGS="$CFLAGS"
1516
1517 ###     Default install-location
1518
1519 echo "$as_me:1519: checking for prefix" >&5
1520 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1521 if test "x$prefix" = "xNONE" ; then
1522         case "$cf_cv_system_name" in
1523                 # non-vendor systems don't have a conflict
1524         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1525                 prefix=/usr
1526                 ;;
1527         (*)     prefix=$ac_default_prefix
1528                 ;;
1529         esac
1530 fi
1531 echo "$as_me:1531: result: $prefix" >&5
1532 echo "${ECHO_T}$prefix" >&6
1533
1534 if test "x$prefix" = "xNONE" ; then
1535 echo "$as_me:1535: checking for default include-directory" >&5
1536 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1537 test -n "$verbose" && echo 1>&6
1538 for cf_symbol in \
1539         $includedir \
1540         $includedir/ncurses \
1541         $prefix/include \
1542         $prefix/include/ncurses \
1543         /usr/local/include \
1544         /usr/local/include/ncurses \
1545         /usr/include \
1546         /usr/include/ncurses
1547 do
1548         cf_dir=`eval echo $cf_symbol`
1549         if test -f $cf_dir/curses.h ; then
1550         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1551                 includedir="$cf_symbol"
1552                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1553                 break
1554         fi
1555         fi
1556         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1557 done
1558 echo "$as_me:1558: result: $includedir" >&5
1559 echo "${ECHO_T}$includedir" >&6
1560 fi
1561
1562 ### Defaults for ncurses ABI
1563
1564 case x$cf_cv_abi_version in
1565 (x[6789])
1566         cf_dft_ext_colors=yes
1567         cf_dft_ext_const=yes
1568         cf_dft_ext_mouse=yes
1569         cf_dft_ext_putwin=yes
1570         cf_dft_ext_spfuncs=yes
1571         cf_dft_filter_syms=yes
1572         cf_dft_chtype=uint32_t
1573         cf_dft_mmask_t=uint32_t
1574         cf_dft_interop=yes
1575         cf_dft_tparm_arg=intptr_t
1576         cf_dft_with_lp64=yes
1577         ;;
1578 (*)
1579         cf_dft_ext_colors=no
1580         cf_dft_ext_const=no
1581         cf_dft_ext_mouse=no
1582         cf_dft_ext_putwin=no
1583         cf_dft_ext_spfuncs=no
1584         cf_dft_filter_syms=no
1585         cf_dft_chtype=auto
1586         cf_dft_mmask_t=auto
1587         cf_dft_interop=no
1588         cf_dft_tparm_arg=long
1589         cf_dft_with_lp64=no
1590         ;;
1591 esac
1592
1593 ###     Checks for programs.
1594
1595 # Check whether --with-ada or --without-ada was given.
1596 if test "${with_ada+set}" = set; then
1597   withval="$with_ada"
1598   cf_with_ada=$withval
1599 else
1600   cf_with_ada=yes
1601 fi;
1602
1603 if test "x$cf_with_ada" = xyes
1604 then
1605         cf_prog_cc="gnatgcc gcc cc"
1606 else
1607         cf_prog_cc="gcc cc"
1608 fi
1609
1610 ac_ext=c
1611 ac_cpp='$CPP $CPPFLAGS'
1612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1615 ac_main_return=return
1616 if test -n "$ac_tool_prefix"; then
1617   for ac_prog in $cf_prog_cc
1618   do
1619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621 echo "$as_me:1621: checking for $ac_word" >&5
1622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623 if test "${ac_cv_prog_CC+set}" = set; then
1624   echo $ECHO_N "(cached) $ECHO_C" >&6
1625 else
1626   if test -n "$CC"; then
1627   ac_cv_prog_CC="$CC" # Let the user override the test.
1628 else
1629   ac_save_IFS=$IFS; IFS=$ac_path_separator
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632   IFS=$ac_save_IFS
1633   test -z "$ac_dir" && ac_dir=.
1634   $as_executable_p "$ac_dir/$ac_word" || continue
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637 break
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:1644: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:1647: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651     test -n "$CC" && break
1652   done
1653 fi
1654 if test -z "$CC"; then
1655   ac_ct_CC=$CC
1656   for ac_prog in $cf_prog_cc
1657 do
1658   # Extract the first word of "$ac_prog", so it can be a program name with args.
1659 set dummy $ac_prog; ac_word=$2
1660 echo "$as_me:1660: checking for $ac_word" >&5
1661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663   echo $ECHO_N "(cached) $ECHO_C" >&6
1664 else
1665   if test -n "$ac_ct_CC"; then
1666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667 else
1668   ac_save_IFS=$IFS; IFS=$ac_path_separator
1669 ac_dummy="$PATH"
1670 for ac_dir in $ac_dummy; do
1671   IFS=$ac_save_IFS
1672   test -z "$ac_dir" && ac_dir=.
1673   $as_executable_p "$ac_dir/$ac_word" || continue
1674 ac_cv_prog_ac_ct_CC="$ac_prog"
1675 echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676 break
1677 done
1678
1679 fi
1680 fi
1681 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682 if test -n "$ac_ct_CC"; then
1683   echo "$as_me:1683: result: $ac_ct_CC" >&5
1684 echo "${ECHO_T}$ac_ct_CC" >&6
1685 else
1686   echo "$as_me:1686: result: no" >&5
1687 echo "${ECHO_T}no" >&6
1688 fi
1689
1690   test -n "$ac_ct_CC" && break
1691 done
1692
1693   CC=$ac_ct_CC
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main (void)
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main (void)
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main (void)
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main (void)
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main (void)
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main (void)
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         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.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 INTEL_COMPILER=no
2115
2116 if test "$GCC" = yes ; then
2117         case $host_os in
2118         (linux*|gnu*)
2119                 echo "$as_me:2119: checking if this is really Intel C compiler" >&5
2120 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2121                 cf_save_CFLAGS="$CFLAGS"
2122                 CFLAGS="$CFLAGS -no-gcc"
2123                 cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126
2127 int
2128 main (void)
2129 {
2130
2131 #ifdef __INTEL_COMPILER
2132 #else
2133 make an error
2134 #endif
2135
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 rm -f conftest.$ac_objext
2141 if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
2142   (eval $ac_compile) 2>&5
2143   ac_status=$?
2144   echo "$as_me:2144: \$? = $ac_status" >&5
2145   (exit $ac_status); } &&
2146          { ac_try='test -s conftest.$ac_objext'
2147   { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); }; }; then
2152   INTEL_COMPILER=yes
2153 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2154
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 cat conftest.$ac_ext >&5
2158 fi
2159 rm -f conftest.$ac_objext conftest.$ac_ext
2160                 CFLAGS="$cf_save_CFLAGS"
2161                 echo "$as_me:2161: result: $INTEL_COMPILER" >&5
2162 echo "${ECHO_T}$INTEL_COMPILER" >&6
2163                 ;;
2164         esac
2165 fi
2166
2167 CLANG_COMPILER=no
2168
2169 if test "$GCC" = yes ; then
2170         echo "$as_me:2170: checking if this is really Clang C compiler" >&5
2171 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2172         cf_save_CFLAGS="$CFLAGS"
2173         CFLAGS="$CFLAGS -Qunused-arguments"
2174         cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177
2178 int
2179 main (void)
2180 {
2181
2182 #ifdef __clang__
2183 #else
2184 make an error
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:2195: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   CLANG_COMPILER=yes
2204 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2205
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211         CFLAGS="$cf_save_CFLAGS"
2212         echo "$as_me:2212: result: $CLANG_COMPILER" >&5
2213 echo "${ECHO_T}$CLANG_COMPILER" >&6
2214 fi
2215
2216 echo "$as_me:2216: checking for $CC option to accept ANSI C" >&5
2217 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2218 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2219   echo $ECHO_N "(cached) $ECHO_C" >&6
2220 else
2221   ac_cv_prog_cc_stdc=no
2222 ac_save_CC=$CC
2223 cat >conftest.$ac_ext <<_ACEOF
2224 #line 2224 "configure"
2225 #include "confdefs.h"
2226 #include <stdarg.h>
2227 #include <stdio.h>
2228 #include <sys/types.h>
2229 #include <sys/stat.h>
2230 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2231 struct buf { int x; };
2232 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2233 static char *e (p, i)
2234      char **p;
2235      int i;
2236 {
2237   return p[i];
2238 }
2239 static char *f (char * (*g) (char **, int), char **p, ...)
2240 {
2241   char *s;
2242   va_list v;
2243   va_start (v,p);
2244   s = g (p, va_arg (v,int));
2245   va_end (v);
2246   return s;
2247 }
2248 int test (int i, double x);
2249 struct s1 {int (*f) (int a);};
2250 struct s2 {int (*f) (double a);};
2251 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2252 int argc;
2253 char **argv;
2254 int
2255 main (void)
2256 {
2257 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 # Don't try gcc -ansi; that turns off useful extensions and
2263 # breaks some systems' header files.
2264 # AIX                   -qlanglvl=ansi
2265 # Ultrix and OSF/1      -std1
2266 # HP-UX 10.20 and later -Ae
2267 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2268 # SVR4                  -Xc -D__EXTENSIONS__
2269 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2270 do
2271   CC="$ac_save_CC $ac_arg"
2272   rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:2273: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>&5
2275   ac_status=$?
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } &&
2278          { ac_try='test -s conftest.$ac_objext'
2279   { (eval echo "$as_me:2279: \"$ac_try\"") >&5
2280   (eval $ac_try) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); }; }; then
2284   ac_cv_prog_cc_stdc=$ac_arg
2285 break
2286 else
2287   echo "$as_me: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
2289 fi
2290 rm -f conftest.$ac_objext
2291 done
2292 rm -f conftest.$ac_ext conftest.$ac_objext
2293 CC=$ac_save_CC
2294
2295 fi
2296
2297 case "x$ac_cv_prog_cc_stdc" in
2298   x|xno)
2299     echo "$as_me:2299: result: none needed" >&5
2300 echo "${ECHO_T}none needed" >&6 ;;
2301   *)
2302     echo "$as_me:2302: result: $ac_cv_prog_cc_stdc" >&5
2303 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2304     CC="$CC $ac_cv_prog_cc_stdc" ;;
2305 esac
2306
2307 # This should have been defined by AC_PROG_CC
2308 : ${CC:=cc}
2309
2310 echo "$as_me:2310: checking \$CFLAGS variable" >&5
2311 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2312 case "x$CFLAGS" in
2313 (*-[IUD]*)
2314         echo "$as_me:2314: result: broken" >&5
2315 echo "${ECHO_T}broken" >&6
2316         { echo "$as_me:2316: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2317 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2318         cf_flags="$CFLAGS"
2319         CFLAGS=
2320         for cf_arg in $cf_flags
2321         do
2322
2323 cf_fix_cppflags=no
2324 cf_new_cflags=
2325 cf_new_cppflags=
2326 cf_new_extra_cppflags=
2327
2328 for cf_add_cflags in $cf_arg
2329 do
2330 case $cf_fix_cppflags in
2331 (no)
2332         case $cf_add_cflags in
2333         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2334                 case $cf_add_cflags in
2335                 (-D*)
2336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2337
2338                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339                                 && test -z "${cf_tst_cflags}" \
2340                                 && cf_fix_cppflags=yes
2341
2342                         if test $cf_fix_cppflags = yes ; then
2343
2344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2346
2347                                 continue
2348                         elif test "${cf_tst_cflags}" = "\"'" ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 (*$cf_add_cflags)
2359                         ;;
2360                 (*)
2361                         case $cf_add_cflags in
2362                         (-D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371
2372         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2373         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2374
2375                         ;;
2376                 esac
2377                 ;;
2378         (*)
2379
2380         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2381         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2382
2383                 ;;
2384         esac
2385         ;;
2386 (yes)
2387
2388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2392
2393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2394                 && test -z "${cf_tst_cflags}" \
2395                 && cf_fix_cppflags=no
2396         ;;
2397 esac
2398 done
2399
2400 if test -n "$cf_new_cflags" ; then
2401
2402         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2403         CFLAGS="${CFLAGS}$cf_new_cflags"
2404
2405 fi
2406
2407 if test -n "$cf_new_cppflags" ; then
2408
2409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2410         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2411
2412 fi
2413
2414 if test -n "$cf_new_extra_cppflags" ; then
2415
2416         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2417         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2418
2419 fi
2420
2421         done
2422         ;;
2423 (*)
2424         echo "$as_me:2424: result: ok" >&5
2425 echo "${ECHO_T}ok" >&6
2426         ;;
2427 esac
2428
2429 echo "$as_me:2429: checking \$CC variable" >&5
2430 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2431 case "$CC" in
2432 (*[\ \  ]-*)
2433         echo "$as_me:2433: result: broken" >&5
2434 echo "${ECHO_T}broken" >&6
2435         { echo "$as_me:2435: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2436 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2437         # humor him...
2438         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2439         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2440         CC="$cf_prog"
2441         for cf_arg in $cf_flags
2442         do
2443                 case "x$cf_arg" in
2444                 (x-[IUDfgOW]*)
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 (no)
2455         case $cf_add_cflags in
2456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2457                 case $cf_add_cflags in
2458                 (-D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466
2467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2469
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         fi
2478                         ;;
2479                 esac
2480                 case "$CPPFLAGS" in
2481                 (*$cf_add_cflags)
2482                         ;;
2483                 (*)
2484                         case $cf_add_cflags in
2485                         (-D*)
2486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2487
2488 CPPFLAGS=`echo "$CPPFLAGS" | \
2489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2491
2492                                 ;;
2493                         esac
2494
2495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2497
2498                         ;;
2499                 esac
2500                 ;;
2501         (*)
2502
2503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2505
2506                 ;;
2507         esac
2508         ;;
2509 (yes)
2510
2511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2513
2514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2515
2516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2517                 && test -z "${cf_tst_cflags}" \
2518                 && cf_fix_cppflags=no
2519         ;;
2520 esac
2521 done
2522
2523 if test -n "$cf_new_cflags" ; then
2524
2525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2526         CFLAGS="${CFLAGS}$cf_new_cflags"
2527
2528 fi
2529
2530 if test -n "$cf_new_cppflags" ; then
2531
2532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2534
2535 fi
2536
2537 if test -n "$cf_new_extra_cppflags" ; then
2538
2539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2541
2542 fi
2543
2544                         ;;
2545                 (*)
2546                         CC="$CC $cf_arg"
2547                         ;;
2548                 esac
2549         done
2550         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2551
2552 echo "${as_me:-configure}:2552: testing resulting CC: '$CC' ..." 1>&5
2553
2554         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2555
2556 echo "${as_me:-configure}:2556: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2557
2558         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2559
2560 echo "${as_me:-configure}:2560: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2561
2562         ;;
2563 (*)
2564         echo "$as_me:2564: result: ok" >&5
2565 echo "${ECHO_T}ok" >&6
2566         ;;
2567 esac
2568
2569 ac_ext=c
2570 ac_cpp='$CPP $CPPFLAGS'
2571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574 ac_main_return=return
2575 echo "$as_me:2575: checking how to run the C preprocessor" >&5
2576 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2577 # On Suns, sometimes $CPP names a directory.
2578 if test -n "$CPP" && test -d "$CPP"; then
2579   CPP=
2580 fi
2581 if test -z "$CPP"; then
2582   if test "${ac_cv_prog_CPP+set}" = set; then
2583   echo $ECHO_N "(cached) $ECHO_C" >&6
2584 else
2585       # Double quotes because CPP needs to be expanded
2586     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2587     do
2588       ac_preproc_ok=false
2589 for ac_c_preproc_warn_flag in '' yes
2590 do
2591   # Use a header file that comes with gcc, so configuring glibc
2592   # with a fresh cross-compiler works.
2593   # On the NeXT, cc -E runs the code through the compiler's parser,
2594   # not just through cpp. "Syntax error" is here to catch this case.
2595   cat >conftest.$ac_ext <<_ACEOF
2596 #line 2596 "configure"
2597 #include "confdefs.h"
2598 #include <assert.h>
2599                      Syntax error
2600 _ACEOF
2601 if { (eval echo "$as_me:2601: \"$ac_cpp conftest.$ac_ext\"") >&5
2602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2603   ac_status=$?
2604   egrep -v '^ *\+' conftest.er1 >conftest.err
2605   rm -f conftest.er1
2606   cat conftest.err >&5
2607   echo "$as_me:2607: \$? = $ac_status" >&5
2608   (exit $ac_status); } >/dev/null; then
2609   if test -s conftest.err; then
2610     ac_cpp_err=$ac_c_preproc_warn_flag
2611   else
2612     ac_cpp_err=
2613   fi
2614 else
2615   ac_cpp_err=yes
2616 fi
2617 if test -z "$ac_cpp_err"; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   # Broken: fails on valid input.
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_ext
2626
2627   # OK, works on sane cases.  Now check whether non-existent headers
2628   # can be detected and how.
2629   cat >conftest.$ac_ext <<_ACEOF
2630 #line 2630 "configure"
2631 #include "confdefs.h"
2632 #include <ac_nonexistent.h>
2633 _ACEOF
2634 if { (eval echo "$as_me:2634: \"$ac_cpp conftest.$ac_ext\"") >&5
2635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2636   ac_status=$?
2637   egrep -v '^ *\+' conftest.er1 >conftest.err
2638   rm -f conftest.er1
2639   cat conftest.err >&5
2640   echo "$as_me:2640: \$? = $ac_status" >&5
2641   (exit $ac_status); } >/dev/null; then
2642   if test -s conftest.err; then
2643     ac_cpp_err=$ac_c_preproc_warn_flag
2644   else
2645     ac_cpp_err=
2646   fi
2647 else
2648   ac_cpp_err=yes
2649 fi
2650 if test -z "$ac_cpp_err"; then
2651   # Broken: success on invalid input.
2652 continue
2653 else
2654   echo "$as_me: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   # Passes both tests.
2657 ac_preproc_ok=:
2658 break
2659 fi
2660 rm -f conftest.err conftest.$ac_ext
2661
2662 done
2663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2664 rm -f conftest.err conftest.$ac_ext
2665 if $ac_preproc_ok; then
2666   break
2667 fi
2668
2669     done
2670     ac_cv_prog_CPP=$CPP
2671
2672 fi
2673   CPP=$ac_cv_prog_CPP
2674 else
2675   ac_cv_prog_CPP=$CPP
2676 fi
2677 echo "$as_me:2677: result: $CPP" >&5
2678 echo "${ECHO_T}$CPP" >&6
2679 ac_preproc_ok=false
2680 for ac_c_preproc_warn_flag in '' yes
2681 do
2682   # Use a header file that comes with gcc, so configuring glibc
2683   # with a fresh cross-compiler works.
2684   # On the NeXT, cc -E runs the code through the compiler's parser,
2685   # not just through cpp. "Syntax error" is here to catch this case.
2686   cat >conftest.$ac_ext <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689 #include <assert.h>
2690                      Syntax error
2691 _ACEOF
2692 if { (eval echo "$as_me:2692: \"$ac_cpp conftest.$ac_ext\"") >&5
2693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694   ac_status=$?
2695   egrep -v '^ *\+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:2698: \$? = $ac_status" >&5
2699   (exit $ac_status); } >/dev/null; then
2700   if test -s conftest.err; then
2701     ac_cpp_err=$ac_c_preproc_warn_flag
2702   else
2703     ac_cpp_err=
2704   fi
2705 else
2706   ac_cpp_err=yes
2707 fi
2708 if test -z "$ac_cpp_err"; then
2709   :
2710 else
2711   echo "$as_me: failed program was:" >&5
2712   cat conftest.$ac_ext >&5
2713   # Broken: fails on valid input.
2714 continue
2715 fi
2716 rm -f conftest.err conftest.$ac_ext
2717
2718   # OK, works on sane cases.  Now check whether non-existent headers
2719   # can be detected and how.
2720   cat >conftest.$ac_ext <<_ACEOF
2721 #line 2721 "configure"
2722 #include "confdefs.h"
2723 #include <ac_nonexistent.h>
2724 _ACEOF
2725 if { (eval echo "$as_me:2725: \"$ac_cpp conftest.$ac_ext\"") >&5
2726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2727   ac_status=$?
2728   egrep -v '^ *\+' conftest.er1 >conftest.err
2729   rm -f conftest.er1
2730   cat conftest.err >&5
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); } >/dev/null; then
2733   if test -s conftest.err; then
2734     ac_cpp_err=$ac_c_preproc_warn_flag
2735   else
2736     ac_cpp_err=
2737   fi
2738 else
2739   ac_cpp_err=yes
2740 fi
2741 if test -z "$ac_cpp_err"; then
2742   # Broken: success on invalid input.
2743 continue
2744 else
2745   echo "$as_me: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   # Passes both tests.
2748 ac_preproc_ok=:
2749 break
2750 fi
2751 rm -f conftest.err conftest.$ac_ext
2752
2753 done
2754 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2755 rm -f conftest.err conftest.$ac_ext
2756 if $ac_preproc_ok; then
2757   :
2758 else
2759   { { echo "$as_me:2759: error: C preprocessor \"$CPP\" fails sanity check" >&5
2760 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2761    { (exit 1); exit 1; }; }
2762 fi
2763
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769 ac_main_return=return
2770
2771 if test $ac_cv_c_compiler_gnu = yes; then
2772     echo "$as_me:2772: checking whether $CC needs -traditional" >&5
2773 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2774 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777     ac_pattern="Autoconf.*'x'"
2778   cat >conftest.$ac_ext <<_ACEOF
2779 #line 2779 "configure"
2780 #include "confdefs.h"
2781 #include <sgtty.h>
2782 int Autoconf = TIOCGETP;
2783 _ACEOF
2784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2785   egrep "$ac_pattern" >/dev/null 2>&1; then
2786   ac_cv_prog_gcc_traditional=yes
2787 else
2788   ac_cv_prog_gcc_traditional=no
2789 fi
2790 rm -rf conftest*
2791
2792   if test $ac_cv_prog_gcc_traditional = no; then
2793     cat >conftest.$ac_ext <<_ACEOF
2794 #line 2794 "configure"
2795 #include "confdefs.h"
2796 #include <termio.h>
2797 int Autoconf = TCGETA;
2798 _ACEOF
2799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2800   egrep "$ac_pattern" >/dev/null 2>&1; then
2801   ac_cv_prog_gcc_traditional=yes
2802 fi
2803 rm -rf conftest*
2804
2805   fi
2806 fi
2807 echo "$as_me:2807: result: $ac_cv_prog_gcc_traditional" >&5
2808 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2809   if test $ac_cv_prog_gcc_traditional = yes; then
2810     CC="$CC -traditional"
2811   fi
2812 fi
2813
2814 echo "$as_me:2814: checking whether $CC understands -c and -o together" >&5
2815 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2816 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 cat > conftest.$ac_ext <<CF_EOF
2821 int main(void)
2822 {
2823         ${cf_cv_main_return:-return}(0);
2824 }
2825 CF_EOF
2826 # We do the test twice because some compilers refuse to overwrite an
2827 # existing .o file with -o, though they will create one.
2828 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2829 if { (eval echo "$as_me:2829: \"$ac_try\"") >&5
2830   (eval $ac_try) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); } &&
2834   test -f conftest2.$ac_objext && { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835   (eval $ac_try) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); };
2839 then
2840   eval cf_cv_prog_CC_c_o=yes
2841 else
2842   eval cf_cv_prog_CC_c_o=no
2843 fi
2844 rm -rf conftest*
2845
2846 fi
2847 if test $cf_cv_prog_CC_c_o = yes; then
2848   echo "$as_me:2848: result: yes" >&5
2849 echo "${ECHO_T}yes" >&6
2850 else
2851   echo "$as_me:2851: result: no" >&5
2852 echo "${ECHO_T}no" >&6
2853 fi
2854
2855 if test "$cross_compiling" = yes ; then
2856         LDCONFIG=:
2857 else
2858         case "$cf_cv_system_name" in
2859         (dragonfly*|mirbsd*|freebsd*)
2860                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2861                 ;;
2862         (*) LDPATH=$PATH:/sbin:/usr/sbin
2863                 # Extract the first word of "ldconfig", so it can be a program name with args.
2864 set dummy ldconfig; ac_word=$2
2865 echo "$as_me:2865: checking for $ac_word" >&5
2866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2867 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   case $LDCONFIG in
2871   [\\/]* | ?:[\\/]*)
2872   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2873   ;;
2874   *)
2875   ac_save_IFS=$IFS; IFS=$ac_path_separator
2876 ac_dummy="$LDPATH"
2877 for ac_dir in $ac_dummy; do
2878   IFS=$ac_save_IFS
2879   test -z "$ac_dir" && ac_dir=.
2880   if $as_executable_p "$ac_dir/$ac_word"; then
2881    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2882    echo "$as_me:2882: found $ac_dir/$ac_word" >&5
2883    break
2884 fi
2885 done
2886
2887   ;;
2888 esac
2889 fi
2890 LDCONFIG=$ac_cv_path_LDCONFIG
2891
2892 if test -n "$LDCONFIG"; then
2893   echo "$as_me:2893: result: $LDCONFIG" >&5
2894 echo "${ECHO_T}$LDCONFIG" >&6
2895 else
2896   echo "$as_me:2896: result: no" >&5
2897 echo "${ECHO_T}no" >&6
2898 fi
2899
2900                 ;;
2901         esac
2902 fi
2903
2904 echo "$as_me:2904: checking if you want to ensure bool is consistent with C++" >&5
2905 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2906
2907 # Check whether --with-cxx or --without-cxx was given.
2908 if test "${with_cxx+set}" = set; then
2909   withval="$with_cxx"
2910   cf_with_cxx=$withval
2911 else
2912   cf_with_cxx=yes
2913 fi;
2914 echo "$as_me:2914: result: $cf_with_cxx" >&5
2915 echo "${ECHO_T}$cf_with_cxx" >&6
2916 if test "X$cf_with_cxx" = Xno ; then
2917         CXX=""
2918         GXX=""
2919 else
2920         # with autoconf 2.13, we can change the error to a warning:
2921                 ac_ext=cc
2922 ac_cpp='$CXXCPP $CPPFLAGS'
2923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2926 ac_main_return=return
2927 if test -n "$ac_tool_prefix"; then
2928   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2929   do
2930     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932 echo "$as_me:2932: checking for $ac_word" >&5
2933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934 if test "${ac_cv_prog_CXX+set}" = set; then
2935   echo $ECHO_N "(cached) $ECHO_C" >&6
2936 else
2937   if test -n "$CXX"; then
2938   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2939 else
2940   ac_save_IFS=$IFS; IFS=$ac_path_separator
2941 ac_dummy="$PATH"
2942 for ac_dir in $ac_dummy; do
2943   IFS=$ac_save_IFS
2944   test -z "$ac_dir" && ac_dir=.
2945   $as_executable_p "$ac_dir/$ac_word" || continue
2946 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2947 echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2948 break
2949 done
2950
2951 fi
2952 fi
2953 CXX=$ac_cv_prog_CXX
2954 if test -n "$CXX"; then
2955   echo "$as_me:2955: result: $CXX" >&5
2956 echo "${ECHO_T}$CXX" >&6
2957 else
2958   echo "$as_me:2958: result: no" >&5
2959 echo "${ECHO_T}no" >&6
2960 fi
2961
2962     test -n "$CXX" && break
2963   done
2964 fi
2965 if test -z "$CXX"; then
2966   ac_ct_CXX=$CXX
2967   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2968 do
2969   # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo "$as_me:2971: checking for $ac_word" >&5
2972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   if test -n "$ac_ct_CXX"; then
2977   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2978 else
2979   ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 ac_dummy="$PATH"
2981 for ac_dir in $ac_dummy; do
2982   IFS=$ac_save_IFS
2983   test -z "$ac_dir" && ac_dir=.
2984   $as_executable_p "$ac_dir/$ac_word" || continue
2985 ac_cv_prog_ac_ct_CXX="$ac_prog"
2986 echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987 break
2988 done
2989
2990 fi
2991 fi
2992 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2993 if test -n "$ac_ct_CXX"; then
2994   echo "$as_me:2994: result: $ac_ct_CXX" >&5
2995 echo "${ECHO_T}$ac_ct_CXX" >&6
2996 else
2997   echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999 fi
3000
3001   test -n "$ac_ct_CXX" && break
3002 done
3003 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3004
3005   CXX=$ac_ct_CXX
3006 fi
3007
3008 # Provide some information about the compiler.
3009 echo "$as_me:3009:" \
3010      "checking for C++ compiler version" >&5
3011 ac_compiler=`set X $ac_compile; echo $2`
3012 { (eval echo "$as_me:3012: \"$ac_compiler --version </dev/null >&5\"") >&5
3013   (eval $ac_compiler --version </dev/null >&5) 2>&5
3014   ac_status=$?
3015   echo "$as_me:3015: \$? = $ac_status" >&5
3016   (exit $ac_status); }
3017 { (eval echo "$as_me:3017: \"$ac_compiler -v </dev/null >&5\"") >&5
3018   (eval $ac_compiler -v </dev/null >&5) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }
3022 { (eval echo "$as_me:3022: \"$ac_compiler -V </dev/null >&5\"") >&5
3023   (eval $ac_compiler -V </dev/null >&5) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }
3027
3028 echo "$as_me:3028: checking whether we are using the GNU C++ compiler" >&5
3029 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3030 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036
3037 int
3038 main (void)
3039 {
3040 #ifndef __GNUC__
3041        choke me
3042 #endif
3043
3044   ;
3045   return 0;
3046 }
3047 _ACEOF
3048 rm -f conftest.$ac_objext
3049 if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050   (eval $ac_compile) 2>&5
3051   ac_status=$?
3052   echo "$as_me:3052: \$? = $ac_status" >&5
3053   (exit $ac_status); } &&
3054          { ac_try='test -s conftest.$ac_objext'
3055   { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3056   (eval $ac_try) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); }; }; then
3060   ac_compiler_gnu=yes
3061 else
3062   echo "$as_me: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 ac_compiler_gnu=no
3065 fi
3066 rm -f conftest.$ac_objext conftest.$ac_ext
3067 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3068
3069 fi
3070 echo "$as_me:3070: result: $ac_cv_cxx_compiler_gnu" >&5
3071 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3072 GXX=`test $ac_compiler_gnu = yes && echo yes`
3073 ac_test_CXXFLAGS=${CXXFLAGS+set}
3074 ac_save_CXXFLAGS=$CXXFLAGS
3075 CXXFLAGS="-g"
3076 echo "$as_me:3076: checking whether $CXX accepts -g" >&5
3077 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3078 if test "${ac_cv_prog_cxx_g+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   cat >conftest.$ac_ext <<_ACEOF
3082 #line 3082 "configure"
3083 #include "confdefs.h"
3084
3085 int
3086 main (void)
3087 {
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 rm -f conftest.$ac_objext
3094 if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095   (eval $ac_compile) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); } &&
3099          { ac_try='test -s conftest.$ac_objext'
3100   { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101   (eval $ac_try) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); }; }; then
3105   ac_cv_prog_cxx_g=yes
3106 else
3107   echo "$as_me: failed program was:" >&5
3108 cat conftest.$ac_ext >&5
3109 ac_cv_prog_cxx_g=no
3110 fi
3111 rm -f conftest.$ac_objext conftest.$ac_ext
3112 fi
3113 echo "$as_me:3113: result: $ac_cv_prog_cxx_g" >&5
3114 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3115 if test "$ac_test_CXXFLAGS" = set; then
3116   CXXFLAGS=$ac_save_CXXFLAGS
3117 elif test $ac_cv_prog_cxx_g = yes; then
3118   if test "$GXX" = yes; then
3119     CXXFLAGS="-g -O2"
3120   else
3121     CXXFLAGS="-g"
3122   fi
3123 else
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-O2"
3126   else
3127     CXXFLAGS=
3128   fi
3129 fi
3130 for ac_declaration in \
3131    ''\
3132    '#include <stdlib.h>' \
3133    'extern "C" void std::exit (int) throw (); using std::exit;' \
3134    'extern "C" void std::exit (int); using std::exit;' \
3135    'extern "C" void exit (int) throw ();' \
3136    'extern "C" void exit (int);' \
3137    'void exit (int);'
3138 do
3139   cat >conftest.$ac_ext <<_ACEOF
3140 #line 3140 "configure"
3141 #include "confdefs.h"
3142 #include <stdlib.h>
3143 $ac_declaration
3144 int
3145 main (void)
3146 {
3147 exit (42);
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 rm -f conftest.$ac_objext
3153 if { (eval echo "$as_me:3153: \"$ac_compile\"") >&5
3154   (eval $ac_compile) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); } &&
3158          { ac_try='test -s conftest.$ac_objext'
3159   { (eval echo "$as_me:3159: \"$ac_try\"") >&5
3160   (eval $ac_try) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); }; }; then
3164   :
3165 else
3166   echo "$as_me: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3168 continue
3169 fi
3170 rm -f conftest.$ac_objext conftest.$ac_ext
3171   cat >conftest.$ac_ext <<_ACEOF
3172 #line 3172 "configure"
3173 #include "confdefs.h"
3174 $ac_declaration
3175 int
3176 main (void)
3177 {
3178 exit (42);
3179   ;
3180   return 0;
3181 }
3182 _ACEOF
3183 rm -f conftest.$ac_objext
3184 if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185   (eval $ac_compile) 2>&5
3186   ac_status=$?
3187   echo "$as_me:3187: \$? = $ac_status" >&5
3188   (exit $ac_status); } &&
3189          { ac_try='test -s conftest.$ac_objext'
3190   { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191   (eval $ac_try) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); }; }; then
3195   break
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 fi
3200 rm -f conftest.$ac_objext conftest.$ac_ext
3201 done
3202 rm -rf conftest*
3203 if test -n "$ac_declaration"; then
3204   echo '#ifdef __cplusplus' >>confdefs.h
3205   echo $ac_declaration      >>confdefs.h
3206   echo '#endif'             >>confdefs.h
3207 fi
3208
3209 ac_ext=c
3210 ac_cpp='$CPP $CPPFLAGS'
3211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214 ac_main_return=return
3215
3216         ac_ext=cc
3217 ac_cpp='$CXXCPP $CPPFLAGS'
3218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3221 ac_main_return=return
3222
3223         if test "x$cf_with_cxx" != xno
3224         then
3225                 # Several of the C++ configurations do not work, particularly when
3226                 # cross-compiling (20140913 -TD)
3227                 echo "$as_me:3227: checking if $CXX works" >&5
3228 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3229
3230                 save_CPPFLAGS="$CPPFLAGS"
3231                 eval cf_includedir=${includedir}
3232                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3233
3234 cat >conftest.$ac_ext <<_ACEOF
3235 #line 3235 "configure"
3236 #include "confdefs.h"
3237
3238 #include <stdlib.h>
3239 #include <stdio.h>
3240
3241 int
3242 main (void)
3243 {
3244
3245                 printf("Hello world!\n")
3246
3247   ;
3248   return 0;
3249 }
3250 _ACEOF
3251 rm -f conftest.$ac_objext
3252 if { (eval echo "$as_me:3252: \"$ac_compile\"") >&5
3253   (eval $ac_compile) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); } &&
3257          { ac_try='test -s conftest.$ac_objext'
3258   { (eval echo "$as_me:3258: \"$ac_try\"") >&5
3259   (eval $ac_try) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); }; }; then
3263   cf_cxx_works=yes
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 cat conftest.$ac_ext >&5
3267 cf_cxx_works=no
3268 fi
3269 rm -f conftest.$ac_objext conftest.$ac_ext
3270                 CPPFLAGS="$save_CPPFLAGS"
3271
3272                 echo "$as_me:3272: result: $cf_cxx_works" >&5
3273 echo "${ECHO_T}$cf_cxx_works" >&6
3274                 if test "x$cf_cxx_works" = xno
3275                 then
3276                         { echo "$as_me:3276: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3277 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3278                         cf_with_cxx=no; CXX=""; GXX="";
3279                 fi
3280         fi
3281         ac_ext=c
3282 ac_cpp='$CPP $CPPFLAGS'
3283 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3286 ac_main_return=return
3287
3288         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3289         if test "$CXX" = "g++" ; then
3290                 # Extract the first word of "g++", so it can be a program name with args.
3291 set dummy g++; ac_word=$2
3292 echo "$as_me:3292: checking for $ac_word" >&5
3293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294 if test "${ac_cv_path_CXX+set}" = set; then
3295   echo $ECHO_N "(cached) $ECHO_C" >&6
3296 else
3297   case $CXX in
3298   [\\/]* | ?:[\\/]*)
3299   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300   ;;
3301   *)
3302   ac_save_IFS=$IFS; IFS=$ac_path_separator
3303 ac_dummy="$PATH"
3304 for ac_dir in $ac_dummy; do
3305   IFS=$ac_save_IFS
3306   test -z "$ac_dir" && ac_dir=.
3307   if $as_executable_p "$ac_dir/$ac_word"; then
3308    ac_cv_path_CXX="$ac_dir/$ac_word"
3309    echo "$as_me:3309: found $ac_dir/$ac_word" >&5
3310    break
3311 fi
3312 done
3313
3314   ;;
3315 esac
3316 fi
3317 CXX=$ac_cv_path_CXX
3318
3319 if test -n "$CXX"; then
3320   echo "$as_me:3320: result: $CXX" >&5
3321 echo "${ECHO_T}$CXX" >&6
3322 else
3323   echo "$as_me:3323: result: no" >&5
3324 echo "${ECHO_T}no" >&6
3325 fi
3326
3327         fi
3328         case "x$CXX" in
3329         (x|xg++)
3330                 { echo "$as_me:3330: WARNING: You don't have any C++ compiler, too bad" >&5
3331 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3332                 cf_with_cxx=no; CXX=""; GXX="";
3333                 ;;
3334         esac
3335 fi
3336
3337 GXX_VERSION=none
3338 if test "$GXX" = yes; then
3339         echo "$as_me:3339: checking version of ${CXX:-g++}" >&5
3340 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3341         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3342         if test -z "$GXX_VERSION"
3343         then
3344                 GXX_VERSION=unknown
3345                 GXX=no
3346         fi
3347         echo "$as_me:3347: result: $GXX_VERSION" >&5
3348 echo "${ECHO_T}$GXX_VERSION" >&6
3349 fi
3350
3351 case $GXX_VERSION in
3352 (1*|2.[0-6]*)
3353         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3354         # cf_cxx_library=no
3355         { echo "$as_me:3355: WARNING: templates do not work" >&5
3356 echo "$as_me: WARNING: templates do not work" >&2;}
3357         ;;
3358 esac
3359
3360 echo "$as_me:3360: checking if you want to build C++ binding and demo" >&5
3361 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3362
3363 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3364 if test "${with_cxx_binding+set}" = set; then
3365   withval="$with_cxx_binding"
3366   cf_with_cxx_binding=$withval
3367 else
3368   cf_with_cxx_binding=$cf_with_cxx
3369 fi;
3370 echo "$as_me:3370: result: $cf_with_cxx_binding" >&5
3371 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3372
3373 echo "$as_me:3373: checking if you want to build with Ada" >&5
3374 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3375 echo "$as_me:3375: result: $cf_with_ada" >&5
3376 echo "${ECHO_T}$cf_with_ada" >&6
3377
3378 echo "$as_me:3378: checking if you want to install terminal database" >&5
3379 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3380
3381 # Check whether --enable-db-install or --disable-db-install was given.
3382 if test "${enable_db_install+set}" = set; then
3383   enableval="$enable_db_install"
3384   cf_with_db_install=$enableval
3385 else
3386   cf_with_db_install=yes
3387 fi;
3388 echo "$as_me:3388: result: $cf_with_db_install" >&5
3389 echo "${ECHO_T}$cf_with_db_install" >&6
3390
3391 echo "$as_me:3391: checking if you want to install manpages" >&5
3392 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3393
3394 # Check whether --with-manpages or --without-manpages was given.
3395 if test "${with_manpages+set}" = set; then
3396   withval="$with_manpages"
3397   cf_with_manpages=$withval
3398 else
3399   cf_with_manpages=yes
3400 fi;
3401 echo "$as_me:3401: result: $cf_with_manpages" >&5
3402 echo "${ECHO_T}$cf_with_manpages" >&6
3403
3404 echo "$as_me:3404: checking if you want to build programs such as tic" >&5
3405 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3406
3407 # Check whether --with-progs or --without-progs was given.
3408 if test "${with_progs+set}" = set; then
3409   withval="$with_progs"
3410   cf_with_progs=$withval
3411 else
3412   cf_with_progs=yes
3413 fi;
3414 echo "$as_me:3414: result: $cf_with_progs" >&5
3415 echo "${ECHO_T}$cf_with_progs" >&6
3416
3417 if test -f $srcdir/tack/tack.h; then
3418         if test "x$cross_compiling" = xyes ; then
3419                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3420
3421 echo "${as_me:-configure}:3421: testing ignoring tack because we are cross-compiling ..." 1>&5
3422
3423                 cf_with_tack=no
3424         else
3425                 echo "$as_me:3425: checking if you want to build the tack program" >&5
3426 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3427
3428 # Check whether --with-tack or --without-tack was given.
3429 if test "${with_tack+set}" = set; then
3430   withval="$with_tack"
3431   cf_with_tack=$withval
3432 else
3433   cf_with_tack=$cf_with_progs
3434 fi;
3435                 echo "$as_me:3435: result: $cf_with_tack" >&5
3436 echo "${ECHO_T}$cf_with_tack" >&6
3437         fi
3438 else
3439         cf_with_tack=no
3440 fi
3441
3442 echo "$as_me:3442: checking if you want to build test-programs" >&5
3443 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3444
3445 # Check whether --with-tests or --without-tests was given.
3446 if test "${with_tests+set}" = set; then
3447   withval="$with_tests"
3448   cf_with_tests=$withval
3449 else
3450   cf_with_tests=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_tests" >&5
3453 echo "${ECHO_T}$cf_with_tests" >&6
3454
3455 echo "$as_me:3455: checking if you wish to install curses.h" >&5
3456 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3457
3458 # Check whether --with-curses-h or --without-curses-h was given.
3459 if test "${with_curses_h+set}" = set; then
3460   withval="$with_curses_h"
3461   with_curses_h=$withval
3462 else
3463   with_curses_h=yes
3464 fi;
3465 echo "$as_me:3465: result: $with_curses_h" >&5
3466 echo "${ECHO_T}$with_curses_h" >&6
3467
3468 modules_to_build="ncurses"
3469 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3470 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3471 modules_to_build="$modules_to_build panel menu form"
3472
3473 test "$program_prefix" != NONE &&
3474   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3475 # Use a double $ so make ignores it.
3476 test "$program_suffix" != NONE &&
3477   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3478 # Double any \ or $.  echo might interpret backslashes.
3479 # By default was `s,x,x', remove it if useless.
3480 cat <<\_ACEOF >conftest.sed
3481 s/[\\$]/&&/g;s/;s,x,x,$//
3482 _ACEOF
3483 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3484 rm conftest.sed
3485
3486 for ac_prog in mawk gawk nawk awk
3487 do
3488   # Extract the first word of "$ac_prog", so it can be a program name with args.
3489 set dummy $ac_prog; ac_word=$2
3490 echo "$as_me:3490: checking for $ac_word" >&5
3491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492 if test "${ac_cv_prog_AWK+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if test -n "$AWK"; then
3496   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3497 else
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   $as_executable_p "$ac_dir/$ac_word" || continue
3504 ac_cv_prog_AWK="$ac_prog"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3507 done
3508
3509 fi
3510 fi
3511 AWK=$ac_cv_prog_AWK
3512 if test -n "$AWK"; then
3513   echo "$as_me:3513: result: $AWK" >&5
3514 echo "${ECHO_T}$AWK" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520   test -n "$AWK" && break
3521 done
3522
3523 test -z "$AWK" && { { echo "$as_me:3523: error: No awk program found" >&5
3524 echo "$as_me: error: No awk program found" >&2;}
3525    { (exit 1); exit 1; }; }
3526
3527 echo "$as_me:3527: checking for egrep" >&5
3528 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3529 if test "${ac_cv_prog_egrep+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3533                 then ac_cv_prog_egrep='grep -E'
3534                 else ac_cv_prog_egrep='egrep'
3535         fi
3536 fi
3537 echo "$as_me:3537: result: $ac_cv_prog_egrep" >&5
3538 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3539         EGREP=$ac_cv_prog_egrep
3540
3541         test -z "$EGREP" && { { echo "$as_me:3541: error: No egrep program found" >&5
3542 echo "$as_me: error: No egrep program found" >&2;}
3543    { (exit 1); exit 1; }; }
3544
3545 # Find a good install program.  We prefer a C program (faster),
3546 # so one script is as good as another.  But avoid the broken or
3547 # incompatible versions:
3548 # SysV /etc/install, /usr/sbin/install
3549 # SunOS /usr/etc/install
3550 # IRIX /sbin/install
3551 # AIX /bin/install
3552 # AmigaOS /C/install, which installs bootblocks on floppy discs
3553 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3554 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3555 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3556 # ./install, which can be erroneously created by make from ./install.sh.
3557 echo "$as_me:3557: checking for a BSD compatible install" >&5
3558 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3559 if test -z "$INSTALL"; then
3560 if test "${ac_cv_path_install+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563     ac_save_IFS=$IFS; IFS=$ac_path_separator
3564   for ac_dir in $PATH; do
3565     IFS=$ac_save_IFS
3566     # Account for people who put trailing slashes in PATH elements.
3567     case $ac_dir/ in
3568     / | ./ | .// | /cC/* \
3569     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3570     | /usr/ucb/* ) ;;
3571     *)
3572       # OSF1 and SCO ODT 3.0 have their own names for install.
3573       # Don't use installbsd from OSF since it installs stuff as root
3574       # by default.
3575       for ac_prog in ginstall scoinst install; do
3576         if $as_executable_p "$ac_dir/$ac_prog"; then
3577           if test $ac_prog = install &&
3578             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3579             # AIX install.  It has an incompatible calling convention.
3580             :
3581           elif test $ac_prog = install &&
3582             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583             # program-specific install script used by HP pwplus--don't use.
3584             :
3585           else
3586             ac_cv_path_install="$ac_dir/$ac_prog -c"
3587             break 2
3588           fi
3589         fi
3590       done
3591       ;;
3592     esac
3593   done
3594
3595 fi
3596   if test "${ac_cv_path_install+set}" = set; then
3597     INSTALL=$ac_cv_path_install
3598   else
3599     # As a last resort, use the slow shell script.  We don't cache a
3600     # path for INSTALL within a source directory, because that will
3601     # break other packages using the cache if that directory is
3602     # removed, or if the path is relative.
3603     INSTALL=$ac_install_sh
3604   fi
3605 fi
3606 echo "$as_me:3606: result: $INSTALL" >&5
3607 echo "${ECHO_T}$INSTALL" >&6
3608
3609 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3610 # It thinks the first close brace ends the variable substitution.
3611 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3612
3613 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3614
3615 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3616
3617 case $INSTALL in
3618 (/*)
3619         ;;
3620 (*)
3621         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3622         test -z "$cf_dir" && cf_dir=.
3623         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3624         ;;
3625 esac
3626
3627 for ac_prog in lint cppcheck splint
3628 do
3629   # Extract the first word of "$ac_prog", so it can be a program name with args.
3630 set dummy $ac_prog; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_LINT+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$LINT"; then
3637   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_LINT="$ac_prog"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650 fi
3651 fi
3652 LINT=$ac_cv_prog_LINT
3653 if test -n "$LINT"; then
3654   echo "$as_me:3654: result: $LINT" >&5
3655 echo "${ECHO_T}$LINT" >&6
3656 else
3657   echo "$as_me:3657: result: no" >&5
3658 echo "${ECHO_T}no" >&6
3659 fi
3660
3661   test -n "$LINT" && break
3662 done
3663
3664 case "x$LINT" in
3665 (xcppcheck|x*/cppcheck)
3666         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3667         ;;
3668 esac
3669
3670 echo "$as_me:3670: checking whether ln -s works" >&5
3671 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3672 LN_S=$as_ln_s
3673 if test "$LN_S" = "ln -s"; then
3674   echo "$as_me:3674: result: yes" >&5
3675 echo "${ECHO_T}yes" >&6
3676 else
3677   echo "$as_me:3677: result: no, using $LN_S" >&5
3678 echo "${ECHO_T}no, using $LN_S" >&6
3679 fi
3680
3681 echo "$as_me:3681: checking if $LN_S -f options work" >&5
3682 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3683
3684 rm -f conf$$.src conf$$dst
3685 echo >conf$$.dst
3686 echo first >conf$$.src
3687 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3688         cf_prog_ln_sf=yes
3689 else
3690         cf_prog_ln_sf=no
3691 fi
3692 rm -f conf$$.dst conf$$src
3693 echo "$as_me:3693: result: $cf_prog_ln_sf" >&5
3694 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3695
3696 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3697
3698 echo "$as_me:3698: checking for long file names" >&5
3699 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3700 if test "${ac_cv_sys_long_file_names+set}" = set; then
3701   echo $ECHO_N "(cached) $ECHO_C" >&6
3702 else
3703   ac_cv_sys_long_file_names=yes
3704 # Test for long file names in all the places we know might matter:
3705 #      .                the current directory, where building will happen
3706 #      $prefix/lib      where we will be installing things
3707 #      $exec_prefix/lib likewise
3708 # eval it to expand exec_prefix.
3709 #      $TMPDIR          if set, where it might want to write temporary files
3710 # if $TMPDIR is not set:
3711 #      /tmp             where it might want to write temporary files
3712 #      /var/tmp         likewise
3713 #      /usr/tmp         likewise
3714 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3715   ac_tmpdirs=$TMPDIR
3716 else
3717   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3718 fi
3719 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3720   test -d $ac_dir || continue
3721   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3722   ac_xdir=$ac_dir/cf$$
3723   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3724   ac_tf1=$ac_xdir/conftest9012345
3725   ac_tf2=$ac_xdir/conftest9012346
3726   (echo 1 >$ac_tf1) 2>/dev/null
3727   (echo 2 >$ac_tf2) 2>/dev/null
3728   ac_val=`cat $ac_tf1 2>/dev/null`
3729   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3730     ac_cv_sys_long_file_names=no
3731     rm -rf $ac_xdir 2>/dev/null
3732     break
3733   fi
3734   rm -rf $ac_xdir 2>/dev/null
3735 done
3736 fi
3737 echo "$as_me:3737: result: $ac_cv_sys_long_file_names" >&5
3738 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3739 if test $ac_cv_sys_long_file_names = yes; then
3740
3741 cat >>confdefs.h <<\EOF
3742 #define HAVE_LONG_FILE_NAMES 1
3743 EOF
3744
3745 fi
3746
3747 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3748 # of package conflict.
3749 cf_config_suffix=
3750
3751 # Check whether --with-config-suffix or --without-config-suffix was given.
3752 if test "${with_config_suffix+set}" = set; then
3753   withval="$with_config_suffix"
3754   case "x$withval" in
3755         (xyes|xno)
3756                 { echo "$as_me:3756: WARNING: expected a value for config-suffix option" >&5
3757 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3758                 ;;
3759         (*)     cf_config_suffix="$withval"
3760                 ;;
3761         esac
3762 fi;
3763
3764 # If we find pkg-config, check if we should install the ".pc" files.
3765
3766 echo "$as_me:3766: checking if you want to use pkg-config" >&5
3767 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3768
3769 # Check whether --with-pkg-config or --without-pkg-config was given.
3770 if test "${with_pkg_config+set}" = set; then
3771   withval="$with_pkg_config"
3772   cf_pkg_config=$withval
3773 else
3774   cf_pkg_config=yes
3775 fi;
3776 echo "$as_me:3776: result: $cf_pkg_config" >&5
3777 echo "${ECHO_T}$cf_pkg_config" >&6
3778
3779 case $cf_pkg_config in
3780 (no)
3781         PKG_CONFIG=none
3782         ;;
3783 (yes)
3784
3785 if test -n "$ac_tool_prefix"; then
3786   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3787 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   case $PKG_CONFIG in
3794   [\\/]* | ?:[\\/]*)
3795   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3796   ;;
3797   *)
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   if $as_executable_p "$ac_dir/$ac_word"; then
3804    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3805    echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806    break
3807 fi
3808 done
3809
3810   ;;
3811 esac
3812 fi
3813 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3814
3815 if test -n "$PKG_CONFIG"; then
3816   echo "$as_me:3816: result: $PKG_CONFIG" >&5
3817 echo "${ECHO_T}$PKG_CONFIG" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823 fi
3824 if test -z "$ac_cv_path_PKG_CONFIG"; then
3825   ac_pt_PKG_CONFIG=$PKG_CONFIG
3826   # Extract the first word of "pkg-config", so it can be a program name with args.
3827 set dummy pkg-config; ac_word=$2
3828 echo "$as_me:3828: checking for $ac_word" >&5
3829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3830 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833   case $ac_pt_PKG_CONFIG in
3834   [\\/]* | ?:[\\/]*)
3835   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3836   ;;
3837   *)
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   if $as_executable_p "$ac_dir/$ac_word"; then
3844    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3845    echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846    break
3847 fi
3848 done
3849
3850   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3851   ;;
3852 esac
3853 fi
3854 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3855
3856 if test -n "$ac_pt_PKG_CONFIG"; then
3857   echo "$as_me:3857: result: $ac_pt_PKG_CONFIG" >&5
3858 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3859 else
3860   echo "$as_me:3860: result: no" >&5
3861 echo "${ECHO_T}no" >&6
3862 fi
3863
3864   PKG_CONFIG=$ac_pt_PKG_CONFIG
3865 else
3866   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3867 fi
3868
3869         ;;
3870 (*)
3871         PKG_CONFIG=$withval
3872         ;;
3873 esac
3874
3875 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3876 if test "$PKG_CONFIG" != none ; then
3877
3878 if test "x$prefix" != xNONE; then
3879         cf_path_syntax="$prefix"
3880 else
3881         cf_path_syntax="$ac_default_prefix"
3882 fi
3883
3884 case ".$PKG_CONFIG" in
3885 (.\$\(*\)*|.\'*\'*)
3886         ;;
3887 (..|./*|.\\*)
3888         ;;
3889 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3890         ;;
3891 (.\${*prefix}*|.\${*dir}*)
3892         eval PKG_CONFIG="$PKG_CONFIG"
3893         case ".$PKG_CONFIG" in
3894         (.NONE/*)
3895                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3896                 ;;
3897         esac
3898         ;;
3899 (.no|.NONE/*)
3900         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3901         ;;
3902 (*)
3903         { { echo "$as_me:3903: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3904 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3905    { (exit 1); exit 1; }; }
3906         ;;
3907 esac
3908
3909 elif test "x$cf_pkg_config" != xno ; then
3910         { echo "$as_me:3910: WARNING: pkg-config is not installed" >&5
3911 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3912 fi
3913
3914 case $PKG_CONFIG in
3915 (no|none|yes)
3916         echo "$as_me:3916: checking for pkg-config library directory" >&5
3917 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3918         ;;
3919 (*)
3920         echo "$as_me:3920: checking for $PKG_CONFIG library directory" >&5
3921 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3922         ;;
3923 esac
3924
3925 PKG_CONFIG_LIBDIR=no
3926
3927 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3928 if test "${with_pkg_config_libdir+set}" = set; then
3929   withval="$with_pkg_config_libdir"
3930   PKG_CONFIG_LIBDIR=$withval
3931 else
3932   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3933 fi;
3934
3935 case x$PKG_CONFIG_LIBDIR in
3936 (x/*)
3937         ;;
3938 (xyes)
3939         # Look for the library directory using the same prefix as the executable
3940         if test "x$PKG_CONFIG" = xnone
3941         then
3942                 cf_path=$prefix
3943         else
3944                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3945         fi
3946
3947         # If you don't like using the default architecture, you have to specify the
3948         # intended library directory and corresponding compiler/linker options.
3949         #
3950         # This case allows for Debian's 2014-flavor of multiarch, along with the
3951         # most common variations before that point.  Some other variants spell the
3952         # directory differently, e.g., "pkg-config", and put it in unusual places.
3953         # pkg-config has always been poorly standardized, which is ironic...
3954         case x`(arch) 2>/dev/null` in
3955         (*64)
3956                 cf_search_path="\
3957                         $cf_path/lib/*64-linux-gnu \
3958                         $cf_path/share \
3959                         $cf_path/lib64 \
3960                         $cf_path/lib32 \
3961                         $cf_path/lib"
3962                 ;;
3963         (*)
3964                 cf_search_path="\
3965                         $cf_path/lib/*-linux-gnu \
3966                         $cf_path/share \
3967                         $cf_path/lib32 \
3968                         $cf_path/lib \
3969                         $cf_path/libdata"
3970                 ;;
3971         esac
3972
3973         test -n "$verbose" && echo "    list..." 1>&6
3974
3975 echo "${as_me:-configure}:3975: testing list... ..." 1>&5
3976
3977         for cf_config in $cf_search_path
3978         do
3979                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing checking $cf_config/pkgconfig ..." 1>&5
3982
3983                 if test -d $cf_config/pkgconfig
3984                 then
3985                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3986                         echo "$as_me:3986: checking done" >&5
3987 echo $ECHO_N "checking done... $ECHO_C" >&6
3988                         break
3989                 fi
3990         done
3991         ;;
3992 (*)
3993         ;;
3994 esac
3995
3996 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3997         echo "$as_me:3997: result: $PKG_CONFIG_LIBDIR" >&5
3998 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3999 fi
4000
4001 if test "x$PKG_CONFIG" != xnone
4002 then
4003         echo "$as_me:4003: checking if we should install .pc files for $PKG_CONFIG" >&5
4004 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4005 else
4006         echo "$as_me:4006: checking if we should install .pc files" >&5
4007 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4008 fi
4009
4010 # Check whether --enable-pc-files or --disable-pc-files was given.
4011 if test "${enable_pc_files+set}" = set; then
4012   enableval="$enable_pc_files"
4013   enable_pc_files=$enableval
4014 else
4015   enable_pc_files=no
4016 fi;
4017 echo "$as_me:4017: result: $enable_pc_files" >&5
4018 echo "${ECHO_T}$enable_pc_files" >&6
4019
4020 if test "x$enable_pc_files" != xno
4021 then
4022         MAKE_PC_FILES=
4023         case "x$PKG_CONFIG_LIBDIR" in
4024         (xno|xyes)
4025                 { echo "$as_me:4025: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4026 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4027                 ;;
4028         (*)
4029
4030 if test "x$prefix" != xNONE; then
4031         cf_path_syntax="$prefix"
4032 else
4033         cf_path_syntax="$ac_default_prefix"
4034 fi
4035
4036 case ".$PKG_CONFIG_LIBDIR" in
4037 (.\$\(*\)*|.\'*\'*)
4038         ;;
4039 (..|./*|.\\*)
4040         ;;
4041 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4042         ;;
4043 (.\${*prefix}*|.\${*dir}*)
4044         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4045         case ".$PKG_CONFIG_LIBDIR" in
4046         (.NONE/*)
4047                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4048                 ;;
4049         esac
4050         ;;
4051 (.no|.NONE/*)
4052         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4053         ;;
4054 (*)
4055         { { echo "$as_me:4055: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4056 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4057    { (exit 1); exit 1; }; }
4058         ;;
4059 esac
4060
4061                 ;;
4062         esac
4063 else
4064         MAKE_PC_FILES="#"
4065 fi
4066
4067 if test -z "$MAKE_PC_FILES"
4068 then
4069         echo "$as_me:4069: checking for suffix to add to pc-files" >&5
4070 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4071
4072 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4073 if test "${with_pc_suffix+set}" = set; then
4074   withval="$with_pc_suffix"
4075   case "x$withval" in
4076         (xyes|xno)
4077                 PC_MODULE_SUFFIX=
4078                 ;;
4079         (*)     PC_MODULE_SUFFIX="$withval"
4080                 ;;
4081         esac
4082 fi;
4083         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4084         echo "$as_me:4084: result: $PC_MODULE_SUFFIX" >&5
4085 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4086         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4087
4088 fi
4089
4090 echo "$as_me:4090: checking if we should assume mixed-case filenames" >&5
4091 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4092
4093 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4094 if test "${enable_mixed_case+set}" = set; then
4095   enableval="$enable_mixed_case"
4096   enable_mixedcase=$enableval
4097 else
4098   enable_mixedcase=auto
4099 fi;
4100 echo "$as_me:4100: result: $enable_mixedcase" >&5
4101 echo "${ECHO_T}$enable_mixedcase" >&6
4102 if test "$enable_mixedcase" = "auto" ; then
4103
4104 echo "$as_me:4104: checking if filesystem supports mixed-case filenames" >&5
4105 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4106 if test "${cf_cv_mixedcase+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110 if test "$cross_compiling" = yes ; then
4111         case $target_alias in
4112         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4113                 cf_cv_mixedcase=no
4114                 ;;
4115         (*)
4116                 cf_cv_mixedcase=yes
4117                 ;;
4118         esac
4119 else
4120         rm -f conftest CONFTEST
4121         echo test >conftest
4122         if test -f CONFTEST ; then
4123                 cf_cv_mixedcase=no
4124         else
4125                 cf_cv_mixedcase=yes
4126         fi
4127         rm -f conftest CONFTEST
4128 fi
4129
4130 fi
4131 echo "$as_me:4131: result: $cf_cv_mixedcase" >&5
4132 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4133 test "$cf_cv_mixedcase" = yes &&
4134 cat >>confdefs.h <<\EOF
4135 #define MIXEDCASE_FILENAMES 1
4136 EOF
4137
4138 else
4139         cf_cv_mixedcase=$enable_mixedcase
4140         if test "x$enable_mixedcase" = "xyes" ; then
4141
4142 cat >>confdefs.h <<\EOF
4143 #define MIXEDCASE_FILENAMES 1
4144 EOF
4145
4146         fi
4147 fi
4148
4149 # do this after mixed-case option (tags/TAGS is not as important as tic).
4150 echo "$as_me:4150: checking whether ${MAKE-make} sets \${MAKE}" >&5
4151 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4152 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4153 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4154   echo $ECHO_N "(cached) $ECHO_C" >&6
4155 else
4156   cat >conftest.make <<\EOF
4157 all:
4158         @echo 'ac_maketemp="${MAKE}"'
4159 EOF
4160 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4161 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4162 if test -n "$ac_maketemp"; then
4163   eval ac_cv_prog_make_${ac_make}_set=yes
4164 else
4165   eval ac_cv_prog_make_${ac_make}_set=no
4166 fi
4167 rm -f conftest.make
4168 fi
4169 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4170   echo "$as_me:4170: result: yes" >&5
4171 echo "${ECHO_T}yes" >&6
4172   SET_MAKE=
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176   SET_MAKE="MAKE=${MAKE-make}"
4177 fi
4178
4179 for ac_prog in exctags ctags
4180 do
4181   # Extract the first word of "$ac_prog", so it can be a program name with args.
4182 set dummy $ac_prog; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_CTAGS+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$CTAGS"; then
4189   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_CTAGS="$ac_prog"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202 fi
4203 fi
4204 CTAGS=$ac_cv_prog_CTAGS
4205 if test -n "$CTAGS"; then
4206   echo "$as_me:4206: result: $CTAGS" >&5
4207 echo "${ECHO_T}$CTAGS" >&6
4208 else
4209   echo "$as_me:4209: result: no" >&5
4210 echo "${ECHO_T}no" >&6
4211 fi
4212
4213   test -n "$CTAGS" && break
4214 done
4215
4216 for ac_prog in exetags etags
4217 do
4218   # Extract the first word of "$ac_prog", so it can be a program name with args.
4219 set dummy $ac_prog; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ETAGS+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ETAGS"; then
4226   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ETAGS="$ac_prog"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239 fi
4240 fi
4241 ETAGS=$ac_cv_prog_ETAGS
4242 if test -n "$ETAGS"; then
4243   echo "$as_me:4243: result: $ETAGS" >&5
4244 echo "${ECHO_T}$ETAGS" >&6
4245 else
4246   echo "$as_me:4246: result: no" >&5
4247 echo "${ECHO_T}no" >&6
4248 fi
4249
4250   test -n "$ETAGS" && break
4251 done
4252
4253 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4254 set dummy ${CTAGS:-ctags}; ac_word=$2
4255 echo "$as_me:4255: checking for $ac_word" >&5
4256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4257 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4258   echo $ECHO_N "(cached) $ECHO_C" >&6
4259 else
4260   if test -n "$MAKE_LOWER_TAGS"; then
4261   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4262 else
4263   ac_save_IFS=$IFS; IFS=$ac_path_separator
4264 ac_dummy="$PATH"
4265 for ac_dir in $ac_dummy; do
4266   IFS=$ac_save_IFS
4267   test -z "$ac_dir" && ac_dir=.
4268   $as_executable_p "$ac_dir/$ac_word" || continue
4269 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4270 echo "$as_me:4270: found $ac_dir/$ac_word" >&5
4271 break
4272 done
4273
4274   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4275 fi
4276 fi
4277 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4278 if test -n "$MAKE_LOWER_TAGS"; then
4279   echo "$as_me:4279: result: $MAKE_LOWER_TAGS" >&5
4280 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4281 else
4282   echo "$as_me:4282: result: no" >&5
4283 echo "${ECHO_T}no" >&6
4284 fi
4285
4286 if test "$cf_cv_mixedcase" = yes ; then
4287         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4288 set dummy ${ETAGS:-etags}; ac_word=$2
4289 echo "$as_me:4289: checking for $ac_word" >&5
4290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4291 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4292   echo $ECHO_N "(cached) $ECHO_C" >&6
4293 else
4294   if test -n "$MAKE_UPPER_TAGS"; then
4295   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4296 else
4297   ac_save_IFS=$IFS; IFS=$ac_path_separator
4298 ac_dummy="$PATH"
4299 for ac_dir in $ac_dummy; do
4300   IFS=$ac_save_IFS
4301   test -z "$ac_dir" && ac_dir=.
4302   $as_executable_p "$ac_dir/$ac_word" || continue
4303 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4304 echo "$as_me:4304: found $ac_dir/$ac_word" >&5
4305 break
4306 done
4307
4308   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4309 fi
4310 fi
4311 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4312 if test -n "$MAKE_UPPER_TAGS"; then
4313   echo "$as_me:4313: result: $MAKE_UPPER_TAGS" >&5
4314 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4315 else
4316   echo "$as_me:4316: result: no" >&5
4317 echo "${ECHO_T}no" >&6
4318 fi
4319
4320 else
4321         MAKE_UPPER_TAGS=no
4322 fi
4323
4324 if test "$MAKE_UPPER_TAGS" = yes ; then
4325         MAKE_UPPER_TAGS=
4326 else
4327         MAKE_UPPER_TAGS="#"
4328 fi
4329
4330 if test "$MAKE_LOWER_TAGS" = yes ; then
4331         MAKE_LOWER_TAGS=
4332 else
4333         MAKE_LOWER_TAGS="#"
4334 fi
4335
4336 echo "$as_me:4336: checking for makeflags variable" >&5
4337 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4338 if test "${cf_cv_makeflags+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341
4342         cf_cv_makeflags=''
4343         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4344         do
4345                 cat >cf_makeflags.tmp <<CF_EOF
4346 SHELL = $SHELL
4347 all :
4348         @ echo '.$cf_option'
4349 CF_EOF
4350                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4351                 case "$cf_result" in
4352                 (.*k|.*kw)
4353                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4354                         case "$cf_result" in
4355                         (.*CC=*)        cf_cv_makeflags=
4356                                 ;;
4357                         (*)     cf_cv_makeflags=$cf_option
4358                                 ;;
4359                         esac
4360                         break
4361                         ;;
4362                 (.-)
4363                         ;;
4364                 (*)
4365
4366 echo "${as_me:-configure}:4366: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4367
4368                         ;;
4369                 esac
4370         done
4371         rm -f cf_makeflags.tmp
4372
4373 fi
4374 echo "$as_me:4374: result: $cf_cv_makeflags" >&5
4375 echo "${ECHO_T}$cf_cv_makeflags" >&6
4376
4377 if test -n "$ac_tool_prefix"; then
4378   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4379 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4380 echo "$as_me:4380: checking for $ac_word" >&5
4381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4382 if test "${ac_cv_prog_RANLIB+set}" = set; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   if test -n "$RANLIB"; then
4386   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4387 else
4388   ac_save_IFS=$IFS; IFS=$ac_path_separator
4389 ac_dummy="$PATH"
4390 for ac_dir in $ac_dummy; do
4391   IFS=$ac_save_IFS
4392   test -z "$ac_dir" && ac_dir=.
4393   $as_executable_p "$ac_dir/$ac_word" || continue
4394 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4395 echo "$as_me:4395: found $ac_dir/$ac_word" >&5
4396 break
4397 done
4398
4399 fi
4400 fi
4401 RANLIB=$ac_cv_prog_RANLIB
4402 if test -n "$RANLIB"; then
4403   echo "$as_me:4403: result: $RANLIB" >&5
4404 echo "${ECHO_T}$RANLIB" >&6
4405 else
4406   echo "$as_me:4406: result: no" >&5
4407 echo "${ECHO_T}no" >&6
4408 fi
4409
4410 fi
4411 if test -z "$ac_cv_prog_RANLIB"; then
4412   ac_ct_RANLIB=$RANLIB
4413   # Extract the first word of "ranlib", so it can be a program name with args.
4414 set dummy ranlib; ac_word=$2
4415 echo "$as_me:4415: checking for $ac_word" >&5
4416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4417 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4418   echo $ECHO_N "(cached) $ECHO_C" >&6
4419 else
4420   if test -n "$ac_ct_RANLIB"; then
4421   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4422 else
4423   ac_save_IFS=$IFS; IFS=$ac_path_separator
4424 ac_dummy="$PATH"
4425 for ac_dir in $ac_dummy; do
4426   IFS=$ac_save_IFS
4427   test -z "$ac_dir" && ac_dir=.
4428   $as_executable_p "$ac_dir/$ac_word" || continue
4429 ac_cv_prog_ac_ct_RANLIB="ranlib"
4430 echo "$as_me:4430: found $ac_dir/$ac_word" >&5
4431 break
4432 done
4433
4434   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4435 fi
4436 fi
4437 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4438 if test -n "$ac_ct_RANLIB"; then
4439   echo "$as_me:4439: result: $ac_ct_RANLIB" >&5
4440 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4441 else
4442   echo "$as_me:4442: result: no" >&5
4443 echo "${ECHO_T}no" >&6
4444 fi
4445
4446   RANLIB=$ac_ct_RANLIB
4447 else
4448   RANLIB="$ac_cv_prog_RANLIB"
4449 fi
4450
4451 if test -n "$ac_tool_prefix"; then
4452   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ld; ac_word=$2
4454 echo "$as_me:4454: checking for $ac_word" >&5
4455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4456 if test "${ac_cv_prog_LD+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   if test -n "$LD"; then
4460   ac_cv_prog_LD="$LD" # Let the user override the test.
4461 else
4462   ac_save_IFS=$IFS; IFS=$ac_path_separator
4463 ac_dummy="$PATH"
4464 for ac_dir in $ac_dummy; do
4465   IFS=$ac_save_IFS
4466   test -z "$ac_dir" && ac_dir=.
4467   $as_executable_p "$ac_dir/$ac_word" || continue
4468 ac_cv_prog_LD="${ac_tool_prefix}ld"
4469 echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470 break
4471 done
4472
4473 fi
4474 fi
4475 LD=$ac_cv_prog_LD
4476 if test -n "$LD"; then
4477   echo "$as_me:4477: result: $LD" >&5
4478 echo "${ECHO_T}$LD" >&6
4479 else
4480   echo "$as_me:4480: result: no" >&5
4481 echo "${ECHO_T}no" >&6
4482 fi
4483
4484 fi
4485 if test -z "$ac_cv_prog_LD"; then
4486   ac_ct_LD=$LD
4487   # Extract the first word of "ld", so it can be a program name with args.
4488 set dummy ld; ac_word=$2
4489 echo "$as_me:4489: checking for $ac_word" >&5
4490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4491 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494   if test -n "$ac_ct_LD"; then
4495   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4496 else
4497   ac_save_IFS=$IFS; IFS=$ac_path_separator
4498 ac_dummy="$PATH"
4499 for ac_dir in $ac_dummy; do
4500   IFS=$ac_save_IFS
4501   test -z "$ac_dir" && ac_dir=.
4502   $as_executable_p "$ac_dir/$ac_word" || continue
4503 ac_cv_prog_ac_ct_LD="ld"
4504 echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505 break
4506 done
4507
4508   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4509 fi
4510 fi
4511 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4512 if test -n "$ac_ct_LD"; then
4513   echo "$as_me:4513: result: $ac_ct_LD" >&5
4514 echo "${ECHO_T}$ac_ct_LD" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520   LD=$ac_ct_LD
4521 else
4522   LD="$ac_cv_prog_LD"
4523 fi
4524
4525 if test -n "$ac_tool_prefix"; then
4526   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4527 set dummy ${ac_tool_prefix}ar; ac_word=$2
4528 echo "$as_me:4528: checking for $ac_word" >&5
4529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4530 if test "${ac_cv_prog_AR+set}" = set; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   if test -n "$AR"; then
4534   ac_cv_prog_AR="$AR" # Let the user override the test.
4535 else
4536   ac_save_IFS=$IFS; IFS=$ac_path_separator
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539   IFS=$ac_save_IFS
4540   test -z "$ac_dir" && ac_dir=.
4541   $as_executable_p "$ac_dir/$ac_word" || continue
4542 ac_cv_prog_AR="${ac_tool_prefix}ar"
4543 echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544 break
4545 done
4546
4547 fi
4548 fi
4549 AR=$ac_cv_prog_AR
4550 if test -n "$AR"; then
4551   echo "$as_me:4551: result: $AR" >&5
4552 echo "${ECHO_T}$AR" >&6
4553 else
4554   echo "$as_me:4554: result: no" >&5
4555 echo "${ECHO_T}no" >&6
4556 fi
4557
4558 fi
4559 if test -z "$ac_cv_prog_AR"; then
4560   ac_ct_AR=$AR
4561   # Extract the first word of "ar", so it can be a program name with args.
4562 set dummy ar; 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_AR+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_AR"; then
4569   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4583 fi
4584 fi
4585 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4586 if test -n "$ac_ct_AR"; then
4587   echo "$as_me:4587: result: $ac_ct_AR" >&5
4588 echo "${ECHO_T}$ac_ct_AR" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   AR=$ac_ct_AR
4595 else
4596   AR="$ac_cv_prog_AR"
4597 fi
4598
4599 if test -n "$ac_tool_prefix"; then
4600   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4601 set dummy ${ac_tool_prefix}nm; ac_word=$2
4602 echo "$as_me:4602: checking for $ac_word" >&5
4603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4604 if test "${ac_cv_prog_NM+set}" = set; then
4605   echo $ECHO_N "(cached) $ECHO_C" >&6
4606 else
4607   if test -n "$NM"; then
4608   ac_cv_prog_NM="$NM" # Let the user override the test.
4609 else
4610   ac_save_IFS=$IFS; IFS=$ac_path_separator
4611 ac_dummy="$PATH"
4612 for ac_dir in $ac_dummy; do
4613   IFS=$ac_save_IFS
4614   test -z "$ac_dir" && ac_dir=.
4615   $as_executable_p "$ac_dir/$ac_word" || continue
4616 ac_cv_prog_NM="${ac_tool_prefix}nm"
4617 echo "$as_me:4617: found $ac_dir/$ac_word" >&5
4618 break
4619 done
4620
4621 fi
4622 fi
4623 NM=$ac_cv_prog_NM
4624 if test -n "$NM"; then
4625   echo "$as_me:4625: result: $NM" >&5
4626 echo "${ECHO_T}$NM" >&6
4627 else
4628   echo "$as_me:4628: result: no" >&5
4629 echo "${ECHO_T}no" >&6
4630 fi
4631
4632 fi
4633 if test -z "$ac_cv_prog_NM"; then
4634   ac_ct_NM=$NM
4635   # Extract the first word of "nm", so it can be a program name with args.
4636 set dummy nm; ac_word=$2
4637 echo "$as_me:4637: checking for $ac_word" >&5
4638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4639 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642   if test -n "$ac_ct_NM"; then
4643   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4644 else
4645   ac_save_IFS=$IFS; IFS=$ac_path_separator
4646 ac_dummy="$PATH"
4647 for ac_dir in $ac_dummy; do
4648   IFS=$ac_save_IFS
4649   test -z "$ac_dir" && ac_dir=.
4650   $as_executable_p "$ac_dir/$ac_word" || continue
4651 ac_cv_prog_ac_ct_NM="nm"
4652 echo "$as_me:4652: found $ac_dir/$ac_word" >&5
4653 break
4654 done
4655
4656   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4657 fi
4658 fi
4659 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4660 if test -n "$ac_ct_NM"; then
4661   echo "$as_me:4661: result: $ac_ct_NM" >&5
4662 echo "${ECHO_T}$ac_ct_NM" >&6
4663 else
4664   echo "$as_me:4664: result: no" >&5
4665 echo "${ECHO_T}no" >&6
4666 fi
4667
4668   NM=$ac_ct_NM
4669 else
4670   NM="$ac_cv_prog_NM"
4671 fi
4672
4673 if test -n "$ac_tool_prefix"; then
4674   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4675 set dummy ${ac_tool_prefix}ar; ac_word=$2
4676 echo "$as_me:4676: checking for $ac_word" >&5
4677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4678 if test "${ac_cv_prog_AR+set}" = set; then
4679   echo $ECHO_N "(cached) $ECHO_C" >&6
4680 else
4681   if test -n "$AR"; then
4682   ac_cv_prog_AR="$AR" # Let the user override the test.
4683 else
4684   ac_save_IFS=$IFS; IFS=$ac_path_separator
4685 ac_dummy="$PATH"
4686 for ac_dir in $ac_dummy; do
4687   IFS=$ac_save_IFS
4688   test -z "$ac_dir" && ac_dir=.
4689   $as_executable_p "$ac_dir/$ac_word" || continue
4690 ac_cv_prog_AR="${ac_tool_prefix}ar"
4691 echo "$as_me:4691: found $ac_dir/$ac_word" >&5
4692 break
4693 done
4694
4695 fi
4696 fi
4697 AR=$ac_cv_prog_AR
4698 if test -n "$AR"; then
4699   echo "$as_me:4699: result: $AR" >&5
4700 echo "${ECHO_T}$AR" >&6
4701 else
4702   echo "$as_me:4702: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_AR"; then
4708   ac_ct_AR=$AR
4709   # Extract the first word of "ar", so it can be a program name with args.
4710 set dummy ar; ac_word=$2
4711 echo "$as_me:4711: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_AR"; then
4717   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4718 else
4719   ac_save_IFS=$IFS; IFS=$ac_path_separator
4720 ac_dummy="$PATH"
4721 for ac_dir in $ac_dummy; do
4722   IFS=$ac_save_IFS
4723   test -z "$ac_dir" && ac_dir=.
4724   $as_executable_p "$ac_dir/$ac_word" || continue
4725 ac_cv_prog_ac_ct_AR="ar"
4726 echo "$as_me:4726: found $ac_dir/$ac_word" >&5
4727 break
4728 done
4729
4730   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4731 fi
4732 fi
4733 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4734 if test -n "$ac_ct_AR"; then
4735   echo "$as_me:4735: result: $ac_ct_AR" >&5
4736 echo "${ECHO_T}$ac_ct_AR" >&6
4737 else
4738   echo "$as_me:4738: result: no" >&5
4739 echo "${ECHO_T}no" >&6
4740 fi
4741
4742   AR=$ac_ct_AR
4743 else
4744   AR="$ac_cv_prog_AR"
4745 fi
4746
4747 echo "$as_me:4747: checking for options to update archives" >&5
4748 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4749 if test "${cf_cv_ar_flags+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752
4753         cf_cv_ar_flags=unknown
4754         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4755         do
4756
4757                 # check if $ARFLAGS already contains this choice
4758                 if test "x$ARFLAGS" != "x" ; then
4759                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4760                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4761                                 cf_cv_ar_flags=
4762                                 break
4763                         fi
4764                 fi
4765
4766                 rm -f conftest.$ac_cv_objext
4767                 rm -f conftest.a
4768
4769                 cat >conftest.$ac_ext <<EOF
4770 #line 4770 "configure"
4771 int     testdata[3] = { 123, 456, 789 };
4772 EOF
4773                 if { (eval echo "$as_me:4773: \"$ac_compile\"") >&5
4774   (eval $ac_compile) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } ; then
4778                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4779                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4780                         if test -f conftest.a ; then
4781                                 cf_cv_ar_flags=$cf_ar_flags
4782                                 break
4783                         fi
4784                 else
4785                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4786
4787 echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5
4788
4789                         break
4790                 fi
4791         done
4792         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4793
4794 fi
4795 echo "$as_me:4795: result: $cf_cv_ar_flags" >&5
4796 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4797
4798 if test -n "$ARFLAGS" ; then
4799         if test -n "$cf_cv_ar_flags" ; then
4800                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4801         fi
4802 else
4803         ARFLAGS=$cf_cv_ar_flags
4804 fi
4805
4806 echo "$as_me:4806: checking if you have specified an install-prefix" >&5
4807 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4808
4809 # Check whether --with-install-prefix or --without-install-prefix was given.
4810 if test "${with_install_prefix+set}" = set; then
4811   withval="$with_install_prefix"
4812   case "x$withval" in
4813         (xyes|xno)
4814                 ;;
4815         (*)     DESTDIR="$withval"
4816                 ;;
4817         esac
4818 fi;
4819 echo "$as_me:4819: result: $DESTDIR" >&5
4820 echo "${ECHO_T}$DESTDIR" >&6
4821
4822 ###############################################################################
4823
4824 # If we're cross-compiling, allow the user to override the tools and their
4825 # options.  The configure script is oriented toward identifying the host
4826 # compiler, etc., but we need a build compiler to generate parts of the source.
4827
4828 if test "$cross_compiling" = yes ; then
4829
4830         # defaults that we might want to override
4831         : ${BUILD_CFLAGS:=''}
4832         : ${BUILD_CPPFLAGS:=''}
4833         : ${BUILD_LDFLAGS:=''}
4834         : ${BUILD_LIBS:=''}
4835         : ${BUILD_EXEEXT:='$x'}
4836         : ${BUILD_OBJEXT:='o'}
4837
4838 # Check whether --with-build-cc or --without-build-cc was given.
4839 if test "${with_build_cc+set}" = set; then
4840   withval="$with_build_cc"
4841   BUILD_CC="$withval"
4842 else
4843   for ac_prog in gcc clang c99 c89 cc cl
4844 do
4845   # Extract the first word of "$ac_prog", so it can be a program name with args.
4846 set dummy $ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$BUILD_CC"; then
4853   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_BUILD_CC="$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 BUILD_CC=$ac_cv_prog_BUILD_CC
4869 if test -n "$BUILD_CC"; then
4870   echo "$as_me:4870: result: $BUILD_CC" >&5
4871 echo "${ECHO_T}$BUILD_CC" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877   test -n "$BUILD_CC" && break
4878 done
4879 test -n "$BUILD_CC" || BUILD_CC="none"
4880
4881 fi;
4882         echo "$as_me:4882: checking for native build C compiler" >&5
4883 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4884         echo "$as_me:4884: result: $BUILD_CC" >&5
4885 echo "${ECHO_T}$BUILD_CC" >&6
4886
4887         echo "$as_me:4887: checking for native build C preprocessor" >&5
4888 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4889
4890 # Check whether --with-build-cpp or --without-build-cpp was given.
4891 if test "${with_build_cpp+set}" = set; then
4892   withval="$with_build_cpp"
4893   BUILD_CPP="$withval"
4894 else
4895   BUILD_CPP='${BUILD_CC} -E'
4896 fi;
4897         echo "$as_me:4897: result: $BUILD_CPP" >&5
4898 echo "${ECHO_T}$BUILD_CPP" >&6
4899
4900         echo "$as_me:4900: checking for native build C flags" >&5
4901 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4902
4903 # Check whether --with-build-cflags or --without-build-cflags was given.
4904 if test "${with_build_cflags+set}" = set; then
4905   withval="$with_build_cflags"
4906   BUILD_CFLAGS="$withval"
4907 fi;
4908         echo "$as_me:4908: result: $BUILD_CFLAGS" >&5
4909 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4910
4911         echo "$as_me:4911: checking for native build C preprocessor-flags" >&5
4912 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4913
4914 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4915 if test "${with_build_cppflags+set}" = set; then
4916   withval="$with_build_cppflags"
4917   BUILD_CPPFLAGS="$withval"
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPPFLAGS" >&5
4920 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4921
4922         echo "$as_me:4922: checking for native build linker-flags" >&5
4923 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4926 if test "${with_build_ldflags+set}" = set; then
4927   withval="$with_build_ldflags"
4928   BUILD_LDFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_LDFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build linker-libraries" >&5
4934 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4935
4936 # Check whether --with-build-libs or --without-build-libs was given.
4937 if test "${with_build_libs+set}" = set; then
4938   withval="$with_build_libs"
4939   BUILD_LIBS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_LIBS" >&5
4942 echo "${ECHO_T}$BUILD_LIBS" >&6
4943
4944         # this assumes we're on Unix.
4945         BUILD_EXEEXT=
4946         BUILD_OBJEXT=o
4947
4948         : ${BUILD_CC:='${CC}'}
4949
4950         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4951                 { { echo "$as_me:4951: error: Cross-build requires two compilers.
4952 Use --with-build-cc to specify the native compiler." >&5
4953 echo "$as_me: error: Cross-build requires two compilers.
4954 Use --with-build-cc to specify the native compiler." >&2;}
4955    { (exit 1); exit 1; }; }
4956         fi
4957
4958 else
4959         : ${BUILD_CC:='${CC}'}
4960         : ${BUILD_CPP:='${CPP}'}
4961         : ${BUILD_CFLAGS:='${CFLAGS}'}
4962         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4963         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4964         : ${BUILD_LIBS:='${LIBS}'}
4965         : ${BUILD_EXEEXT:='$x'}
4966         : ${BUILD_OBJEXT:='o'}
4967 fi
4968
4969 ###############################################################################
4970
4971 ### Options to allow the user to specify the set of libraries which are used.
4972 ### Use "--without-normal --with-shared" to allow the default model to be
4973 ### shared, for example.
4974 cf_list_models=""
4975
4976 echo "$as_me:4976: checking if libtool -version-number should be used" >&5
4977 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4978
4979 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4980 if test "${enable_libtool_version+set}" = set; then
4981   enableval="$enable_libtool_version"
4982   test "$enableval" != no && enableval=yes
4983         if test "$enableval" != "yes" ; then
4984     cf_libtool_version=no
4985         else
4986                 cf_libtool_version=yes
4987         fi
4988 else
4989   enableval=yes
4990         cf_libtool_version=yes
4991
4992 fi;
4993 echo "$as_me:4993: result: $cf_libtool_version" >&5
4994 echo "${ECHO_T}$cf_libtool_version" >&6
4995
4996 if test "$cf_libtool_version" = yes ; then
4997         LIBTOOL_VERSION="-version-number"
4998 else
4999         LIBTOOL_VERSION="-version-info"
5000         case "x$VERSION" in
5001         (x)
5002                 { echo "$as_me:5002: WARNING: VERSION was not set" >&5
5003 echo "$as_me: WARNING: VERSION was not set" >&2;}
5004                 ;;
5005         (x*.*.*)
5006                 ABI_VERSION="$VERSION"
5007                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5008
5009 echo "${as_me:-configure}:5009: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5010
5011                 ;;
5012         (x*:*:*)
5013                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5014                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5017
5018                 ;;
5019         (*)
5020                 { echo "$as_me:5020: WARNING: unexpected VERSION value: $VERSION" >&5
5021 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5022                 ;;
5023         esac
5024 fi
5025
5026 LIBTOOL=
5027
5028 # common library maintenance symbols that are convenient for libtool scripts:
5029 LIB_CREATE='${AR} -cr'
5030 LIB_OBJECT='${OBJECTS}'
5031 LIB_SUFFIX=.a
5032 LIB_PREP="$RANLIB"
5033
5034 # symbols used to prop libtool up to enable it to determine what it should be
5035 # doing:
5036 LIB_CLEAN=
5037 LIB_COMPILE=
5038 LIB_LINK='${CC}'
5039 LIB_INSTALL=
5040 LIB_UNINSTALL=
5041
5042 echo "$as_me:5042: checking if you want to build libraries with libtool" >&5
5043 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5044
5045 # Check whether --with-libtool or --without-libtool was given.
5046 if test "${with_libtool+set}" = set; then
5047   withval="$with_libtool"
5048   with_libtool=$withval
5049 else
5050   with_libtool=no
5051 fi;
5052 echo "$as_me:5052: result: $with_libtool" >&5
5053 echo "${ECHO_T}$with_libtool" >&6
5054 if test "$with_libtool" != "no"; then
5055
5056         if test "$with_libtool" != "yes" ; then
5057
5058 if test "x$prefix" != xNONE; then
5059         cf_path_syntax="$prefix"
5060 else
5061         cf_path_syntax="$ac_default_prefix"
5062 fi
5063
5064 case ".$with_libtool" in
5065 (.\$\(*\)*|.\'*\'*)
5066         ;;
5067 (..|./*|.\\*)
5068         ;;
5069 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5070         ;;
5071 (.\${*prefix}*|.\${*dir}*)
5072         eval with_libtool="$with_libtool"
5073         case ".$with_libtool" in
5074         (.NONE/*)
5075                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5076                 ;;
5077         esac
5078         ;;
5079 (.no|.NONE/*)
5080         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5081         ;;
5082 (*)
5083         { { echo "$as_me:5083: error: expected a pathname, not \"$with_libtool\"" >&5
5084 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5085    { (exit 1); exit 1; }; }
5086         ;;
5087 esac
5088
5089                 LIBTOOL=$with_libtool
5090         else
5091                 if test -n "$ac_tool_prefix"; then
5092   for ac_prog in libtool glibtool
5093   do
5094     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5095 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5096 echo "$as_me:5096: checking for $ac_word" >&5
5097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5098 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101   if test -n "$LIBTOOL"; then
5102   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5103 else
5104   ac_save_IFS=$IFS; IFS=$ac_path_separator
5105 ac_dummy="$PATH"
5106 for ac_dir in $ac_dummy; do
5107   IFS=$ac_save_IFS
5108   test -z "$ac_dir" && ac_dir=.
5109   $as_executable_p "$ac_dir/$ac_word" || continue
5110 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5111 echo "$as_me:5111: found $ac_dir/$ac_word" >&5
5112 break
5113 done
5114
5115 fi
5116 fi
5117 LIBTOOL=$ac_cv_prog_LIBTOOL
5118 if test -n "$LIBTOOL"; then
5119   echo "$as_me:5119: result: $LIBTOOL" >&5
5120 echo "${ECHO_T}$LIBTOOL" >&6
5121 else
5122   echo "$as_me:5122: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126     test -n "$LIBTOOL" && break
5127   done
5128 fi
5129 if test -z "$LIBTOOL"; then
5130   ac_ct_LIBTOOL=$LIBTOOL
5131   for ac_prog in libtool glibtool
5132 do
5133   # Extract the first word of "$ac_prog", so it can be a program name with args.
5134 set dummy $ac_prog; ac_word=$2
5135 echo "$as_me:5135: checking for $ac_word" >&5
5136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5137 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5138   echo $ECHO_N "(cached) $ECHO_C" >&6
5139 else
5140   if test -n "$ac_ct_LIBTOOL"; then
5141   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5142 else
5143   ac_save_IFS=$IFS; IFS=$ac_path_separator
5144 ac_dummy="$PATH"
5145 for ac_dir in $ac_dummy; do
5146   IFS=$ac_save_IFS
5147   test -z "$ac_dir" && ac_dir=.
5148   $as_executable_p "$ac_dir/$ac_word" || continue
5149 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5150 echo "$as_me:5150: found $ac_dir/$ac_word" >&5
5151 break
5152 done
5153
5154 fi
5155 fi
5156 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5157 if test -n "$ac_ct_LIBTOOL"; then
5158   echo "$as_me:5158: result: $ac_ct_LIBTOOL" >&5
5159 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5160 else
5161   echo "$as_me:5161: result: no" >&5
5162 echo "${ECHO_T}no" >&6
5163 fi
5164
5165   test -n "$ac_ct_LIBTOOL" && break
5166 done
5167 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5168
5169   LIBTOOL=$ac_ct_LIBTOOL
5170 fi
5171
5172 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5173 then
5174         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.].*//'`
5175 else
5176         cf_cv_libtool_version=
5177 fi
5178 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5179
5180                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5181                 then
5182
5183 unset ac_cv_prog_ac_ct_LIBTOOL
5184 unset ac_ct_LIBTOOL
5185 unset LIBTOOL
5186
5187                         if test -n "$ac_tool_prefix"; then
5188   for ac_prog in glibtool
5189   do
5190     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5191 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5192 echo "$as_me:5192: checking for $ac_word" >&5
5193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5194 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   if test -n "$LIBTOOL"; then
5198   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5199 else
5200   ac_save_IFS=$IFS; IFS=$ac_path_separator
5201 ac_dummy="$PATH"
5202 for ac_dir in $ac_dummy; do
5203   IFS=$ac_save_IFS
5204   test -z "$ac_dir" && ac_dir=.
5205   $as_executable_p "$ac_dir/$ac_word" || continue
5206 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5207 echo "$as_me:5207: found $ac_dir/$ac_word" >&5
5208 break
5209 done
5210
5211 fi
5212 fi
5213 LIBTOOL=$ac_cv_prog_LIBTOOL
5214 if test -n "$LIBTOOL"; then
5215   echo "$as_me:5215: result: $LIBTOOL" >&5
5216 echo "${ECHO_T}$LIBTOOL" >&6
5217 else
5218   echo "$as_me:5218: result: no" >&5
5219 echo "${ECHO_T}no" >&6
5220 fi
5221
5222     test -n "$LIBTOOL" && break
5223   done
5224 fi
5225 if test -z "$LIBTOOL"; then
5226   ac_ct_LIBTOOL=$LIBTOOL
5227   for ac_prog in glibtool
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 echo "$as_me:5231: checking for $ac_word" >&5
5232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5233 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5234   echo $ECHO_N "(cached) $ECHO_C" >&6
5235 else
5236   if test -n "$ac_ct_LIBTOOL"; then
5237   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5238 else
5239   ac_save_IFS=$IFS; IFS=$ac_path_separator
5240 ac_dummy="$PATH"
5241 for ac_dir in $ac_dummy; do
5242   IFS=$ac_save_IFS
5243   test -z "$ac_dir" && ac_dir=.
5244   $as_executable_p "$ac_dir/$ac_word" || continue
5245 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5246 echo "$as_me:5246: found $ac_dir/$ac_word" >&5
5247 break
5248 done
5249
5250 fi
5251 fi
5252 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5253 if test -n "$ac_ct_LIBTOOL"; then
5254   echo "$as_me:5254: result: $ac_ct_LIBTOOL" >&5
5255 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5256 else
5257   echo "$as_me:5257: result: no" >&5
5258 echo "${ECHO_T}no" >&6
5259 fi
5260
5261   test -n "$ac_ct_LIBTOOL" && break
5262 done
5263 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5264
5265   LIBTOOL=$ac_ct_LIBTOOL
5266 fi
5267
5268 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5269 then
5270         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.].*//'`
5271 else
5272         cf_cv_libtool_version=
5273 fi
5274 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5275
5276                 fi
5277         fi
5278         if test -z "$LIBTOOL" ; then
5279                 { { echo "$as_me:5279: error: Cannot find libtool" >&5
5280 echo "$as_me: error: Cannot find libtool" >&2;}
5281    { (exit 1); exit 1; }; }
5282         fi
5283         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5284         LIB_OBJECT='${OBJECTS:.o=.lo}'
5285         LIB_SUFFIX=.la
5286         LIB_CLEAN='${LIBTOOL} --mode=clean'
5287         LIB_COMPILE='${LIBTOOL} --mode=compile'
5288         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5289         LIB_INSTALL='${LIBTOOL} --mode=install'
5290         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5291         LIB_PREP=:
5292
5293 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5294 then
5295         echo "$as_me:5295: checking version of $LIBTOOL" >&5
5296 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5297
5298 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5299 then
5300         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.].*//'`
5301 else
5302         cf_cv_libtool_version=
5303 fi
5304 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5305
5306         echo "$as_me:5306: result: $cf_cv_libtool_version" >&5
5307 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5308         if test -z "$cf_cv_libtool_version" ; then
5309                 { { echo "$as_me:5309: error: This is not GNU libtool" >&5
5310 echo "$as_me: error: This is not GNU libtool" >&2;}
5311    { (exit 1); exit 1; }; }
5312         fi
5313 else
5314         { { echo "$as_me:5314: error: GNU libtool has not been found" >&5
5315 echo "$as_me: error: GNU libtool has not been found" >&2;}
5316    { (exit 1); exit 1; }; }
5317 fi
5318
5319         # special hack to add -no-undefined (which libtool should do for itself)
5320         LT_UNDEF=
5321         case "$cf_cv_system_name" in
5322         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5323                 LT_UNDEF=-no-undefined
5324                 ;;
5325         esac
5326
5327         # special hack to add --tag option for C++ compiler
5328         case $cf_cv_libtool_version in
5329         (1.[5-9]*|[2-9].[0-9.a-z]*)
5330                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5331                 LIBTOOL="$LIBTOOL --tag=CC"
5332                 ;;
5333         (*)
5334                 LIBTOOL_CXX="$LIBTOOL"
5335                 ;;
5336         esac
5337 else
5338         LIBTOOL=""
5339         LIBTOOL_CXX=""
5340 fi
5341
5342 test -z "$LIBTOOL" && ECHO_LT=
5343
5344 if test "$with_libtool" != "no" ; then
5345
5346 cf_list_models="$cf_list_models libtool"
5347
5348 else
5349
5350 echo "$as_me:5350: checking if you want to build shared libraries" >&5
5351 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5352
5353 # Check whether --with-shared or --without-shared was given.
5354 if test "${with_shared+set}" = set; then
5355   withval="$with_shared"
5356   with_shared=$withval
5357 else
5358   with_shared=no
5359 fi;
5360 echo "$as_me:5360: result: $with_shared" >&5
5361 echo "${ECHO_T}$with_shared" >&6
5362 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5363
5364 echo "$as_me:5364: checking if you want to build static libraries" >&5
5365 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5366
5367 # Check whether --with-normal or --without-normal was given.
5368 if test "${with_normal+set}" = set; then
5369   withval="$with_normal"
5370   with_normal=$withval
5371 else
5372   with_normal=yes
5373 fi;
5374 echo "$as_me:5374: result: $with_normal" >&5
5375 echo "${ECHO_T}$with_normal" >&6
5376 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5377
5378 echo "$as_me:5378: checking if you want to build debug libraries" >&5
5379 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5380
5381 # Check whether --with-debug or --without-debug was given.
5382 if test "${with_debug+set}" = set; then
5383   withval="$with_debug"
5384   with_debug=$withval
5385 else
5386   with_debug=yes
5387 fi;
5388 echo "$as_me:5388: result: $with_debug" >&5
5389 echo "${ECHO_T}$with_debug" >&6
5390 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5391
5392 echo "$as_me:5392: checking if you want to build profiling libraries" >&5
5393 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5394
5395 # Check whether --with-profile or --without-profile was given.
5396 if test "${with_profile+set}" = set; then
5397   withval="$with_profile"
5398   with_profile=$withval
5399 else
5400   with_profile=no
5401 fi;
5402 echo "$as_me:5402: result: $with_profile" >&5
5403 echo "${ECHO_T}$with_profile" >&6
5404 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5405
5406 fi
5407
5408 if test "X$cf_with_cxx_binding" != Xno; then
5409 if test "x$with_shared" = "xyes"; then
5410 echo "$as_me:5410: checking if you want to build C++ shared libraries" >&5
5411 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5412
5413 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5414 if test "${with_cxx_shared+set}" = set; then
5415   withval="$with_cxx_shared"
5416   with_shared_cxx=$withval
5417 else
5418   with_shared_cxx=no
5419 fi;
5420 echo "$as_me:5420: result: $with_shared_cxx" >&5
5421 echo "${ECHO_T}$with_shared_cxx" >&6
5422 fi
5423 fi
5424
5425 ###############################################################################
5426
5427 echo "$as_me:5427: checking for specified models" >&5
5428 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5429 test -z "$cf_list_models" && cf_list_models=normal
5430 test "$with_libtool" != "no" && cf_list_models=libtool
5431 echo "$as_me:5431: result: $cf_list_models" >&5
5432 echo "${ECHO_T}$cf_list_models" >&6
5433
5434 ### Use the first model as the default, and save its suffix for use in building
5435 ### up test-applications.
5436 echo "$as_me:5436: checking for default model" >&5
5437 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5438 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5439 echo "$as_me:5439: result: $DFT_LWR_MODEL" >&5
5440 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5441
5442 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5443
5444 TICS_NAME=tic
5445
5446 TINFO_NAME=tinfo
5447
5448 LIB_NAME=ncurses
5449
5450 LIB_DIR=../lib
5451 LIB_2ND=../../lib
5452
5453 echo "$as_me:5453: checking if you want to have a library-prefix" >&5
5454 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5455
5456 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5457 if test "${with_lib_prefix+set}" = set; then
5458   withval="$with_lib_prefix"
5459   with_lib_prefix=$withval
5460 else
5461   with_lib_prefix=auto
5462 fi;
5463 echo "$as_me:5463: result: $with_lib_prefix" >&5
5464 echo "${ECHO_T}$with_lib_prefix" >&6
5465
5466 if test $with_lib_prefix = auto
5467 then
5468
5469         case $cf_cv_system_name in
5470         (OS/2*|os2*)
5471                 if test "$DFT_LWR_MODEL" = libtool; then
5472                         LIB_PREFIX='lib'
5473                 else
5474                         LIB_PREFIX=''
5475                 fi
5476                 ;;
5477         (*)     LIB_PREFIX='lib'
5478                 ;;
5479         esac
5480 cf_prefix=$LIB_PREFIX
5481
5482 elif test $with_lib_prefix = no
5483 then
5484         LIB_PREFIX=
5485 else
5486         LIB_PREFIX=$with_lib_prefix
5487 fi
5488
5489 LIB_SUFFIX=
5490
5491         echo "$as_me:5491: checking for PATH separator" >&5
5492 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5493         case $cf_cv_system_name in
5494         (os2*)  PATH_SEPARATOR=';'  ;;
5495         (*)     ${PATH_SEPARATOR:=':'}  ;;
5496         esac
5497
5498         echo "$as_me:5498: result: $PATH_SEPARATOR" >&5
5499 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5500
5501 ###############################################################################
5502
5503 echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5
5504 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5505
5506 # Check whether --with-termlib or --without-termlib was given.
5507 if test "${with_termlib+set}" = set; then
5508   withval="$with_termlib"
5509   with_termlib=$withval
5510 else
5511   with_termlib=no
5512 fi;
5513 echo "$as_me:5513: result: $with_termlib" >&5
5514 echo "${ECHO_T}$with_termlib" >&6
5515
5516 echo "$as_me:5516: checking if you want to build a separate tic library" >&5
5517 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5518
5519 # Check whether --with-ticlib or --without-ticlib was given.
5520 if test "${with_ticlib+set}" = set; then
5521   withval="$with_ticlib"
5522   with_ticlib=$withval
5523 else
5524   with_ticlib=no
5525 fi;
5526 echo "$as_me:5526: result: $with_ticlib" >&5
5527 echo "${ECHO_T}$with_ticlib" >&6
5528
5529 if test X"$CC_G_OPT" = X"" ; then
5530         CC_G_OPT='-g'
5531         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5532 fi
5533
5534 if test X"$CXX_G_OPT" = X"" ; then
5535         CXX_G_OPT='-g'
5536         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5537 fi
5538
5539 echo "$as_me:5539: checking for default loader flags" >&5
5540 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5541 case $DFT_LWR_MODEL in
5542 (libtool) LD_MODEL=''   ;;
5543 (normal)  LD_MODEL=''   ;;
5544 (debug)   LD_MODEL=$CC_G_OPT ;;
5545 (profile) LD_MODEL='-pg';;
5546 (shared)  LD_MODEL=''   ;;
5547 esac
5548 echo "$as_me:5548: result: $LD_MODEL" >&5
5549 echo "${ECHO_T}$LD_MODEL" >&6
5550
5551 case $DFT_LWR_MODEL in
5552 (shared)
5553
5554 echo "$as_me:5554: checking if rpath option should be used" >&5
5555 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5556
5557 # Check whether --enable-rpath or --disable-rpath was given.
5558 if test "${enable_rpath+set}" = set; then
5559   enableval="$enable_rpath"
5560   cf_cv_enable_rpath=$enableval
5561 else
5562   cf_cv_enable_rpath=no
5563 fi;
5564 echo "$as_me:5564: result: $cf_cv_enable_rpath" >&5
5565 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5566
5567 echo "$as_me:5567: checking if shared libraries should be relinked during install" >&5
5568 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5569
5570 # Check whether --enable-relink or --disable-relink was given.
5571 if test "${enable_relink+set}" = set; then
5572   enableval="$enable_relink"
5573   cf_cv_do_relink=$enableval
5574 else
5575   cf_cv_do_relink=yes
5576 fi;
5577 echo "$as_me:5577: result: $cf_cv_do_relink" >&5
5578 echo "${ECHO_T}$cf_cv_do_relink" >&6
5579         ;;
5580 esac
5581
5582 # we will build libraries one-level down.
5583 rel_builddir=..
5584
5585 LD_RPATH_OPT=
5586 if test "x$cf_cv_enable_rpath" != xno
5587 then
5588         echo "$as_me:5588: checking for an rpath option" >&5
5589 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5590         case $cf_cv_system_name in
5591         (irix*)
5592                 if test "$GCC" = yes; then
5593                         LD_RPATH_OPT="-Wl,-rpath,"
5594                 else
5595                         LD_RPATH_OPT="-rpath "
5596                 fi
5597                 ;;
5598         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5599                 LD_RPATH_OPT="-Wl,-rpath,"
5600                 ;;
5601         (openbsd[2-9].*|mirbsd*)
5602                 LD_RPATH_OPT="-Wl,-rpath,"
5603                 ;;
5604         (dragonfly*)
5605                 LD_RPATH_OPT="-rpath "
5606                 ;;
5607         (netbsd*)
5608                 LD_RPATH_OPT="-Wl,-rpath,"
5609                 ;;
5610         (osf*|mls+*)
5611                 LD_RPATH_OPT="-rpath "
5612                 ;;
5613         (solaris2*)
5614                 LD_RPATH_OPT="-R"
5615                 ;;
5616         (*)
5617                 ;;
5618         esac
5619         echo "$as_me:5619: result: $LD_RPATH_OPT" >&5
5620 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5621
5622         case "x$LD_RPATH_OPT" in
5623         (x-R*)
5624                 echo "$as_me:5624: checking if we need a space after rpath option" >&5
5625 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5626                 cf_save_LIBS="$LIBS"
5627
5628 cf_add_libs="$LIBS"
5629 # reverse order
5630 cf_add_0lib=
5631 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5632 # filter duplicates
5633 for cf_add_1lib in $cf_add_0lib; do
5634         for cf_add_2lib in $cf_add_libs; do
5635                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5636                         cf_add_1lib=
5637                         break
5638                 fi
5639         done
5640         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5641 done
5642 LIBS="$cf_add_libs"
5643
5644                 cat >conftest.$ac_ext <<_ACEOF
5645 #line 5645 "configure"
5646 #include "confdefs.h"
5647
5648 int
5649 main (void)
5650 {
5651
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658   (eval $ac_link) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest$ac_exeext'
5663   { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664   (eval $ac_try) 2>&5
5665   ac_status=$?
5666   echo "$as_me:5666: \$? = $ac_status" >&5
5667   (exit $ac_status); }; }; then
5668   cf_rpath_space=no
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 cf_rpath_space=yes
5673 fi
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675                 LIBS="$cf_save_LIBS"
5676                 echo "$as_me:5676: result: $cf_rpath_space" >&5
5677 echo "${ECHO_T}$cf_rpath_space" >&6
5678                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5679                 ;;
5680         esac
5681 fi
5682
5683         RM_SHARED_OPTS=
5684         LOCAL_LDFLAGS=
5685         LOCAL_LDFLAGS2=
5686         LD_SHARED_OPTS=
5687         INSTALL_LIB="-m 644"
5688         : ${rel_builddir:=.}
5689
5690         shlibdir=$libdir
5691
5692         MAKE_DLLS="#"
5693
5694         cf_cv_do_symlinks=no
5695         cf_ld_rpath_opt=
5696         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5697
5698         echo "$as_me:5698: checking if release/abi version should be used for shared libs" >&5
5699 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5700
5701 # Check whether --with-shlib-version or --without-shlib-version was given.
5702 if test "${with_shlib_version+set}" = set; then
5703   withval="$with_shlib_version"
5704   test -z "$withval" && withval=auto
5705         case $withval in
5706         (yes)
5707                 cf_cv_shlib_version=auto
5708                 ;;
5709         (rel|abi|auto)
5710                 cf_cv_shlib_version=$withval
5711                 ;;
5712         (*)
5713                 echo "$as_me:5713: result: $withval" >&5
5714 echo "${ECHO_T}$withval" >&6
5715                 { { echo "$as_me:5715: error: option value must be one of: rel, abi, or auto" >&5
5716 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5717    { (exit 1); exit 1; }; }
5718                 ;;
5719         esac
5720
5721 else
5722   cf_cv_shlib_version=auto
5723 fi;
5724         echo "$as_me:5724: result: $cf_cv_shlib_version" >&5
5725 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5726
5727         cf_cv_rm_so_locs=no
5728         cf_try_cflags=
5729
5730         # Some less-capable ports of gcc support only -fpic
5731         CC_SHARED_OPTS=
5732
5733         cf_try_fPIC=no
5734         if test "$GCC" = yes
5735         then
5736                 cf_try_fPIC=yes
5737         else
5738                 case $cf_cv_system_name in
5739                 (*linux*)       # e.g., PGI compiler
5740                         cf_try_fPIC=yes
5741                         ;;
5742                 esac
5743         fi
5744
5745         if test "$cf_try_fPIC" = yes
5746         then
5747                 echo "$as_me:5747: checking which $CC option to use" >&5
5748 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5749                 cf_save_CFLAGS="$CFLAGS"
5750                 for CC_SHARED_OPTS in -fPIC -fpic ''
5751                 do
5752                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5753                         cat >conftest.$ac_ext <<_ACEOF
5754 #line 5754 "configure"
5755 #include "confdefs.h"
5756 #include <stdio.h>
5757 int
5758 main (void)
5759 {
5760 int x = 1
5761   ;
5762   return 0;
5763 }
5764 _ACEOF
5765 rm -f conftest.$ac_objext
5766 if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5
5767   (eval $ac_compile) 2>&5
5768   ac_status=$?
5769   echo "$as_me:5769: \$? = $ac_status" >&5
5770   (exit $ac_status); } &&
5771          { ac_try='test -s conftest.$ac_objext'
5772   { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5773   (eval $ac_try) 2>&5
5774   ac_status=$?
5775   echo "$as_me:5775: \$? = $ac_status" >&5
5776   (exit $ac_status); }; }; then
5777   break
5778 else
5779   echo "$as_me: failed program was:" >&5
5780 cat conftest.$ac_ext >&5
5781 fi
5782 rm -f conftest.$ac_objext conftest.$ac_ext
5783                 done
5784                 echo "$as_me:5784: result: $CC_SHARED_OPTS" >&5
5785 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5786                 CFLAGS="$cf_save_CFLAGS"
5787         fi
5788
5789         cf_cv_shlib_version_infix=no
5790
5791         case $cf_cv_system_name in
5792         (aix4.3-9*|aix[5-7]*)
5793                 if test "$GCC" = yes; then
5794                         CC_SHARED_OPTS='-Wl,-brtl'
5795                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5796                 else
5797                         CC_SHARED_OPTS='-brtl'
5798                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5799                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5800                 fi
5801                 ;;
5802         (beos*)
5803                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5804                 ;;
5805         (cygwin*)
5806                 CC_SHARED_OPTS=
5807                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5808                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5809                 cf_cv_shlib_version=cygdll
5810                 cf_cv_shlib_version_infix=cygdll
5811                 shlibdir=$bindir
5812                 MAKE_DLLS=
5813                 cat >mk_shared_lib.sh <<-CF_EOF
5814                 #!$SHELL
5815                 SHARED_LIB=\$1
5816                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5817                 shift
5818                 cat <<-EOF
5819                 Linking shared library
5820                 ** SHARED_LIB \$SHARED_LIB
5821                 ** IMPORT_LIB \$IMPORT_LIB
5822 EOF
5823                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5824 CF_EOF
5825                 chmod +x mk_shared_lib.sh
5826                 ;;
5827         (msys*)
5828                 CC_SHARED_OPTS=
5829                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5830                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5831                 cf_cv_shlib_version=msysdll
5832                 cf_cv_shlib_version_infix=msysdll
5833                 shlibdir=$bindir
5834                 MAKE_DLLS=
5835                 cat >mk_shared_lib.sh <<-CF_EOF
5836                 #!$SHELL
5837                 SHARED_LIB=\$1
5838                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5839                 shift
5840                 cat <<-EOF
5841                 Linking shared library
5842                 ** SHARED_LIB \$SHARED_LIB
5843                 ** IMPORT_LIB \$IMPORT_LIB
5844 EOF
5845                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5846 CF_EOF
5847                 chmod +x mk_shared_lib.sh
5848                 ;;
5849         (darwin*)
5850                 cf_try_cflags="no-cpp-precomp"
5851                 CC_SHARED_OPTS="-dynamic"
5852                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5853                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5854                 cf_cv_shlib_version_infix=yes
5855                 echo "$as_me:5855: checking if ld -search_paths_first works" >&5
5856 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5857 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5858   echo $ECHO_N "(cached) $ECHO_C" >&6
5859 else
5860
5861                         cf_save_LDFLAGS=$LDFLAGS
5862                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5863                         cat >conftest.$ac_ext <<_ACEOF
5864 #line 5864 "configure"
5865 #include "confdefs.h"
5866
5867 int
5868 main (void)
5869 {
5870 int i;
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest$ac_exeext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   cf_cv_ldflags_search_paths_first=yes
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5891 cf_cv_ldflags_search_paths_first=no
5892 fi
5893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894                                 LDFLAGS=$cf_save_LDFLAGS
5895 fi
5896 echo "$as_me:5896: result: $cf_cv_ldflags_search_paths_first" >&5
5897 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5898                 if test $cf_cv_ldflags_search_paths_first = yes; then
5899                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5900                 fi
5901                 ;;
5902         (hpux[7-8]*)
5903                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5904                 if test "$GCC" != yes; then
5905                         CC_SHARED_OPTS='+Z'
5906                 fi
5907                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5908                 INSTALL_LIB="-m 555"
5909                 ;;
5910         (hpux*)
5911                 # (tested with gcc 2.7.2 -- I don't have c89)
5912                 if test "$GCC" = yes; then
5913                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5914                 else
5915                         CC_SHARED_OPTS='+Z'
5916                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5917                 fi
5918                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5919                 # HP-UX shared libraries must be executable, and should be
5920                 # readonly to exploit a quirk in the memory manager.
5921                 INSTALL_LIB="-m 555"
5922                 ;;
5923         (interix*)
5924                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5925                 if test "$cf_cv_shlib_version" = rel; then
5926                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5927                 else
5928                         cf_shared_soname='`basename $@`'
5929                 fi
5930                 CC_SHARED_OPTS=
5931                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5932                 ;;
5933         (irix*)
5934                 if test "$cf_cv_enable_rpath" = yes ; then
5935                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5936                 fi
5937                 # tested with IRIX 5.2 and 'cc'.
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5941                 else
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5943                 fi
5944                 cf_cv_rm_so_locs=yes
5945                 ;;
5946         (linux*|gnu*|k*bsd*-gnu)
5947                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5948                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5963                 ;;
5964         (mingw*)
5965                 cf_cv_shlib_version=mingw
5966                 cf_cv_shlib_version_infix=mingw
5967                 shlibdir=$bindir
5968                 MAKE_DLLS=
5969                 if test "$DFT_LWR_MODEL" = "shared" ; then
5970                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5971                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5972                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5973                 fi
5974                 CC_SHARED_OPTS=
5975                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5976                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5977                 cat >mk_shared_lib.sh <<-CF_EOF
5978                 #!$SHELL
5979                 SHARED_LIB=\$1
5980                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5981                 shift
5982                 cat <<-EOF
5983                 Linking shared library
5984                 ** SHARED_LIB \$SHARED_LIB
5985                 ** IMPORT_LIB \$IMPORT_LIB
5986 EOF
5987                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5988 CF_EOF
5989                 chmod +x mk_shared_lib.sh
5990                 ;;
5991         (openbsd[2-9].*|mirbsd*)
5992                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5993                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5994                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5995                 fi
5996                 if test "$cf_cv_enable_rpath" = yes ; then
5997                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5998                 fi
5999                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6000
6001         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6002         if test "$cf_cv_shlib_version" = rel; then
6003                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6004         else
6005                 cf_cv_shared_soname='`basename $@`'
6006         fi
6007
6008                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6009                 ;;
6010         (nto-qnx*|openbsd*|freebsd[12].*)
6011                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6012                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6013                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6014                 ;;
6015         (dragonfly*|freebsd*)
6016                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6017                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6018                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6019                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6020                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6021                 fi
6022
6023         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6024         if test "$cf_cv_shlib_version" = rel; then
6025                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6026         else
6027                 cf_cv_shared_soname='`basename $@`'
6028         fi
6029
6030                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6031                 ;;
6032         (netbsd*)
6033                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6034                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6035                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6036                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6037                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6038                         if test "$cf_cv_shlib_version" = auto; then
6039                         if test -f /usr/libexec/ld.elf_so; then
6040                                 cf_cv_shlib_version=abi
6041                         else
6042                                 cf_cv_shlib_version=rel
6043                         fi
6044                         fi
6045
6046         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6047         if test "$cf_cv_shlib_version" = rel; then
6048                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6049         else
6050                 cf_cv_shared_soname='`basename $@`'
6051         fi
6052
6053                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6054                 else
6055                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6056                 fi
6057                 ;;
6058         (osf*|mls+*)
6059                 # tested with OSF/1 V3.2 and 'cc'
6060                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6061                 # link with shared libs).
6062                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6063                 case $host_os in
6064                 (osf4*)
6065                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6066                         ;;
6067                 esac
6068                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6069                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6070                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6071                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6072                 fi
6073                 cf_cv_rm_so_locs=yes
6074                 ;;
6075         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6076                 # tested with osr5.0.5
6077                 if test "$GCC" != yes; then
6078                         CC_SHARED_OPTS='-belf -KPIC'
6079                 fi
6080                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6081                 if test "$cf_cv_enable_rpath" = yes ; then
6082                         # only way is to set LD_RUN_PATH but no switch for it
6083                         RUN_PATH=$libdir
6084                 fi
6085                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6086                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6087                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6088                 ;;
6089         (sunos4*)
6090                 # tested with SunOS 4.1.1 and gcc 2.7.0
6091                 if test "$GCC" != yes; then
6092                         CC_SHARED_OPTS='-KPIC'
6093                 fi
6094                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6095                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6096                 ;;
6097         (solaris2*)
6098                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6099                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6100                 if test "$DFT_LWR_MODEL" = "shared" ; then
6101                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6103                 fi
6104                 if test "$cf_cv_enable_rpath" = yes ; then
6105                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6106                 fi
6107
6108         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6109         if test "$cf_cv_shlib_version" = rel; then
6110                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6111         else
6112                 cf_cv_shared_soname='`basename $@`'
6113         fi
6114
6115                 if test "$GCC" != yes; then
6116                         cf_save_CFLAGS="$CFLAGS"
6117                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6118                         do
6119                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6120                                 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main (void)
6126 {
6127 printf("Hello\n");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext
6133 if { (eval echo "$as_me:6133: \"$ac_compile\"") >&5
6134   (eval $ac_compile) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest.$ac_objext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   break
6145 else
6146   echo "$as_me: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 fi
6149 rm -f conftest.$ac_objext conftest.$ac_ext
6150                         done
6151                         CFLAGS="$cf_save_CFLAGS"
6152                         CC_SHARED_OPTS=$cf_shared_opts
6153                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6154                 else
6155                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6156                 fi
6157                 ;;
6158         (sysv5uw7*|unix_sv*)
6159                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6160                 if test "$GCC" != yes; then
6161                         CC_SHARED_OPTS='-KPIC'
6162                 fi
6163                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6164                 ;;
6165         (*)
6166                 CC_SHARED_OPTS='unknown'
6167                 MK_SHARED_LIB='echo unknown'
6168                 ;;
6169         esac
6170
6171         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6172         case "$cf_cv_shlib_version" in
6173         (rel|abi)
6174                 case "$MK_SHARED_LIB" in
6175                 (*'-o $@')
6176                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6177                         ;;
6178                 (*)
6179                         { echo "$as_me:6179: WARNING: ignored --with-shlib-version" >&5
6180 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6181                         ;;
6182                 esac
6183                 ;;
6184         esac
6185
6186         if test -n "$cf_try_cflags"
6187         then
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6189 "${as_me:-configure}"
6190 #include <stdio.h>
6191 int main(int argc, char *argv[])
6192 {
6193         printf("hello\n");
6194         return (argv[argc-1] == 0) ;
6195 }
6196 EOF
6197                 cf_save_CFLAGS="$CFLAGS"
6198                 for cf_opt in $cf_try_cflags
6199                 do
6200                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6201                         echo "$as_me:6201: checking if CFLAGS option -$cf_opt works" >&5
6202 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6203                         if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit $ac_status); }; then
6208                                 echo "$as_me:6208: result: yes" >&5
6209 echo "${ECHO_T}yes" >&6
6210                                 cf_save_CFLAGS="$CFLAGS"
6211                         else
6212                                 echo "$as_me:6212: result: no" >&5
6213 echo "${ECHO_T}no" >&6
6214                         fi
6215                 done
6216                 CFLAGS="$cf_save_CFLAGS"
6217         fi
6218
6219         # RPATH_LIST is a colon-separated list of directories
6220         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6221         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6222
6223         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6224
6225         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6226
6227 echo "${as_me:-configure}:6227: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6228
6229         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6230
6231 echo "${as_me:-configure}:6231: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6232
6233 for model in $cf_list_models; do
6234         case $model in
6235         (libtool)
6236
6237 echo "$as_me:6237: checking for additional libtool options" >&5
6238 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6239
6240 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6241 if test "${with_libtool_opts+set}" = set; then
6242   withval="$with_libtool_opts"
6243   with_libtool_opts=$withval
6244 else
6245   with_libtool_opts=no
6246 fi;
6247 echo "$as_me:6247: result: $with_libtool_opts" >&5
6248 echo "${ECHO_T}$with_libtool_opts" >&6
6249
6250 case .$with_libtool_opts in
6251 (.yes|.no|.)
6252         ;;
6253 (*)
6254         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6255         ;;
6256 esac
6257
6258 echo "$as_me:6258: checking if exported-symbols file should be used" >&5
6259 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6260
6261 # Check whether --with-export-syms or --without-export-syms was given.
6262 if test "${with_export_syms+set}" = set; then
6263   withval="$with_export_syms"
6264   with_export_syms=$withval
6265 else
6266   with_export_syms=no
6267 fi;
6268 if test "x$with_export_syms" = xyes
6269 then
6270         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6271
6272 fi
6273 echo "$as_me:6273: result: $with_export_syms" >&5
6274 echo "${ECHO_T}$with_export_syms" >&6
6275 if test "x$with_export_syms" != xno
6276 then
6277         EXPORT_SYMS="-export-symbols $with_export_syms"
6278
6279 fi
6280
6281                 ;;
6282         (shared)
6283                 if test "$CC_SHARED_OPTS" = "unknown"; then
6284                         { { echo "$as_me:6284: error: Shared libraries are not supported in this version" >&5
6285 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6286    { (exit 1); exit 1; }; }
6287                 fi
6288                 # workaround for inept transition to PIE vs PIC...
6289                 echo "$as_me:6289: checking if current CFLAGS link properly" >&5
6290 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6291                 cat >conftest.$ac_ext <<_ACEOF
6292 #line 6292 "configure"
6293 #include "confdefs.h"
6294 #include <stdio.h>
6295 int
6296 main (void)
6297 {
6298 printf("Hello work\n");
6299   ;
6300   return 0;
6301 }
6302 _ACEOF
6303 rm -f conftest.$ac_objext conftest$ac_exeext
6304 if { (eval echo "$as_me:6304: \"$ac_link\"") >&5
6305   (eval $ac_link) 2>&5
6306   ac_status=$?
6307   echo "$as_me:6307: \$? = $ac_status" >&5
6308   (exit $ac_status); } &&
6309          { ac_try='test -s conftest$ac_exeext'
6310   { (eval echo "$as_me:6310: \"$ac_try\"") >&5
6311   (eval $ac_try) 2>&5
6312   ac_status=$?
6313   echo "$as_me:6313: \$? = $ac_status" >&5
6314   (exit $ac_status); }; }; then
6315   cf_cflags_work=yes
6316 else
6317   echo "$as_me: failed program was:" >&5
6318 cat conftest.$ac_ext >&5
6319 cf_cflags_work=no
6320 fi
6321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6322                 echo "$as_me:6322: result: $cf_cflags_work" >&5
6323 echo "${ECHO_T}$cf_cflags_work" >&6
6324                 if test "$cf_cflags_work" = no
6325                 then
6326                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6327
6328 echo "${as_me:-configure}:6328: testing try to work around by appending shared-options ..." 1>&5
6329
6330                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6331                 fi
6332
6333 echo "$as_me:6333: checking if versioned-symbols file should be used" >&5
6334 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6335
6336 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6337 if test "${with_versioned_syms+set}" = set; then
6338   withval="$with_versioned_syms"
6339   with_versioned_syms=$withval
6340 else
6341   with_versioned_syms=no
6342 fi;
6343 case "x$with_versioned_syms" in
6344 (xyes)
6345         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6346
6347         ;;
6348 (xno)
6349         ;;
6350 (x/*)
6351         test -f "$with_versioned_syms" || { { echo "$as_me:6351: error: expected a filename: $with_versioned_syms" >&5
6352 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6353    { (exit 1); exit 1; }; }
6354         ;;
6355 (*)
6356         test -f "$with_versioned_syms" || { { echo "$as_me:6356: error: expected a filename: $with_versioned_syms" >&5
6357 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6358    { (exit 1); exit 1; }; }
6359         with_versioned_syms=`pwd`/"$with_versioned_syms"
6360         ;;
6361 esac
6362 echo "$as_me:6362: result: $with_versioned_syms" >&5
6363 echo "${ECHO_T}$with_versioned_syms" >&6
6364
6365 RESULTING_SYMS=
6366 VERSIONED_SYMS=
6367 WILDCARD_SYMS=
6368
6369 if test "x$with_versioned_syms" != xno
6370 then
6371         RESULTING_SYMS=$with_versioned_syms
6372         case "x$MK_SHARED_LIB" in
6373         (*-Wl,*)
6374                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6375                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6376                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6377
6378 echo "${as_me:-configure}:6378: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6379
6380                 ;;
6381         (*-dy\ *)
6382                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6383                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6384                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6385
6386 echo "${as_me:-configure}:6386: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6387
6388                 ;;
6389         (*)
6390                 { echo "$as_me:6390: WARNING: this system does not support versioned-symbols" >&5
6391 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6392                 ;;
6393         esac
6394
6395         # Linux ld can selectively override scope, e.g., of symbols beginning with
6396         # "_" by first declaring some as global, and then using a wildcard to
6397         # declare the others as local.  Some other loaders cannot do this.  Check
6398         # by constructing a (very) simple shared library and inspecting its
6399         # symbols.
6400         if test "x$VERSIONED_SYMS" != "x"
6401         then
6402                 echo "$as_me:6402: checking if wildcards can be used to selectively omit symbols" >&5
6403 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6404                 WILDCARD_SYMS=no
6405
6406                 # make sources
6407                 rm -f conftest.*
6408
6409                 cat >conftest.ver <<EOF
6410 module_1.0 {
6411 global:
6412         globalf1;
6413 local:
6414         localf1;
6415 };
6416 module_2.0 {
6417 global:
6418         globalf2;
6419 local:
6420         localf2;
6421         _*;
6422 } module_1.0;
6423 submodule_1.0 {
6424 global:
6425         subglobalf1;
6426         _ismissing;
6427 local:
6428         sublocalf1;
6429 };
6430 submodule_2.0 {
6431 global:
6432         subglobalf2;
6433 local:
6434         sublocalf2;
6435         _*;
6436 } submodule_1.0;
6437 EOF
6438                 cat >conftest.$ac_ext <<EOF
6439 #line 6439 "configure"
6440 int     _ismissing(void) { return 1; }
6441 int     _localf1(void) { return 1; }
6442 int     _localf2(void) { return 2; }
6443 int     globalf1(void) { return 1; }
6444 int     globalf2(void) { return 2; }
6445 int     _sublocalf1(void) { return 1; }
6446 int     _sublocalf2(void) { return 2; }
6447 int     subglobalf1(void) { return 1; }
6448 int     subglobalf2(void) { return 2; }
6449 EOF
6450                 cat >conftest.mk <<EOF
6451 CC=${CC}
6452 CFLAGS=${CFLAGS}
6453 CPPFLAGS=${CPPFLAGS}
6454 LDFLAGS=${LDFLAGS}
6455 LIBS=${LIBS}
6456 VERSIONED_SYMS=${VERSIONED_SYMS}
6457 RESULTING_SYMS=conftest.ver
6458 MK_SHARED_LIB=${MK_SHARED_LIB}
6459 conftest.so: conftest.$ac_cv_objext
6460                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6461 EOF
6462
6463                 # compile source, make library
6464                 if make -f conftest.mk 2>&5 >/dev/null
6465                 then
6466                         # test for missing symbol in either Data or Text section
6467                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6468                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6469                 fi
6470                 echo "$as_me:6470: result: $WILDCARD_SYMS" >&5
6471 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6472                 rm -f conftest.*
6473         fi
6474 fi
6475
6476                 ;;
6477         esac
6478 done
6479
6480 ### Checks for special libraries, must be done up-front.
6481 SHLIB_LIST=""
6482
6483 echo "$as_me:6483: checking if you want to link with the GPM mouse library" >&5
6484 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6485
6486 # Check whether --with-gpm or --without-gpm was given.
6487 if test "${with_gpm+set}" = set; then
6488   withval="$with_gpm"
6489   with_gpm=$withval
6490 else
6491   with_gpm=maybe
6492 fi;
6493 echo "$as_me:6493: result: $with_gpm" >&5
6494 echo "${ECHO_T}$with_gpm" >&6
6495
6496 if test "$with_gpm" != no ; then
6497         echo "$as_me:6497: checking for gpm.h" >&5
6498 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6499 if test "${ac_cv_header_gpm_h+set}" = set; then
6500   echo $ECHO_N "(cached) $ECHO_C" >&6
6501 else
6502   cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 #include <gpm.h>
6506 _ACEOF
6507 if { (eval echo "$as_me:6507: \"$ac_cpp conftest.$ac_ext\"") >&5
6508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6509   ac_status=$?
6510   egrep -v '^ *\+' conftest.er1 >conftest.err
6511   rm -f conftest.er1
6512   cat conftest.err >&5
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit $ac_status); } >/dev/null; then
6515   if test -s conftest.err; then
6516     ac_cpp_err=$ac_c_preproc_warn_flag
6517   else
6518     ac_cpp_err=
6519   fi
6520 else
6521   ac_cpp_err=yes
6522 fi
6523 if test -z "$ac_cpp_err"; then
6524   ac_cv_header_gpm_h=yes
6525 else
6526   echo "$as_me: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   ac_cv_header_gpm_h=no
6529 fi
6530 rm -f conftest.err conftest.$ac_ext
6531 fi
6532 echo "$as_me:6532: result: $ac_cv_header_gpm_h" >&5
6533 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6534 if test $ac_cv_header_gpm_h = yes; then
6535
6536 cat >>confdefs.h <<\EOF
6537 #define HAVE_GPM_H 1
6538 EOF
6539
6540                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6541                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6542
6543 echo "${as_me:-configure}:6543: testing assuming we really have GPM library ..." 1>&5
6544
6545 cat >>confdefs.h <<\EOF
6546 #define HAVE_LIBGPM 1
6547 EOF
6548
6549                         with_gpm=yes
6550                 else
6551                         echo "$as_me:6551: checking for Gpm_Open in -lgpm" >&5
6552 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6553 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6554   echo $ECHO_N "(cached) $ECHO_C" >&6
6555 else
6556   ac_check_lib_save_LIBS=$LIBS
6557 LIBS="-lgpm  $LIBS"
6558 cat >conftest.$ac_ext <<_ACEOF
6559 #line 6559 "configure"
6560 #include "confdefs.h"
6561
6562 /* Override any gcc2 internal prototype to avoid an error.  */
6563 #ifdef __cplusplus
6564 extern "C"
6565 #endif
6566 /* We use char because int might match the return type of a gcc2
6567    builtin and then its argument prototype would still apply.  */
6568 char Gpm_Open ();
6569 int
6570 main (void)
6571 {
6572 Gpm_Open ();
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 rm -f conftest.$ac_objext conftest$ac_exeext
6578 if { (eval echo "$as_me:6578: \"$ac_link\"") >&5
6579   (eval $ac_link) 2>&5
6580   ac_status=$?
6581   echo "$as_me:6581: \$? = $ac_status" >&5
6582   (exit $ac_status); } &&
6583          { ac_try='test -s conftest$ac_exeext'
6584   { (eval echo "$as_me:6584: \"$ac_try\"") >&5
6585   (eval $ac_try) 2>&5
6586   ac_status=$?
6587   echo "$as_me:6587: \$? = $ac_status" >&5
6588   (exit $ac_status); }; }; then
6589   ac_cv_lib_gpm_Gpm_Open=yes
6590 else
6591   echo "$as_me: failed program was:" >&5
6592 cat conftest.$ac_ext >&5
6593 ac_cv_lib_gpm_Gpm_Open=no
6594 fi
6595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6596 LIBS=$ac_check_lib_save_LIBS
6597 fi
6598 echo "$as_me:6598: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6599 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6600 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6601   with_gpm=yes
6602 else
6603
6604                                 if test "$with_gpm" = maybe; then
6605                                         { echo "$as_me:6605: WARNING: Cannot link with GPM library" >&5
6606 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6607                                         with_gpm=no
6608                                 else
6609                                         { { echo "$as_me:6609: error: Cannot link with GPM library" >&5
6610 echo "$as_me: error: Cannot link with GPM library" >&2;}
6611    { (exit 1); exit 1; }; }
6612                                 fi
6613
6614 fi
6615
6616                 fi
6617
6618 else
6619
6620                 test "$with_gpm" != maybe && { echo "$as_me:6620: WARNING: Cannot find GPM header" >&5
6621 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6622                 with_gpm=no
6623
6624 fi
6625
6626 fi
6627
6628 if test "$with_gpm" != no ; then
6629         echo "$as_me:6629: checking if you want to load GPM dynamically" >&5
6630 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6631
6632 # Check whether --with-dlsym or --without-dlsym was given.
6633 if test "${with_dlsym+set}" = set; then
6634   withval="$with_dlsym"
6635   with_dlsym=$withval
6636 else
6637   with_dlsym=yes
6638 fi;
6639         echo "$as_me:6639: result: $with_dlsym" >&5
6640 echo "${ECHO_T}$with_dlsym" >&6
6641         if test "x$with_dlsym" = xyes ; then
6642
6643 cf_have_dlsym=no
6644 echo "$as_me:6644: checking for dlsym" >&5
6645 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6646 if test "${ac_cv_func_dlsym+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   cat >conftest.$ac_ext <<_ACEOF
6650 #line 6650 "configure"
6651 #include "confdefs.h"
6652 #define dlsym autoconf_temporary
6653 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6654 #undef dlsym
6655
6656 #ifdef __cplusplus
6657 extern "C"
6658 #endif
6659
6660 /* We use char because int might match the return type of a gcc2
6661    builtin and then its argument prototype would still apply.  */
6662 char dlsym (void);
6663
6664 int
6665 main (void)
6666 {
6667
6668 /* The GNU C library defines stubs for functions which it implements
6669     to always fail with ENOSYS.  Some functions are actually named
6670     something starting with __ and the normal name is an alias.  */
6671 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6672 #error found stub for dlsym
6673 #endif
6674
6675         return dlsym ();
6676   ;
6677   return 0;
6678 }
6679 _ACEOF
6680 rm -f conftest.$ac_objext conftest$ac_exeext
6681 if { (eval echo "$as_me:6681: \"$ac_link\"") >&5
6682   (eval $ac_link) 2>&5
6683   ac_status=$?
6684   echo "$as_me:6684: \$? = $ac_status" >&5
6685   (exit $ac_status); } &&
6686          { ac_try='test -s conftest$ac_exeext'
6687   { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688   (eval $ac_try) 2>&5
6689   ac_status=$?
6690   echo "$as_me:6690: \$? = $ac_status" >&5
6691   (exit $ac_status); }; }; then
6692   ac_cv_func_dlsym=yes
6693 else
6694   echo "$as_me: failed program was:" >&5
6695 cat conftest.$ac_ext >&5
6696 ac_cv_func_dlsym=no
6697 fi
6698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6699 fi
6700 echo "$as_me:6700: result: $ac_cv_func_dlsym" >&5
6701 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6702 if test $ac_cv_func_dlsym = yes; then
6703   cf_have_dlsym=yes
6704 else
6705
6706 cf_have_libdl=no
6707 echo "$as_me:6707: checking for dlsym in -ldl" >&5
6708 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6709 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6710   echo $ECHO_N "(cached) $ECHO_C" >&6
6711 else
6712   ac_check_lib_save_LIBS=$LIBS
6713 LIBS="-ldl  $LIBS"
6714 cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717
6718 /* Override any gcc2 internal prototype to avoid an error.  */
6719 #ifdef __cplusplus
6720 extern "C"
6721 #endif
6722 /* We use char because int might match the return type of a gcc2
6723    builtin and then its argument prototype would still apply.  */
6724 char dlsym ();
6725 int
6726 main (void)
6727 {
6728 dlsym ();
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f conftest.$ac_objext conftest$ac_exeext
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); } &&
6739          { ac_try='test -s conftest$ac_exeext'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); }; }; then
6745   ac_cv_lib_dl_dlsym=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 ac_cv_lib_dl_dlsym=no
6750 fi
6751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752 LIBS=$ac_check_lib_save_LIBS
6753 fi
6754 echo "$as_me:6754: result: $ac_cv_lib_dl_dlsym" >&5
6755 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6756 if test $ac_cv_lib_dl_dlsym = yes; then
6757
6758         cf_have_dlsym=yes
6759         cf_have_libdl=yes
6760 fi
6761
6762 fi
6763
6764 if test "$cf_have_dlsym" = yes ; then
6765         test "$cf_have_libdl" = yes && {
6766 cf_add_libs="$LIBS"
6767 # reverse order
6768 cf_add_0lib=
6769 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6770 # filter duplicates
6771 for cf_add_1lib in $cf_add_0lib; do
6772         for cf_add_2lib in $cf_add_libs; do
6773                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6774                         cf_add_1lib=
6775                         break
6776                 fi
6777         done
6778         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6779 done
6780 LIBS="$cf_add_libs"
6781  }
6782
6783         echo "$as_me:6783: checking whether able to link to dl*() functions" >&5
6784 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6785         cat >conftest.$ac_ext <<_ACEOF
6786 #line 6786 "configure"
6787 #include "confdefs.h"
6788 #include <dlfcn.h>
6789 int
6790 main (void)
6791 {
6792
6793                 void *obj;
6794                 if ((obj = dlopen("filename", 0)) != 0) {
6795                         if (dlsym(obj, "symbolname") == 0) {
6796                         dlclose(obj);
6797                         }
6798                 }
6799   ;
6800   return 0;
6801 }
6802 _ACEOF
6803 rm -f conftest.$ac_objext conftest$ac_exeext
6804 if { (eval echo "$as_me:6804: \"$ac_link\"") >&5
6805   (eval $ac_link) 2>&5
6806   ac_status=$?
6807   echo "$as_me:6807: \$? = $ac_status" >&5
6808   (exit $ac_status); } &&
6809          { ac_try='test -s conftest$ac_exeext'
6810   { (eval echo "$as_me:6810: \"$ac_try\"") >&5
6811   (eval $ac_try) 2>&5
6812   ac_status=$?
6813   echo "$as_me:6813: \$? = $ac_status" >&5
6814   (exit $ac_status); }; }; then
6815
6816 cat >>confdefs.h <<\EOF
6817 #define HAVE_LIBDL 1
6818 EOF
6819
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6823
6824                 { { echo "$as_me:6824: error: Cannot link test program for libdl" >&5
6825 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6826    { (exit 1); exit 1; }; }
6827 fi
6828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6829         echo "$as_me:6829: result: ok" >&5
6830 echo "${ECHO_T}ok" >&6
6831 else
6832         { { echo "$as_me:6832: error: Cannot find dlsym function" >&5
6833 echo "$as_me: error: Cannot find dlsym function" >&2;}
6834    { (exit 1); exit 1; }; }
6835 fi
6836
6837                 if test "x$with_gpm" != xyes ; then
6838                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6839
6840 echo "${as_me:-configure}:6840: testing assuming soname for gpm is $with_gpm ..." 1>&5
6841
6842                         cf_cv_gpm_soname="$with_gpm"
6843                 else
6844
6845 echo "$as_me:6845: checking for soname of gpm library" >&5
6846 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6847 if test "${cf_cv_gpm_soname+set}" = set; then
6848   echo $ECHO_N "(cached) $ECHO_C" >&6
6849 else
6850
6851 cf_cv_gpm_soname=unknown
6852 if test "$cross_compiling" != yes ; then
6853 cat >conftest.$ac_ext <<CF_EOF
6854 #include <gpm.h>
6855 int main(void)
6856 {
6857 if (Gpm_Open(0,0)) Gpm_Close();
6858         ${cf_cv_main_return:-return}(0);
6859 }
6860 CF_EOF
6861 cf_save_LIBS="$LIBS"
6862
6863 cf_add_libs="$LIBS"
6864 # reverse order
6865 cf_add_0lib=
6866 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6867 # filter duplicates
6868 for cf_add_1lib in $cf_add_0lib; do
6869         for cf_add_2lib in $cf_add_libs; do
6870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6871                         cf_add_1lib=
6872                         break
6873                 fi
6874         done
6875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6876 done
6877 LIBS="$cf_add_libs"
6878
6879         if { (eval echo "$as_me:6879: \"$ac_compile\"") >&5
6880   (eval $ac_compile) 2>&5
6881   ac_status=$?
6882   echo "$as_me:6882: \$? = $ac_status" >&5
6883   (exit $ac_status); } ; then
6884                 if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885   (eval $ac_link) 2>&5
6886   ac_status=$?
6887   echo "$as_me:6887: \$? = $ac_status" >&5
6888   (exit $ac_status); } ; then
6889                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6890                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6891                 fi
6892         fi
6893 rm -rf conftest*
6894 LIBS="$cf_save_LIBS"
6895 fi
6896
6897 fi
6898 echo "$as_me:6898: result: $cf_cv_gpm_soname" >&5
6899 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6900
6901                 fi
6902                 test "$cf_cv_gpm_soname" != "unknown" &&
6903 cat >>confdefs.h <<EOF
6904 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6905 EOF
6906
6907                 SHLIB_LIST="-ldl $SHLIB_LIST"
6908
6909 cf_add_libs="$PRIVATE_LIBS"
6910 # reverse order
6911 cf_add_0lib=
6912 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6913 # filter duplicates
6914 for cf_add_1lib in $cf_add_0lib; do
6915         for cf_add_2lib in $cf_add_libs; do
6916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6917                         cf_add_1lib=
6918                         break
6919                 fi
6920         done
6921         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6922 done
6923 PRIVATE_LIBS="$cf_add_libs"
6924
6925         else
6926                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6927
6928 cf_add_libs="$TEST_LIBS"
6929 # reverse order
6930 cf_add_0lib=
6931 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6932 # filter duplicates
6933 for cf_add_1lib in $cf_add_0lib; do
6934         for cf_add_2lib in $cf_add_libs; do
6935                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6936                         cf_add_1lib=
6937                         break
6938                 fi
6939         done
6940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6941 done
6942 TEST_LIBS="$cf_add_libs"
6943
6944 cf_add_libs="$PRIVATE_LIBS"
6945 # reverse order
6946 cf_add_0lib=
6947 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6948 # filter duplicates
6949 for cf_add_1lib in $cf_add_0lib; do
6950         for cf_add_2lib in $cf_add_libs; do
6951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6952                         cf_add_1lib=
6953                         break
6954                 fi
6955         done
6956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6957 done
6958 PRIVATE_LIBS="$cf_add_libs"
6959
6960         fi
6961
6962 cat >>confdefs.h <<\EOF
6963 #define HAVE_LIBGPM 1
6964 EOF
6965
6966 echo "$as_me:6966: checking for Gpm_Wgetch in -lgpm" >&5
6967 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6968 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6969   echo $ECHO_N "(cached) $ECHO_C" >&6
6970 else
6971   ac_check_lib_save_LIBS=$LIBS
6972 LIBS="-lgpm  $LIBS"
6973 cat >conftest.$ac_ext <<_ACEOF
6974 #line 6974 "configure"
6975 #include "confdefs.h"
6976
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 #ifdef __cplusplus
6979 extern "C"
6980 #endif
6981 /* We use char because int might match the return type of a gcc2
6982    builtin and then its argument prototype would still apply.  */
6983 char Gpm_Wgetch ();
6984 int
6985 main (void)
6986 {
6987 Gpm_Wgetch ();
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 rm -f conftest.$ac_objext conftest$ac_exeext
6993 if { (eval echo "$as_me:6993: \"$ac_link\"") >&5
6994   (eval $ac_link) 2>&5
6995   ac_status=$?
6996   echo "$as_me:6996: \$? = $ac_status" >&5
6997   (exit $ac_status); } &&
6998          { ac_try='test -s conftest$ac_exeext'
6999   { (eval echo "$as_me:6999: \"$ac_try\"") >&5
7000   (eval $ac_try) 2>&5
7001   ac_status=$?
7002   echo "$as_me:7002: \$? = $ac_status" >&5
7003   (exit $ac_status); }; }; then
7004   ac_cv_lib_gpm_Gpm_Wgetch=yes
7005 else
7006   echo "$as_me: failed program was:" >&5
7007 cat conftest.$ac_ext >&5
7008 ac_cv_lib_gpm_Gpm_Wgetch=no
7009 fi
7010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7011 LIBS=$ac_check_lib_save_LIBS
7012 fi
7013 echo "$as_me:7013: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7014 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7015 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7016
7017 echo "$as_me:7017: checking if GPM is weakly bound to curses library" >&5
7018 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7019 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7020   echo $ECHO_N "(cached) $ECHO_C" >&6
7021 else
7022
7023 cf_cv_check_gpm_wgetch=unknown
7024 if test "$cross_compiling" != yes ; then
7025
7026 cat >conftest.$ac_ext <<CF_EOF
7027 #include <gpm.h>
7028 int main(void)
7029 {
7030         Gpm_Wgetch();
7031         ${cf_cv_main_return:-return}(0);
7032 }
7033 CF_EOF
7034
7035         cf_save_LIBS="$LIBS"
7036         # This only works if we can look at the symbol table.  If a shared
7037         # library is stripped for install, we cannot use that.  So we're forced
7038         # to rely on the static library, noting that some packagers may not
7039         # include it.
7040         LIBS="-static -lgpm -dynamic $LIBS"
7041         if { (eval echo "$as_me:7041: \"$ac_compile\"") >&5
7042   (eval $ac_compile) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); } ; then
7046                 if { (eval echo "$as_me:7046: \"$ac_link\"") >&5
7047   (eval $ac_link) 2>&5
7048   ac_status=$?
7049   echo "$as_me:7049: \$? = $ac_status" >&5
7050   (exit $ac_status); } ; then
7051                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7052                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7053                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7054                 fi
7055         fi
7056         rm -rf conftest*
7057         LIBS="$cf_save_LIBS"
7058 fi
7059
7060 fi
7061 echo "$as_me:7061: result: $cf_cv_check_gpm_wgetch" >&5
7062 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7063
7064 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7065         { echo "$as_me:7065: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7066 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7067 fi
7068
7069 fi
7070
7071 fi
7072
7073 echo "$as_me:7073: checking if you want to use PCRE2 for regular-expressions" >&5
7074 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7075
7076 # Check whether --with-pcre2 or --without-pcre2 was given.
7077 if test "${with_pcre2+set}" = set; then
7078   withval="$with_pcre2"
7079
7080 fi;
7081 test -z "$with_pcre2" && with_pcre2=no
7082 echo "$as_me:7082: result: $with_pcre2" >&5
7083 echo "${ECHO_T}$with_pcre2" >&6
7084
7085 if test "x$with_pcre2" != xno ; then
7086
7087 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7088         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7089
7090 echo "${as_me:-configure}:7090: testing found package libpcre2 ..." 1>&5
7091
7092         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7093         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7094         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7095
7096 echo "${as_me:-configure}:7096: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7097
7098         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7099
7100 echo "${as_me:-configure}:7100: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7101
7102 cf_fix_cppflags=no
7103 cf_new_cflags=
7104 cf_new_cppflags=
7105 cf_new_extra_cppflags=
7106
7107 for cf_add_cflags in $cf_pkgconfig_incs
7108 do
7109 case $cf_fix_cppflags in
7110 (no)
7111         case $cf_add_cflags in
7112         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7113                 case $cf_add_cflags in
7114                 (-D*)
7115                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7116
7117                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7118                                 && test -z "${cf_tst_cflags}" \
7119                                 && cf_fix_cppflags=yes
7120
7121                         if test $cf_fix_cppflags = yes ; then
7122
7123         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7124         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7125
7126                                 continue
7127                         elif test "${cf_tst_cflags}" = "\"'" ; then
7128
7129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7131
7132                                 continue
7133                         fi
7134                         ;;
7135                 esac
7136                 case "$CPPFLAGS" in
7137                 (*$cf_add_cflags)
7138                         ;;
7139                 (*)
7140                         case $cf_add_cflags in
7141                         (-D*)
7142                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7143
7144 CPPFLAGS=`echo "$CPPFLAGS" | \
7145         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7146                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7147
7148                                 ;;
7149                         esac
7150
7151         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7152         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7153
7154                         ;;
7155                 esac
7156                 ;;
7157         (*)
7158
7159         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7160         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7161
7162                 ;;
7163         esac
7164         ;;
7165 (yes)
7166
7167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7169
7170         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7171
7172         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7173                 && test -z "${cf_tst_cflags}" \
7174                 && cf_fix_cppflags=no
7175         ;;
7176 esac
7177 done
7178
7179 if test -n "$cf_new_cflags" ; then
7180
7181         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7182         CFLAGS="${CFLAGS}$cf_new_cflags"
7183
7184 fi
7185
7186 if test -n "$cf_new_cppflags" ; then
7187
7188         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7189         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7190
7191 fi
7192
7193 if test -n "$cf_new_extra_cppflags" ; then
7194
7195         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7196         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7197
7198 fi
7199
7200 cf_add_libs="$LIBS"
7201 # reverse order
7202 cf_add_0lib=
7203 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7204 # filter duplicates
7205 for cf_add_1lib in $cf_add_0lib; do
7206         for cf_add_2lib in $cf_add_libs; do
7207                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7208                         cf_add_1lib=
7209                         break
7210                 fi
7211         done
7212         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7213 done
7214 LIBS="$cf_add_libs"
7215
7216         :
7217 else
7218         cf_pkgconfig_incs=
7219         cf_pkgconfig_libs=
7220
7221 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7222         test -n "$verbose" && echo "    found package libpcre" 1>&6
7223
7224 echo "${as_me:-configure}:7224: testing found package libpcre ..." 1>&5
7225
7226         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7227         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7228         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7229
7230 echo "${as_me:-configure}:7230: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7231
7232         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7233
7234 echo "${as_me:-configure}:7234: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7235
7236 cf_fix_cppflags=no
7237 cf_new_cflags=
7238 cf_new_cppflags=
7239 cf_new_extra_cppflags=
7240
7241 for cf_add_cflags in $cf_pkgconfig_incs
7242 do
7243 case $cf_fix_cppflags in
7244 (no)
7245         case $cf_add_cflags in
7246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7247                 case $cf_add_cflags in
7248                 (-D*)
7249                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7250
7251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7252                                 && test -z "${cf_tst_cflags}" \
7253                                 && cf_fix_cppflags=yes
7254
7255                         if test $cf_fix_cppflags = yes ; then
7256
7257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7259
7260                                 continue
7261                         elif test "${cf_tst_cflags}" = "\"'" ; then
7262
7263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7265
7266                                 continue
7267                         fi
7268                         ;;
7269                 esac
7270                 case "$CPPFLAGS" in
7271                 (*$cf_add_cflags)
7272                         ;;
7273                 (*)
7274                         case $cf_add_cflags in
7275                         (-D*)
7276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7277
7278 CPPFLAGS=`echo "$CPPFLAGS" | \
7279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7281
7282                                 ;;
7283                         esac
7284
7285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7287
7288                         ;;
7289                 esac
7290                 ;;
7291         (*)
7292
7293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7295
7296                 ;;
7297         esac
7298         ;;
7299 (yes)
7300
7301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7303
7304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7305
7306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7307                 && test -z "${cf_tst_cflags}" \
7308                 && cf_fix_cppflags=no
7309         ;;
7310 esac
7311 done
7312
7313 if test -n "$cf_new_cflags" ; then
7314
7315         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7316         CFLAGS="${CFLAGS}$cf_new_cflags"
7317
7318 fi
7319
7320 if test -n "$cf_new_cppflags" ; then
7321
7322         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7323         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7324
7325 fi
7326
7327 if test -n "$cf_new_extra_cppflags" ; then
7328
7329         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7330         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7331
7332 fi
7333
7334 cf_add_libs="$LIBS"
7335 # reverse order
7336 cf_add_0lib=
7337 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7338 # filter duplicates
7339 for cf_add_1lib in $cf_add_0lib; do
7340         for cf_add_2lib in $cf_add_libs; do
7341                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7342                         cf_add_1lib=
7343                         break
7344                 fi
7345         done
7346         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7347 done
7348 LIBS="$cf_add_libs"
7349
7350         :
7351 else
7352         cf_pkgconfig_incs=
7353         cf_pkgconfig_libs=
7354
7355                         { { echo "$as_me:7355: error: Cannot find PCRE2 library" >&5
7356 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7357    { (exit 1); exit 1; }; }
7358 fi
7359
7360 fi
7361
7362 cat >>confdefs.h <<\EOF
7363 #define HAVE_LIB_PCRE2 1
7364 EOF
7365
7366         # if pkgconfig gave no results, look for the libraries directly
7367         case $LIBS in
7368         (*pcre2-posix*|*pcreposix*)
7369                 ;;
7370         (*)
7371                 echo "$as_me:7371: checking for regcomp in -lpcre2-posix" >&5
7372 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7373 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7374   echo $ECHO_N "(cached) $ECHO_C" >&6
7375 else
7376   ac_check_lib_save_LIBS=$LIBS
7377 LIBS="-lpcre2-posix  $LIBS"
7378 cat >conftest.$ac_ext <<_ACEOF
7379 #line 7379 "configure"
7380 #include "confdefs.h"
7381
7382 /* Override any gcc2 internal prototype to avoid an error.  */
7383 #ifdef __cplusplus
7384 extern "C"
7385 #endif
7386 /* We use char because int might match the return type of a gcc2
7387    builtin and then its argument prototype would still apply.  */
7388 char regcomp ();
7389 int
7390 main (void)
7391 {
7392 regcomp ();
7393   ;
7394   return 0;
7395 }
7396 _ACEOF
7397 rm -f conftest.$ac_objext conftest$ac_exeext
7398 if { (eval echo "$as_me:7398: \"$ac_link\"") >&5
7399   (eval $ac_link) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); } &&
7403          { ac_try='test -s conftest$ac_exeext'
7404   { (eval echo "$as_me:7404: \"$ac_try\"") >&5
7405   (eval $ac_try) 2>&5
7406   ac_status=$?
7407   echo "$as_me:7407: \$? = $ac_status" >&5
7408   (exit $ac_status); }; }; then
7409   ac_cv_lib_pcre2_posix_regcomp=yes
7410 else
7411   echo "$as_me: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 ac_cv_lib_pcre2_posix_regcomp=no
7414 fi
7415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7416 LIBS=$ac_check_lib_save_LIBS
7417 fi
7418 echo "$as_me:7418: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7419 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7420 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7421
7422 cf_add_libs="$LIBS"
7423 # reverse order
7424 cf_add_0lib=
7425 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7426 # filter duplicates
7427 for cf_add_1lib in $cf_add_0lib; do
7428         for cf_add_2lib in $cf_add_libs; do
7429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7430                         cf_add_1lib=
7431                         break
7432                 fi
7433         done
7434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7435 done
7436 LIBS="$cf_add_libs"
7437
7438 else
7439   echo "$as_me:7439: checking for regcomp in -lpcreposix" >&5
7440 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7441 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7442   echo $ECHO_N "(cached) $ECHO_C" >&6
7443 else
7444   ac_check_lib_save_LIBS=$LIBS
7445 LIBS="-lpcreposix  $LIBS"
7446 cat >conftest.$ac_ext <<_ACEOF
7447 #line 7447 "configure"
7448 #include "confdefs.h"
7449
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 #ifdef __cplusplus
7452 extern "C"
7453 #endif
7454 /* We use char because int might match the return type of a gcc2
7455    builtin and then its argument prototype would still apply.  */
7456 char regcomp ();
7457 int
7458 main (void)
7459 {
7460 regcomp ();
7461   ;
7462   return 0;
7463 }
7464 _ACEOF
7465 rm -f conftest.$ac_objext conftest$ac_exeext
7466 if { (eval echo "$as_me:7466: \"$ac_link\"") >&5
7467   (eval $ac_link) 2>&5
7468   ac_status=$?
7469   echo "$as_me:7469: \$? = $ac_status" >&5
7470   (exit $ac_status); } &&
7471          { ac_try='test -s conftest$ac_exeext'
7472   { (eval echo "$as_me:7472: \"$ac_try\"") >&5
7473   (eval $ac_try) 2>&5
7474   ac_status=$?
7475   echo "$as_me:7475: \$? = $ac_status" >&5
7476   (exit $ac_status); }; }; then
7477   ac_cv_lib_pcreposix_regcomp=yes
7478 else
7479   echo "$as_me: failed program was:" >&5
7480 cat conftest.$ac_ext >&5
7481 ac_cv_lib_pcreposix_regcomp=no
7482 fi
7483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7484 LIBS=$ac_check_lib_save_LIBS
7485 fi
7486 echo "$as_me:7486: result: $ac_cv_lib_pcreposix_regcomp" >&5
7487 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7488 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7489
7490 cf_add_libs="$LIBS"
7491 # reverse order
7492 cf_add_0lib=
7493 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7494 # filter duplicates
7495 for cf_add_1lib in $cf_add_0lib; do
7496         for cf_add_2lib in $cf_add_libs; do
7497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7498                         cf_add_1lib=
7499                         break
7500                 fi
7501         done
7502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7503 done
7504 LIBS="$cf_add_libs"
7505
7506 else
7507   { { echo "$as_me:7507: error: Cannot find PCRE2 POSIX library" >&5
7508 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7509    { (exit 1); exit 1; }; }
7510 fi
7511
7512 fi
7513
7514                 ;;
7515         esac
7516
7517         # either way, check for the library header files
7518
7519 for ac_header in pcre2-posix.h pcreposix.h
7520 do
7521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7522 echo "$as_me:7522: checking for $ac_header" >&5
7523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527   cat >conftest.$ac_ext <<_ACEOF
7528 #line 7528 "configure"
7529 #include "confdefs.h"
7530 #include <$ac_header>
7531 _ACEOF
7532 if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5
7533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7534   ac_status=$?
7535   egrep -v '^ *\+' conftest.er1 >conftest.err
7536   rm -f conftest.er1
7537   cat conftest.err >&5
7538   echo "$as_me:7538: \$? = $ac_status" >&5
7539   (exit $ac_status); } >/dev/null; then
7540   if test -s conftest.err; then
7541     ac_cpp_err=$ac_c_preproc_warn_flag
7542   else
7543     ac_cpp_err=
7544   fi
7545 else
7546   ac_cpp_err=yes
7547 fi
7548 if test -z "$ac_cpp_err"; then
7549   eval "$as_ac_Header=yes"
7550 else
7551   echo "$as_me: failed program was:" >&5
7552   cat conftest.$ac_ext >&5
7553   eval "$as_ac_Header=no"
7554 fi
7555 rm -f conftest.err conftest.$ac_ext
7556 fi
7557 echo "$as_me:7557: result: `eval echo '${'$as_ac_Header'}'`" >&5
7558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7560   cat >>confdefs.h <<EOF
7561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7562 EOF
7563
7564 fi
7565 done
7566
7567 fi
7568
7569 # not everyone has "test -c"
7570 if test -c /dev/sysmouse 2>/dev/null ; then
7571 echo "$as_me:7571: checking if you want to use sysmouse" >&5
7572 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7573
7574 # Check whether --with-sysmouse or --without-sysmouse was given.
7575 if test "${with_sysmouse+set}" = set; then
7576   withval="$with_sysmouse"
7577   cf_with_sysmouse=$withval
7578 else
7579   cf_with_sysmouse=maybe
7580 fi;
7581         if test "$cf_with_sysmouse" != no ; then
7582         cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585
7586 #include <osreldate.h>
7587 #if (__FreeBSD_version >= 400017)
7588 #include <sys/consio.h>
7589 #include <sys/fbio.h>
7590 #else
7591 #include <machine/console.h>
7592 #endif
7593
7594 int
7595 main (void)
7596 {
7597
7598         struct mouse_info the_mouse;
7599         ioctl(0, CONS_MOUSECTL, &the_mouse);
7600
7601   ;
7602   return 0;
7603 }
7604 _ACEOF
7605 rm -f conftest.$ac_objext
7606 if { (eval echo "$as_me:7606: \"$ac_compile\"") >&5
7607   (eval $ac_compile) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); } &&
7611          { ac_try='test -s conftest.$ac_objext'
7612   { (eval echo "$as_me:7612: \"$ac_try\"") >&5
7613   (eval $ac_try) 2>&5
7614   ac_status=$?
7615   echo "$as_me:7615: \$? = $ac_status" >&5
7616   (exit $ac_status); }; }; then
7617   cf_with_sysmouse=yes
7618 else
7619   echo "$as_me: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7621 cf_with_sysmouse=no
7622 fi
7623 rm -f conftest.$ac_objext conftest.$ac_ext
7624         fi
7625 echo "$as_me:7625: result: $cf_with_sysmouse" >&5
7626 echo "${ECHO_T}$cf_with_sysmouse" >&6
7627 test "$cf_with_sysmouse" = yes &&
7628 cat >>confdefs.h <<\EOF
7629 #define USE_SYSMOUSE 1
7630 EOF
7631
7632 fi
7633
7634 # pretend that ncurses==ncursesw==ncursest
7635 echo "$as_me:7635: checking if you want to disable library suffixes" >&5
7636 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7637
7638 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7639 if test "${enable_lib_suffixes+set}" = set; then
7640   enableval="$enable_lib_suffixes"
7641   test "$enableval" != no && enableval=yes
7642         if test "$enableval" != "yes" ; then
7643     disable_lib_suffixes=yes
7644         else
7645                 disable_lib_suffixes=no
7646         fi
7647 else
7648   enableval=yes
7649         disable_lib_suffixes=no
7650
7651 fi;
7652 echo "$as_me:7652: result: $disable_lib_suffixes" >&5
7653 echo "${ECHO_T}$disable_lib_suffixes" >&6
7654
7655 ### If we're building with rpath, try to link non-standard libs that way too.
7656 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7657
7658 echo "$as_me:7658: checking if rpath-hack should be disabled" >&5
7659 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7660
7661 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7662 if test "${enable_rpath_hack+set}" = set; then
7663   enableval="$enable_rpath_hack"
7664   test "$enableval" != no && enableval=yes
7665         if test "$enableval" != "yes" ; then
7666     cf_disable_rpath_hack=yes
7667         else
7668                 cf_disable_rpath_hack=no
7669         fi
7670 else
7671   enableval=yes
7672         cf_disable_rpath_hack=no
7673
7674 fi;
7675 echo "$as_me:7675: result: $cf_disable_rpath_hack" >&5
7676 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7677 if test "$cf_disable_rpath_hack" = no ; then
7678
7679 echo "$as_me:7679: checking for updated LDFLAGS" >&5
7680 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7681 if test -n "$LD_RPATH_OPT" ; then
7682         echo "$as_me:7682: result: maybe" >&5
7683 echo "${ECHO_T}maybe" >&6
7684
7685         for ac_prog in ldd
7686 do
7687   # Extract the first word of "$ac_prog", so it can be a program name with args.
7688 set dummy $ac_prog; ac_word=$2
7689 echo "$as_me:7689: checking for $ac_word" >&5
7690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7691 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7692   echo $ECHO_N "(cached) $ECHO_C" >&6
7693 else
7694   if test -n "$cf_ldd_prog"; then
7695   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7696 else
7697   ac_save_IFS=$IFS; IFS=$ac_path_separator
7698 ac_dummy="$PATH"
7699 for ac_dir in $ac_dummy; do
7700   IFS=$ac_save_IFS
7701   test -z "$ac_dir" && ac_dir=.
7702   $as_executable_p "$ac_dir/$ac_word" || continue
7703 ac_cv_prog_cf_ldd_prog="$ac_prog"
7704 echo "$as_me:7704: found $ac_dir/$ac_word" >&5
7705 break
7706 done
7707
7708 fi
7709 fi
7710 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7711 if test -n "$cf_ldd_prog"; then
7712   echo "$as_me:7712: result: $cf_ldd_prog" >&5
7713 echo "${ECHO_T}$cf_ldd_prog" >&6
7714 else
7715   echo "$as_me:7715: result: no" >&5
7716 echo "${ECHO_T}no" >&6
7717 fi
7718
7719   test -n "$cf_ldd_prog" && break
7720 done
7721 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7722
7723         cf_rpath_list="/usr/lib /lib"
7724         if test "$cf_ldd_prog" != no
7725         then
7726                 cf_rpath_oops=
7727
7728 cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 #include <stdio.h>
7732 int
7733 main (void)
7734 {
7735 printf("Hello");
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 rm -f conftest.$ac_objext conftest$ac_exeext
7741 if { (eval echo "$as_me:7741: \"$ac_link\"") >&5
7742   (eval $ac_link) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -s conftest$ac_exeext'
7747   { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748   (eval $ac_try) 2>&5
7749   ac_status=$?
7750   echo "$as_me:7750: \$? = $ac_status" >&5
7751   (exit $ac_status); }; }; then
7752   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7753                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7754 else
7755   echo "$as_me: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 fi
7758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7759
7760                 # If we passed the link-test, but get a "not found" on a given library,
7761                 # this could be due to inept reconfiguration of gcc to make it only
7762                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7763                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7764                 # /usr/local libraries.
7765                 if test -n "$cf_rpath_oops"
7766                 then
7767                         for cf_rpath_src in $cf_rpath_oops
7768                         do
7769                                 for cf_rpath_dir in \
7770                                         /usr/local \
7771                                         /usr/pkg \
7772                                         /opt/sfw
7773                                 do
7774                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7775                                         then
7776                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7777
7778 echo "${as_me:-configure}:7778: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7779
7780                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7781                                                 break
7782                                         fi
7783                                 done
7784                         done
7785                 fi
7786         fi
7787
7788         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7789
7790 echo "${as_me:-configure}:7790: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7791
7792 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7793
7794 echo "${as_me:-configure}:7794: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7795
7796 cf_rpath_dst=
7797 for cf_rpath_src in $LDFLAGS
7798 do
7799         case $cf_rpath_src in
7800         (-L*)
7801
7802                 # check if this refers to a directory which we will ignore
7803                 cf_rpath_skip=no
7804                 if test -n "$cf_rpath_list"
7805                 then
7806                         for cf_rpath_item in $cf_rpath_list
7807                         do
7808                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7809                                 then
7810                                         cf_rpath_skip=yes
7811                                         break
7812                                 fi
7813                         done
7814                 fi
7815
7816                 if test "$cf_rpath_skip" = no
7817                 then
7818                         # transform the option
7819                         if test "$LD_RPATH_OPT" = "-R " ; then
7820                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7821                         else
7822                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7823                         fi
7824
7825                         # if we have not already added this, add it now
7826                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7827                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7828                         then
7829                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7830
7831 echo "${as_me:-configure}:7831: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7832
7833                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7834                         fi
7835                 fi
7836                 ;;
7837         esac
7838         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7839 done
7840 LDFLAGS=$cf_rpath_dst
7841
7842 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7843
7844 echo "${as_me:-configure}:7844: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7845
7846 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7847
7848 echo "${as_me:-configure}:7848: testing ...checking LIBS $LIBS ..." 1>&5
7849
7850 cf_rpath_dst=
7851 for cf_rpath_src in $LIBS
7852 do
7853         case $cf_rpath_src in
7854         (-L*)
7855
7856                 # check if this refers to a directory which we will ignore
7857                 cf_rpath_skip=no
7858                 if test -n "$cf_rpath_list"
7859                 then
7860                         for cf_rpath_item in $cf_rpath_list
7861                         do
7862                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7863                                 then
7864                                         cf_rpath_skip=yes
7865                                         break
7866                                 fi
7867                         done
7868                 fi
7869
7870                 if test "$cf_rpath_skip" = no
7871                 then
7872                         # transform the option
7873                         if test "$LD_RPATH_OPT" = "-R " ; then
7874                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7875                         else
7876                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7877                         fi
7878
7879                         # if we have not already added this, add it now
7880                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7881                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7882                         then
7883                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7884
7885 echo "${as_me:-configure}:7885: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7886
7887                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7888                         fi
7889                 fi
7890                 ;;
7891         esac
7892         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7893 done
7894 LIBS=$cf_rpath_dst
7895
7896 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7897
7898 echo "${as_me:-configure}:7898: testing ...checked LIBS $LIBS ..." 1>&5
7899
7900         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7901
7902 echo "${as_me:-configure}:7902: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7903
7904 else
7905         echo "$as_me:7905: result: no" >&5
7906 echo "${ECHO_T}no" >&6
7907 fi
7908
7909 fi
7910
7911 fi
7912
7913 ###############################################################################
7914
7915 ###     use option --with-extra-suffix to append suffix to headers and libraries
7916 echo "$as_me:7916: checking if you wish to append extra suffix to header/library paths" >&5
7917 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7918 EXTRA_SUFFIX=
7919
7920 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7921 if test "${with_extra_suffix+set}" = set; then
7922   withval="$with_extra_suffix"
7923   case x$withval in
7924         (no)
7925                 ;;
7926         (xyes|x)
7927                 EXTRA_SUFFIX=$cf_cv_abi_version
7928                 ;;
7929         (*)
7930                 EXTRA_SUFFIX=$withval
7931                 ;;
7932         esac
7933
7934 fi;
7935 echo "$as_me:7935: result: $EXTRA_SUFFIX" >&5
7936 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7937
7938 ###     use option --disable-overwrite to leave out the link to -lcurses
7939 echo "$as_me:7939: checking if you wish to install ncurses overwriting curses" >&5
7940 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7941
7942 # Check whether --enable-overwrite or --disable-overwrite was given.
7943 if test "${enable_overwrite+set}" = set; then
7944   enableval="$enable_overwrite"
7945   with_overwrite=$enableval
7946 else
7947   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7948 fi;
7949 echo "$as_me:7949: result: $with_overwrite" >&5
7950 echo "${ECHO_T}$with_overwrite" >&6
7951
7952 echo "$as_me:7952: checking if external terminfo-database is used" >&5
7953 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7954
7955 # Check whether --enable-database or --disable-database was given.
7956 if test "${enable_database+set}" = set; then
7957   enableval="$enable_database"
7958   use_database=$enableval
7959 else
7960   use_database=yes
7961 fi;
7962 echo "$as_me:7962: result: $use_database" >&5
7963 echo "${ECHO_T}$use_database" >&6
7964
7965 case $host_os in
7966 (os2*)
7967         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7968         ;;
7969 (*)
7970         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7971         ;;
7972 esac
7973
7974 NCURSES_USE_DATABASE=0
7975 if test "$use_database" != no ; then
7976         NCURSES_USE_DATABASE=1
7977
7978         echo "$as_me:7978: checking which terminfo source-file will be installed" >&5
7979 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7980
7981 # Check whether --with-database or --without-database was given.
7982 if test "${with_database+set}" = set; then
7983   withval="$with_database"
7984   TERMINFO_SRC=$withval
7985 fi;
7986         echo "$as_me:7986: result: $TERMINFO_SRC" >&5
7987 echo "${ECHO_T}$TERMINFO_SRC" >&6
7988
7989         echo "$as_me:7989: checking whether to use hashed database instead of directory/tree" >&5
7990 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7991
7992 # Check whether --with-hashed-db or --without-hashed-db was given.
7993 if test "${with_hashed_db+set}" = set; then
7994   withval="$with_hashed_db"
7995
7996 else
7997   with_hashed_db=no
7998 fi;
7999         echo "$as_me:7999: result: $with_hashed_db" >&5
8000 echo "${ECHO_T}$with_hashed_db" >&6
8001 else
8002         with_hashed_db=no
8003 fi
8004
8005 echo "$as_me:8005: checking for list of fallback descriptions" >&5
8006 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8007
8008 # Check whether --with-fallbacks or --without-fallbacks was given.
8009 if test "${with_fallbacks+set}" = set; then
8010   withval="$with_fallbacks"
8011   with_fallback=$withval
8012 else
8013   with_fallback=
8014 fi;
8015 echo "$as_me:8015: result: $with_fallback" >&5
8016 echo "${ECHO_T}$with_fallback" >&6
8017
8018 case ".$with_fallback" in
8019 (.|.no)
8020         FALLBACK_LIST=
8021         ;;
8022 (.yes)
8023         { echo "$as_me:8023: WARNING: expected a list of terminal descriptions" >&5
8024 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8025         ;;
8026 (*)
8027         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8028         ;;
8029 esac
8030
8031 USE_FALLBACKS=
8032 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8033
8034 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8035 # tree for generating the terminal descriptions that will be compiled into the
8036 # library.  If your toolchain is old, it may not handle current terminal
8037 # databases.  Use configure-options to point to the tools which will be used,
8038 # rather than the first ones found on the $PATH.
8039 if test -n "$FALLBACK_LIST"
8040 then
8041
8042 # Check whether --with-tic-path or --without-tic-path was given.
8043 if test "${with_tic_path+set}" = set; then
8044   withval="$with_tic_path"
8045   echo "$as_me:8045: checking for tic program for fallbacks" >&5
8046 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8047                 TIC=$withval
8048                 echo "$as_me:8048: result: $TIC" >&5
8049 echo "${ECHO_T}$TIC" >&6
8050
8051 if test "x$prefix" != xNONE; then
8052         cf_path_syntax="$prefix"
8053 else
8054         cf_path_syntax="$ac_default_prefix"
8055 fi
8056
8057 case ".$TIC" in
8058 (.\$\(*\)*|.\'*\'*)
8059         ;;
8060 (..|./*|.\\*)
8061         ;;
8062 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8063         ;;
8064 (.\${*prefix}*|.\${*dir}*)
8065         eval TIC="$TIC"
8066         case ".$TIC" in
8067         (.NONE/*)
8068                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8069                 ;;
8070         esac
8071         ;;
8072 (.no|.NONE/*)
8073         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8074         ;;
8075 (*)
8076         { { echo "$as_me:8076: error: expected a pathname, not \"$TIC\"" >&5
8077 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8078    { (exit 1); exit 1; }; }
8079         ;;
8080 esac
8081
8082 else
8083
8084 test -z "$TIC" && TIC=tic
8085 for ac_prog in $TIC tic
8086 do
8087   # Extract the first word of "$ac_prog", so it can be a program name with args.
8088 set dummy $ac_prog; ac_word=$2
8089 echo "$as_me:8089: checking for $ac_word" >&5
8090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8091 if test "${ac_cv_path_TIC+set}" = set; then
8092   echo $ECHO_N "(cached) $ECHO_C" >&6
8093 else
8094   case $TIC in
8095   [\\/]* | ?:[\\/]*)
8096   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8097   ;;
8098   *)
8099   ac_save_IFS=$IFS; IFS=$ac_path_separator
8100 ac_dummy="$PATH:/usr/local/ncurses/bin"
8101 for ac_dir in $ac_dummy; do
8102   IFS=$ac_save_IFS
8103   test -z "$ac_dir" && ac_dir=.
8104   if $as_executable_p "$ac_dir/$ac_word"; then
8105    ac_cv_path_TIC="$ac_dir/$ac_word"
8106    echo "$as_me:8106: found $ac_dir/$ac_word" >&5
8107    break
8108 fi
8109 done
8110
8111   ;;
8112 esac
8113 fi
8114 TIC=$ac_cv_path_TIC
8115
8116 if test -n "$TIC"; then
8117   echo "$as_me:8117: result: $TIC" >&5
8118 echo "${ECHO_T}$TIC" >&6
8119 else
8120   echo "$as_me:8120: result: no" >&5
8121 echo "${ECHO_T}no" >&6
8122 fi
8123
8124   test -n "$TIC" && break
8125 done
8126 test -n "$TIC" || TIC="$TIC"
8127
8128 cf_path_prog=""
8129 cf_path_args=""
8130 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8131 for cf_temp in $ac_cv_path_TIC
8132 do
8133         if test -z "$cf_path_prog" ; then
8134                 if test "$with_full_paths" = yes ; then
8135
8136 if test "x$prefix" != xNONE; then
8137         cf_path_syntax="$prefix"
8138 else
8139         cf_path_syntax="$ac_default_prefix"
8140 fi
8141
8142 case ".$cf_temp" in
8143 (.\$\(*\)*|.\'*\'*)
8144         ;;
8145 (..|./*|.\\*)
8146         ;;
8147 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8148         ;;
8149 (.\${*prefix}*|.\${*dir}*)
8150         eval cf_temp="$cf_temp"
8151         case ".$cf_temp" in
8152         (.NONE/*)
8153                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8154                 ;;
8155         esac
8156         ;;
8157 (.no|.NONE/*)
8158         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8159         ;;
8160 (*)
8161         break
8162         ;;
8163 esac
8164
8165                         cf_path_prog="$cf_temp"
8166                 else
8167                         cf_path_prog="`basename $cf_temp`"
8168                 fi
8169         elif test -z "$cf_path_args" ; then
8170                 cf_path_args="$cf_temp"
8171         else
8172                 cf_path_args="$cf_path_args $cf_temp"
8173         fi
8174 done
8175 IFS="$cf_save_ifs"
8176
8177 if test -n "$cf_path_prog" ; then
8178
8179 echo "${as_me:-configure}:8179: testing defining path for ${cf_path_prog} ..." 1>&5
8180
8181 cat >>confdefs.h <<EOF
8182 #define TIC_PATH "$cf_path_prog"
8183 EOF
8184
8185         test -n "$cf_path_args" &&
8186 cat >>confdefs.h <<EOF
8187 #define TIC_ARGS "$cf_path_args"
8188 EOF
8189
8190 fi
8191
8192                 if test -z "$TIC"
8193                 then
8194                         { echo "$as_me:8194: WARNING: no tic program found for fallbacks" >&5
8195 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8196                 fi
8197
8198 fi;
8199
8200 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8201 if test "${with_infocmp_path+set}" = set; then
8202   withval="$with_infocmp_path"
8203   echo "$as_me:8203: checking for infocmp program for fallbacks" >&5
8204 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8205                 INFOCMP=$withval
8206                 echo "$as_me:8206: result: $INFOCMP" >&5
8207 echo "${ECHO_T}$INFOCMP" >&6
8208
8209 if test "x$prefix" != xNONE; then
8210         cf_path_syntax="$prefix"
8211 else
8212         cf_path_syntax="$ac_default_prefix"
8213 fi
8214
8215 case ".$INFOCMP" in
8216 (.\$\(*\)*|.\'*\'*)
8217         ;;
8218 (..|./*|.\\*)
8219         ;;
8220 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8221         ;;
8222 (.\${*prefix}*|.\${*dir}*)
8223         eval INFOCMP="$INFOCMP"
8224         case ".$INFOCMP" in
8225         (.NONE/*)
8226                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8227                 ;;
8228         esac
8229         ;;
8230 (.no|.NONE/*)
8231         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8232         ;;
8233 (*)
8234         { { echo "$as_me:8234: error: expected a pathname, not \"$INFOCMP\"" >&5
8235 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8236    { (exit 1); exit 1; }; }
8237         ;;
8238 esac
8239
8240 else
8241
8242 test -z "$INFOCMP" && INFOCMP=infocmp
8243 for ac_prog in $INFOCMP infocmp
8244 do
8245   # Extract the first word of "$ac_prog", so it can be a program name with args.
8246 set dummy $ac_prog; ac_word=$2
8247 echo "$as_me:8247: checking for $ac_word" >&5
8248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8249 if test "${ac_cv_path_INFOCMP+set}" = set; then
8250   echo $ECHO_N "(cached) $ECHO_C" >&6
8251 else
8252   case $INFOCMP in
8253   [\\/]* | ?:[\\/]*)
8254   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8255   ;;
8256   *)
8257   ac_save_IFS=$IFS; IFS=$ac_path_separator
8258 ac_dummy="$PATH:/usr/local/ncurses/bin"
8259 for ac_dir in $ac_dummy; do
8260   IFS=$ac_save_IFS
8261   test -z "$ac_dir" && ac_dir=.
8262   if $as_executable_p "$ac_dir/$ac_word"; then
8263    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8264    echo "$as_me:8264: found $ac_dir/$ac_word" >&5
8265    break
8266 fi
8267 done
8268
8269   ;;
8270 esac
8271 fi
8272 INFOCMP=$ac_cv_path_INFOCMP
8273
8274 if test -n "$INFOCMP"; then
8275   echo "$as_me:8275: result: $INFOCMP" >&5
8276 echo "${ECHO_T}$INFOCMP" >&6
8277 else
8278   echo "$as_me:8278: result: no" >&5
8279 echo "${ECHO_T}no" >&6
8280 fi
8281
8282   test -n "$INFOCMP" && break
8283 done
8284 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8285
8286 cf_path_prog=""
8287 cf_path_args=""
8288 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8289 for cf_temp in $ac_cv_path_INFOCMP
8290 do
8291         if test -z "$cf_path_prog" ; then
8292                 if test "$with_full_paths" = yes ; then
8293
8294 if test "x$prefix" != xNONE; then
8295         cf_path_syntax="$prefix"
8296 else
8297         cf_path_syntax="$ac_default_prefix"
8298 fi
8299
8300 case ".$cf_temp" in
8301 (.\$\(*\)*|.\'*\'*)
8302         ;;
8303 (..|./*|.\\*)
8304         ;;
8305 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8306         ;;
8307 (.\${*prefix}*|.\${*dir}*)
8308         eval cf_temp="$cf_temp"
8309         case ".$cf_temp" in
8310         (.NONE/*)
8311                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8312                 ;;
8313         esac
8314         ;;
8315 (.no|.NONE/*)
8316         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8317         ;;
8318 (*)
8319         break
8320         ;;
8321 esac
8322
8323                         cf_path_prog="$cf_temp"
8324                 else
8325                         cf_path_prog="`basename $cf_temp`"
8326                 fi
8327         elif test -z "$cf_path_args" ; then
8328                 cf_path_args="$cf_temp"
8329         else
8330                 cf_path_args="$cf_path_args $cf_temp"
8331         fi
8332 done
8333 IFS="$cf_save_ifs"
8334
8335 if test -n "$cf_path_prog" ; then
8336
8337 echo "${as_me:-configure}:8337: testing defining path for ${cf_path_prog} ..." 1>&5
8338
8339 cat >>confdefs.h <<EOF
8340 #define INFOCMP_PATH "$cf_path_prog"
8341 EOF
8342
8343         test -n "$cf_path_args" &&
8344 cat >>confdefs.h <<EOF
8345 #define INFOCMP_ARGS "$cf_path_args"
8346 EOF
8347
8348 fi
8349
8350                 if test -z "$INFOCMP"
8351                 then
8352                         { echo "$as_me:8352: WARNING: no infocmp program found for fallbacks" >&5
8353 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8354                 fi
8355
8356 fi;
8357
8358 else
8359         : ${TIC:=tic}
8360         : ${INFOCMP:=infocmp}
8361 fi
8362
8363 echo "$as_me:8363: checking if you want modern xterm or antique" >&5
8364 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8365
8366 # Check whether --with-xterm-new or --without-xterm-new was given.
8367 if test "${with_xterm_new+set}" = set; then
8368   withval="$with_xterm_new"
8369   with_xterm_new=$withval
8370 else
8371   with_xterm_new=yes
8372 fi;
8373 case $with_xterm_new in
8374 (no) with_xterm_new=xterm-old;;
8375 (*)      with_xterm_new=xterm-new;;
8376 esac
8377 echo "$as_me:8377: result: $with_xterm_new" >&5
8378 echo "${ECHO_T}$with_xterm_new" >&6
8379 WHICH_XTERM=$with_xterm_new
8380
8381 echo "$as_me:8381: checking if xterm backspace sends BS or DEL" >&5
8382 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8383
8384 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8385 if test "${with_xterm_kbs+set}" = set; then
8386   withval="$with_xterm_kbs"
8387   with_xterm_kbs=$withval
8388 else
8389   with_xterm_kbs=BS
8390 fi;
8391 case x$with_xterm_kbs in
8392 (xyes|xno|xBS|xbs|x8)
8393         with_xterm_kbs=BS
8394         ;;
8395 (xDEL|xdel|x127)
8396         with_xterm_kbs=DEL
8397         ;;
8398 (*)
8399         with_xterm_kbs=$withval
8400         ;;
8401 esac
8402 echo "$as_me:8402: result: $with_xterm_kbs" >&5
8403 echo "${ECHO_T}$with_xterm_kbs" >&6
8404 XTERM_KBS=$with_xterm_kbs
8405
8406 MAKE_TERMINFO=
8407 if test "$use_database" = no ; then
8408         TERMINFO="${datadir}/terminfo"
8409         MAKE_TERMINFO="#"
8410 else
8411
8412 echo "$as_me:8412: checking for list of terminfo directories" >&5
8413 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8414
8415 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8416 if test "${with_terminfo_dirs+set}" = set; then
8417   withval="$with_terminfo_dirs"
8418
8419 else
8420   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8421 fi;
8422 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8423 cf_dst_path=
8424 for cf_src_path in $withval
8425 do
8426
8427 if test "x$prefix" != xNONE; then
8428         cf_path_syntax="$prefix"
8429 else
8430         cf_path_syntax="$ac_default_prefix"
8431 fi
8432
8433 case ".$cf_src_path" in
8434 (.\$\(*\)*|.\'*\'*)
8435         ;;
8436 (..|./*|.\\*)
8437         ;;
8438 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8439         ;;
8440 (.\${*prefix}*|.\${*dir}*)
8441         eval cf_src_path="$cf_src_path"
8442         case ".$cf_src_path" in
8443         (.NONE/*)
8444                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8445                 ;;
8446         esac
8447         ;;
8448 (.no|.NONE/*)
8449         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8450         ;;
8451 (*)
8452         { { echo "$as_me:8452: error: expected a pathname, not \"$cf_src_path\"" >&5
8453 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8454    { (exit 1); exit 1; }; }
8455         ;;
8456 esac
8457
8458   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8459   cf_dst_path="${cf_dst_path}${cf_src_path}"
8460 done
8461 IFS="$ac_save_ifs"
8462
8463 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8464 # so we have to check/work around.  We do prefer the result of "eval"...
8465 eval cf_dst_eval="$cf_dst_path"
8466 case "x$cf_dst_eval" in
8467 (xNONE*)
8468         TERMINFO_DIRS=$cf_dst_path
8469         ;;
8470 (*)
8471         TERMINFO_DIRS="$cf_dst_eval"
8472         ;;
8473 esac
8474
8475 echo "$as_me:8475: result: $TERMINFO_DIRS" >&5
8476 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8477 test -n "$TERMINFO_DIRS" &&
8478 cat >>confdefs.h <<EOF
8479 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8480 EOF
8481
8482 case "x$TERMINFO" in
8483 x???:*)
8484         { echo "$as_me:8484: WARNING: ignoring non-directory/file TERMINFO value" >&5
8485 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8486         unset TERMINFO
8487         ;;
8488 esac
8489
8490 echo "$as_me:8490: checking for default terminfo directory" >&5
8491 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8492
8493 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8494 if test "${with_default_terminfo_dir+set}" = set; then
8495   withval="$with_default_terminfo_dir"
8496
8497 else
8498   withval="${TERMINFO:-${datadir}/terminfo}"
8499 fi; if test -n "${datadir}/terminfo" ; then
8500
8501 if test "x$prefix" != xNONE; then
8502         cf_path_syntax="$prefix"
8503 else
8504         cf_path_syntax="$ac_default_prefix"
8505 fi
8506
8507 case ".$withval" in
8508 (.\$\(*\)*|.\'*\'*)
8509         ;;
8510 (..|./*|.\\*)
8511         ;;
8512 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8513         ;;
8514 (.\${*prefix}*|.\${*dir}*)
8515         eval withval="$withval"
8516         case ".$withval" in
8517         (.NONE/*)
8518                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8519                 ;;
8520         esac
8521         ;;
8522 (.no|.NONE/*)
8523         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8524         ;;
8525 (*)
8526         { { echo "$as_me:8526: error: expected a pathname, not \"$withval\"" >&5
8527 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8528    { (exit 1); exit 1; }; }
8529         ;;
8530 esac
8531
8532 fi
8533 eval TERMINFO="$withval"
8534
8535 echo "$as_me:8535: result: $TERMINFO" >&5
8536 echo "${ECHO_T}$TERMINFO" >&6
8537
8538 cat >>confdefs.h <<EOF
8539 #define TERMINFO "$TERMINFO"
8540 EOF
8541
8542 fi
8543
8544 ###     use option --disable-big-core to make tic run on small machines
8545 ###     We need 4Mb, check if we can allocate 50% more than that.
8546 echo "$as_me:8546: checking if big-core option selected" >&5
8547 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8548
8549 # Check whether --enable-big-core or --disable-big-core was given.
8550 if test "${enable_big_core+set}" = set; then
8551   enableval="$enable_big_core"
8552   with_big_core=$enableval
8553 else
8554   if test "$cross_compiling" = yes; then
8555   with_big_core=no
8556 else
8557   cat >conftest.$ac_ext <<_ACEOF
8558 #line 8558 "configure"
8559 #include "confdefs.h"
8560
8561 #include <stdlib.h>
8562 #include <string.h>
8563 int main() {
8564         unsigned long n = 6000000L;
8565         char *s = malloc(n);
8566         if (s != 0)
8567                 s[0] = s[n-1] = 0;
8568         ${cf_cv_main_return:-return}(s == 0);
8569 }
8570 _ACEOF
8571 rm -f conftest$ac_exeext
8572 if { (eval echo "$as_me:8572: \"$ac_link\"") >&5
8573   (eval $ac_link) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8577   { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8578   (eval $ac_try) 2>&5
8579   ac_status=$?
8580   echo "$as_me:8580: \$? = $ac_status" >&5
8581   (exit $ac_status); }; }; then
8582   with_big_core=yes
8583 else
8584   echo "$as_me: program exited with status $ac_status" >&5
8585 echo "$as_me: failed program was:" >&5
8586 cat conftest.$ac_ext >&5
8587 with_big_core=no
8588 fi
8589 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8590 fi
8591 fi;
8592 echo "$as_me:8592: result: $with_big_core" >&5
8593 echo "${ECHO_T}$with_big_core" >&6
8594 test "x$with_big_core" = "xyes" &&
8595 cat >>confdefs.h <<\EOF
8596 #define HAVE_BIG_CORE 1
8597 EOF
8598
8599 ### ISO C only guarantees 512-char strings, we have tables which load faster
8600 ### when constructed using "big" strings.  More than the C compiler, the awk
8601 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8602 echo "$as_me:8602: checking if big-strings option selected" >&5
8603 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8604
8605 # Check whether --enable-big-strings or --disable-big-strings was given.
8606 if test "${enable_big_strings+set}" = set; then
8607   enableval="$enable_big_strings"
8608   with_big_strings=$enableval
8609 else
8610
8611         case x$AWK in
8612         (x)
8613                 eval with_big_strings=no
8614                 ;;
8615         (*)
8616                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8617                         | $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
8618                         eval with_big_strings=yes
8619                 else
8620                         eval with_big_strings=no
8621                 fi
8622                 ;;
8623         esac
8624
8625 fi;
8626 echo "$as_me:8626: result: $with_big_strings" >&5
8627 echo "${ECHO_T}$with_big_strings" >&6
8628
8629 USE_BIG_STRINGS=0
8630 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8631
8632 ###     use option --enable-termcap to compile in the termcap fallback support
8633 echo "$as_me:8633: checking if you want termcap-fallback support" >&5
8634 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8635
8636 # Check whether --enable-termcap or --disable-termcap was given.
8637 if test "${enable_termcap+set}" = set; then
8638   enableval="$enable_termcap"
8639   with_termcap=$enableval
8640 else
8641   with_termcap=no
8642 fi;
8643 echo "$as_me:8643: result: $with_termcap" >&5
8644 echo "${ECHO_T}$with_termcap" >&6
8645
8646 NCURSES_USE_TERMCAP=0
8647 if test "x$with_termcap" != "xyes" ; then
8648         if test "$use_database" = no ; then
8649                 if test -z "$with_fallback" ; then
8650                         { { echo "$as_me:8650: error: You have disabled the database w/o specifying fallbacks" >&5
8651 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8652    { (exit 1); exit 1; }; }
8653                 fi
8654         fi
8655
8656 cat >>confdefs.h <<\EOF
8657 #define PURE_TERMINFO 1
8658 EOF
8659
8660 else
8661
8662         if test "$with_ticlib" != no ; then
8663                 { { echo "$as_me:8663: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8664 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8665    { (exit 1); exit 1; }; }
8666         fi
8667
8668         NCURSES_USE_TERMCAP=1
8669         echo "$as_me:8669: checking for list of termcap files" >&5
8670 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8671
8672 # Check whether --with-termpath or --without-termpath was given.
8673 if test "${with_termpath+set}" = set; then
8674   withval="$with_termpath"
8675
8676 else
8677   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8678 fi;
8679 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8680 cf_dst_path=
8681 for cf_src_path in $withval
8682 do
8683
8684 if test "x$prefix" != xNONE; then
8685         cf_path_syntax="$prefix"
8686 else
8687         cf_path_syntax="$ac_default_prefix"
8688 fi
8689
8690 case ".$cf_src_path" in
8691 (.\$\(*\)*|.\'*\'*)
8692         ;;
8693 (..|./*|.\\*)
8694         ;;
8695 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8696         ;;
8697 (.\${*prefix}*|.\${*dir}*)
8698         eval cf_src_path="$cf_src_path"
8699         case ".$cf_src_path" in
8700         (.NONE/*)
8701                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8702                 ;;
8703         esac
8704         ;;
8705 (.no|.NONE/*)
8706         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8707         ;;
8708 (*)
8709         { { echo "$as_me:8709: error: expected a pathname, not \"$cf_src_path\"" >&5
8710 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8711    { (exit 1); exit 1; }; }
8712         ;;
8713 esac
8714
8715   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8716   cf_dst_path="${cf_dst_path}${cf_src_path}"
8717 done
8718 IFS="$ac_save_ifs"
8719
8720 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8721 # so we have to check/work around.  We do prefer the result of "eval"...
8722 eval cf_dst_eval="$cf_dst_path"
8723 case "x$cf_dst_eval" in
8724 (xNONE*)
8725         TERMPATH=$cf_dst_path
8726         ;;
8727 (*)
8728         TERMPATH="$cf_dst_eval"
8729         ;;
8730 esac
8731
8732         echo "$as_me:8732: result: $TERMPATH" >&5
8733 echo "${ECHO_T}$TERMPATH" >&6
8734         test -n "$TERMPATH" &&
8735 cat >>confdefs.h <<EOF
8736 #define TERMPATH "$TERMPATH"
8737 EOF
8738
8739         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8740         echo "$as_me:8740: checking if fast termcap-loader is needed" >&5
8741 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8742
8743 # Check whether --enable-getcap or --disable-getcap was given.
8744 if test "${enable_getcap+set}" = set; then
8745   enableval="$enable_getcap"
8746   with_getcap=$enableval
8747 else
8748   with_getcap=no
8749 fi;
8750         echo "$as_me:8750: result: $with_getcap" >&5
8751 echo "${ECHO_T}$with_getcap" >&6
8752         test "x$with_getcap" = "xyes" &&
8753 cat >>confdefs.h <<\EOF
8754 #define USE_GETCAP 1
8755 EOF
8756
8757         echo "$as_me:8757: checking if translated termcaps will be cached in ~/.terminfo" >&5
8758 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8759
8760 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8761 if test "${enable_getcap_cache+set}" = set; then
8762   enableval="$enable_getcap_cache"
8763   with_getcap_cache=$enableval
8764 else
8765   with_getcap_cache=no
8766 fi;
8767         echo "$as_me:8767: result: $with_getcap_cache" >&5
8768 echo "${ECHO_T}$with_getcap_cache" >&6
8769         test "x$with_getcap_cache" = "xyes" &&
8770 cat >>confdefs.h <<\EOF
8771 #define USE_GETCAP_CACHE 1
8772 EOF
8773
8774 fi
8775
8776 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8777 echo "$as_me:8777: checking if ~/.terminfo is wanted" >&5
8778 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8779
8780 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8781 if test "${enable_home_terminfo+set}" = set; then
8782   enableval="$enable_home_terminfo"
8783   with_home_terminfo=$enableval
8784 else
8785   with_home_terminfo=yes
8786 fi;
8787 echo "$as_me:8787: result: $with_home_terminfo" >&5
8788 echo "${ECHO_T}$with_home_terminfo" >&6
8789 test "x$with_home_terminfo" = "xyes" &&
8790 cat >>confdefs.h <<\EOF
8791 #define USE_HOME_TERMINFO 1
8792 EOF
8793
8794 echo "$as_me:8794: checking if you want to use restricted environment when running as root" >&5
8795 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8796
8797 # Check whether --enable-root-environ or --disable-root-environ was given.
8798 if test "${enable_root_environ+set}" = set; then
8799   enableval="$enable_root_environ"
8800   with_root_environ=$enableval
8801 else
8802   with_root_environ=yes
8803 fi;
8804 echo "$as_me:8804: result: $with_root_environ" >&5
8805 echo "${ECHO_T}$with_root_environ" >&6
8806 test "x$with_root_environ" = xyes &&
8807 cat >>confdefs.h <<\EOF
8808 #define USE_ROOT_ENVIRON 1
8809 EOF
8810
8811 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8812 ###   to reduce storage requirements for the terminfo database.
8813
8814 for ac_header in \
8815 unistd.h \
8816
8817 do
8818 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8819 echo "$as_me:8819: checking for $ac_header" >&5
8820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8822   echo $ECHO_N "(cached) $ECHO_C" >&6
8823 else
8824   cat >conftest.$ac_ext <<_ACEOF
8825 #line 8825 "configure"
8826 #include "confdefs.h"
8827 #include <$ac_header>
8828 _ACEOF
8829 if { (eval echo "$as_me:8829: \"$ac_cpp conftest.$ac_ext\"") >&5
8830   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8831   ac_status=$?
8832   egrep -v '^ *\+' conftest.er1 >conftest.err
8833   rm -f conftest.er1
8834   cat conftest.err >&5
8835   echo "$as_me:8835: \$? = $ac_status" >&5
8836   (exit $ac_status); } >/dev/null; then
8837   if test -s conftest.err; then
8838     ac_cpp_err=$ac_c_preproc_warn_flag
8839   else
8840     ac_cpp_err=
8841   fi
8842 else
8843   ac_cpp_err=yes
8844 fi
8845 if test -z "$ac_cpp_err"; then
8846   eval "$as_ac_Header=yes"
8847 else
8848   echo "$as_me: failed program was:" >&5
8849   cat conftest.$ac_ext >&5
8850   eval "$as_ac_Header=no"
8851 fi
8852 rm -f conftest.err conftest.$ac_ext
8853 fi
8854 echo "$as_me:8854: result: `eval echo '${'$as_ac_Header'}'`" >&5
8855 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8856 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8857   cat >>confdefs.h <<EOF
8858 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8859 EOF
8860
8861 fi
8862 done
8863
8864 for ac_func in \
8865         remove \
8866         unlink
8867 do
8868 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8869 echo "$as_me:8869: checking for $ac_func" >&5
8870 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8871 if eval "test \"\${$as_ac_var+set}\" = set"; then
8872   echo $ECHO_N "(cached) $ECHO_C" >&6
8873 else
8874   cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877 #define $ac_func autoconf_temporary
8878 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8879 #undef $ac_func
8880
8881 #ifdef __cplusplus
8882 extern "C"
8883 #endif
8884
8885 /* We use char because int might match the return type of a gcc2
8886    builtin and then its argument prototype would still apply.  */
8887 char $ac_func (void);
8888
8889 int
8890 main (void)
8891 {
8892
8893 /* The GNU C library defines stubs for functions which it implements
8894     to always fail with ENOSYS.  Some functions are actually named
8895     something starting with __ and the normal name is an alias.  */
8896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8897 #error found stub for $ac_func
8898 #endif
8899
8900         return $ac_func ();
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext conftest$ac_exeext
8906 if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907   (eval $ac_link) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest$ac_exeext'
8912   { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917   eval "$as_ac_var=yes"
8918 else
8919   echo "$as_me: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8921 eval "$as_ac_var=no"
8922 fi
8923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924 fi
8925 echo "$as_me:8925: result: `eval echo '${'$as_ac_var'}'`" >&5
8926 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8927 if test `eval echo '${'$as_ac_var'}'` = yes; then
8928   cat >>confdefs.h <<EOF
8929 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8930 EOF
8931
8932 fi
8933 done
8934
8935 if test "$cross_compiling" = yes ; then
8936
8937 for ac_func in \
8938                 link \
8939                 symlink
8940 do
8941 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8942 echo "$as_me:8942: checking for $ac_func" >&5
8943 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8944 if eval "test \"\${$as_ac_var+set}\" = set"; then
8945   echo $ECHO_N "(cached) $ECHO_C" >&6
8946 else
8947   cat >conftest.$ac_ext <<_ACEOF
8948 #line 8948 "configure"
8949 #include "confdefs.h"
8950 #define $ac_func autoconf_temporary
8951 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8952 #undef $ac_func
8953
8954 #ifdef __cplusplus
8955 extern "C"
8956 #endif
8957
8958 /* We use char because int might match the return type of a gcc2
8959    builtin and then its argument prototype would still apply.  */
8960 char $ac_func (void);
8961
8962 int
8963 main (void)
8964 {
8965
8966 /* The GNU C library defines stubs for functions which it implements
8967     to always fail with ENOSYS.  Some functions are actually named
8968     something starting with __ and the normal name is an alias.  */
8969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8970 #error found stub for $ac_func
8971 #endif
8972
8973         return $ac_func ();
8974   ;
8975   return 0;
8976 }
8977 _ACEOF
8978 rm -f conftest.$ac_objext conftest$ac_exeext
8979 if { (eval echo "$as_me:8979: \"$ac_link\"") >&5
8980   (eval $ac_link) 2>&5
8981   ac_status=$?
8982   echo "$as_me:8982: \$? = $ac_status" >&5
8983   (exit $ac_status); } &&
8984          { ac_try='test -s conftest$ac_exeext'
8985   { (eval echo "$as_me:8985: \"$ac_try\"") >&5
8986   (eval $ac_try) 2>&5
8987   ac_status=$?
8988   echo "$as_me:8988: \$? = $ac_status" >&5
8989   (exit $ac_status); }; }; then
8990   eval "$as_ac_var=yes"
8991 else
8992   echo "$as_me: failed program was:" >&5
8993 cat conftest.$ac_ext >&5
8994 eval "$as_ac_var=no"
8995 fi
8996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997 fi
8998 echo "$as_me:8998: result: `eval echo '${'$as_ac_var'}'`" >&5
8999 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9000 if test `eval echo '${'$as_ac_var'}'` = yes; then
9001   cat >>confdefs.h <<EOF
9002 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9003 EOF
9004
9005 fi
9006 done
9007
9008 else
9009         echo "$as_me:9009: checking if link/symlink functions work" >&5
9010 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9011 if test "${cf_cv_link_funcs+set}" = set; then
9012   echo $ECHO_N "(cached) $ECHO_C" >&6
9013 else
9014
9015                 cf_cv_link_funcs=
9016                 for cf_func in link symlink ; do
9017                         if test "$cross_compiling" = yes; then
9018
9019                         eval 'ac_cv_func_'$cf_func'=error'
9020 else
9021   cat >conftest.$ac_ext <<_ACEOF
9022 #line 9022 "configure"
9023 #include "confdefs.h"
9024
9025 #include <sys/types.h>
9026 #include <sys/stat.h>
9027 #ifdef HAVE_UNISTD_H
9028 #include <unistd.h>
9029 #endif
9030 int main(void)
9031 {
9032         int fail = 0;
9033         char *src = "config.log";
9034         char *dst = "conftest.chk";
9035         struct stat src_sb;
9036         struct stat dst_sb;
9037
9038         stat(src, &src_sb);
9039         fail = ($cf_func("config.log", "conftest.chk") < 0)
9040             || (stat(dst, &dst_sb) < 0)
9041             || (dst_sb.st_mtime != src_sb.st_mtime);
9042 #ifdef HAVE_UNLINK
9043         unlink(dst);
9044 #else
9045         remove(dst);
9046 #endif
9047         ${cf_cv_main_return:-return} (fail);
9048 }
9049
9050 _ACEOF
9051 rm -f conftest$ac_exeext
9052 if { (eval echo "$as_me:9052: \"$ac_link\"") >&5
9053   (eval $ac_link) 2>&5
9054   ac_status=$?
9055   echo "$as_me:9055: \$? = $ac_status" >&5
9056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9057   { (eval echo "$as_me:9057: \"$ac_try\"") >&5
9058   (eval $ac_try) 2>&5
9059   ac_status=$?
9060   echo "$as_me:9060: \$? = $ac_status" >&5
9061   (exit $ac_status); }; }; then
9062
9063                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9064                         eval 'ac_cv_func_'$cf_func'=yes'
9065 else
9066   echo "$as_me: program exited with status $ac_status" >&5
9067 echo "$as_me: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9069
9070                         eval 'ac_cv_func_'$cf_func'=no'
9071 fi
9072 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9073 fi
9074                 done
9075                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9076
9077 fi
9078 echo "$as_me:9078: result: $cf_cv_link_funcs" >&5
9079 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9080         test "$ac_cv_func_link"    = yes &&
9081 cat >>confdefs.h <<\EOF
9082 #define HAVE_LINK 1
9083 EOF
9084
9085         test "$ac_cv_func_symlink" = yes &&
9086 cat >>confdefs.h <<\EOF
9087 #define HAVE_SYMLINK 1
9088 EOF
9089
9090 fi
9091
9092 with_links=no
9093 with_symlinks=no
9094
9095 # soft links (symbolic links) are useful for some systems where hard links do
9096 # not work, or to make it simpler to copy terminfo trees around.
9097 if test "x$ac_cv_func_symlink" = xyes ; then
9098         echo "$as_me:9098: checking if tic should use symbolic links" >&5
9099 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9100
9101 # Check whether --enable-symlinks or --disable-symlinks was given.
9102 if test "${enable_symlinks+set}" = set; then
9103   enableval="$enable_symlinks"
9104   with_symlinks=$enableval
9105 else
9106   with_symlinks=no
9107 fi;
9108         echo "$as_me:9108: result: $with_symlinks" >&5
9109 echo "${ECHO_T}$with_symlinks" >&6
9110 fi
9111
9112 # If we have hard links and did not choose to use soft links instead, there is
9113 # no reason to make this choice optional - use the hard links.
9114 if test "$with_symlinks" = no ; then
9115         echo "$as_me:9115: checking if tic should use hard links" >&5
9116 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9117         if test "x$ac_cv_func_link" = xyes ; then
9118                 with_links=yes
9119         else
9120                 with_links=no
9121         fi
9122         echo "$as_me:9122: result: $with_links" >&5
9123 echo "${ECHO_T}$with_links" >&6
9124 fi
9125
9126 test "x$with_links" = xyes &&
9127 cat >>confdefs.h <<\EOF
9128 #define USE_LINKS 1
9129 EOF
9130
9131 test "x$with_symlinks" = xyes &&
9132 cat >>confdefs.h <<\EOF
9133 #define USE_SYMLINKS 1
9134 EOF
9135
9136 ###   use option --enable-broken-linker to force on use of broken-linker support
9137 echo "$as_me:9137: checking if you want broken-linker support code" >&5
9138 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9139
9140 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9141 if test "${enable_broken_linker+set}" = set; then
9142   enableval="$enable_broken_linker"
9143   with_broken_linker=$enableval
9144 else
9145   with_broken_linker=${BROKEN_LINKER:-no}
9146 fi;
9147 echo "$as_me:9147: result: $with_broken_linker" >&5
9148 echo "${ECHO_T}$with_broken_linker" >&6
9149
9150 BROKEN_LINKER=0
9151 if test "x$with_broken_linker" = xyes ; then
9152
9153 cat >>confdefs.h <<\EOF
9154 #define BROKEN_LINKER 1
9155 EOF
9156
9157         BROKEN_LINKER=1
9158 elif test "$DFT_LWR_MODEL" = shared ; then
9159         case $cf_cv_system_name in
9160         (cygwin*)
9161
9162 cat >>confdefs.h <<\EOF
9163 #define BROKEN_LINKER 1
9164 EOF
9165
9166                 BROKEN_LINKER=1
9167                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
9168
9169 echo "${as_me:-configure}:9169: testing cygwin linker is broken anyway ..." 1>&5
9170
9171                 ;;
9172         esac
9173 fi
9174
9175 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9176 echo "$as_me:9176: checking if tputs should process BSD-style prefix padding" >&5
9177 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9178
9179 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9180 if test "${enable_bsdpad+set}" = set; then
9181   enableval="$enable_bsdpad"
9182   with_bsdpad=$enableval
9183 else
9184   with_bsdpad=no
9185 fi;
9186 echo "$as_me:9186: result: $with_bsdpad" >&5
9187 echo "${ECHO_T}$with_bsdpad" >&6
9188 test "x$with_bsdpad" = xyes &&
9189 cat >>confdefs.h <<\EOF
9190 #define BSD_TPUTS 1
9191 EOF
9192
9193 ###   use option --enable-widec to turn on use of wide-character support
9194 NCURSES_CH_T=chtype
9195 NCURSES_LIBUTF8=0
9196
9197 NEED_WCHAR_H=0
9198 NCURSES_MBSTATE_T=0
9199 NCURSES_WCHAR_T=0
9200 NCURSES_WINT_T=0
9201
9202 # Check to define _XOPEN_SOURCE "automatically"
9203 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9204
9205 echo "$as_me:9205: checking if the POSIX test-macros are already defined" >&5
9206 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9207 if test "${cf_cv_posix_visible+set}" = set; then
9208   echo $ECHO_N "(cached) $ECHO_C" >&6
9209 else
9210
9211 cat >conftest.$ac_ext <<_ACEOF
9212 #line 9212 "configure"
9213 #include "confdefs.h"
9214 #include <stdio.h>
9215 int
9216 main (void)
9217 {
9218
9219 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9220         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9221         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9222         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9223 #error conflicting symbols found
9224 #endif
9225
9226   ;
9227   return 0;
9228 }
9229 _ACEOF
9230 rm -f conftest.$ac_objext
9231 if { (eval echo "$as_me:9231: \"$ac_compile\"") >&5
9232   (eval $ac_compile) 2>&5
9233   ac_status=$?
9234   echo "$as_me:9234: \$? = $ac_status" >&5
9235   (exit $ac_status); } &&
9236          { ac_try='test -s conftest.$ac_objext'
9237   { (eval echo "$as_me:9237: \"$ac_try\"") >&5
9238   (eval $ac_try) 2>&5
9239   ac_status=$?
9240   echo "$as_me:9240: \$? = $ac_status" >&5
9241   (exit $ac_status); }; }; then
9242   cf_cv_posix_visible=no
9243 else
9244   echo "$as_me: failed program was:" >&5
9245 cat conftest.$ac_ext >&5
9246 cf_cv_posix_visible=yes
9247 fi
9248 rm -f conftest.$ac_objext conftest.$ac_ext
9249
9250 fi
9251 echo "$as_me:9251: result: $cf_cv_posix_visible" >&5
9252 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9253
9254 if test "$cf_cv_posix_visible" = no; then
9255
9256 cf_XOPEN_SOURCE=600
9257 cf_POSIX_C_SOURCE=199506L
9258 cf_xopen_source=
9259
9260 case $host_os in
9261 (aix[4-7]*)
9262         cf_xopen_source="-D_ALL_SOURCE"
9263         ;;
9264 (msys)
9265         cf_XOPEN_SOURCE=600
9266         ;;
9267 (darwin[0-8].*)
9268         cf_xopen_source="-D_APPLE_C_SOURCE"
9269         ;;
9270 (darwin*)
9271         cf_xopen_source="-D_DARWIN_C_SOURCE"
9272         cf_XOPEN_SOURCE=
9273         ;;
9274 (freebsd*|dragonfly*|midnightbsd*)
9275         # 5.x headers associate
9276         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9277         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9278         cf_POSIX_C_SOURCE=200112L
9279         cf_XOPEN_SOURCE=600
9280         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9281         ;;
9282 (hpux11*)
9283         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9284         ;;
9285 (hpux*)
9286         cf_xopen_source="-D_HPUX_SOURCE"
9287         ;;
9288 (irix[56].*)
9289         cf_xopen_source="-D_SGI_SOURCE"
9290         cf_XOPEN_SOURCE=
9291         ;;
9292 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9293
9294 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9295
9296 echo "$as_me:9296: checking if this is the GNU C library" >&5
9297 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9298 if test "${cf_cv_gnu_library+set}" = set; then
9299   echo $ECHO_N "(cached) $ECHO_C" >&6
9300 else
9301
9302 cat >conftest.$ac_ext <<_ACEOF
9303 #line 9303 "configure"
9304 #include "confdefs.h"
9305 #include <sys/types.h>
9306 int
9307 main (void)
9308 {
9309
9310         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9311                 return 0;
9312         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9313                 return 0;
9314         #else
9315         #       error not GNU C library
9316         #endif
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 rm -f conftest.$ac_objext
9322 if { (eval echo "$as_me:9322: \"$ac_compile\"") >&5
9323   (eval $ac_compile) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit $ac_status); } &&
9327          { ac_try='test -s conftest.$ac_objext'
9328   { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9329   (eval $ac_try) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit $ac_status); }; }; then
9333   cf_cv_gnu_library=yes
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 cat conftest.$ac_ext >&5
9337 cf_cv_gnu_library=no
9338 fi
9339 rm -f conftest.$ac_objext conftest.$ac_ext
9340
9341 fi
9342 echo "$as_me:9342: result: $cf_cv_gnu_library" >&5
9343 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9344
9345 if test x$cf_cv_gnu_library = xyes; then
9346
9347         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9348         # was changed to help a little.  newlib incorporated the change about 4
9349         # years later.
9350         echo "$as_me:9350: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9351 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9352 if test "${cf_cv_gnu_library_219+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355
9356                 cf_save="$CPPFLAGS"
9357
9358         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9359         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9360
9361                 cat >conftest.$ac_ext <<_ACEOF
9362 #line 9362 "configure"
9363 #include "confdefs.h"
9364 #include <sys/types.h>
9365 int
9366 main (void)
9367 {
9368
9369                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9370                                 return 0;
9371                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9372                                 return 0;
9373                         #else
9374                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9375                         #endif
9376   ;
9377   return 0;
9378 }
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:9390: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   cf_cv_gnu_library_219=yes
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 cf_cv_gnu_library_219=no
9397 fi
9398 rm -f conftest.$ac_objext conftest.$ac_ext
9399                 CPPFLAGS="$cf_save"
9400
9401 fi
9402 echo "$as_me:9402: result: $cf_cv_gnu_library_219" >&5
9403 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9404
9405         if test "x$cf_cv_gnu_library_219" = xyes; then
9406                 cf_save="$CPPFLAGS"
9407                 echo "$as_me:9407: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9408 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9409 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9410   echo $ECHO_N "(cached) $ECHO_C" >&6
9411 else
9412
9413 cf_fix_cppflags=no
9414 cf_new_cflags=
9415 cf_new_cppflags=
9416 cf_new_extra_cppflags=
9417
9418 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9419 do
9420 case $cf_fix_cppflags in
9421 (no)
9422         case $cf_add_cflags in
9423         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9424                 case $cf_add_cflags in
9425                 (-D*)
9426                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9427
9428                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9429                                 && test -z "${cf_tst_cflags}" \
9430                                 && cf_fix_cppflags=yes
9431
9432                         if test $cf_fix_cppflags = yes ; then
9433
9434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9436
9437                                 continue
9438                         elif test "${cf_tst_cflags}" = "\"'" ; then
9439
9440         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9441         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9442
9443                                 continue
9444                         fi
9445                         ;;
9446                 esac
9447                 case "$CPPFLAGS" in
9448                 (*$cf_add_cflags)
9449                         ;;
9450                 (*)
9451                         case $cf_add_cflags in
9452                         (-D*)
9453                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9454
9455 CPPFLAGS=`echo "$CPPFLAGS" | \
9456         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9457                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9458
9459                                 ;;
9460                         esac
9461
9462         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9463         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9464
9465                         ;;
9466                 esac
9467                 ;;
9468         (*)
9469
9470         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9471         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9472
9473                 ;;
9474         esac
9475         ;;
9476 (yes)
9477
9478         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9479         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9480
9481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9482
9483         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9484                 && test -z "${cf_tst_cflags}" \
9485                 && cf_fix_cppflags=no
9486         ;;
9487 esac
9488 done
9489
9490 if test -n "$cf_new_cflags" ; then
9491
9492         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9493         CFLAGS="${CFLAGS}$cf_new_cflags"
9494
9495 fi
9496
9497 if test -n "$cf_new_cppflags" ; then
9498
9499         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9500         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9501
9502 fi
9503
9504 if test -n "$cf_new_extra_cppflags" ; then
9505
9506         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9507         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9508
9509 fi
9510
9511                         cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514
9515                                 #include <limits.h>
9516                                 #include <sys/types.h>
9517
9518 int
9519 main (void)
9520 {
9521
9522                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9523                                         return 0;
9524                                 #else
9525                                 #       error GNU C library is too old
9526                                 #endif
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_gnu_dftsrc_219=yes
9544 else
9545   echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547 cf_cv_gnu_dftsrc_219=no
9548 fi
9549 rm -f conftest.$ac_objext conftest.$ac_ext
9550
9551 fi
9552 echo "$as_me:9552: result: $cf_cv_gnu_dftsrc_219" >&5
9553 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9554                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9555         else
9556                 cf_cv_gnu_dftsrc_219=maybe
9557         fi
9558
9559         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9560
9561                 echo "$as_me:9561: checking if we must define _GNU_SOURCE" >&5
9562 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9563 if test "${cf_cv_gnu_source+set}" = set; then
9564   echo $ECHO_N "(cached) $ECHO_C" >&6
9565 else
9566
9567                 cat >conftest.$ac_ext <<_ACEOF
9568 #line 9568 "configure"
9569 #include "confdefs.h"
9570 #include <sys/types.h>
9571 int
9572 main (void)
9573 {
9574
9575                         #ifndef _XOPEN_SOURCE
9576                         #error  expected _XOPEN_SOURCE to be defined
9577                         #endif
9578   ;
9579   return 0;
9580 }
9581 _ACEOF
9582 rm -f conftest.$ac_objext
9583 if { (eval echo "$as_me:9583: \"$ac_compile\"") >&5
9584   (eval $ac_compile) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); } &&
9588          { ac_try='test -s conftest.$ac_objext'
9589   { (eval echo "$as_me:9589: \"$ac_try\"") >&5
9590   (eval $ac_try) 2>&5
9591   ac_status=$?
9592   echo "$as_me:9592: \$? = $ac_status" >&5
9593   (exit $ac_status); }; }; then
9594   cf_cv_gnu_source=no
9595 else
9596   echo "$as_me: failed program was:" >&5
9597 cat conftest.$ac_ext >&5
9598 cf_save="$CPPFLAGS"
9599
9600 cf_fix_cppflags=no
9601 cf_new_cflags=
9602 cf_new_cppflags=
9603 cf_new_extra_cppflags=
9604
9605 for cf_add_cflags in -D_GNU_SOURCE
9606 do
9607 case $cf_fix_cppflags in
9608 (no)
9609         case $cf_add_cflags in
9610         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9611                 case $cf_add_cflags in
9612                 (-D*)
9613                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9614
9615                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9616                                 && test -z "${cf_tst_cflags}" \
9617                                 && cf_fix_cppflags=yes
9618
9619                         if test $cf_fix_cppflags = yes ; then
9620
9621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9623
9624                                 continue
9625                         elif test "${cf_tst_cflags}" = "\"'" ; then
9626
9627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9629
9630                                 continue
9631                         fi
9632                         ;;
9633                 esac
9634                 case "$CPPFLAGS" in
9635                 (*$cf_add_cflags)
9636                         ;;
9637                 (*)
9638                         case $cf_add_cflags in
9639                         (-D*)
9640                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9641
9642 CPPFLAGS=`echo "$CPPFLAGS" | \
9643         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9644                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9645
9646                                 ;;
9647                         esac
9648
9649         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9650         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9651
9652                         ;;
9653                 esac
9654                 ;;
9655         (*)
9656
9657         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9658         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9659
9660                 ;;
9661         esac
9662         ;;
9663 (yes)
9664
9665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9667
9668         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9669
9670         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9671                 && test -z "${cf_tst_cflags}" \
9672                 && cf_fix_cppflags=no
9673         ;;
9674 esac
9675 done
9676
9677 if test -n "$cf_new_cflags" ; then
9678
9679         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9680         CFLAGS="${CFLAGS}$cf_new_cflags"
9681
9682 fi
9683
9684 if test -n "$cf_new_cppflags" ; then
9685
9686         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9687         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9688
9689 fi
9690
9691 if test -n "$cf_new_extra_cppflags" ; then
9692
9693         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9694         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9695
9696 fi
9697
9698                          cat >conftest.$ac_ext <<_ACEOF
9699 #line 9699 "configure"
9700 #include "confdefs.h"
9701 #include <sys/types.h>
9702 int
9703 main (void)
9704 {
9705
9706                                 #ifdef _XOPEN_SOURCE
9707                                 #error  expected _XOPEN_SOURCE to be undefined
9708                                 #endif
9709   ;
9710   return 0;
9711 }
9712 _ACEOF
9713 rm -f conftest.$ac_objext
9714 if { (eval echo "$as_me:9714: \"$ac_compile\"") >&5
9715   (eval $ac_compile) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); } &&
9719          { ac_try='test -s conftest.$ac_objext'
9720   { (eval echo "$as_me:9720: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:9723: \$? = $ac_status" >&5
9724   (exit $ac_status); }; }; then
9725   cf_cv_gnu_source=no
9726 else
9727   echo "$as_me: failed program was:" >&5
9728 cat conftest.$ac_ext >&5
9729 cf_cv_gnu_source=yes
9730 fi
9731 rm -f conftest.$ac_objext conftest.$ac_ext
9732                         CPPFLAGS="$cf_save"
9733
9734 fi
9735 rm -f conftest.$ac_objext conftest.$ac_ext
9736
9737 fi
9738 echo "$as_me:9738: result: $cf_cv_gnu_source" >&5
9739 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9740
9741                 if test "$cf_cv_gnu_source" = yes
9742                 then
9743                 echo "$as_me:9743: checking if we should also define _DEFAULT_SOURCE" >&5
9744 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9745 if test "${cf_cv_default_source+set}" = set; then
9746   echo $ECHO_N "(cached) $ECHO_C" >&6
9747 else
9748
9749         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9750         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9751
9752                         cat >conftest.$ac_ext <<_ACEOF
9753 #line 9753 "configure"
9754 #include "confdefs.h"
9755 #include <sys/types.h>
9756 int
9757 main (void)
9758 {
9759
9760                                 #ifdef _DEFAULT_SOURCE
9761                                 #error  expected _DEFAULT_SOURCE to be undefined
9762                                 #endif
9763   ;
9764   return 0;
9765 }
9766 _ACEOF
9767 rm -f conftest.$ac_objext
9768 if { (eval echo "$as_me:9768: \"$ac_compile\"") >&5
9769   (eval $ac_compile) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); } &&
9773          { ac_try='test -s conftest.$ac_objext'
9774   { (eval echo "$as_me:9774: \"$ac_try\"") >&5
9775   (eval $ac_try) 2>&5
9776   ac_status=$?
9777   echo "$as_me:9777: \$? = $ac_status" >&5
9778   (exit $ac_status); }; }; then
9779   cf_cv_default_source=no
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 cf_cv_default_source=yes
9784 fi
9785 rm -f conftest.$ac_objext conftest.$ac_ext
9786
9787 fi
9788 echo "$as_me:9788: result: $cf_cv_default_source" >&5
9789 echo "${ECHO_T}$cf_cv_default_source" >&6
9790                         if test "$cf_cv_default_source" = yes
9791                         then
9792
9793         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9794         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9795
9796                         fi
9797                 fi
9798         fi
9799
9800 fi
9801
9802         ;;
9803 (minix*)
9804         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9805         ;;
9806 (mirbsd*)
9807         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9808         cf_XOPEN_SOURCE=
9809
9810 if test "$cf_cv_posix_visible" = no; then
9811
9812 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9813
9814 cf_save_CFLAGS="$CFLAGS"
9815 cf_save_CPPFLAGS="$CPPFLAGS"
9816
9817 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9818         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9819                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9820
9821 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9822         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9823                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9824
9825 echo "$as_me:9825: checking if we should define _POSIX_C_SOURCE" >&5
9826 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9827 if test "${cf_cv_posix_c_source+set}" = set; then
9828   echo $ECHO_N "(cached) $ECHO_C" >&6
9829 else
9830
9831 echo "${as_me:-configure}:9831: testing if the symbol is already defined go no further ..." 1>&5
9832
9833         cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9836 #include <sys/types.h>
9837 int
9838 main (void)
9839 {
9840
9841 #ifndef _POSIX_C_SOURCE
9842 make an error
9843 #endif
9844   ;
9845   return 0;
9846 }
9847 _ACEOF
9848 rm -f conftest.$ac_objext
9849 if { (eval echo "$as_me:9849: \"$ac_compile\"") >&5
9850   (eval $ac_compile) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } &&
9854          { ac_try='test -s conftest.$ac_objext'
9855   { (eval echo "$as_me:9855: \"$ac_try\"") >&5
9856   (eval $ac_try) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); }; }; then
9860   cf_cv_posix_c_source=no
9861 else
9862   echo "$as_me: failed program was:" >&5
9863 cat conftest.$ac_ext >&5
9864 cf_want_posix_source=no
9865          case .$cf_POSIX_C_SOURCE in
9866          (.[12]??*)
9867                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9868                 ;;
9869          (.2)
9870                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9871                 cf_want_posix_source=yes
9872                 ;;
9873          (.*)
9874                 cf_want_posix_source=yes
9875                 ;;
9876          esac
9877          if test "$cf_want_posix_source" = yes ; then
9878                 cat >conftest.$ac_ext <<_ACEOF
9879 #line 9879 "configure"
9880 #include "confdefs.h"
9881 #include <sys/types.h>
9882 int
9883 main (void)
9884 {
9885
9886 #ifdef _POSIX_SOURCE
9887 make an error
9888 #endif
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 rm -f conftest.$ac_objext
9894 if { (eval echo "$as_me:9894: \"$ac_compile\"") >&5
9895   (eval $ac_compile) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -s conftest.$ac_objext'
9900   { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); }; }; then
9905   :
9906 else
9907   echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9910 fi
9911 rm -f conftest.$ac_objext conftest.$ac_ext
9912          fi
9913
9914 echo "${as_me:-configure}:9914: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9915
9916          CFLAGS="$cf_trim_CFLAGS"
9917          CPPFLAGS="$cf_trim_CPPFLAGS"
9918
9919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9920         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9921
9922 echo "${as_me:-configure}:9922: testing if the second compile does not leave our definition intact error ..." 1>&5
9923
9924          cat >conftest.$ac_ext <<_ACEOF
9925 #line 9925 "configure"
9926 #include "confdefs.h"
9927 #include <sys/types.h>
9928 int
9929 main (void)
9930 {
9931
9932 #ifndef _POSIX_C_SOURCE
9933 make an error
9934 #endif
9935   ;
9936   return 0;
9937 }
9938 _ACEOF
9939 rm -f conftest.$ac_objext
9940 if { (eval echo "$as_me:9940: \"$ac_compile\"") >&5
9941   (eval $ac_compile) 2>&5
9942   ac_status=$?
9943   echo "$as_me:9943: \$? = $ac_status" >&5
9944   (exit $ac_status); } &&
9945          { ac_try='test -s conftest.$ac_objext'
9946   { (eval echo "$as_me:9946: \"$ac_try\"") >&5
9947   (eval $ac_try) 2>&5
9948   ac_status=$?
9949   echo "$as_me:9949: \$? = $ac_status" >&5
9950   (exit $ac_status); }; }; then
9951   :
9952 else
9953   echo "$as_me: failed program was:" >&5
9954 cat conftest.$ac_ext >&5
9955 cf_cv_posix_c_source=no
9956 fi
9957 rm -f conftest.$ac_objext conftest.$ac_ext
9958          CFLAGS="$cf_save_CFLAGS"
9959          CPPFLAGS="$cf_save_CPPFLAGS"
9960
9961 fi
9962 rm -f conftest.$ac_objext conftest.$ac_ext
9963
9964 fi
9965 echo "$as_me:9965: result: $cf_cv_posix_c_source" >&5
9966 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9967
9968 if test "$cf_cv_posix_c_source" != no ; then
9969         CFLAGS="$cf_trim_CFLAGS"
9970         CPPFLAGS="$cf_trim_CPPFLAGS"
9971
9972 cf_fix_cppflags=no
9973 cf_new_cflags=
9974 cf_new_cppflags=
9975 cf_new_extra_cppflags=
9976
9977 for cf_add_cflags in $cf_cv_posix_c_source
9978 do
9979 case $cf_fix_cppflags in
9980 (no)
9981         case $cf_add_cflags in
9982         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9983                 case $cf_add_cflags in
9984                 (-D*)
9985                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9986
9987                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9988                                 && test -z "${cf_tst_cflags}" \
9989                                 && cf_fix_cppflags=yes
9990
9991                         if test $cf_fix_cppflags = yes ; then
9992
9993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9995
9996                                 continue
9997                         elif test "${cf_tst_cflags}" = "\"'" ; then
9998
9999         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10000         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10001
10002                                 continue
10003                         fi
10004                         ;;
10005                 esac
10006                 case "$CPPFLAGS" in
10007                 (*$cf_add_cflags)
10008                         ;;
10009                 (*)
10010                         case $cf_add_cflags in
10011                         (-D*)
10012                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10013
10014 CPPFLAGS=`echo "$CPPFLAGS" | \
10015         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10016                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10017
10018                                 ;;
10019                         esac
10020
10021         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10022         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10023
10024                         ;;
10025                 esac
10026                 ;;
10027         (*)
10028
10029         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10030         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10031
10032                 ;;
10033         esac
10034         ;;
10035 (yes)
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10041
10042         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10043                 && test -z "${cf_tst_cflags}" \
10044                 && cf_fix_cppflags=no
10045         ;;
10046 esac
10047 done
10048
10049 if test -n "$cf_new_cflags" ; then
10050
10051         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10052         CFLAGS="${CFLAGS}$cf_new_cflags"
10053
10054 fi
10055
10056 if test -n "$cf_new_cppflags" ; then
10057
10058         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10059         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10060
10061 fi
10062
10063 if test -n "$cf_new_extra_cppflags" ; then
10064
10065         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10066         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10067
10068 fi
10069
10070 fi
10071
10072 fi # cf_cv_posix_visible
10073
10074         ;;
10075 (netbsd*)
10076         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10077         ;;
10078 (openbsd[4-9]*)
10079         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10080         cf_xopen_source="-D_BSD_SOURCE"
10081         cf_XOPEN_SOURCE=600
10082         ;;
10083 (openbsd*)
10084         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10085         ;;
10086 (osf[45]*)
10087         cf_xopen_source="-D_OSF_SOURCE"
10088         ;;
10089 (nto-qnx*)
10090         cf_xopen_source="-D_QNX_SOURCE"
10091         ;;
10092 (sco*)
10093         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10094         ;;
10095 (solaris2.*)
10096         cf_xopen_source="-D__EXTENSIONS__"
10097         cf_cv_xopen_source=broken
10098         ;;
10099 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10100         cf_XOPEN_SOURCE=
10101         cf_POSIX_C_SOURCE=
10102         ;;
10103 (*)
10104
10105 echo "$as_me:10105: checking if we should define _XOPEN_SOURCE" >&5
10106 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10107 if test "${cf_cv_xopen_source+set}" = set; then
10108   echo $ECHO_N "(cached) $ECHO_C" >&6
10109 else
10110
10111         cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114
10115 #include <stdlib.h>
10116 #include <string.h>
10117 #include <sys/types.h>
10118
10119 int
10120 main (void)
10121 {
10122
10123 #ifndef _XOPEN_SOURCE
10124 make an error
10125 #endif
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 rm -f conftest.$ac_objext
10131 if { (eval echo "$as_me:10131: \"$ac_compile\"") >&5
10132   (eval $ac_compile) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); } &&
10136          { ac_try='test -s conftest.$ac_objext'
10137   { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); }; }; then
10142   cf_cv_xopen_source=no
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 cf_save="$CPPFLAGS"
10147
10148         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10149         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10150
10151          cat >conftest.$ac_ext <<_ACEOF
10152 #line 10152 "configure"
10153 #include "confdefs.h"
10154
10155 #include <stdlib.h>
10156 #include <string.h>
10157 #include <sys/types.h>
10158
10159 int
10160 main (void)
10161 {
10162
10163 #ifdef _XOPEN_SOURCE
10164 make an error
10165 #endif
10166   ;
10167   return 0;
10168 }
10169 _ACEOF
10170 rm -f conftest.$ac_objext
10171 if { (eval echo "$as_me:10171: \"$ac_compile\"") >&5
10172   (eval $ac_compile) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit $ac_status); } &&
10176          { ac_try='test -s conftest.$ac_objext'
10177   { (eval echo "$as_me:10177: \"$ac_try\"") >&5
10178   (eval $ac_try) 2>&5
10179   ac_status=$?
10180   echo "$as_me:10180: \$? = $ac_status" >&5
10181   (exit $ac_status); }; }; then
10182   cf_cv_xopen_source=no
10183 else
10184   echo "$as_me: failed program was:" >&5
10185 cat conftest.$ac_ext >&5
10186 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10187 fi
10188 rm -f conftest.$ac_objext conftest.$ac_ext
10189         CPPFLAGS="$cf_save"
10190
10191 fi
10192 rm -f conftest.$ac_objext conftest.$ac_ext
10193
10194 fi
10195 echo "$as_me:10195: result: $cf_cv_xopen_source" >&5
10196 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10197
10198 if test "$cf_cv_xopen_source" != no ; then
10199
10200 CFLAGS=`echo "$CFLAGS" | \
10201         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10202                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10203
10204 CPPFLAGS=`echo "$CPPFLAGS" | \
10205         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10206                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10207
10208         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10209
10210 cf_fix_cppflags=no
10211 cf_new_cflags=
10212 cf_new_cppflags=
10213 cf_new_extra_cppflags=
10214
10215 for cf_add_cflags in $cf_temp_xopen_source
10216 do
10217 case $cf_fix_cppflags in
10218 (no)
10219         case $cf_add_cflags in
10220         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10221                 case $cf_add_cflags in
10222                 (-D*)
10223                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10224
10225                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10226                                 && test -z "${cf_tst_cflags}" \
10227                                 && cf_fix_cppflags=yes
10228
10229                         if test $cf_fix_cppflags = yes ; then
10230
10231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10233
10234                                 continue
10235                         elif test "${cf_tst_cflags}" = "\"'" ; then
10236
10237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10239
10240                                 continue
10241                         fi
10242                         ;;
10243                 esac
10244                 case "$CPPFLAGS" in
10245                 (*$cf_add_cflags)
10246                         ;;
10247                 (*)
10248                         case $cf_add_cflags in
10249                         (-D*)
10250                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10251
10252 CPPFLAGS=`echo "$CPPFLAGS" | \
10253         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10254                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10255
10256                                 ;;
10257                         esac
10258
10259         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10260         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10261
10262                         ;;
10263                 esac
10264                 ;;
10265         (*)
10266
10267         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10268         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10269
10270                 ;;
10271         esac
10272         ;;
10273 (yes)
10274
10275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10277
10278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10279
10280         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10281                 && test -z "${cf_tst_cflags}" \
10282                 && cf_fix_cppflags=no
10283         ;;
10284 esac
10285 done
10286
10287 if test -n "$cf_new_cflags" ; then
10288
10289         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10290         CFLAGS="${CFLAGS}$cf_new_cflags"
10291
10292 fi
10293
10294 if test -n "$cf_new_cppflags" ; then
10295
10296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10297         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10298
10299 fi
10300
10301 if test -n "$cf_new_extra_cppflags" ; then
10302
10303         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10304         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10305
10306 fi
10307
10308 fi
10309
10310 if test "$cf_cv_posix_visible" = no; then
10311
10312 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10313
10314 cf_save_CFLAGS="$CFLAGS"
10315 cf_save_CPPFLAGS="$CPPFLAGS"
10316
10317 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10318         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10319                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10320
10321 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10322         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10323                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10324
10325 echo "$as_me:10325: checking if we should define _POSIX_C_SOURCE" >&5
10326 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10327 if test "${cf_cv_posix_c_source+set}" = set; then
10328   echo $ECHO_N "(cached) $ECHO_C" >&6
10329 else
10330
10331 echo "${as_me:-configure}:10331: testing if the symbol is already defined go no further ..." 1>&5
10332
10333         cat >conftest.$ac_ext <<_ACEOF
10334 #line 10334 "configure"
10335 #include "confdefs.h"
10336 #include <sys/types.h>
10337 int
10338 main (void)
10339 {
10340
10341 #ifndef _POSIX_C_SOURCE
10342 make an error
10343 #endif
10344   ;
10345   return 0;
10346 }
10347 _ACEOF
10348 rm -f conftest.$ac_objext
10349 if { (eval echo "$as_me:10349: \"$ac_compile\"") >&5
10350   (eval $ac_compile) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } &&
10354          { ac_try='test -s conftest.$ac_objext'
10355   { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356   (eval $ac_try) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit $ac_status); }; }; then
10360   cf_cv_posix_c_source=no
10361 else
10362   echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_want_posix_source=no
10365          case .$cf_POSIX_C_SOURCE in
10366          (.[12]??*)
10367                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10368                 ;;
10369          (.2)
10370                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10371                 cf_want_posix_source=yes
10372                 ;;
10373          (.*)
10374                 cf_want_posix_source=yes
10375                 ;;
10376          esac
10377          if test "$cf_want_posix_source" = yes ; then
10378                 cat >conftest.$ac_ext <<_ACEOF
10379 #line 10379 "configure"
10380 #include "confdefs.h"
10381 #include <sys/types.h>
10382 int
10383 main (void)
10384 {
10385
10386 #ifdef _POSIX_SOURCE
10387 make an error
10388 #endif
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393 rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395   (eval $ac_compile) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -s conftest.$ac_objext'
10400   { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401   (eval $ac_try) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); }; }; then
10405   :
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10410 fi
10411 rm -f conftest.$ac_objext conftest.$ac_ext
10412          fi
10413
10414 echo "${as_me:-configure}:10414: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10415
10416          CFLAGS="$cf_trim_CFLAGS"
10417          CPPFLAGS="$cf_trim_CPPFLAGS"
10418
10419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10420         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10421
10422 echo "${as_me:-configure}:10422: testing if the second compile does not leave our definition intact error ..." 1>&5
10423
10424          cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 #include <sys/types.h>
10428 int
10429 main (void)
10430 {
10431
10432 #ifndef _POSIX_C_SOURCE
10433 make an error
10434 #endif
10435   ;
10436   return 0;
10437 }
10438 _ACEOF
10439 rm -f conftest.$ac_objext
10440 if { (eval echo "$as_me:10440: \"$ac_compile\"") >&5
10441   (eval $ac_compile) 2>&5
10442   ac_status=$?
10443   echo "$as_me:10443: \$? = $ac_status" >&5
10444   (exit $ac_status); } &&
10445          { ac_try='test -s conftest.$ac_objext'
10446   { (eval echo "$as_me:10446: \"$ac_try\"") >&5
10447   (eval $ac_try) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); }; }; then
10451   :
10452 else
10453   echo "$as_me: failed program was:" >&5
10454 cat conftest.$ac_ext >&5
10455 cf_cv_posix_c_source=no
10456 fi
10457 rm -f conftest.$ac_objext conftest.$ac_ext
10458          CFLAGS="$cf_save_CFLAGS"
10459          CPPFLAGS="$cf_save_CPPFLAGS"
10460
10461 fi
10462 rm -f conftest.$ac_objext conftest.$ac_ext
10463
10464 fi
10465 echo "$as_me:10465: result: $cf_cv_posix_c_source" >&5
10466 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10467
10468 if test "$cf_cv_posix_c_source" != no ; then
10469         CFLAGS="$cf_trim_CFLAGS"
10470         CPPFLAGS="$cf_trim_CPPFLAGS"
10471
10472 cf_fix_cppflags=no
10473 cf_new_cflags=
10474 cf_new_cppflags=
10475 cf_new_extra_cppflags=
10476
10477 for cf_add_cflags in $cf_cv_posix_c_source
10478 do
10479 case $cf_fix_cppflags in
10480 (no)
10481         case $cf_add_cflags in
10482         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10483                 case $cf_add_cflags in
10484                 (-D*)
10485                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10486
10487                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10488                                 && test -z "${cf_tst_cflags}" \
10489                                 && cf_fix_cppflags=yes
10490
10491                         if test $cf_fix_cppflags = yes ; then
10492
10493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10495
10496                                 continue
10497                         elif test "${cf_tst_cflags}" = "\"'" ; then
10498
10499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10501
10502                                 continue
10503                         fi
10504                         ;;
10505                 esac
10506                 case "$CPPFLAGS" in
10507                 (*$cf_add_cflags)
10508                         ;;
10509                 (*)
10510                         case $cf_add_cflags in
10511                         (-D*)
10512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10513
10514 CPPFLAGS=`echo "$CPPFLAGS" | \
10515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10517
10518                                 ;;
10519                         esac
10520
10521         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10522         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10523
10524                         ;;
10525                 esac
10526                 ;;
10527         (*)
10528
10529         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10530         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10531
10532                 ;;
10533         esac
10534         ;;
10535 (yes)
10536
10537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10539
10540         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10541
10542         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10543                 && test -z "${cf_tst_cflags}" \
10544                 && cf_fix_cppflags=no
10545         ;;
10546 esac
10547 done
10548
10549 if test -n "$cf_new_cflags" ; then
10550
10551         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10552         CFLAGS="${CFLAGS}$cf_new_cflags"
10553
10554 fi
10555
10556 if test -n "$cf_new_cppflags" ; then
10557
10558         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10559         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10560
10561 fi
10562
10563 if test -n "$cf_new_extra_cppflags" ; then
10564
10565         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10566         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10567
10568 fi
10569
10570 fi
10571
10572 fi # cf_cv_posix_visible
10573
10574         ;;
10575 esac
10576
10577 if test -n "$cf_xopen_source" ; then
10578
10579 cf_fix_cppflags=no
10580 cf_new_cflags=
10581 cf_new_cppflags=
10582 cf_new_extra_cppflags=
10583
10584 for cf_add_cflags in $cf_xopen_source
10585 do
10586 case $cf_fix_cppflags in
10587 (no)
10588         case $cf_add_cflags in
10589         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10590                 case $cf_add_cflags in
10591                 (-D*)
10592                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10593
10594                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10595                                 && test -z "${cf_tst_cflags}" \
10596                                 && cf_fix_cppflags=yes
10597
10598                         if test $cf_fix_cppflags = yes ; then
10599
10600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603                                 continue
10604                         elif test "${cf_tst_cflags}" = "\"'" ; then
10605
10606         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10607         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10608
10609                                 continue
10610                         fi
10611                         ;;
10612                 esac
10613                 case "$CPPFLAGS" in
10614                 (*$cf_add_cflags)
10615                         ;;
10616                 (*)
10617                         case $cf_add_cflags in
10618                         (-D*)
10619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10620
10621 CPPFLAGS=`echo "$CPPFLAGS" | \
10622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10624
10625                                 ;;
10626                         esac
10627
10628         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10629         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10630
10631                         ;;
10632                 esac
10633                 ;;
10634         (*)
10635
10636         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10637         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10638
10639                 ;;
10640         esac
10641         ;;
10642 (yes)
10643
10644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10646
10647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10648
10649         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10650                 && test -z "${cf_tst_cflags}" \
10651                 && cf_fix_cppflags=no
10652         ;;
10653 esac
10654 done
10655
10656 if test -n "$cf_new_cflags" ; then
10657         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10658
10659 echo "${as_me:-configure}:10659: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10660
10661         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10662         CFLAGS="${CFLAGS}$cf_new_cflags"
10663
10664 fi
10665
10666 if test -n "$cf_new_cppflags" ; then
10667         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10668
10669 echo "${as_me:-configure}:10669: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10670
10671         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10672         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10673
10674 fi
10675
10676 if test -n "$cf_new_extra_cppflags" ; then
10677         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10678
10679 echo "${as_me:-configure}:10679: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10680
10681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10683
10684 fi
10685
10686 fi
10687
10688 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10689         echo "$as_me:10689: checking if _XOPEN_SOURCE really is set" >&5
10690 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10691         cat >conftest.$ac_ext <<_ACEOF
10692 #line 10692 "configure"
10693 #include "confdefs.h"
10694 #include <stdlib.h>
10695 int
10696 main (void)
10697 {
10698
10699 #ifndef _XOPEN_SOURCE
10700 make an error
10701 #endif
10702   ;
10703   return 0;
10704 }
10705 _ACEOF
10706 rm -f conftest.$ac_objext
10707 if { (eval echo "$as_me:10707: \"$ac_compile\"") >&5
10708   (eval $ac_compile) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); } &&
10712          { ac_try='test -s conftest.$ac_objext'
10713   { (eval echo "$as_me:10713: \"$ac_try\"") >&5
10714   (eval $ac_try) 2>&5
10715   ac_status=$?
10716   echo "$as_me:10716: \$? = $ac_status" >&5
10717   (exit $ac_status); }; }; then
10718   cf_XOPEN_SOURCE_set=yes
10719 else
10720   echo "$as_me: failed program was:" >&5
10721 cat conftest.$ac_ext >&5
10722 cf_XOPEN_SOURCE_set=no
10723 fi
10724 rm -f conftest.$ac_objext conftest.$ac_ext
10725         echo "$as_me:10725: result: $cf_XOPEN_SOURCE_set" >&5
10726 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10727         if test $cf_XOPEN_SOURCE_set = yes
10728         then
10729                 cat >conftest.$ac_ext <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10732 #include <stdlib.h>
10733 int
10734 main (void)
10735 {
10736
10737 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10738 make an error
10739 #endif
10740   ;
10741   return 0;
10742 }
10743 _ACEOF
10744 rm -f conftest.$ac_objext
10745 if { (eval echo "$as_me:10745: \"$ac_compile\"") >&5
10746   (eval $ac_compile) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit $ac_status); } &&
10750          { ac_try='test -s conftest.$ac_objext'
10751   { (eval echo "$as_me:10751: \"$ac_try\"") >&5
10752   (eval $ac_try) 2>&5
10753   ac_status=$?
10754   echo "$as_me:10754: \$? = $ac_status" >&5
10755   (exit $ac_status); }; }; then
10756   cf_XOPEN_SOURCE_set_ok=yes
10757 else
10758   echo "$as_me: failed program was:" >&5
10759 cat conftest.$ac_ext >&5
10760 cf_XOPEN_SOURCE_set_ok=no
10761 fi
10762 rm -f conftest.$ac_objext conftest.$ac_ext
10763                 if test $cf_XOPEN_SOURCE_set_ok = no
10764                 then
10765                         { echo "$as_me:10765: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10766 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10767                 fi
10768         else
10769
10770 echo "$as_me:10770: checking if we should define _XOPEN_SOURCE" >&5
10771 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10772 if test "${cf_cv_xopen_source+set}" = set; then
10773   echo $ECHO_N "(cached) $ECHO_C" >&6
10774 else
10775
10776         cat >conftest.$ac_ext <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779
10780 #include <stdlib.h>
10781 #include <string.h>
10782 #include <sys/types.h>
10783
10784 int
10785 main (void)
10786 {
10787
10788 #ifndef _XOPEN_SOURCE
10789 make an error
10790 #endif
10791   ;
10792   return 0;
10793 }
10794 _ACEOF
10795 rm -f conftest.$ac_objext
10796 if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
10797   (eval $ac_compile) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); } &&
10801          { ac_try='test -s conftest.$ac_objext'
10802   { (eval echo "$as_me:10802: \"$ac_try\"") >&5
10803   (eval $ac_try) 2>&5
10804   ac_status=$?
10805   echo "$as_me:10805: \$? = $ac_status" >&5
10806   (exit $ac_status); }; }; then
10807   cf_cv_xopen_source=no
10808 else
10809   echo "$as_me: failed program was:" >&5
10810 cat conftest.$ac_ext >&5
10811 cf_save="$CPPFLAGS"
10812
10813         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10814         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10815
10816          cat >conftest.$ac_ext <<_ACEOF
10817 #line 10817 "configure"
10818 #include "confdefs.h"
10819
10820 #include <stdlib.h>
10821 #include <string.h>
10822 #include <sys/types.h>
10823
10824 int
10825 main (void)
10826 {
10827
10828 #ifdef _XOPEN_SOURCE
10829 make an error
10830 #endif
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); } &&
10841          { ac_try='test -s conftest.$ac_objext'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit $ac_status); }; }; then
10847   cf_cv_xopen_source=no
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10852 fi
10853 rm -f conftest.$ac_objext conftest.$ac_ext
10854         CPPFLAGS="$cf_save"
10855
10856 fi
10857 rm -f conftest.$ac_objext conftest.$ac_ext
10858
10859 fi
10860 echo "$as_me:10860: result: $cf_cv_xopen_source" >&5
10861 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10862
10863 if test "$cf_cv_xopen_source" != no ; then
10864
10865 CFLAGS=`echo "$CFLAGS" | \
10866         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10867                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10868
10869 CPPFLAGS=`echo "$CPPFLAGS" | \
10870         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10871                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10872
10873         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10874
10875 cf_fix_cppflags=no
10876 cf_new_cflags=
10877 cf_new_cppflags=
10878 cf_new_extra_cppflags=
10879
10880 for cf_add_cflags in $cf_temp_xopen_source
10881 do
10882 case $cf_fix_cppflags in
10883 (no)
10884         case $cf_add_cflags in
10885         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10886                 case $cf_add_cflags in
10887                 (-D*)
10888                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10889
10890                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10891                                 && test -z "${cf_tst_cflags}" \
10892                                 && cf_fix_cppflags=yes
10893
10894                         if test $cf_fix_cppflags = yes ; then
10895
10896         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10897         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10898
10899                                 continue
10900                         elif test "${cf_tst_cflags}" = "\"'" ; then
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905                                 continue
10906                         fi
10907                         ;;
10908                 esac
10909                 case "$CPPFLAGS" in
10910                 (*$cf_add_cflags)
10911                         ;;
10912                 (*)
10913                         case $cf_add_cflags in
10914                         (-D*)
10915                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10916
10917 CPPFLAGS=`echo "$CPPFLAGS" | \
10918         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10919                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10920
10921                                 ;;
10922                         esac
10923
10924         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10925         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10926
10927                         ;;
10928                 esac
10929                 ;;
10930         (*)
10931
10932         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10933         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10934
10935                 ;;
10936         esac
10937         ;;
10938 (yes)
10939
10940         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10941         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10942
10943         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10944
10945         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10946                 && test -z "${cf_tst_cflags}" \
10947                 && cf_fix_cppflags=no
10948         ;;
10949 esac
10950 done
10951
10952 if test -n "$cf_new_cflags" ; then
10953
10954         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10955         CFLAGS="${CFLAGS}$cf_new_cflags"
10956
10957 fi
10958
10959 if test -n "$cf_new_cppflags" ; then
10960
10961         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10962         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10963
10964 fi
10965
10966 if test -n "$cf_new_extra_cppflags" ; then
10967
10968         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10969         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10970
10971 fi
10972
10973 fi
10974
10975         fi
10976 fi
10977 fi # cf_cv_posix_visible
10978
10979 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10980
10981 # Work around breakage on OS X
10982
10983 echo "$as_me:10983: checking if SIGWINCH is defined" >&5
10984 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10985 if test "${cf_cv_define_sigwinch+set}" = set; then
10986   echo $ECHO_N "(cached) $ECHO_C" >&6
10987 else
10988
10989         cat >conftest.$ac_ext <<_ACEOF
10990 #line 10990 "configure"
10991 #include "confdefs.h"
10992
10993 #include <sys/types.h>
10994 #include <sys/signal.h>
10995
10996 int
10997 main (void)
10998 {
10999 int x = SIGWINCH
11000   ;
11001   return 0;
11002 }
11003 _ACEOF
11004 rm -f conftest.$ac_objext
11005 if { (eval echo "$as_me:11005: \"$ac_compile\"") >&5
11006   (eval $ac_compile) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); } &&
11010          { ac_try='test -s conftest.$ac_objext'
11011   { (eval echo "$as_me:11011: \"$ac_try\"") >&5
11012   (eval $ac_try) 2>&5
11013   ac_status=$?
11014   echo "$as_me:11014: \$? = $ac_status" >&5
11015   (exit $ac_status); }; }; then
11016   cf_cv_define_sigwinch=yes
11017 else
11018   echo "$as_me: failed program was:" >&5
11019 cat conftest.$ac_ext >&5
11020 cat >conftest.$ac_ext <<_ACEOF
11021 #line 11021 "configure"
11022 #include "confdefs.h"
11023
11024 #undef _XOPEN_SOURCE
11025 #undef _POSIX_SOURCE
11026 #undef _POSIX_C_SOURCE
11027 #include <sys/types.h>
11028 #include <sys/signal.h>
11029
11030 int
11031 main (void)
11032 {
11033 int x = SIGWINCH
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038 rm -f conftest.$ac_objext
11039 if { (eval echo "$as_me:11039: \"$ac_compile\"") >&5
11040   (eval $ac_compile) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); } &&
11044          { ac_try='test -s conftest.$ac_objext'
11045   { (eval echo "$as_me:11045: \"$ac_try\"") >&5
11046   (eval $ac_try) 2>&5
11047   ac_status=$?
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); }; }; then
11050   cf_cv_define_sigwinch=maybe
11051 else
11052   echo "$as_me: failed program was:" >&5
11053 cat conftest.$ac_ext >&5
11054 cf_cv_define_sigwinch=no
11055 fi
11056 rm -f conftest.$ac_objext conftest.$ac_ext
11057
11058 fi
11059 rm -f conftest.$ac_objext conftest.$ac_ext
11060
11061 fi
11062 echo "$as_me:11062: result: $cf_cv_define_sigwinch" >&5
11063 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11064
11065 if test "$cf_cv_define_sigwinch" = maybe ; then
11066 echo "$as_me:11066: checking for actual SIGWINCH definition" >&5
11067 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11068 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11069   echo $ECHO_N "(cached) $ECHO_C" >&6
11070 else
11071
11072 cf_cv_fixup_sigwinch=unknown
11073 cf_sigwinch=32
11074 while test $cf_sigwinch != 1
11075 do
11076         cat >conftest.$ac_ext <<_ACEOF
11077 #line 11077 "configure"
11078 #include "confdefs.h"
11079
11080 #undef _XOPEN_SOURCE
11081 #undef _POSIX_SOURCE
11082 #undef _POSIX_C_SOURCE
11083 #include <sys/types.h>
11084 #include <sys/signal.h>
11085
11086 int
11087 main (void)
11088 {
11089
11090 #if SIGWINCH != $cf_sigwinch
11091 make an error
11092 #endif
11093 int x = SIGWINCH
11094   ;
11095   return 0;
11096 }
11097 _ACEOF
11098 rm -f conftest.$ac_objext
11099 if { (eval echo "$as_me:11099: \"$ac_compile\"") >&5
11100   (eval $ac_compile) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit $ac_status); } &&
11104          { ac_try='test -s conftest.$ac_objext'
11105   { (eval echo "$as_me:11105: \"$ac_try\"") >&5
11106   (eval $ac_try) 2>&5
11107   ac_status=$?
11108   echo "$as_me:11108: \$? = $ac_status" >&5
11109   (exit $ac_status); }; }; then
11110   cf_cv_fixup_sigwinch=$cf_sigwinch
11111          break
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115 fi
11116 rm -f conftest.$ac_objext conftest.$ac_ext
11117
11118 cf_sigwinch=`expr $cf_sigwinch - 1`
11119 done
11120
11121 fi
11122 echo "$as_me:11122: result: $cf_cv_fixup_sigwinch" >&5
11123 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11124
11125         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11126                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11127         fi
11128 fi
11129
11130 # Checks for CODESET support.
11131
11132 echo "$as_me:11132: checking for nl_langinfo and CODESET" >&5
11133 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11134 if test "${am_cv_langinfo_codeset+set}" = set; then
11135   echo $ECHO_N "(cached) $ECHO_C" >&6
11136 else
11137   cat >conftest.$ac_ext <<_ACEOF
11138 #line 11138 "configure"
11139 #include "confdefs.h"
11140 #include <langinfo.h>
11141 int
11142 main (void)
11143 {
11144 char* cs = nl_langinfo(CODESET);
11145   ;
11146   return 0;
11147 }
11148 _ACEOF
11149 rm -f conftest.$ac_objext conftest$ac_exeext
11150 if { (eval echo "$as_me:11150: \"$ac_link\"") >&5
11151   (eval $ac_link) 2>&5
11152   ac_status=$?
11153   echo "$as_me:11153: \$? = $ac_status" >&5
11154   (exit $ac_status); } &&
11155          { ac_try='test -s conftest$ac_exeext'
11156   { (eval echo "$as_me:11156: \"$ac_try\"") >&5
11157   (eval $ac_try) 2>&5
11158   ac_status=$?
11159   echo "$as_me:11159: \$? = $ac_status" >&5
11160   (exit $ac_status); }; }; then
11161   am_cv_langinfo_codeset=yes
11162 else
11163   echo "$as_me: failed program was:" >&5
11164 cat conftest.$ac_ext >&5
11165 am_cv_langinfo_codeset=no
11166 fi
11167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11168
11169 fi
11170 echo "$as_me:11170: result: $am_cv_langinfo_codeset" >&5
11171 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11172         if test $am_cv_langinfo_codeset = yes; then
11173
11174 cat >>confdefs.h <<\EOF
11175 #define HAVE_LANGINFO_CODESET 1
11176 EOF
11177
11178         fi
11179
11180 # use these variables to work around a defect in gcc's fixincludes.
11181 NCURSES_OK_WCHAR_T=
11182 NCURSES_OK_WINT_T=
11183
11184 echo "$as_me:11184: checking if you want wide-character code" >&5
11185 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11186
11187 # Check whether --enable-widec or --disable-widec was given.
11188 if test "${enable_widec+set}" = set; then
11189   enableval="$enable_widec"
11190   with_widec=$enableval
11191 else
11192   with_widec=no
11193 fi;
11194 echo "$as_me:11194: result: $with_widec" >&5
11195 echo "${ECHO_T}$with_widec" >&6
11196
11197 NCURSES_WCWIDTH_GRAPHICS=1
11198
11199 if test "x$with_widec" = xyes ; then
11200         if test "x$disable_lib_suffixes" = xno ; then
11201                 LIB_SUFFIX="w${LIB_SUFFIX}"
11202         fi
11203
11204 cat >>confdefs.h <<\EOF
11205 #define USE_WIDEC_SUPPORT 1
11206 EOF
11207
11208 cat >>confdefs.h <<\EOF
11209 #define NCURSES_WIDECHAR 1
11210 EOF
11211
11212 for ac_header in \
11213 wchar.h \
11214 wctype.h \
11215
11216 do
11217 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11218 echo "$as_me:11218: checking for $ac_header" >&5
11219 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11220 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11221   echo $ECHO_N "(cached) $ECHO_C" >&6
11222 else
11223   cat >conftest.$ac_ext <<_ACEOF
11224 #line 11224 "configure"
11225 #include "confdefs.h"
11226 #include <$ac_header>
11227 _ACEOF
11228 if { (eval echo "$as_me:11228: \"$ac_cpp conftest.$ac_ext\"") >&5
11229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11230   ac_status=$?
11231   egrep -v '^ *\+' conftest.er1 >conftest.err
11232   rm -f conftest.er1
11233   cat conftest.err >&5
11234   echo "$as_me:11234: \$? = $ac_status" >&5
11235   (exit $ac_status); } >/dev/null; then
11236   if test -s conftest.err; then
11237     ac_cpp_err=$ac_c_preproc_warn_flag
11238   else
11239     ac_cpp_err=
11240   fi
11241 else
11242   ac_cpp_err=yes
11243 fi
11244 if test -z "$ac_cpp_err"; then
11245   eval "$as_ac_Header=yes"
11246 else
11247   echo "$as_me: failed program was:" >&5
11248   cat conftest.$ac_ext >&5
11249   eval "$as_ac_Header=no"
11250 fi
11251 rm -f conftest.err conftest.$ac_ext
11252 fi
11253 echo "$as_me:11253: result: `eval echo '${'$as_ac_Header'}'`" >&5
11254 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11255 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11256   cat >>confdefs.h <<EOF
11257 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11258 EOF
11259
11260 fi
11261 done
11262
11263 echo "$as_me:11263: checking if wchar.h can be used as is" >&5
11264 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11265 if test "${cf_cv_wchar_h_okay+set}" = set; then
11266   echo $ECHO_N "(cached) $ECHO_C" >&6
11267 else
11268
11269 cat >conftest.$ac_ext <<_ACEOF
11270 #line 11270 "configure"
11271 #include "confdefs.h"
11272
11273 #include <stdlib.h>
11274 #ifdef HAVE_WCHAR_H
11275 #include <wchar.h>
11276 #endif
11277 #ifdef HAVE_WCTYPE_H
11278 #include <wctype.h>
11279 #endif
11280
11281 int
11282 main (void)
11283 {
11284
11285         wint_t foo = 0;
11286         int bar = iswpunct(foo)
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest.$ac_objext
11292 if { (eval echo "$as_me:11292: \"$ac_compile\"") >&5
11293   (eval $ac_compile) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); } &&
11297          { ac_try='test -s conftest.$ac_objext'
11298   { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299   (eval $ac_try) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit $ac_status); }; }; then
11303   cf_cv_wchar_h_okay=yes
11304 else
11305   echo "$as_me: failed program was:" >&5
11306 cat conftest.$ac_ext >&5
11307 cf_cv_wchar_h_okay=no
11308 fi
11309 rm -f conftest.$ac_objext conftest.$ac_ext
11310 fi
11311 echo "$as_me:11311: result: $cf_cv_wchar_h_okay" >&5
11312 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11313
11314 if test $cf_cv_wchar_h_okay = no
11315 then
11316
11317 echo "$as_me:11317: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11318 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11319 cat >conftest.$ac_ext <<_ACEOF
11320 #line 11320 "configure"
11321 #include "confdefs.h"
11322 #include <sys/types.h>
11323
11324 int
11325 main (void)
11326 {
11327
11328 #ifndef _XOPEN_SOURCE_EXTENDED
11329 make an error
11330 #endif
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 rm -f conftest.$ac_objext
11336 if { (eval echo "$as_me:11336: \"$ac_compile\"") >&5
11337   (eval $ac_compile) 2>&5
11338   ac_status=$?
11339   echo "$as_me:11339: \$? = $ac_status" >&5
11340   (exit $ac_status); } &&
11341          { ac_try='test -s conftest.$ac_objext'
11342   { (eval echo "$as_me:11342: \"$ac_try\"") >&5
11343   (eval $ac_try) 2>&5
11344   ac_status=$?
11345   echo "$as_me:11345: \$? = $ac_status" >&5
11346   (exit $ac_status); }; }; then
11347   cf_result=no
11348 else
11349   echo "$as_me: failed program was:" >&5
11350 cat conftest.$ac_ext >&5
11351 cf_result=yes
11352 fi
11353 rm -f conftest.$ac_objext conftest.$ac_ext
11354 echo "$as_me:11354: result: $cf_result" >&5
11355 echo "${ECHO_T}$cf_result" >&6
11356
11357 if test "$cf_result" = yes ; then
11358         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11359 elif test "x" != "x" ; then
11360         echo "$as_me:11360: checking checking for compatible value versus " >&5
11361 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11362         cat >conftest.$ac_ext <<_ACEOF
11363 #line 11363 "configure"
11364 #include "confdefs.h"
11365 #include <sys/types.h>
11366
11367 int
11368 main (void)
11369 {
11370
11371 #if _XOPEN_SOURCE_EXTENDED- < 0
11372 make an error
11373 #endif
11374   ;
11375   return 0;
11376 }
11377 _ACEOF
11378 rm -f conftest.$ac_objext
11379 if { (eval echo "$as_me:11379: \"$ac_compile\"") >&5
11380   (eval $ac_compile) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); } &&
11384          { ac_try='test -s conftest.$ac_objext'
11385   { (eval echo "$as_me:11385: \"$ac_try\"") >&5
11386   (eval $ac_try) 2>&5
11387   ac_status=$?
11388   echo "$as_me:11388: \$? = $ac_status" >&5
11389   (exit $ac_status); }; }; then
11390   cf_result=yes
11391 else
11392   echo "$as_me: failed program was:" >&5
11393 cat conftest.$ac_ext >&5
11394 cf_result=no
11395 fi
11396 rm -f conftest.$ac_objext conftest.$ac_ext
11397         echo "$as_me:11397: result: $cf_result" >&5
11398 echo "${ECHO_T}$cf_result" >&6
11399         if test "$cf_result" = no ; then
11400                 # perhaps we can override it - try...
11401                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11402         fi
11403 fi
11404
11405 fi
11406
11407 echo "$as_me:11407: checking if wcwidth agrees graphics are single-width" >&5
11408 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11409 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11410   echo $ECHO_N "(cached) $ECHO_C" >&6
11411 else
11412
11413 cat >conftest.in <<CF_EOF
11414 -       VT100 symbols
11415 0x250c  upper left corner
11416 0x2514  lower left corner
11417 0x2510  upper right corner
11418 0x2518  lower right corner
11419 0x251c  tee pointing left
11420 0x2524  tee pointing right
11421 0x2534  tee pointing up
11422 0x252c  tee pointing down
11423 0x2500  horizontal line
11424 0x2502  vertical line
11425 0x253c  large plus or crossover
11426 0x23ba  scan line 1
11427 0x23bd  scan line 9
11428 0x25c6  diamond
11429 0x2592  checker board (stipple)
11430 0x00b0  degree symbol
11431 0x00b1  plus/minus
11432 0x00b7  bullet
11433 -       Teletype 5410v1 symbols
11434 0x2190  arrow pointing left
11435 0x2192  arrow pointing right
11436 0x2193  arrow pointing down
11437 0x2191  arrow pointing up
11438 0x2592  board of squares
11439 0x2603  lantern symbol
11440 0x25ae  solid square block
11441 -       these defaults were invented for ncurses
11442 0x23bb  scan line 3
11443 0x23bc  scan line 7
11444 0x2264  less-than-or-equal-to
11445 0x2265  greater-than-or-equal-to
11446 0x03c0  greek pi
11447 0x2260  not-equal
11448 0x00a3  pound-sterling symbol
11449 -       thick-line-drawing
11450 0x250f  upper left corner
11451 0x2517  lower left corner
11452 0x2513  upper right corner
11453 0x251b  lower right corner
11454 0x2523  tee pointing left
11455 0x252b  tee pointing right
11456 0x253b  tee pointing up
11457 0x2533  tee pointing down
11458 0x2501  horizontal line
11459 0x2503  vertical line
11460 0x254b  large plus or crossover
11461 -       double-line-drawing
11462 0x2554  upper left corner
11463 0x255a  lower left corner
11464 0x2557  upper right corner
11465 0x255d  lower right corner
11466 0x2563  tee pointing left
11467 0x2560  tee pointing right
11468 0x2569  tee pointing up
11469 0x2566  tee pointing down
11470 0x2550  horizontal line
11471 0x2551  vertical line
11472 0x256c  large plus or crossover
11473 CF_EOF
11474 if test "$cross_compiling" = yes; then
11475   cf_cv_wcwidth_graphics=unknown
11476 else
11477   cat >conftest.$ac_ext <<_ACEOF
11478 #line 11478 "configure"
11479 #include "confdefs.h"
11480
11481 #include <locale.h>
11482 #include <stdio.h>
11483 #include <wchar.h>
11484
11485 #define MY_LEN 80
11486
11487 int
11488 main(void)
11489 {
11490         FILE *fp;
11491         int value;
11492         char buffer[MY_LEN + 1];
11493         char notes[MY_LEN + 1];
11494         int totals = 0;
11495         int passed = 0;
11496
11497         if (setlocale(LC_ALL, "en_US.UTF8") ||
11498                 setlocale(LC_ALL, "en_US.UTF-8") ||
11499                 setlocale(LC_ALL, "en_US.utf8") ||
11500                 setlocale(LC_ALL, "en_US.utf-8")) {
11501                 if ((fp = fopen("conftest.in", "r")) != 0) {
11502                         while (fgets(buffer, MY_LEN, fp) != 0) {
11503                                 if (*buffer == '-') {
11504                                         fprintf(stderr, "\t%s", buffer);
11505                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11506                                         ++totals;
11507                                         if (wcwidth(value) == 1)
11508                                                 ++passed;
11509                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11510                                 } else {
11511                                         fprintf(stderr, "?\t%s", buffer);
11512                                 }
11513                         }
11514                 }
11515         }
11516         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11517         return (totals == passed) ? 0 : 1;
11518 }
11519
11520 _ACEOF
11521 rm -f conftest$ac_exeext
11522 if { (eval echo "$as_me:11522: \"$ac_link\"") >&5
11523   (eval $ac_link) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11527   { (eval echo "$as_me:11527: \"$ac_try\"") >&5
11528   (eval $ac_try) 2>&5
11529   ac_status=$?
11530   echo "$as_me:11530: \$? = $ac_status" >&5
11531   (exit $ac_status); }; }; then
11532   cf_cv_wcwidth_graphics=yes
11533 else
11534   echo "$as_me: program exited with status $ac_status" >&5
11535 echo "$as_me: failed program was:" >&5
11536 cat conftest.$ac_ext >&5
11537 cf_cv_wcwidth_graphics=no
11538 fi
11539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11540 fi
11541
11542 fi
11543 echo "$as_me:11543: result: $cf_cv_wcwidth_graphics" >&5
11544 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11545
11546         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11547
11548         # with_overwrite=no
11549         NCURSES_CH_T=cchar_t
11550
11551 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11552 do
11553 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11554 echo "$as_me:11554: checking for $ac_func" >&5
11555 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11556 if eval "test \"\${$as_ac_var+set}\" = set"; then
11557   echo $ECHO_N "(cached) $ECHO_C" >&6
11558 else
11559   cat >conftest.$ac_ext <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562 #define $ac_func autoconf_temporary
11563 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11564 #undef $ac_func
11565
11566 #ifdef __cplusplus
11567 extern "C"
11568 #endif
11569
11570 /* We use char because int might match the return type of a gcc2
11571    builtin and then its argument prototype would still apply.  */
11572 char $ac_func (void);
11573
11574 int
11575 main (void)
11576 {
11577
11578 /* The GNU C library defines stubs for functions which it implements
11579     to always fail with ENOSYS.  Some functions are actually named
11580     something starting with __ and the normal name is an alias.  */
11581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11582 #error found stub for $ac_func
11583 #endif
11584
11585         return $ac_func ();
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592   (eval $ac_link) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); } &&
11596          { ac_try='test -s conftest$ac_exeext'
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   eval "$as_ac_var=yes"
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 eval "$as_ac_var=no"
11607 fi
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 fi
11610 echo "$as_me:11610: result: `eval echo '${'$as_ac_var'}'`" >&5
11611 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11612 if test `eval echo '${'$as_ac_var'}'` = yes; then
11613   cat >>confdefs.h <<EOF
11614 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11615 EOF
11616
11617 fi
11618 done
11619
11620         if test "x$ac_cv_func_putwc" != xyes ; then
11621
11622 echo "$as_me:11622: checking for multibyte character support" >&5
11623 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11624 if test "${cf_cv_utf8_lib+set}" = set; then
11625   echo $ECHO_N "(cached) $ECHO_C" >&6
11626 else
11627
11628         cf_save_LIBS="$LIBS"
11629         cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632
11633 #include <stdlib.h>
11634 int
11635 main (void)
11636 {
11637 putwc(0,0);
11638   ;
11639   return 0;
11640 }
11641 _ACEOF
11642 rm -f conftest.$ac_objext conftest$ac_exeext
11643 if { (eval echo "$as_me:11643: \"$ac_link\"") >&5
11644   (eval $ac_link) 2>&5
11645   ac_status=$?
11646   echo "$as_me:11646: \$? = $ac_status" >&5
11647   (exit $ac_status); } &&
11648          { ac_try='test -s conftest$ac_exeext'
11649   { (eval echo "$as_me:11649: \"$ac_try\"") >&5
11650   (eval $ac_try) 2>&5
11651   ac_status=$?
11652   echo "$as_me:11652: \$? = $ac_status" >&5
11653   (exit $ac_status); }; }; then
11654   cf_cv_utf8_lib=yes
11655 else
11656   echo "$as_me: failed program was:" >&5
11657 cat conftest.$ac_ext >&5
11658
11659 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11660 # will be set on completion of the AC_TRY_LINK below.
11661 cf_cv_header_path_utf8=
11662 cf_cv_library_path_utf8=
11663
11664 echo "${as_me:-configure}:11664: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11665
11666 cf_save_LIBS="$LIBS"
11667
11668 cat >conftest.$ac_ext <<_ACEOF
11669 #line 11669 "configure"
11670 #include "confdefs.h"
11671
11672 #include <libutf8.h>
11673 int
11674 main (void)
11675 {
11676 putwc(0,0);
11677   ;
11678   return 0;
11679 }
11680 _ACEOF
11681 rm -f conftest.$ac_objext conftest$ac_exeext
11682 if { (eval echo "$as_me:11682: \"$ac_link\"") >&5
11683   (eval $ac_link) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); } &&
11687          { ac_try='test -s conftest$ac_exeext'
11688   { (eval echo "$as_me:11688: \"$ac_try\"") >&5
11689   (eval $ac_try) 2>&5
11690   ac_status=$?
11691   echo "$as_me:11691: \$? = $ac_status" >&5
11692   (exit $ac_status); }; }; then
11693
11694         cf_cv_find_linkage_utf8=yes
11695         cf_cv_header_path_utf8=/usr/include
11696         cf_cv_library_path_utf8=/usr/lib
11697
11698 else
11699   echo "$as_me: failed program was:" >&5
11700 cat conftest.$ac_ext >&5
11701
11702 LIBS="-lutf8  $cf_save_LIBS"
11703
11704 cat >conftest.$ac_ext <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #include <libutf8.h>
11709 int
11710 main (void)
11711 {
11712 putwc(0,0);
11713   ;
11714   return 0;
11715 }
11716 _ACEOF
11717 rm -f conftest.$ac_objext conftest$ac_exeext
11718 if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
11719   (eval $ac_link) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); } &&
11723          { ac_try='test -s conftest$ac_exeext'
11724   { (eval echo "$as_me:11724: \"$ac_try\"") >&5
11725   (eval $ac_try) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); }; }; then
11729
11730         cf_cv_find_linkage_utf8=yes
11731         cf_cv_header_path_utf8=/usr/include
11732         cf_cv_library_path_utf8=/usr/lib
11733         cf_cv_library_file_utf8="-lutf8"
11734
11735 else
11736   echo "$as_me: failed program was:" >&5
11737 cat conftest.$ac_ext >&5
11738
11739         cf_cv_find_linkage_utf8=no
11740         LIBS="$cf_save_LIBS"
11741
11742         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11743
11744 echo "${as_me:-configure}:11744: testing find linkage for utf8 library ..." 1>&5
11745
11746 echo "${as_me:-configure}:11746: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11747
11748         cf_save_CPPFLAGS="$CPPFLAGS"
11749         cf_test_CPPFLAGS="$CPPFLAGS"
11750
11751 cf_search=
11752
11753 # collect the current set of include-directories from compiler flags
11754 cf_header_path_list=""
11755 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11756         for cf_header_path in $CPPFLAGS $CFLAGS
11757         do
11758                 case $cf_header_path in
11759                 (-I*)
11760                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11761
11762 test "x$cf_header_path" != "xNONE" && \
11763 test -d "$cf_header_path" && \
11764  {
11765         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11766         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11767         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11768         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11769         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11770         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11771 }
11772
11773                         cf_header_path_list="$cf_header_path_list $cf_search"
11774                         ;;
11775                 esac
11776         done
11777 fi
11778
11779 # add the variations for the package we are looking for
11780
11781 cf_search=
11782
11783 test "x$prefix" != "xNONE" && \
11784 test -d "$prefix" && \
11785  {
11786         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11787         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11788         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11789         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11790         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11791         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11792 }
11793
11794 for cf_subdir_prefix in \
11795         /usr \
11796         /usr/local \
11797         /usr/pkg \
11798         /opt \
11799         /opt/local \
11800         $HOME
11801 do
11802
11803 test "x$cf_subdir_prefix" != "x$prefix" && \
11804 test -d "$cf_subdir_prefix" && \
11805 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11806         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11807         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11808         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11809         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11810         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11811         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11812 }
11813
11814 done
11815
11816 test "$includedir" != NONE && \
11817 test "$includedir" != "/usr/include" && \
11818 test -d "$includedir" && {
11819         test -d $includedir &&    cf_search="$cf_search $includedir"
11820         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11821 }
11822
11823 test "$oldincludedir" != NONE && \
11824 test "$oldincludedir" != "/usr/include" && \
11825 test -d "$oldincludedir" && {
11826         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11827         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11828 }
11829
11830 cf_search="$cf_search $cf_header_path_list"
11831
11832         for cf_cv_header_path_utf8 in $cf_search
11833         do
11834                 if test -d $cf_cv_header_path_utf8 ; then
11835                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11836
11837 echo "${as_me:-configure}:11837: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11838
11839                         CPPFLAGS="$cf_save_CPPFLAGS"
11840
11841         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11842         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11843
11844                         cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847
11848 #include <libutf8.h>
11849 int
11850 main (void)
11851 {
11852 putwc(0,0);
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 rm -f conftest.$ac_objext
11858 if { (eval echo "$as_me:11858: \"$ac_compile\"") >&5
11859   (eval $ac_compile) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit $ac_status); } &&
11863          { ac_try='test -s conftest.$ac_objext'
11864   { (eval echo "$as_me:11864: \"$ac_try\"") >&5
11865   (eval $ac_try) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); }; }; then
11869
11870                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11871
11872 echo "${as_me:-configure}:11872: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11873
11874                                 cf_cv_find_linkage_utf8=maybe
11875                                 cf_test_CPPFLAGS="$CPPFLAGS"
11876                                 break
11877 else
11878   echo "$as_me: failed program was:" >&5
11879 cat conftest.$ac_ext >&5
11880
11881                                 CPPFLAGS="$cf_save_CPPFLAGS"
11882
11883 fi
11884 rm -f conftest.$ac_objext conftest.$ac_ext
11885                 fi
11886         done
11887
11888         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11889
11890 echo "${as_me:-configure}:11890: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11891
11892                 cf_save_LIBS="$LIBS"
11893                 cf_save_LDFLAGS="$LDFLAGS"
11894
11895                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11896
11897 cf_search=
11898 cf_library_path_list=""
11899 if test -n "${LDFLAGS}${LIBS}" ; then
11900         for cf_library_path in $LDFLAGS $LIBS
11901         do
11902                 case $cf_library_path in
11903                 (-L*)
11904                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11905
11906 test "x$cf_library_path" != "xNONE" && \
11907 test -d "$cf_library_path" && \
11908  {
11909         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11910         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11911         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11912         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11913         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11914         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11915 }
11916
11917                         cf_library_path_list="$cf_library_path_list $cf_search"
11918                         ;;
11919                 esac
11920         done
11921 fi
11922
11923 cf_search=
11924
11925 test "x$prefix" != "xNONE" && \
11926 test -d "$prefix" && \
11927  {
11928         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11929         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11930         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11931         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11932         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11933         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11934 }
11935
11936 for cf_subdir_prefix in \
11937         /usr \
11938         /usr/local \
11939         /usr/pkg \
11940         /opt \
11941         /opt/local \
11942         $HOME
11943 do
11944
11945 test "x$cf_subdir_prefix" != "x$prefix" && \
11946 test -d "$cf_subdir_prefix" && \
11947 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11948         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11949         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11950         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11951         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11952         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11953         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11954 }
11955
11956 done
11957
11958 cf_search="$cf_library_path_list $cf_search"
11959
11960                         for cf_cv_library_path_utf8 in $cf_search
11961                         do
11962                                 if test -d $cf_cv_library_path_utf8 ; then
11963                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11964
11965 echo "${as_me:-configure}:11965: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11966
11967                                         CPPFLAGS="$cf_test_CPPFLAGS"
11968                                         LIBS="-lutf8  $cf_save_LIBS"
11969                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11970                                         cat >conftest.$ac_ext <<_ACEOF
11971 #line 11971 "configure"
11972 #include "confdefs.h"
11973
11974 #include <libutf8.h>
11975 int
11976 main (void)
11977 {
11978 putwc(0,0);
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext conftest$ac_exeext
11984 if { (eval echo "$as_me:11984: \"$ac_link\"") >&5
11985   (eval $ac_link) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -s conftest$ac_exeext'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); }; }; then
11995
11996                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11997
11998 echo "${as_me:-configure}:11998: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11999
12000                                         cf_cv_find_linkage_utf8=yes
12001                                         cf_cv_library_file_utf8="-lutf8"
12002                                         break
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 cat conftest.$ac_ext >&5
12006
12007                                         CPPFLAGS="$cf_save_CPPFLAGS"
12008                                         LIBS="$cf_save_LIBS"
12009                                         LDFLAGS="$cf_save_LDFLAGS"
12010
12011 fi
12012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12013                                 fi
12014                         done
12015                         CPPFLAGS="$cf_save_CPPFLAGS"
12016                         LDFLAGS="$cf_save_LDFLAGS"
12017                 fi
12018
12019         else
12020                 cf_cv_find_linkage_utf8=no
12021         fi
12022
12023 fi
12024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12025
12026 fi
12027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12028
12029 LIBS="$cf_save_LIBS"
12030
12031 if test "$cf_cv_find_linkage_utf8" = yes ; then
12032 cf_cv_utf8_lib=add-on
12033 else
12034 cf_cv_utf8_lib=no
12035 fi
12036
12037 fi
12038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12039 fi
12040 echo "$as_me:12040: result: $cf_cv_utf8_lib" >&5
12041 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12042
12043 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12044 # ncurses/ncursesw:
12045 if test "$cf_cv_utf8_lib" = "add-on" ; then
12046
12047 cat >>confdefs.h <<\EOF
12048 #define HAVE_LIBUTF8_H 1
12049 EOF
12050
12051 if test -n "$cf_cv_header_path_utf8" ; then
12052   for cf_add_incdir in $cf_cv_header_path_utf8
12053   do
12054         while test $cf_add_incdir != /usr/include
12055         do
12056           if test -d $cf_add_incdir
12057           then
12058                 cf_have_incdir=no
12059                 if test -n "$CFLAGS$CPPFLAGS" ; then
12060                   # a loop is needed to ensure we can add subdirs of existing dirs
12061                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12062                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12063                           cf_have_incdir=yes; break
12064                         fi
12065                   done
12066                 fi
12067
12068                 if test "$cf_have_incdir" = no ; then
12069                   if test "$cf_add_incdir" = /usr/local/include ; then
12070                         if test "$GCC" = yes
12071                         then
12072                           cf_save_CPPFLAGS=$CPPFLAGS
12073
12074         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12075         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12076
12077                           cat >conftest.$ac_ext <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <stdio.h>
12081 int
12082 main (void)
12083 {
12084 printf("Hello")
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f conftest.$ac_objext
12090 if { (eval echo "$as_me:12090: \"$ac_compile\"") >&5
12091   (eval $ac_compile) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); } &&
12095          { ac_try='test -s conftest.$ac_objext'
12096   { (eval echo "$as_me:12096: \"$ac_try\"") >&5
12097   (eval $ac_try) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); }; }; then
12101   :
12102 else
12103   echo "$as_me: failed program was:" >&5
12104 cat conftest.$ac_ext >&5
12105 cf_have_incdir=yes
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108                           CPPFLAGS=$cf_save_CPPFLAGS
12109                         fi
12110                   fi
12111                 fi
12112
12113                 if test "$cf_have_incdir" = no ; then
12114                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12115
12116 echo "${as_me:-configure}:12116: testing adding $cf_add_incdir to include-path ..." 1>&5
12117
12118                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12119
12120                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12121                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12122                   cf_add_incdir="$cf_top_incdir"
12123                 else
12124                   break
12125                 fi
12126           else
12127                 break
12128           fi
12129         done
12130   done
12131 fi
12132
12133 if test -n "$cf_cv_library_path_utf8" ; then
12134         for cf_add_libdir in $cf_cv_library_path_utf8
12135         do
12136                 if test $cf_add_libdir = /usr/lib ; then
12137                         :
12138                 elif test -d $cf_add_libdir
12139                 then
12140                         cf_have_libdir=no
12141                         if test -n "$LDFLAGS$LIBS" ; then
12142                                 # a loop is needed to ensure we can add subdirs of existing dirs
12143                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12144                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12145                                                 cf_have_libdir=yes; break
12146                                         fi
12147                                 done
12148                         fi
12149                         if test "$cf_have_libdir" = no ; then
12150                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12151
12152 echo "${as_me:-configure}:12152: testing adding $cf_add_libdir to library-path ..." 1>&5
12153
12154                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12155                         fi
12156                 fi
12157         done
12158 fi
12159
12160 cf_add_libs="$LIBS"
12161 # reverse order
12162 cf_add_0lib=
12163 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12164 # filter duplicates
12165 for cf_add_1lib in $cf_add_0lib; do
12166         for cf_add_2lib in $cf_add_libs; do
12167                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12168                         cf_add_1lib=
12169                         break
12170                 fi
12171         done
12172         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12173 done
12174 LIBS="$cf_add_libs"
12175
12176 fi
12177
12178                 if test "$cf_cv_utf8_lib" != no ; then
12179                         NCURSES_LIBUTF8=1
12180                 fi
12181         fi
12182
12183 # This is needed on Tru64 5.0 to declare mbstate_t
12184 echo "$as_me:12184: checking if we must include wchar.h to declare mbstate_t" >&5
12185 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12186 if test "${cf_cv_mbstate_t+set}" = set; then
12187   echo $ECHO_N "(cached) $ECHO_C" >&6
12188 else
12189
12190 cat >conftest.$ac_ext <<_ACEOF
12191 #line 12191 "configure"
12192 #include "confdefs.h"
12193
12194 #include <stdlib.h>
12195 #include <stdarg.h>
12196 #include <stdio.h>
12197 #ifdef HAVE_LIBUTF8_H
12198 #include <libutf8.h>
12199 #endif
12200 int
12201 main (void)
12202 {
12203 mbstate_t state
12204   ;
12205   return 0;
12206 }
12207 _ACEOF
12208 rm -f conftest.$ac_objext
12209 if { (eval echo "$as_me:12209: \"$ac_compile\"") >&5
12210   (eval $ac_compile) 2>&5
12211   ac_status=$?
12212   echo "$as_me:12212: \$? = $ac_status" >&5
12213   (exit $ac_status); } &&
12214          { ac_try='test -s conftest.$ac_objext'
12215   { (eval echo "$as_me:12215: \"$ac_try\"") >&5
12216   (eval $ac_try) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit $ac_status); }; }; then
12220   cf_cv_mbstate_t=no
12221 else
12222   echo "$as_me: failed program was:" >&5
12223 cat conftest.$ac_ext >&5
12224 cat >conftest.$ac_ext <<_ACEOF
12225 #line 12225 "configure"
12226 #include "confdefs.h"
12227
12228 #include <stdlib.h>
12229 #include <stdarg.h>
12230 #include <stdio.h>
12231 #include <wchar.h>
12232 #ifdef HAVE_LIBUTF8_H
12233 #include <libutf8.h>
12234 #endif
12235 int
12236 main (void)
12237 {
12238 mbstate_t value
12239   ;
12240   return 0;
12241 }
12242 _ACEOF
12243 rm -f conftest.$ac_objext
12244 if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245   (eval $ac_compile) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); } &&
12249          { ac_try='test -s conftest.$ac_objext'
12250   { (eval echo "$as_me:12250: \"$ac_try\"") >&5
12251   (eval $ac_try) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); }; }; then
12255   cf_cv_mbstate_t=yes
12256 else
12257   echo "$as_me: failed program was:" >&5
12258 cat conftest.$ac_ext >&5
12259 cf_cv_mbstate_t=unknown
12260 fi
12261 rm -f conftest.$ac_objext conftest.$ac_ext
12262 fi
12263 rm -f conftest.$ac_objext conftest.$ac_ext
12264 fi
12265 echo "$as_me:12265: result: $cf_cv_mbstate_t" >&5
12266 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12267
12268 if test "$cf_cv_mbstate_t" = yes ; then
12269
12270 cat >>confdefs.h <<\EOF
12271 #define NEED_WCHAR_H 1
12272 EOF
12273
12274         NEED_WCHAR_H=1
12275 fi
12276
12277 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12278 if test "$cf_cv_mbstate_t" = unknown ; then
12279         NCURSES_MBSTATE_T=1
12280 fi
12281
12282 # This is needed on Tru64 5.0 to declare wchar_t
12283 echo "$as_me:12283: checking if we must include wchar.h to declare wchar_t" >&5
12284 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12285 if test "${cf_cv_wchar_t+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288
12289 cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 #include <stdlib.h>
12294 #include <stdarg.h>
12295 #include <stdio.h>
12296 #ifdef HAVE_LIBUTF8_H
12297 #include <libutf8.h>
12298 #endif
12299 int
12300 main (void)
12301 {
12302 wchar_t state
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 rm -f conftest.$ac_objext
12308 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); } &&
12313          { ac_try='test -s conftest.$ac_objext'
12314   { (eval echo "$as_me:12314: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); }; }; then
12319   cf_cv_wchar_t=no
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat conftest.$ac_ext >&5
12323 cat >conftest.$ac_ext <<_ACEOF
12324 #line 12324 "configure"
12325 #include "confdefs.h"
12326
12327 #include <stdlib.h>
12328 #include <stdarg.h>
12329 #include <stdio.h>
12330 #include <wchar.h>
12331 #ifdef HAVE_LIBUTF8_H
12332 #include <libutf8.h>
12333 #endif
12334 int
12335 main (void)
12336 {
12337 wchar_t value
12338   ;
12339   return 0;
12340 }
12341 _ACEOF
12342 rm -f conftest.$ac_objext
12343 if { (eval echo "$as_me:12343: \"$ac_compile\"") >&5
12344   (eval $ac_compile) 2>&5
12345   ac_status=$?
12346   echo "$as_me:12346: \$? = $ac_status" >&5
12347   (exit $ac_status); } &&
12348          { ac_try='test -s conftest.$ac_objext'
12349   { (eval echo "$as_me:12349: \"$ac_try\"") >&5
12350   (eval $ac_try) 2>&5
12351   ac_status=$?
12352   echo "$as_me:12352: \$? = $ac_status" >&5
12353   (exit $ac_status); }; }; then
12354   cf_cv_wchar_t=yes
12355 else
12356   echo "$as_me: failed program was:" >&5
12357 cat conftest.$ac_ext >&5
12358 cf_cv_wchar_t=unknown
12359 fi
12360 rm -f conftest.$ac_objext conftest.$ac_ext
12361 fi
12362 rm -f conftest.$ac_objext conftest.$ac_ext
12363 fi
12364 echo "$as_me:12364: result: $cf_cv_wchar_t" >&5
12365 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12366
12367 if test "$cf_cv_wchar_t" = yes ; then
12368
12369 cat >>confdefs.h <<\EOF
12370 #define NEED_WCHAR_H 1
12371 EOF
12372
12373         NEED_WCHAR_H=1
12374 fi
12375
12376 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12377 if test "$cf_cv_wchar_t" = unknown ; then
12378         NCURSES_WCHAR_T=1
12379 fi
12380
12381 # if we find wchar_t in either place, use substitution to provide a fallback.
12382 if test "$cf_cv_wchar_t" != unknown ; then
12383         NCURSES_OK_WCHAR_T=1
12384 fi
12385
12386 # This is needed on Tru64 5.0 to declare wint_t
12387 echo "$as_me:12387: checking if we must include wchar.h to declare wint_t" >&5
12388 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12389 if test "${cf_cv_wint_t+set}" = set; then
12390   echo $ECHO_N "(cached) $ECHO_C" >&6
12391 else
12392
12393 cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396
12397 #include <stdlib.h>
12398 #include <stdarg.h>
12399 #include <stdio.h>
12400 #ifdef HAVE_LIBUTF8_H
12401 #include <libutf8.h>
12402 #endif
12403 int
12404 main (void)
12405 {
12406 wint_t state
12407   ;
12408   return 0;
12409 }
12410 _ACEOF
12411 rm -f conftest.$ac_objext
12412 if { (eval echo "$as_me:12412: \"$ac_compile\"") >&5
12413   (eval $ac_compile) 2>&5
12414   ac_status=$?
12415   echo "$as_me:12415: \$? = $ac_status" >&5
12416   (exit $ac_status); } &&
12417          { ac_try='test -s conftest.$ac_objext'
12418   { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419   (eval $ac_try) 2>&5
12420   ac_status=$?
12421   echo "$as_me:12421: \$? = $ac_status" >&5
12422   (exit $ac_status); }; }; then
12423   cf_cv_wint_t=no
12424 else
12425   echo "$as_me: failed program was:" >&5
12426 cat conftest.$ac_ext >&5
12427 cat >conftest.$ac_ext <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430
12431 #include <stdlib.h>
12432 #include <stdarg.h>
12433 #include <stdio.h>
12434 #include <wchar.h>
12435 #ifdef HAVE_LIBUTF8_H
12436 #include <libutf8.h>
12437 #endif
12438 int
12439 main (void)
12440 {
12441 wint_t value
12442   ;
12443   return 0;
12444 }
12445 _ACEOF
12446 rm -f conftest.$ac_objext
12447 if { (eval echo "$as_me:12447: \"$ac_compile\"") >&5
12448   (eval $ac_compile) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); } &&
12452          { ac_try='test -s conftest.$ac_objext'
12453   { (eval echo "$as_me:12453: \"$ac_try\"") >&5
12454   (eval $ac_try) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; }; then
12458   cf_cv_wint_t=yes
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 cf_cv_wint_t=unknown
12463 fi
12464 rm -f conftest.$ac_objext conftest.$ac_ext
12465 fi
12466 rm -f conftest.$ac_objext conftest.$ac_ext
12467 fi
12468 echo "$as_me:12468: result: $cf_cv_wint_t" >&5
12469 echo "${ECHO_T}$cf_cv_wint_t" >&6
12470
12471 if test "$cf_cv_wint_t" = yes ; then
12472
12473 cat >>confdefs.h <<\EOF
12474 #define NEED_WCHAR_H 1
12475 EOF
12476
12477         NEED_WCHAR_H=1
12478 fi
12479
12480 # if we do not find wint_t in either place, use substitution to provide a fallback.
12481 if test "$cf_cv_wint_t" = unknown ; then
12482         NCURSES_WINT_T=1
12483 fi
12484
12485 # if we find wint_t in either place, use substitution to provide a fallback.
12486 if test "$cf_cv_wint_t" != unknown ; then
12487         NCURSES_OK_WINT_T=1
12488 fi
12489
12490         if test "$NCURSES_MBSTATE_T" != 0; then
12491
12492 cat >>confdefs.h <<\EOF
12493 #define NEED_MBSTATE_T_DEF 1
12494 EOF
12495
12496         fi
12497 fi
12498
12499 ###   use option --disable-lp64 to allow long chtype
12500 echo "$as_me:12500: checking whether to enable _LP64 definition in curses.h" >&5
12501 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12502
12503 # Check whether --enable-lp64 or --disable-lp64 was given.
12504 if test "${enable_lp64+set}" = set; then
12505   enableval="$enable_lp64"
12506   with_lp64=$enableval
12507 else
12508   with_lp64=$cf_dft_with_lp64
12509 fi;
12510 echo "$as_me:12510: result: $with_lp64" >&5
12511 echo "${ECHO_T}$with_lp64" >&6
12512
12513 if test "x$with_lp64" = xyes ; then
12514         cf_cv_enable_lp64=1
12515 else
12516         cf_cv_enable_lp64=0
12517 fi
12518
12519 # Check whether --enable-largefile or --disable-largefile was given.
12520 if test "${enable_largefile+set}" = set; then
12521   enableval="$enable_largefile"
12522
12523 fi;
12524 if test "$enable_largefile" != no; then
12525
12526   echo "$as_me:12526: checking for special C compiler options needed for large files" >&5
12527 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12528 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12529   echo $ECHO_N "(cached) $ECHO_C" >&6
12530 else
12531   ac_cv_sys_largefile_CC=no
12532      if test "$GCC" != yes; then
12533        ac_save_CC=$CC
12534        while :; do
12535          # IRIX 6.2 and later do not support large files by default,
12536          # so use the C compiler's -n32 option if that helps.
12537          cat >conftest.$ac_ext <<_ACEOF
12538 #line 12538 "configure"
12539 #include "confdefs.h"
12540 #include <sys/types.h>
12541  /* Check that off_t can represent 2**63 - 1 correctly.
12542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12543     since some C++ compilers masquerading as C compilers
12544     incorrectly reject 9223372036854775807.  */
12545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12547                        && LARGE_OFF_T % 2147483647 == 1)
12548                       ? 1 : -1];
12549 int
12550 main (void)
12551 {
12552
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557          rm -f conftest.$ac_objext
12558 if { (eval echo "$as_me:12558: \"$ac_compile\"") >&5
12559   (eval $ac_compile) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); } &&
12563          { ac_try='test -s conftest.$ac_objext'
12564   { (eval echo "$as_me:12564: \"$ac_try\"") >&5
12565   (eval $ac_try) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); }; }; then
12569   break
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 fi
12574 rm -f conftest.$ac_objext
12575          CC="$CC -n32"
12576          rm -f conftest.$ac_objext
12577 if { (eval echo "$as_me:12577: \"$ac_compile\"") >&5
12578   (eval $ac_compile) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); } &&
12582          { ac_try='test -s conftest.$ac_objext'
12583   { (eval echo "$as_me:12583: \"$ac_try\"") >&5
12584   (eval $ac_try) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); }; }; then
12588   ac_cv_sys_largefile_CC=' -n32'; break
12589 else
12590   echo "$as_me: failed program was:" >&5
12591 cat conftest.$ac_ext >&5
12592 fi
12593 rm -f conftest.$ac_objext
12594          break
12595        done
12596        CC=$ac_save_CC
12597        rm -f conftest.$ac_ext
12598     fi
12599 fi
12600 echo "$as_me:12600: result: $ac_cv_sys_largefile_CC" >&5
12601 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12602   if test "$ac_cv_sys_largefile_CC" != no; then
12603     CC=$CC$ac_cv_sys_largefile_CC
12604   fi
12605
12606   echo "$as_me:12606: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12607 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12608 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12609   echo $ECHO_N "(cached) $ECHO_C" >&6
12610 else
12611   while :; do
12612   ac_cv_sys_file_offset_bits=no
12613   cat >conftest.$ac_ext <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12616 #include <sys/types.h>
12617  /* Check that off_t can represent 2**63 - 1 correctly.
12618     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12619     since some C++ compilers masquerading as C compilers
12620     incorrectly reject 9223372036854775807.  */
12621 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12622   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12623                        && LARGE_OFF_T % 2147483647 == 1)
12624                       ? 1 : -1];
12625 int
12626 main (void)
12627 {
12628
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f conftest.$ac_objext
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635   (eval $ac_compile) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); } &&
12639          { ac_try='test -s conftest.$ac_objext'
12640   { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641   (eval $ac_try) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit $ac_status); }; }; then
12645   break
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 fi
12650 rm -f conftest.$ac_objext conftest.$ac_ext
12651   cat >conftest.$ac_ext <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 #define _FILE_OFFSET_BITS 64
12655 #include <sys/types.h>
12656  /* Check that off_t can represent 2**63 - 1 correctly.
12657     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12658     since some C++ compilers masquerading as C compilers
12659     incorrectly reject 9223372036854775807.  */
12660 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12661   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12662                        && LARGE_OFF_T % 2147483647 == 1)
12663                       ? 1 : -1];
12664 int
12665 main (void)
12666 {
12667
12668   ;
12669   return 0;
12670 }
12671 _ACEOF
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674   (eval $ac_compile) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } &&
12678          { ac_try='test -s conftest.$ac_objext'
12679   { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680   (eval $ac_try) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); }; }; then
12684   ac_cv_sys_file_offset_bits=64; break
12685 else
12686   echo "$as_me: failed program was:" >&5
12687 cat conftest.$ac_ext >&5
12688 fi
12689 rm -f conftest.$ac_objext conftest.$ac_ext
12690   break
12691 done
12692 fi
12693 echo "$as_me:12693: result: $ac_cv_sys_file_offset_bits" >&5
12694 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12695 if test "$ac_cv_sys_file_offset_bits" != no; then
12696
12697 cat >>confdefs.h <<EOF
12698 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12699 EOF
12700
12701 fi
12702 rm -rf conftest*
12703   echo "$as_me:12703: checking for _LARGE_FILES value needed for large files" >&5
12704 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12705 if test "${ac_cv_sys_large_files+set}" = set; then
12706   echo $ECHO_N "(cached) $ECHO_C" >&6
12707 else
12708   while :; do
12709   ac_cv_sys_large_files=no
12710   cat >conftest.$ac_ext <<_ACEOF
12711 #line 12711 "configure"
12712 #include "confdefs.h"
12713 #include <sys/types.h>
12714  /* Check that off_t can represent 2**63 - 1 correctly.
12715     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12716     since some C++ compilers masquerading as C compilers
12717     incorrectly reject 9223372036854775807.  */
12718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12719   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12720                        && LARGE_OFF_T % 2147483647 == 1)
12721                       ? 1 : -1];
12722 int
12723 main (void)
12724 {
12725
12726   ;
12727   return 0;
12728 }
12729 _ACEOF
12730 rm -f conftest.$ac_objext
12731 if { (eval echo "$as_me:12731: \"$ac_compile\"") >&5
12732   (eval $ac_compile) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -s conftest.$ac_objext'
12737   { (eval echo "$as_me:12737: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); }; }; then
12742   break
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 cat conftest.$ac_ext >&5
12746 fi
12747 rm -f conftest.$ac_objext conftest.$ac_ext
12748   cat >conftest.$ac_ext <<_ACEOF
12749 #line 12749 "configure"
12750 #include "confdefs.h"
12751 #define _LARGE_FILES 1
12752 #include <sys/types.h>
12753  /* Check that off_t can represent 2**63 - 1 correctly.
12754     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12755     since some C++ compilers masquerading as C compilers
12756     incorrectly reject 9223372036854775807.  */
12757 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12758   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12759                        && LARGE_OFF_T % 2147483647 == 1)
12760                       ? 1 : -1];
12761 int
12762 main (void)
12763 {
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext
12770 if { (eval echo "$as_me:12770: \"$ac_compile\"") >&5
12771   (eval $ac_compile) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); } &&
12775          { ac_try='test -s conftest.$ac_objext'
12776   { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); }; }; then
12781   ac_cv_sys_large_files=1; break
12782 else
12783   echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12785 fi
12786 rm -f conftest.$ac_objext conftest.$ac_ext
12787   break
12788 done
12789 fi
12790 echo "$as_me:12790: result: $ac_cv_sys_large_files" >&5
12791 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12792 if test "$ac_cv_sys_large_files" != no; then
12793
12794 cat >>confdefs.h <<EOF
12795 #define _LARGE_FILES $ac_cv_sys_large_files
12796 EOF
12797
12798 fi
12799 rm -rf conftest*
12800 fi
12801
12802         if test "$enable_largefile" != no ; then
12803         echo "$as_me:12803: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12804 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12805 if test "${ac_cv_sys_largefile_source+set}" = set; then
12806   echo $ECHO_N "(cached) $ECHO_C" >&6
12807 else
12808   while :; do
12809   ac_cv_sys_largefile_source=no
12810   cat >conftest.$ac_ext <<_ACEOF
12811 #line 12811 "configure"
12812 #include "confdefs.h"
12813 #include <stdio.h>
12814 int
12815 main (void)
12816 {
12817 return !fseeko;
12818   ;
12819   return 0;
12820 }
12821 _ACEOF
12822 rm -f conftest.$ac_objext
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); } &&
12828          { ac_try='test -s conftest.$ac_objext'
12829   { (eval echo "$as_me:12829: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:12832: \$? = $ac_status" >&5
12833   (exit $ac_status); }; }; then
12834   break
12835 else
12836   echo "$as_me: failed program was:" >&5
12837 cat conftest.$ac_ext >&5
12838 fi
12839 rm -f conftest.$ac_objext conftest.$ac_ext
12840   cat >conftest.$ac_ext <<_ACEOF
12841 #line 12841 "configure"
12842 #include "confdefs.h"
12843 #define _LARGEFILE_SOURCE 1
12844 #include <stdio.h>
12845 int
12846 main (void)
12847 {
12848 return !fseeko;
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 rm -f conftest.$ac_objext
12854 if { (eval echo "$as_me:12854: \"$ac_compile\"") >&5
12855   (eval $ac_compile) 2>&5
12856   ac_status=$?
12857   echo "$as_me:12857: \$? = $ac_status" >&5
12858   (exit $ac_status); } &&
12859          { ac_try='test -s conftest.$ac_objext'
12860   { (eval echo "$as_me:12860: \"$ac_try\"") >&5
12861   (eval $ac_try) 2>&5
12862   ac_status=$?
12863   echo "$as_me:12863: \$? = $ac_status" >&5
12864   (exit $ac_status); }; }; then
12865   ac_cv_sys_largefile_source=1; break
12866 else
12867   echo "$as_me: failed program was:" >&5
12868 cat conftest.$ac_ext >&5
12869 fi
12870 rm -f conftest.$ac_objext conftest.$ac_ext
12871   break
12872 done
12873 fi
12874 echo "$as_me:12874: result: $ac_cv_sys_largefile_source" >&5
12875 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12876 if test "$ac_cv_sys_largefile_source" != no; then
12877
12878 cat >>confdefs.h <<EOF
12879 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12880 EOF
12881
12882 fi
12883 rm -rf conftest*
12884
12885 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12886 # in glibc 2.1.3, but that breaks too many other things.
12887 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12888 echo "$as_me:12888: checking for fseeko" >&5
12889 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12890 if test "${ac_cv_func_fseeko+set}" = set; then
12891   echo $ECHO_N "(cached) $ECHO_C" >&6
12892 else
12893   cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896 #include <stdio.h>
12897 int
12898 main (void)
12899 {
12900 return fseeko && fseeko (stdin, 0, 0);
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext conftest$ac_exeext
12906 if { (eval echo "$as_me:12906: \"$ac_link\"") >&5
12907   (eval $ac_link) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest$ac_exeext'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   ac_cv_func_fseeko=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12921 ac_cv_func_fseeko=no
12922 fi
12923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12924 fi
12925 echo "$as_me:12925: result: $ac_cv_func_fseeko" >&5
12926 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12927 if test $ac_cv_func_fseeko = yes; then
12928
12929 cat >>confdefs.h <<\EOF
12930 #define HAVE_FSEEKO 1
12931 EOF
12932
12933 fi
12934
12935         # Normally we would collect these definitions in the config.h,
12936         # but (like _XOPEN_SOURCE), some environments rely on having these
12937         # defined before any of the system headers are included.  Another
12938         # case comes up with C++, e.g., on AIX the compiler compiles the
12939         # header files by themselves before looking at the body files it is
12940         # told to compile.  For ncurses, those header files do not include
12941         # the config.h
12942         if test "$ac_cv_sys_large_files" != no
12943         then
12944
12945         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12946         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12947
12948         fi
12949         if test "$ac_cv_sys_largefile_source" != no
12950         then
12951
12952         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12953         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12954
12955         fi
12956         if test "$ac_cv_sys_file_offset_bits" != no
12957         then
12958
12959         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12960         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12961
12962         fi
12963
12964         echo "$as_me:12964: checking whether to use struct dirent64" >&5
12965 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12966 if test "${cf_cv_struct_dirent64+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969
12970                 cat >conftest.$ac_ext <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973
12974 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12975 #include <sys/types.h>
12976 #include <dirent.h>
12977
12978 int
12979 main (void)
12980 {
12981
12982                 /* if transitional largefile support is setup, this is true */
12983                 extern struct dirent64 * readdir(DIR *);
12984                 struct dirent64 *x = readdir((DIR *)0);
12985                 struct dirent *y = readdir((DIR *)0);
12986                 int z = x - y;
12987
12988   ;
12989   return 0;
12990 }
12991 _ACEOF
12992 rm -f conftest.$ac_objext
12993 if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
12994   (eval $ac_compile) 2>&5
12995   ac_status=$?
12996   echo "$as_me:12996: \$? = $ac_status" >&5
12997   (exit $ac_status); } &&
12998          { ac_try='test -s conftest.$ac_objext'
12999   { (eval echo "$as_me:12999: \"$ac_try\"") >&5
13000   (eval $ac_try) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit $ac_status); }; }; then
13004   cf_cv_struct_dirent64=yes
13005 else
13006   echo "$as_me: failed program was:" >&5
13007 cat conftest.$ac_ext >&5
13008 cf_cv_struct_dirent64=no
13009 fi
13010 rm -f conftest.$ac_objext conftest.$ac_ext
13011
13012 fi
13013 echo "$as_me:13013: result: $cf_cv_struct_dirent64" >&5
13014 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13015         test "$cf_cv_struct_dirent64" = yes &&
13016 cat >>confdefs.h <<\EOF
13017 #define HAVE_STRUCT_DIRENT64 1
13018 EOF
13019
13020         fi
13021
13022 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13023 echo "$as_me:13023: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13024 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13025
13026 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13027 if test "${enable_tparm_varargs+set}" = set; then
13028   enableval="$enable_tparm_varargs"
13029   with_tparm_varargs=$enableval
13030 else
13031   with_tparm_varargs=yes
13032 fi;
13033 echo "$as_me:13033: result: $with_tparm_varargs" >&5
13034 echo "${ECHO_T}$with_tparm_varargs" >&6
13035 NCURSES_TPARM_VARARGS=0
13036 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13037
13038 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13039 if test "$with_ticlib" != no ; then
13040 echo "$as_me:13040: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13041 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13042
13043 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13044 if test "${enable_tic_depends+set}" = set; then
13045   enableval="$enable_tic_depends"
13046   with_tic_depends=$enableval
13047 else
13048   with_tic_depends=yes
13049 fi;
13050 echo "$as_me:13050: result: $with_tic_depends" >&5
13051 echo "${ECHO_T}$with_tic_depends" >&6
13052 else
13053         with_tic_depends=no
13054 fi
13055
13056 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13057 echo "$as_me:13057: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13058 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13059
13060 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13061 if test "${enable_wattr_macros+set}" = set; then
13062   enableval="$enable_wattr_macros"
13063   with_wattr_macros=$enableval
13064 else
13065   with_wattr_macros=yes
13066 fi;
13067 if [ "x$with_wattr_macros" != xyes ]; then
13068         NCURSES_WATTR_MACROS=0
13069         echo "$as_me:13069: result: yes" >&5
13070 echo "${ECHO_T}yes" >&6
13071 else
13072         NCURSES_WATTR_MACROS=1
13073         echo "$as_me:13073: result: no" >&5
13074 echo "${ECHO_T}no" >&6
13075 fi
13076
13077 echo "$as_me:13077: checking for X11 rgb file" >&5
13078 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13079
13080 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13081 if test "${with_x11_rgb+set}" = set; then
13082   withval="$with_x11_rgb"
13083   RGB_PATH=$withval
13084 else
13085   RGB_PATH=auto
13086 fi;
13087
13088 if test "x$RGB_PATH" = xauto
13089 then
13090         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13091         for cf_path in \
13092                 /opt/local/share/X11/rgb.txt \
13093                 /opt/X11/share/X11/rgb.txt \
13094                 /usr/share/X11/rgb.txt \
13095                 /usr/X11/share/X11/rgb.txt \
13096                 /usr/X11/lib/X11/rgb.txt \
13097                 /usr/lib/X11/rgb.txt \
13098                 /etc/X11/rgb.txt \
13099                 /usr/pkg/lib/X11/rgb.txt \
13100                 /usr/X11R7/lib/X11/rgb.txt \
13101                 /usr/X11R6/lib/X11/rgb.txt \
13102                 /usr/X11R5/lib/X11/rgb.txt \
13103                 /usr/X11R4/lib/X11/rgb.txt \
13104                 /usr/local/lib/X11/rgb.txt \
13105                 /usr/local/share/X11/rgb.txt \
13106                 /usr/lib64/X11/rgb.txt
13107         do
13108                 if test -f "$cf_path" ; then
13109                         RGB_PATH="$cf_path"
13110                         break
13111                 fi
13112         done
13113 else
13114         cf_path=$RGB_PATH
13115
13116 if test "x$prefix" != xNONE; then
13117         cf_path_syntax="$prefix"
13118 else
13119         cf_path_syntax="$ac_default_prefix"
13120 fi
13121
13122 case ".$cf_path" in
13123 (.\$\(*\)*|.\'*\'*)
13124         ;;
13125 (..|./*|.\\*)
13126         ;;
13127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13128         ;;
13129 (.\${*prefix}*|.\${*dir}*)
13130         eval cf_path="$cf_path"
13131         case ".$cf_path" in
13132         (.NONE/*)
13133                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13134                 ;;
13135         esac
13136         ;;
13137 (.no|.NONE/*)
13138         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13139         ;;
13140 (*)
13141         { { echo "$as_me:13141: error: expected a pathname, not \"$cf_path\"" >&5
13142 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13143    { (exit 1); exit 1; }; }
13144         ;;
13145 esac
13146
13147 fi
13148
13149 echo "$as_me:13149: result: $RGB_PATH" >&5
13150 echo "${ECHO_T}$RGB_PATH" >&6
13151
13152 cat >>confdefs.h <<EOF
13153 #define RGB_PATH "$cf_path"
13154 EOF
13155
13156 no_x11_rgb=
13157 if test "$RGB_PATH" = no
13158 then
13159         no_x11_rgb="#"
13160 fi
13161
13162 ###   use option --with-bool to override bool's type
13163 echo "$as_me:13163: checking for type of bool" >&5
13164 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13165
13166 # Check whether --with-bool or --without-bool was given.
13167 if test "${with_bool+set}" = set; then
13168   withval="$with_bool"
13169   NCURSES_BOOL="$withval"
13170 else
13171   NCURSES_BOOL=auto
13172 fi;
13173 echo "$as_me:13173: result: $NCURSES_BOOL" >&5
13174 echo "${ECHO_T}$NCURSES_BOOL" >&6
13175
13176 echo "$as_me:13176: checking for alternate terminal capabilities file" >&5
13177 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13178
13179 # Check whether --with-caps or --without-caps was given.
13180 if test "${with_caps+set}" = set; then
13181   withval="$with_caps"
13182   TERMINFO_CAPS=Caps.$withval
13183 else
13184   TERMINFO_CAPS=Caps
13185 fi;
13186 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13187 echo "$as_me:13187: result: $TERMINFO_CAPS" >&5
13188 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13189
13190 ###   use option --with-chtype to override chtype's type
13191 echo "$as_me:13191: checking for type of chtype" >&5
13192 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13193
13194 # Check whether --with-chtype or --without-chtype was given.
13195 if test "${with_chtype+set}" = set; then
13196   withval="$with_chtype"
13197   NCURSES_CHTYPE="$withval"
13198 else
13199   NCURSES_CHTYPE=$cf_dft_chtype
13200 fi;
13201 echo "$as_me:13201: result: $NCURSES_CHTYPE" >&5
13202 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13203
13204 ###   use option --with-ospeed to override ospeed's type
13205 echo "$as_me:13205: checking for type of ospeed" >&5
13206 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13207
13208 # Check whether --with-ospeed or --without-ospeed was given.
13209 if test "${with_ospeed+set}" = set; then
13210   withval="$with_ospeed"
13211   NCURSES_OSPEED="$withval"
13212 else
13213   NCURSES_OSPEED=short
13214 fi;
13215 echo "$as_me:13215: result: $NCURSES_OSPEED" >&5
13216 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13217
13218 ###   use option --with-mmask-t to override mmask_t's type
13219 echo "$as_me:13219: checking for type of mmask_t" >&5
13220 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13221
13222 # Check whether --with-mmask-t or --without-mmask-t was given.
13223 if test "${with_mmask_t+set}" = set; then
13224   withval="$with_mmask_t"
13225   NCURSES_MMASK_T="$withval"
13226 else
13227   NCURSES_MMASK_T=$cf_dft_mmask_t
13228 fi;
13229 echo "$as_me:13229: result: $NCURSES_MMASK_T" >&5
13230 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13231
13232 ###   use option --with-ccharw-max to override CCHARW_MAX size
13233 echo "$as_me:13233: checking for size CCHARW_MAX" >&5
13234 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13235
13236 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13237 if test "${with_ccharw_max+set}" = set; then
13238   withval="$with_ccharw_max"
13239   NCURSES_CCHARW_MAX="$withval"
13240 else
13241   NCURSES_CCHARW_MAX=5
13242 fi;
13243 echo "$as_me:13243: result: $NCURSES_CCHARW_MAX" >&5
13244 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13245
13246 echo "$as_me:13246: checking for ANSI C header files" >&5
13247 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13248 if test "${ac_cv_header_stdc+set}" = set; then
13249   echo $ECHO_N "(cached) $ECHO_C" >&6
13250 else
13251   cat >conftest.$ac_ext <<_ACEOF
13252 #line 13252 "configure"
13253 #include "confdefs.h"
13254 #include <stdlib.h>
13255 #include <stdarg.h>
13256 #include <string.h>
13257 #include <float.h>
13258
13259 _ACEOF
13260 if { (eval echo "$as_me:13260: \"$ac_cpp conftest.$ac_ext\"") >&5
13261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13262   ac_status=$?
13263   egrep -v '^ *\+' conftest.er1 >conftest.err
13264   rm -f conftest.er1
13265   cat conftest.err >&5
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); } >/dev/null; then
13268   if test -s conftest.err; then
13269     ac_cpp_err=$ac_c_preproc_warn_flag
13270   else
13271     ac_cpp_err=
13272   fi
13273 else
13274   ac_cpp_err=yes
13275 fi
13276 if test -z "$ac_cpp_err"; then
13277   ac_cv_header_stdc=yes
13278 else
13279   echo "$as_me: failed program was:" >&5
13280   cat conftest.$ac_ext >&5
13281   ac_cv_header_stdc=no
13282 fi
13283 rm -f conftest.err conftest.$ac_ext
13284
13285 if test $ac_cv_header_stdc = yes; then
13286   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13287   cat >conftest.$ac_ext <<_ACEOF
13288 #line 13288 "configure"
13289 #include "confdefs.h"
13290 #include <string.h>
13291
13292 _ACEOF
13293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13294   egrep "memchr" >/dev/null 2>&1; then
13295   :
13296 else
13297   ac_cv_header_stdc=no
13298 fi
13299 rm -rf conftest*
13300
13301 fi
13302
13303 if test $ac_cv_header_stdc = yes; then
13304   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13305   cat >conftest.$ac_ext <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308 #include <stdlib.h>
13309
13310 _ACEOF
13311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13312   egrep "free" >/dev/null 2>&1; then
13313   :
13314 else
13315   ac_cv_header_stdc=no
13316 fi
13317 rm -rf conftest*
13318
13319 fi
13320
13321 if test $ac_cv_header_stdc = yes; then
13322   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13323   if test "$cross_compiling" = yes; then
13324   :
13325 else
13326   cat >conftest.$ac_ext <<_ACEOF
13327 #line 13327 "configure"
13328 #include "confdefs.h"
13329 #include <ctype.h>
13330 #if ((' ' & 0x0FF) == 0x020)
13331 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13332 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13333 #else
13334 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13335                      || ('j' <= (c) && (c) <= 'r') \
13336                      || ('s' <= (c) && (c) <= 'z'))
13337 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13338 #endif
13339
13340 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13341 int
13342 main (void)
13343 {
13344   int i;
13345   for (i = 0; i < 256; i++)
13346     if (XOR (islower (i), ISLOWER (i))
13347         || toupper (i) != TOUPPER (i))
13348       $ac_main_return(2);
13349   $ac_main_return (0);
13350 }
13351 _ACEOF
13352 rm -f conftest$ac_exeext
13353 if { (eval echo "$as_me:13353: \"$ac_link\"") >&5
13354   (eval $ac_link) 2>&5
13355   ac_status=$?
13356   echo "$as_me:13356: \$? = $ac_status" >&5
13357   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13358   { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359   (eval $ac_try) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); }; }; then
13363   :
13364 else
13365   echo "$as_me: program exited with status $ac_status" >&5
13366 echo "$as_me: failed program was:" >&5
13367 cat conftest.$ac_ext >&5
13368 ac_cv_header_stdc=no
13369 fi
13370 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13371 fi
13372 fi
13373 fi
13374 echo "$as_me:13374: result: $ac_cv_header_stdc" >&5
13375 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13376 if test $ac_cv_header_stdc = yes; then
13377
13378 cat >>confdefs.h <<\EOF
13379 #define STDC_HEADERS 1
13380 EOF
13381
13382 fi
13383
13384 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13385
13386 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13387                   inttypes.h stdint.h unistd.h
13388 do
13389 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13390 echo "$as_me:13390: checking for $ac_header" >&5
13391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13392 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13393   echo $ECHO_N "(cached) $ECHO_C" >&6
13394 else
13395   cat >conftest.$ac_ext <<_ACEOF
13396 #line 13396 "configure"
13397 #include "confdefs.h"
13398 $ac_includes_default
13399 #include <$ac_header>
13400 _ACEOF
13401 rm -f conftest.$ac_objext
13402 if { (eval echo "$as_me:13402: \"$ac_compile\"") >&5
13403   (eval $ac_compile) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); } &&
13407          { ac_try='test -s conftest.$ac_objext'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); }; }; then
13413   eval "$as_ac_Header=yes"
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat conftest.$ac_ext >&5
13417 eval "$as_ac_Header=no"
13418 fi
13419 rm -f conftest.$ac_objext conftest.$ac_ext
13420 fi
13421 echo "$as_me:13421: result: `eval echo '${'$as_ac_Header'}'`" >&5
13422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13424   cat >>confdefs.h <<EOF
13425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13426 EOF
13427
13428 fi
13429 done
13430
13431 echo "$as_me:13431: checking for signed char" >&5
13432 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13433 if test "${ac_cv_type_signed_char+set}" = set; then
13434   echo $ECHO_N "(cached) $ECHO_C" >&6
13435 else
13436   cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 $ac_includes_default
13440 int
13441 main (void)
13442 {
13443 if ((signed char *) 0)
13444   return 0;
13445 if (sizeof (signed char))
13446   return 0;
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f conftest.$ac_objext
13452 if { (eval echo "$as_me:13452: \"$ac_compile\"") >&5
13453   (eval $ac_compile) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } &&
13457          { ac_try='test -s conftest.$ac_objext'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; }; then
13463   ac_cv_type_signed_char=yes
13464 else
13465   echo "$as_me: failed program was:" >&5
13466 cat conftest.$ac_ext >&5
13467 ac_cv_type_signed_char=no
13468 fi
13469 rm -f conftest.$ac_objext conftest.$ac_ext
13470 fi
13471 echo "$as_me:13471: result: $ac_cv_type_signed_char" >&5
13472 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13473
13474 echo "$as_me:13474: checking size of signed char" >&5
13475 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13476 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13477   echo $ECHO_N "(cached) $ECHO_C" >&6
13478 else
13479   if test "$ac_cv_type_signed_char" = yes; then
13480   if test "$cross_compiling" = yes; then
13481   # Depending upon the size, compute the lo and hi bounds.
13482 cat >conftest.$ac_ext <<_ACEOF
13483 #line 13483 "configure"
13484 #include "confdefs.h"
13485 $ac_includes_default
13486 int
13487 main (void)
13488 {
13489 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext
13495 if { (eval echo "$as_me:13495: \"$ac_compile\"") >&5
13496   (eval $ac_compile) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } &&
13500          { ac_try='test -s conftest.$ac_objext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   ac_lo=0 ac_mid=0
13507   while :; do
13508     cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511 $ac_includes_default
13512 int
13513 main (void)
13514 {
13515 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext
13521 if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
13522   (eval $ac_compile) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest.$ac_objext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   ac_hi=$ac_mid; break
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13537 fi
13538 rm -f conftest.$ac_objext conftest.$ac_ext
13539   done
13540 else
13541   echo "$as_me: failed program was:" >&5
13542 cat conftest.$ac_ext >&5
13543 ac_hi=-1 ac_mid=-1
13544   while :; do
13545     cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 $ac_includes_default
13549 int
13550 main (void)
13551 {
13552 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f conftest.$ac_objext
13558 if { (eval echo "$as_me:13558: \"$ac_compile\"") >&5
13559   (eval $ac_compile) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); } &&
13563          { ac_try='test -s conftest.$ac_objext'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit $ac_status); }; }; then
13569   ac_lo=$ac_mid; break
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 cat conftest.$ac_ext >&5
13573 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13574 fi
13575 rm -f conftest.$ac_objext conftest.$ac_ext
13576   done
13577 fi
13578 rm -f conftest.$ac_objext conftest.$ac_ext
13579 # Binary search between lo and hi bounds.
13580 while test "x$ac_lo" != "x$ac_hi"; do
13581   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13582   cat >conftest.$ac_ext <<_ACEOF
13583 #line 13583 "configure"
13584 #include "confdefs.h"
13585 $ac_includes_default
13586 int
13587 main (void)
13588 {
13589 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext
13595 if { (eval echo "$as_me:13595: \"$ac_compile\"") >&5
13596   (eval $ac_compile) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest.$ac_objext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606   ac_hi=$ac_mid
13607 else
13608   echo "$as_me: failed program was:" >&5
13609 cat conftest.$ac_ext >&5
13610 ac_lo=`expr $ac_mid + 1`
13611 fi
13612 rm -f conftest.$ac_objext conftest.$ac_ext
13613 done
13614 ac_cv_sizeof_signed_char=$ac_lo
13615 else
13616   if test "$cross_compiling" = yes; then
13617   { { echo "$as_me:13617: error: cannot run test program while cross compiling" >&5
13618 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13619    { (exit 1); exit 1; }; }
13620 else
13621   cat >conftest.$ac_ext <<_ACEOF
13622 #line 13622 "configure"
13623 #include "confdefs.h"
13624 $ac_includes_default
13625 int
13626 main (void)
13627 {
13628 FILE *f = fopen ("conftest.val", "w");
13629 if (!f)
13630   $ac_main_return (1);
13631 fprintf (f, "%d", (sizeof (signed char)));
13632 fclose (f);
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest$ac_exeext
13638 if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13639   (eval $ac_link) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_cv_sizeof_signed_char=`cat conftest.val`
13649 else
13650   echo "$as_me: program exited with status $ac_status" >&5
13651 echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13653 fi
13654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13655 fi
13656 fi
13657 rm -f conftest.val
13658 else
13659   ac_cv_sizeof_signed_char=0
13660 fi
13661 fi
13662 echo "$as_me:13662: result: $ac_cv_sizeof_signed_char" >&5
13663 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13664 cat >>confdefs.h <<EOF
13665 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13666 EOF
13667
13668 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13669         NCURSES_SBOOL="signed char"
13670 else
13671         NCURSES_SBOOL="char"
13672 fi
13673 echo "$as_me:13673: checking if you want to use signed Boolean array in term.h" >&5
13674 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13675
13676 # Check whether --enable-signed-char or --disable-signed-char was given.
13677 if test "${enable_signed_char+set}" = set; then
13678   enableval="$enable_signed_char"
13679   with_signed_char=$enableval
13680 else
13681   with_signed_char=no
13682 fi;
13683 echo "$as_me:13683: result: $with_signed_char" >&5
13684 echo "${ECHO_T}$with_signed_char" >&6
13685 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13686
13687 ###   use option --with-tparm-arg to override tparm's argument type
13688 echo "$as_me:13688: checking for type of tparm args" >&5
13689 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13690
13691 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13692 if test "${with_tparm_arg+set}" = set; then
13693   withval="$with_tparm_arg"
13694   NCURSES_TPARM_ARG="$withval"
13695 else
13696   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13697 fi;
13698 echo "$as_me:13698: result: $NCURSES_TPARM_ARG" >&5
13699 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13700
13701 ### Enable compiling-in rcs id's
13702 echo "$as_me:13702: checking if RCS identifiers should be compiled-in" >&5
13703 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13704
13705 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13706 if test "${with_rcs_ids+set}" = set; then
13707   withval="$with_rcs_ids"
13708   with_rcs_ids=$withval
13709 else
13710   with_rcs_ids=no
13711 fi;
13712 echo "$as_me:13712: result: $with_rcs_ids" >&5
13713 echo "${ECHO_T}$with_rcs_ids" >&6
13714 test "x$with_rcs_ids" = xyes &&
13715 cat >>confdefs.h <<\EOF
13716 #define USE_RCS_IDS 1
13717 EOF
13718
13719 ###############################################################################
13720
13721 echo "$as_me:13721: checking format of man-pages" >&5
13722 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13723
13724 # Check whether --with-manpage-format or --without-manpage-format was given.
13725 if test "${with_manpage_format+set}" = set; then
13726   withval="$with_manpage_format"
13727   MANPAGE_FORMAT=$withval
13728 else
13729   MANPAGE_FORMAT=unknown
13730 fi;
13731
13732 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13733 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13734
13735 cf_unknown=
13736
13737 case $MANPAGE_FORMAT in
13738 (unknown)
13739         if test -z "$MANPATH" ; then
13740                 MANPATH="/usr/man:/usr/share/man"
13741         fi
13742
13743         # look for the 'date' man-page (it's most likely to be installed!)
13744         MANPAGE_FORMAT=
13745         cf_preform=no
13746         cf_catonly=yes
13747         cf_example=date
13748
13749         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13750         for cf_dir in $MANPATH; do
13751                 test -z "$cf_dir" && cf_dir=/usr/man
13752                 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
13753                 do
13754                         cf_test=`echo $cf_name | sed -e 's/*//'`
13755                         if test "x$cf_test" = "x$cf_name" ; then
13756
13757                                 case "$cf_name" in
13758                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13759                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13760                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13761                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13762                                 esac
13763
13764                                 case "$cf_name" in
13765                                 ($cf_dir/man*)
13766                                         cf_catonly=no
13767                                         ;;
13768                                 ($cf_dir/cat*)
13769                                         cf_preform=yes
13770                                         ;;
13771                                 esac
13772                                 break
13773                         fi
13774
13775                         # if we found a match in either man* or cat*, stop looking
13776                         if test -n "$MANPAGE_FORMAT" ; then
13777                                 cf_found=no
13778                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13779                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13780                                 case "$cf_name" in
13781                                 ($cf_dir/cat*)
13782                                         cf_found=yes
13783                                         ;;
13784                                 esac
13785                                 test $cf_found=yes && break
13786                         fi
13787                 done
13788                 # only check the first directory in $MANPATH where we find manpages
13789                 if test -n "$MANPAGE_FORMAT" ; then
13790                         break
13791                 fi
13792         done
13793         # if we did not find the example, just assume it is normal
13794         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13795         IFS="$ac_save_ifs"
13796         ;;
13797 (*)
13798         for cf_option in $MANPAGE_FORMAT; do
13799         case $cf_option in
13800         (gzip|compress|BSDI|normal|formatted|catonly)
13801                 ;;
13802         (*)
13803                 cf_unknown="$cf_unknown $cf_option"
13804                 ;;
13805         esac
13806         done
13807         ;;
13808 esac
13809
13810 echo "$as_me:13810: result: $MANPAGE_FORMAT" >&5
13811 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13812 if test -n "$cf_unknown" ; then
13813         { echo "$as_me:13813: WARNING: Unexpected manpage-format $cf_unknown" >&5
13814 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13815 fi
13816
13817 echo "$as_me:13817: checking for manpage renaming" >&5
13818 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13819
13820 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13821 if test "${with_manpage_renames+set}" = set; then
13822   withval="$with_manpage_renames"
13823   MANPAGE_RENAMES=$withval
13824 else
13825   MANPAGE_RENAMES=yes
13826 fi;
13827
13828 case ".$MANPAGE_RENAMES" in
13829 (.no)
13830         ;;
13831 (.|.yes)
13832         # Debian 'man' program?
13833         if test -f /etc/debian_version ; then
13834                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13835         else
13836                 MANPAGE_RENAMES=no
13837         fi
13838         ;;
13839 esac
13840
13841 if test "$MANPAGE_RENAMES" != no ; then
13842         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13843                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13844         elif test ! -f $MANPAGE_RENAMES ; then
13845                 { { echo "$as_me:13845: error: not a filename: $MANPAGE_RENAMES" >&5
13846 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13847    { (exit 1); exit 1; }; }
13848         fi
13849
13850         test ! -d man && mkdir man
13851
13852         # Construct a sed-script to perform renaming within man-pages
13853         if test -n "$MANPAGE_RENAMES" ; then
13854                 test ! -d man && mkdir man
13855                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13856         fi
13857 fi
13858
13859 echo "$as_me:13859: result: $MANPAGE_RENAMES" >&5
13860 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13861
13862 echo "$as_me:13862: checking if manpage aliases will be installed" >&5
13863 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13864
13865 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13866 if test "${with_manpage_aliases+set}" = set; then
13867   withval="$with_manpage_aliases"
13868   MANPAGE_ALIASES=$withval
13869 else
13870   MANPAGE_ALIASES=yes
13871 fi;
13872
13873 echo "$as_me:13873: result: $MANPAGE_ALIASES" >&5
13874 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13875
13876 case "x$LN_S" in
13877 (xln*)
13878         cf_use_symlinks=yes
13879         ;;
13880 (*)
13881         cf_use_symlinks=no
13882         ;;
13883 esac
13884
13885 MANPAGE_SYMLINKS=no
13886 if test "$MANPAGE_ALIASES" = yes ; then
13887 echo "$as_me:13887: checking if manpage symlinks should be used" >&5
13888 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13889
13890 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13891 if test "${with_manpage_symlinks+set}" = set; then
13892   withval="$with_manpage_symlinks"
13893   MANPAGE_SYMLINKS=$withval
13894 else
13895   MANPAGE_SYMLINKS=$cf_use_symlinks
13896 fi;
13897
13898 if test "$$cf_use_symlinks" = no; then
13899 if test "$MANPAGE_SYMLINKS" = yes ; then
13900         { echo "$as_me:13900: WARNING: cannot make symlinks" >&5
13901 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13902         MANPAGE_SYMLINKS=no
13903 fi
13904 fi
13905
13906 echo "$as_me:13906: result: $MANPAGE_SYMLINKS" >&5
13907 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13908 fi
13909
13910 echo "$as_me:13910: checking for manpage tbl" >&5
13911 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13912
13913 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13914 if test "${with_manpage_tbl+set}" = set; then
13915   withval="$with_manpage_tbl"
13916   MANPAGE_TBL=$withval
13917 else
13918   MANPAGE_TBL=no
13919 fi;
13920
13921 echo "$as_me:13921: result: $MANPAGE_TBL" >&5
13922 echo "${ECHO_T}$MANPAGE_TBL" >&6
13923
13924 if test "$prefix" = "NONE" ; then
13925         cf_prefix="$ac_default_prefix"
13926 else
13927         cf_prefix="$prefix"
13928 fi
13929
13930 case "$MANPAGE_FORMAT" in
13931 (*catonly*)
13932         cf_format=yes
13933         cf_inboth=no
13934         ;;
13935 (*formatted*)
13936         cf_format=yes
13937         cf_inboth=yes
13938         ;;
13939 (*)
13940         cf_format=no
13941         cf_inboth=no
13942         ;;
13943 esac
13944
13945 test ! -d man && mkdir man
13946
13947 cf_so_strip=
13948 cf_compress=
13949 case "$MANPAGE_FORMAT" in
13950 (*compress*)
13951         cf_so_strip="Z"
13952         cf_compress=compress
13953         ;;
13954 (*gzip*)
13955         cf_so_strip="gz"
13956         cf_compress=gzip
13957         ;;
13958 esac
13959
13960 cf_edit_man=./edit_man.sh
13961 cf_man_alias=`pwd`/man_alias.sed
13962
13963 cat >$cf_edit_man <<CF_EOF
13964 #! $SHELL
13965 # this script is generated by the configure-script CF_MAN_PAGES macro.
13966
13967 prefix="$cf_prefix"
13968 datarootdir="$datarootdir"
13969 datadir="$datadir"
13970
13971 NCURSES_MAJOR="$NCURSES_MAJOR"
13972 NCURSES_MINOR="$NCURSES_MINOR"
13973 NCURSES_PATCH="$NCURSES_PATCH"
13974
13975 NCURSES_OSPEED="$NCURSES_OSPEED"
13976 TERMINFO="$TERMINFO"
13977
13978 INSTALL="$INSTALL"
13979 INSTALL_DATA="$INSTALL_DATA"
13980
13981 transform="$program_transform_name"
13982
13983 TMP=\${TMPDIR:=/tmp}/man\$\$
13984 trap "rm -f \$TMP" 0 1 2 3 15
13985
13986 form=\$1
13987 shift || exit 1
13988
13989 verb=\$1
13990 shift || exit 1
13991
13992 mandir=\$1
13993 shift || exit 1
13994
13995 srcdir=\$1
13996 top_srcdir=\$srcdir/..
13997 shift || exit 1
13998
13999 if test "\$form" = normal ; then
14000         if test "$cf_format" = yes ; then
14001         if test "$cf_inboth" = no ; then
14002                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14003                 exit $?
14004         fi
14005         fi
14006         cf_subdir=\$mandir/man
14007         cf_tables=$MANPAGE_TBL
14008 else
14009         cf_subdir=\$mandir/cat
14010         cf_tables=yes
14011 fi
14012
14013 # process the list of source-files
14014 for i in \$* ; do
14015 case \$i in
14016 (*.orig|*.rej) ;;
14017 (*.[0-9]*)
14018         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14019         if test \$verb = installing ; then
14020         if test ! -d \$cf_subdir\${section} ; then
14021                 mkdir -p \$cf_subdir\$section
14022         fi
14023         fi
14024
14025         # replace variables in man page
14026         if test ! -f $cf_man_alias ; then
14027 cat >>$cf_man_alias <<-CF_EOF2
14028                 s,@DATADIR@,\$datadir,g
14029                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14030                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14031                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14032                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14033                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14034                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14035 CF_EOF
14036
14037         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14038         do
14039                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14040                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14041 cat >>$cf_edit_man <<-CF_EOF
14042                 s,@$cf_NAME@,$cf_name,g
14043 CF_EOF
14044         done
14045
14046 cat >>$cf_edit_man <<CF_EOF
14047 CF_EOF2
14048                 echo "...made $cf_man_alias"
14049         fi
14050
14051         aliases=
14052         cf_source=\`basename \$i\`
14053         inalias=\$cf_source
14054         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14055         if test ! -f \$inalias ; then
14056                 echo .. skipped \$cf_source
14057                 continue
14058         fi
14059 CF_EOF
14060
14061 if test "$MANPAGE_ALIASES" != no ; then
14062 cat >>$cf_edit_man <<CF_EOF
14063         nCurses=ignore.3x
14064         test $with_curses_h = yes && nCurses=ncurses.3x
14065         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14066 CF_EOF
14067 fi
14068
14069 if test "$MANPAGE_RENAMES" = no ; then
14070 cat >>$cf_edit_man <<CF_EOF
14071         # perform program transformations for section 1 man pages
14072         if test \$section = 1 ; then
14073                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14074         else
14075                 cf_target=\$cf_subdir\${section}/\$cf_source
14076         fi
14077 CF_EOF
14078 else
14079 cat >>$cf_edit_man <<CF_EOF
14080         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14081         if test -z "\$cf_target" ; then
14082                 echo '? missing rename for '\$cf_source
14083                 cf_target="\$cf_source"
14084         fi
14085         cf_target="\$cf_subdir\${section}/\${cf_target}"
14086
14087 CF_EOF
14088 fi
14089
14090 cat >>$cf_edit_man <<CF_EOF
14091         sed     -f $cf_man_alias \\
14092 CF_EOF
14093
14094 if test -f $MANPAGE_RENAMES ; then
14095 cat >>$cf_edit_man <<CF_EOF
14096                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14097 CF_EOF
14098 else
14099 cat >>$cf_edit_man <<CF_EOF
14100                 < \$i >\$TMP
14101 CF_EOF
14102 fi
14103
14104 cat >>$cf_edit_man <<CF_EOF
14105 if test \$cf_tables = yes ; then
14106         tbl \$TMP >\$TMP.out
14107         mv \$TMP.out \$TMP
14108 fi
14109 CF_EOF
14110
14111 if test $with_overwrite != yes ; then
14112 cat >>$cf_edit_man <<CF_EOF
14113         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14114         mv \$TMP.out \$TMP
14115 CF_EOF
14116 fi
14117
14118 if test $with_curses_h != yes ; then
14119 cat >>$cf_edit_man <<CF_EOF
14120         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14121         mv \$TMP.out \$TMP
14122 CF_EOF
14123 fi
14124
14125 cat >>$cf_edit_man <<CF_EOF
14126         if test \$form = format ; then
14127                 nroff -man \$TMP >\$TMP.out
14128                 mv \$TMP.out \$TMP
14129         fi
14130 CF_EOF
14131
14132 if test -n "$cf_compress" ; then
14133 cat >>$cf_edit_man <<CF_EOF
14134         if test \$verb = installing ; then
14135         if ( $cf_compress -f \$TMP )
14136         then
14137                 mv \$TMP.$cf_so_strip \$TMP
14138         fi
14139         fi
14140         cf_target="\$cf_target.$cf_so_strip"
14141 CF_EOF
14142 fi
14143
14144 case "$MANPAGE_FORMAT" in
14145 (*BSDI*)
14146 cat >>$cf_edit_man <<CF_EOF
14147         if test \$form = format ; then
14148                 # BSDI installs only .0 suffixes in the cat directories
14149                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14150         fi
14151 CF_EOF
14152   ;;
14153 esac
14154
14155 cat >>$cf_edit_man <<CF_EOF
14156         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14157         if test \$verb = installing ; then
14158                 echo \$verb \$cf_target
14159                 \$INSTALL_DATA \$TMP \$cf_target
14160                 test -d \$cf_subdir\${section} &&
14161                 test -n "\$aliases" && (
14162                         cd \$cf_subdir\${section} && (
14163                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14164                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14165                                 cf_target=\`basename \$cf_target\`
14166                                 for cf_alias in \$aliases
14167                                 do
14168                                         if test \$section = 1 ; then
14169                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14170                                         fi
14171
14172                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14173                                                 if test -f \$cf_alias\${suffix} ; then
14174                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14175                                                         then
14176                                                                 continue
14177                                                         fi
14178                                                 fi
14179                                                 echo .. \$verb alias \$cf_alias\${suffix}
14180 CF_EOF
14181 case "x$LN_S" in
14182 (*-f)
14183 cat >>$cf_edit_man <<CF_EOF
14184                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14185 CF_EOF
14186         ;;
14187 (*)
14188 cat >>$cf_edit_man <<CF_EOF
14189                                                 rm -f \$cf_alias\${suffix}
14190                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14191 CF_EOF
14192         ;;
14193 esac
14194 cat >>$cf_edit_man <<CF_EOF
14195                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14196                                                 echo ".so \$cf_source" >\$TMP
14197 CF_EOF
14198 if test -n "$cf_compress" ; then
14199 cat >>$cf_edit_man <<CF_EOF
14200                                                 if test -n "$cf_so_strip" ; then
14201                                                         $cf_compress -f \$TMP
14202                                                         mv \$TMP.$cf_so_strip \$TMP
14203                                                 fi
14204 CF_EOF
14205 fi
14206 cat >>$cf_edit_man <<CF_EOF
14207                                                 echo .. \$verb alias \$cf_alias\${suffix}
14208                                                 rm -f \$cf_alias\${suffix}
14209                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14210                                         fi
14211                                 done
14212                         )
14213                 )
14214         elif test \$verb = removing ; then
14215                 test -f \$cf_target && (
14216                         echo \$verb \$cf_target
14217                         rm -f \$cf_target
14218                 )
14219                 test -d \$cf_subdir\${section} &&
14220                 test -n "\$aliases" && (
14221                         cd \$cf_subdir\${section} && (
14222                                 for cf_alias in \$aliases
14223                                 do
14224                                         if test \$section = 1 ; then
14225                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14226                                         fi
14227
14228                                         echo .. \$verb alias \$cf_alias\${suffix}
14229                                         rm -f \$cf_alias\${suffix}
14230                                 done
14231                         )
14232                 )
14233         else
14234 #               echo ".hy 0"
14235                 cat \$TMP
14236         fi
14237         ;;
14238 esac
14239 done
14240
14241 if test $cf_inboth = yes ; then
14242 if test \$form != format ; then
14243         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14244 fi
14245 fi
14246
14247 exit 0
14248 CF_EOF
14249 chmod 755 $cf_edit_man
14250
14251 ###############################################################################
14252
14253 ### Note that some functions (such as const) are normally disabled anyway.
14254 echo "$as_me:14254: checking if you want to build with function extensions" >&5
14255 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14256
14257 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14258 if test "${enable_ext_funcs+set}" = set; then
14259   enableval="$enable_ext_funcs"
14260   with_ext_funcs=$enableval
14261 else
14262   with_ext_funcs=yes
14263 fi;
14264 echo "$as_me:14264: result: $with_ext_funcs" >&5
14265 echo "${ECHO_T}$with_ext_funcs" >&6
14266 if test "x$with_ext_funcs" = xyes ; then
14267         NCURSES_EXT_FUNCS=1
14268
14269 cat >>confdefs.h <<\EOF
14270 #define NCURSES_EXT_FUNCS 1
14271 EOF
14272
14273 cat >>confdefs.h <<\EOF
14274 #define HAVE_ASSUME_DEFAULT_COLORS 1
14275 EOF
14276
14277 cat >>confdefs.h <<\EOF
14278 #define HAVE_CURSES_VERSION 1
14279 EOF
14280
14281 cat >>confdefs.h <<\EOF
14282 #define HAVE_HAS_KEY 1
14283 EOF
14284
14285 cat >>confdefs.h <<\EOF
14286 #define HAVE_RESIZETERM 1
14287 EOF
14288
14289 cat >>confdefs.h <<\EOF
14290 #define HAVE_RESIZE_TERM 1
14291 EOF
14292
14293 cat >>confdefs.h <<\EOF
14294 #define HAVE_TERM_ENTRY_H 1
14295 EOF
14296
14297 cat >>confdefs.h <<\EOF
14298 #define HAVE_USE_DEFAULT_COLORS 1
14299 EOF
14300
14301 cat >>confdefs.h <<\EOF
14302 #define HAVE_USE_EXTENDED_NAMES 1
14303 EOF
14304
14305 cat >>confdefs.h <<\EOF
14306 #define HAVE_USE_SCREEN 1
14307 EOF
14308
14309 cat >>confdefs.h <<\EOF
14310 #define HAVE_USE_WINDOW 1
14311 EOF
14312
14313 cat >>confdefs.h <<\EOF
14314 #define HAVE_WRESIZE 1
14315 EOF
14316
14317         GENERATED_EXT_FUNCS=generated
14318         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14319 else
14320         NCURSES_EXT_FUNCS=0
14321         GENERATED_EXT_FUNCS=
14322 fi
14323
14324 echo "$as_me:14324: checking if you want to build with SCREEN extensions" >&5
14325 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14326
14327 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14328 if test "${enable_sp_funcs+set}" = set; then
14329   enableval="$enable_sp_funcs"
14330   with_sp_funcs=$enableval
14331 else
14332   with_sp_funcs=$cf_dft_ext_spfuncs
14333 fi;
14334 echo "$as_me:14334: result: $with_sp_funcs" >&5
14335 echo "${ECHO_T}$with_sp_funcs" >&6
14336 if test "x$with_sp_funcs" = xyes ; then
14337         NCURSES_SP_FUNCS=1
14338
14339 cat >>confdefs.h <<\EOF
14340 #define NCURSES_SP_FUNCS 1
14341 EOF
14342
14343 cat >>confdefs.h <<\EOF
14344 #define HAVE_TPUTS_SP 1
14345 EOF
14346
14347         GENERATED_SP_FUNCS=generated
14348 else
14349         NCURSES_SP_FUNCS=0
14350         GENERATED_SP_FUNCS=
14351 fi
14352
14353 echo "$as_me:14353: checking if you want to build with terminal-driver" >&5
14354 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14355
14356 # Check whether --enable-term-driver or --disable-term-driver was given.
14357 if test "${enable_term_driver+set}" = set; then
14358   enableval="$enable_term_driver"
14359   with_term_driver=$enableval
14360 else
14361   with_term_driver=no
14362 fi;
14363 echo "$as_me:14363: result: $with_term_driver" >&5
14364 echo "${ECHO_T}$with_term_driver" >&6
14365 if test "x$with_term_driver" = xyes ; then
14366
14367 cat >>confdefs.h <<\EOF
14368 #define USE_TERM_DRIVER 1
14369 EOF
14370
14371         if test "x$with_termlib" != xno ; then
14372                 { { echo "$as_me:14372: error: The term-driver option conflicts with the termlib option" >&5
14373 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14374    { (exit 1); exit 1; }; }
14375         fi
14376         if test "x$with_sp_funcs" != xyes ; then
14377                 { { echo "$as_me:14377: error: The term-driver option relies upon sp-funcs" >&5
14378 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14379    { (exit 1); exit 1; }; }
14380         fi
14381 fi
14382
14383 ###   use option --enable-const to turn on use of const beyond that in XSI.
14384 echo "$as_me:14384: checking for extended use of const keyword" >&5
14385 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14386
14387 # Check whether --enable-const or --disable-const was given.
14388 if test "${enable_const+set}" = set; then
14389   enableval="$enable_const"
14390   with_ext_const=$enableval
14391 else
14392   with_ext_const=$cf_dft_ext_const
14393 fi;
14394 echo "$as_me:14394: result: $with_ext_const" >&5
14395 echo "${ECHO_T}$with_ext_const" >&6
14396 NCURSES_CONST='/*nothing*/'
14397 if test "x$with_ext_const" = xyes ; then
14398         NCURSES_CONST=const
14399 fi
14400
14401 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14402 echo "$as_me:14402: checking if you want to use extended colors" >&5
14403 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14404
14405 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14406 if test "${enable_ext_colors+set}" = set; then
14407   enableval="$enable_ext_colors"
14408   with_ext_colors=$enableval
14409 else
14410   with_ext_colors=$cf_dft_ext_colors
14411 fi;
14412 echo "$as_me:14412: result: $with_ext_colors" >&5
14413 echo "${ECHO_T}$with_ext_colors" >&6
14414 NCURSES_EXT_COLORS=0
14415 if test "x$with_ext_colors" = xyes ; then
14416         if test "x$with_widec" != xyes ; then
14417                 { echo "$as_me:14417: WARNING: This option applies only to wide-character library" >&5
14418 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14419         else
14420                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14421
14422 if test "${with_abi_version+set}" != set; then
14423         case $cf_cv_rel_version in
14424         (5.*)
14425                 cf_cv_rel_version=6.0
14426                 cf_cv_abi_version=6
14427                 { echo "$as_me:14427: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14428 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14429                 ;;
14430         esac
14431 fi
14432
14433                 NCURSES_EXT_COLORS=1
14434
14435 cat >>confdefs.h <<\EOF
14436 #define NCURSES_EXT_COLORS 1
14437 EOF
14438
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_ALLOC_PAIR 1
14441 EOF
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_INIT_EXTENDED_COLOR 1
14445 EOF
14446
14447 cat >>confdefs.h <<\EOF
14448 #define HAVE_RESET_COLOR_PAIRS 1
14449 EOF
14450
14451         fi
14452 fi
14453
14454 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14455 echo "$as_me:14455: checking if you want to use extended mouse encoding" >&5
14456 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14457
14458 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14459 if test "${enable_ext_mouse+set}" = set; then
14460   enableval="$enable_ext_mouse"
14461   with_ext_mouse=$enableval
14462 else
14463   with_ext_mouse=$cf_dft_ext_mouse
14464 fi;
14465 echo "$as_me:14465: result: $with_ext_mouse" >&5
14466 echo "${ECHO_T}$with_ext_mouse" >&6
14467 NCURSES_MOUSE_VERSION=1
14468 if test "x$with_ext_mouse" = xyes ; then
14469         NCURSES_MOUSE_VERSION=2
14470
14471 if test "${with_abi_version+set}" != set; then
14472         case $cf_cv_rel_version in
14473         (5.*)
14474                 cf_cv_rel_version=6.0
14475                 cf_cv_abi_version=6
14476                 { echo "$as_me:14476: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14477 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14478                 ;;
14479         esac
14480 fi
14481
14482 fi
14483
14484 ###   use option --enable-ext-putwin to turn on extended screendumps
14485 echo "$as_me:14485: checking if you want to use extended putwin/screendump" >&5
14486 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14487
14488 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14489 if test "${enable_ext_putwin+set}" = set; then
14490   enableval="$enable_ext_putwin"
14491   with_ext_putwin=$enableval
14492 else
14493   with_ext_putwin=$cf_dft_ext_putwin
14494 fi;
14495 echo "$as_me:14495: result: $with_ext_putwin" >&5
14496 echo "${ECHO_T}$with_ext_putwin" >&6
14497 if test "x$with_ext_putwin" = xyes ; then
14498
14499 cat >>confdefs.h <<\EOF
14500 #define NCURSES_EXT_PUTWIN 1
14501 EOF
14502
14503 fi
14504
14505 echo "$as_me:14505: checking if you want \$NCURSES_NO_PADDING code" >&5
14506 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14507
14508 # Check whether --enable-no-padding or --disable-no-padding was given.
14509 if test "${enable_no_padding+set}" = set; then
14510   enableval="$enable_no_padding"
14511   with_no_padding=$enableval
14512 else
14513   with_no_padding=$with_ext_funcs
14514 fi;
14515 echo "$as_me:14515: result: $with_no_padding" >&5
14516 echo "${ECHO_T}$with_no_padding" >&6
14517 test "x$with_no_padding" = xyes &&
14518 cat >>confdefs.h <<\EOF
14519 #define NCURSES_NO_PADDING 1
14520 EOF
14521
14522 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14523 echo "$as_me:14523: checking if you want SIGWINCH handler" >&5
14524 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14525
14526 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14527 if test "${enable_sigwinch+set}" = set; then
14528   enableval="$enable_sigwinch"
14529   with_sigwinch=$enableval
14530 else
14531   with_sigwinch=$with_ext_funcs
14532 fi;
14533 echo "$as_me:14533: result: $with_sigwinch" >&5
14534 echo "${ECHO_T}$with_sigwinch" >&6
14535 test "x$with_sigwinch" = xyes &&
14536 cat >>confdefs.h <<\EOF
14537 #define USE_SIGWINCH 1
14538 EOF
14539
14540 ###   use option --enable-tcap-names to allow user to define new capabilities
14541 echo "$as_me:14541: checking if you want user-definable terminal capabilities like termcap" >&5
14542 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14543
14544 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14545 if test "${enable_tcap_names+set}" = set; then
14546   enableval="$enable_tcap_names"
14547   with_tcap_names=$enableval
14548 else
14549   with_tcap_names=$with_ext_funcs
14550 fi;
14551 echo "$as_me:14551: result: $with_tcap_names" >&5
14552 echo "${ECHO_T}$with_tcap_names" >&6
14553 NCURSES_XNAMES=0
14554 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14555
14556 ##############################################################################
14557
14558 echo "$as_me:14558: checking if you want to link with the pthread library" >&5
14559 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14560
14561 # Check whether --with-pthread or --without-pthread was given.
14562 if test "${with_pthread+set}" = set; then
14563   withval="$with_pthread"
14564   with_pthread=$withval
14565 else
14566   with_pthread=no
14567 fi;
14568 echo "$as_me:14568: result: $with_pthread" >&5
14569 echo "${ECHO_T}$with_pthread" >&6
14570
14571 if test "$with_pthread" != no ; then
14572         echo "$as_me:14572: checking for pthread.h" >&5
14573 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14574 if test "${ac_cv_header_pthread_h+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <pthread.h>
14581 _ACEOF
14582 if { (eval echo "$as_me:14582: \"$ac_cpp conftest.$ac_ext\"") >&5
14583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14584   ac_status=$?
14585   egrep -v '^ *\+' conftest.er1 >conftest.err
14586   rm -f conftest.er1
14587   cat conftest.err >&5
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); } >/dev/null; then
14590   if test -s conftest.err; then
14591     ac_cpp_err=$ac_c_preproc_warn_flag
14592   else
14593     ac_cpp_err=
14594   fi
14595 else
14596   ac_cpp_err=yes
14597 fi
14598 if test -z "$ac_cpp_err"; then
14599   ac_cv_header_pthread_h=yes
14600 else
14601   echo "$as_me: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   ac_cv_header_pthread_h=no
14604 fi
14605 rm -f conftest.err conftest.$ac_ext
14606 fi
14607 echo "$as_me:14607: result: $ac_cv_header_pthread_h" >&5
14608 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14609 if test $ac_cv_header_pthread_h = yes; then
14610
14611 cat >>confdefs.h <<\EOF
14612 #define HAVE_PTHREADS_H 1
14613 EOF
14614
14615         for cf_lib_pthread in pthread c_r
14616         do
14617             echo "$as_me:14617: checking if we can link with the $cf_lib_pthread library" >&5
14618 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14619             cf_save_LIBS="$LIBS"
14620
14621 cf_add_libs="$LIBS"
14622 # reverse order
14623 cf_add_0lib=
14624 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14625 # filter duplicates
14626 for cf_add_1lib in $cf_add_0lib; do
14627         for cf_add_2lib in $cf_add_libs; do
14628                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14629                         cf_add_1lib=
14630                         break
14631                 fi
14632         done
14633         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14634 done
14635 LIBS="$cf_add_libs"
14636
14637             cat >conftest.$ac_ext <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640
14641 #include <pthread.h>
14642
14643 int
14644 main (void)
14645 {
14646
14647                 int rc = pthread_create(0,0,0,0);
14648                 int r2 = pthread_mutexattr_settype(0, 0);
14649
14650   ;
14651   return 0;
14652 }
14653 _ACEOF
14654 rm -f conftest.$ac_objext conftest$ac_exeext
14655 if { (eval echo "$as_me:14655: \"$ac_link\"") >&5
14656   (eval $ac_link) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); } &&
14660          { ac_try='test -s conftest$ac_exeext'
14661   { (eval echo "$as_me:14661: \"$ac_try\"") >&5
14662   (eval $ac_try) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); }; }; then
14666   with_pthread=yes
14667 else
14668   echo "$as_me: failed program was:" >&5
14669 cat conftest.$ac_ext >&5
14670 with_pthread=no
14671 fi
14672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14673             LIBS="$cf_save_LIBS"
14674             echo "$as_me:14674: result: $with_pthread" >&5
14675 echo "${ECHO_T}$with_pthread" >&6
14676             test "$with_pthread" = yes && break
14677         done
14678
14679         if test "$with_pthread" = yes ; then
14680
14681 cf_add_libs="$LIBS"
14682 # reverse order
14683 cf_add_0lib=
14684 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14685 # filter duplicates
14686 for cf_add_1lib in $cf_add_0lib; do
14687         for cf_add_2lib in $cf_add_libs; do
14688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14689                         cf_add_1lib=
14690                         break
14691                 fi
14692         done
14693         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14694 done
14695 LIBS="$cf_add_libs"
14696
14697 cat >>confdefs.h <<\EOF
14698 #define HAVE_LIBPTHREADS 1
14699 EOF
14700
14701         else
14702             { { echo "$as_me:14702: error: Cannot link with pthread library" >&5
14703 echo "$as_me: error: Cannot link with pthread library" >&2;}
14704    { (exit 1); exit 1; }; }
14705         fi
14706
14707 fi
14708
14709 fi
14710
14711 if test "x$with_pthread" != xno; then
14712         echo "$as_me:14712: checking for pthread_kill" >&5
14713 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14714 if test "${ac_cv_func_pthread_kill+set}" = set; then
14715   echo $ECHO_N "(cached) $ECHO_C" >&6
14716 else
14717   cat >conftest.$ac_ext <<_ACEOF
14718 #line 14718 "configure"
14719 #include "confdefs.h"
14720 #define pthread_kill autoconf_temporary
14721 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14722 #undef pthread_kill
14723
14724 #ifdef __cplusplus
14725 extern "C"
14726 #endif
14727
14728 /* We use char because int might match the return type of a gcc2
14729    builtin and then its argument prototype would still apply.  */
14730 char pthread_kill (void);
14731
14732 int
14733 main (void)
14734 {
14735
14736 /* The GNU C library defines stubs for functions which it implements
14737     to always fail with ENOSYS.  Some functions are actually named
14738     something starting with __ and the normal name is an alias.  */
14739 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14740 #error found stub for pthread_kill
14741 #endif
14742
14743         return pthread_kill ();
14744   ;
14745   return 0;
14746 }
14747 _ACEOF
14748 rm -f conftest.$ac_objext conftest$ac_exeext
14749 if { (eval echo "$as_me:14749: \"$ac_link\"") >&5
14750   (eval $ac_link) 2>&5
14751   ac_status=$?
14752   echo "$as_me:14752: \$? = $ac_status" >&5
14753   (exit $ac_status); } &&
14754          { ac_try='test -s conftest$ac_exeext'
14755   { (eval echo "$as_me:14755: \"$ac_try\"") >&5
14756   (eval $ac_try) 2>&5
14757   ac_status=$?
14758   echo "$as_me:14758: \$? = $ac_status" >&5
14759   (exit $ac_status); }; }; then
14760   ac_cv_func_pthread_kill=yes
14761 else
14762   echo "$as_me: failed program was:" >&5
14763 cat conftest.$ac_ext >&5
14764 ac_cv_func_pthread_kill=no
14765 fi
14766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14767 fi
14768 echo "$as_me:14768: result: $ac_cv_func_pthread_kill" >&5
14769 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14770 if test $ac_cv_func_pthread_kill = yes; then
14771
14772                 echo "$as_me:14772: checking if you want to allow EINTR in wgetch with pthreads" >&5
14773 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14774
14775 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14776 if test "${enable_pthreads_eintr+set}" = set; then
14777   enableval="$enable_pthreads_eintr"
14778   use_pthreads_eintr=$enableval
14779 else
14780   use_pthreads_eintr=no
14781 fi;
14782                 echo "$as_me:14782: result: $use_pthreads_eintr" >&5
14783 echo "${ECHO_T}$use_pthreads_eintr" >&6
14784                 if test "x$use_pthreads_eintr" = xyes ; then
14785
14786 cat >>confdefs.h <<\EOF
14787 #define USE_PTHREADS_EINTR 1
14788 EOF
14789
14790                 fi
14791 fi
14792
14793         echo "$as_me:14793: checking if you want to use weak-symbols for pthreads" >&5
14794 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14795
14796 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14797 if test "${enable_weak_symbols+set}" = set; then
14798   enableval="$enable_weak_symbols"
14799   use_weak_symbols=$enableval
14800 else
14801   use_weak_symbols=no
14802 fi;
14803         echo "$as_me:14803: result: $use_weak_symbols" >&5
14804 echo "${ECHO_T}$use_weak_symbols" >&6
14805         if test "x$use_weak_symbols" = xyes ; then
14806
14807 echo "$as_me:14807: checking if $CC supports weak symbols" >&5
14808 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14809 if test "${cf_cv_weak_symbols+set}" = set; then
14810   echo $ECHO_N "(cached) $ECHO_C" >&6
14811 else
14812
14813 cat >conftest.$ac_ext <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14816
14817 #include <stdio.h>
14818 int
14819 main (void)
14820 {
14821
14822 #if defined(__GNUC__)
14823 #  if defined __USE_ISOC99
14824 #    define _cat_pragma(exp)    _Pragma(#exp)
14825 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14826 #  else
14827 #    define _weak_pragma(exp)
14828 #  endif
14829 #  define _declare(name)        __extension__ extern __typeof__(name) name
14830 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14831 #endif
14832
14833 weak_symbol(fopen);
14834
14835   ;
14836   return 0;
14837 }
14838 _ACEOF
14839 rm -f conftest.$ac_objext
14840 if { (eval echo "$as_me:14840: \"$ac_compile\"") >&5
14841   (eval $ac_compile) 2>&5
14842   ac_status=$?
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); } &&
14845          { ac_try='test -s conftest.$ac_objext'
14846   { (eval echo "$as_me:14846: \"$ac_try\"") >&5
14847   (eval $ac_try) 2>&5
14848   ac_status=$?
14849   echo "$as_me:14849: \$? = $ac_status" >&5
14850   (exit $ac_status); }; }; then
14851   cf_cv_weak_symbols=yes
14852 else
14853   echo "$as_me: failed program was:" >&5
14854 cat conftest.$ac_ext >&5
14855 cf_cv_weak_symbols=no
14856 fi
14857 rm -f conftest.$ac_objext conftest.$ac_ext
14858
14859 fi
14860 echo "$as_me:14860: result: $cf_cv_weak_symbols" >&5
14861 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14862
14863         else
14864                 cf_cv_weak_symbols=no
14865         fi
14866
14867         if test "x$cf_cv_weak_symbols" = xyes ; then
14868
14869 cat >>confdefs.h <<\EOF
14870 #define USE_WEAK_SYMBOLS 1
14871 EOF
14872
14873         fi
14874 fi
14875
14876 PTHREAD=
14877 if test "x$with_pthread" = "xyes" ; then
14878
14879 cat >>confdefs.h <<\EOF
14880 #define USE_PTHREADS 1
14881 EOF
14882
14883         enable_reentrant=yes
14884         if test "x$cf_cv_weak_symbols" = xyes ; then
14885                 PTHREAD=-lpthread
14886
14887 cf_add_libs="$PRIVATE_LIBS"
14888 # reverse order
14889 cf_add_0lib=
14890 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14891 # filter duplicates
14892 for cf_add_1lib in $cf_add_0lib; do
14893         for cf_add_2lib in $cf_add_libs; do
14894                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14895                         cf_add_1lib=
14896                         break
14897                 fi
14898         done
14899         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14900 done
14901 PRIVATE_LIBS="$cf_add_libs"
14902
14903         fi
14904 fi
14905
14906 # Reentrant code has to be opaque; there's little advantage to making ncurses
14907 # opaque outside of that, so there is no --enable-opaque option.  We can use
14908 # this option without --with-pthreads, but this will be always set for
14909 # pthreads.
14910 echo "$as_me:14910: checking if you want reentrant code" >&5
14911 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14912
14913 # Check whether --enable-reentrant or --disable-reentrant was given.
14914 if test "${enable_reentrant+set}" = set; then
14915   enableval="$enable_reentrant"
14916   with_reentrant=$enableval
14917 else
14918   with_reentrant=no
14919 fi;
14920 echo "$as_me:14920: result: $with_reentrant" >&5
14921 echo "${ECHO_T}$with_reentrant" >&6
14922 if test "x$with_reentrant" = xyes ; then
14923         cf_cv_enable_reentrant=1
14924         cf_cv_enable_opaque="NCURSES_INTERNALS"
14925         NCURSES_SIZE_T=int
14926         if test "x$cf_cv_weak_symbols" = xyes ; then
14927
14928 # remove pthread library from $LIBS
14929 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14930
14931 cf_add_libs="$TEST_LIBS"
14932 # reverse order
14933 cf_add_0lib=
14934 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14935 # filter duplicates
14936 for cf_add_1lib in $cf_add_0lib; do
14937         for cf_add_2lib in $cf_add_libs; do
14938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14939                         cf_add_1lib=
14940                         break
14941                 fi
14942         done
14943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14944 done
14945 TEST_LIBS="$cf_add_libs"
14946
14947 cf_add_libs="$TEST_LIBS2"
14948 # reverse order
14949 cf_add_0lib=
14950 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14951 # filter duplicates
14952 for cf_add_1lib in $cf_add_0lib; do
14953         for cf_add_2lib in $cf_add_libs; do
14954                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14955                         cf_add_1lib=
14956                         break
14957                 fi
14958         done
14959         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14960 done
14961 TEST_LIBS2="$cf_add_libs"
14962
14963 cf_add_libs="$PRIVATE_LIBS"
14964 # reverse order
14965 cf_add_0lib=
14966 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14967 # filter duplicates
14968 for cf_add_1lib in $cf_add_0lib; do
14969         for cf_add_2lib in $cf_add_libs; do
14970                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14971                         cf_add_1lib=
14972                         break
14973                 fi
14974         done
14975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14976 done
14977 PRIVATE_LIBS="$cf_add_libs"
14978
14979         else
14980                 # when not using weak symbols but with_reentrant,
14981                 # add 't' to the library suffix on all platforms
14982                 # except cygwin, where we only do that if ALSO
14983                 # compiling with full thread support.
14984                 case "$host" in
14985                 (*cygwin* | *msys*)
14986                         if test "$with_pthread" = "yes" ; then
14987                                 if test "x$disable_lib_suffixes" = "xno" ; then
14988                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14989                                 fi
14990                         fi ;;
14991                 (*)
14992                         if test "x$disable_lib_suffixes" = "xno" ; then
14993                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14994                         fi
14995                         ;;
14996                 esac
14997         fi
14998
14999 cat >>confdefs.h <<\EOF
15000 #define USE_REENTRANT 1
15001 EOF
15002
15003 if test "${with_abi_version+set}" != set; then
15004         case $cf_cv_rel_version in
15005         (5.*)
15006                 cf_cv_rel_version=6.0
15007                 cf_cv_abi_version=6
15008                 { echo "$as_me:15008: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15009 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15010                 ;;
15011         esac
15012 fi
15013
15014 else
15015         cf_cv_enable_reentrant=0
15016         cf_cv_enable_opaque="NCURSES_OPAQUE"
15017         NCURSES_SIZE_T=short
15018 fi
15019
15020 echo "$as_me:15020: checking if you want opaque curses-library structures" >&5
15021 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15022
15023 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15024 if test "${enable_opaque_curses+set}" = set; then
15025   enableval="$enable_opaque_curses"
15026   test "$enableval" != yes && enableval=no
15027         if test "$enableval" != "no" ; then
15028     enable_opaque_curses=yes
15029         else
15030
15031          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15032          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15033
15034         fi
15035 else
15036   enableval=no
15037
15038          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15039          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15040
15041 fi;
15042 echo "$as_me:15042: result: $enable_opaque_curses" >&5
15043 echo "${ECHO_T}$enable_opaque_curses" >&6
15044
15045 test "$cf_cv_enable_reentrant" = 1 && \
15046 test "$enable_opaque_curses" = no && \
15047 { { echo "$as_me:15047: error: reentrant configuration requires opaque library" >&5
15048 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15049    { (exit 1); exit 1; }; }
15050
15051 echo "$as_me:15051: checking if you want opaque form-library structures" >&5
15052 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15053
15054 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15055 if test "${enable_opaque_form+set}" = set; then
15056   enableval="$enable_opaque_form"
15057   enable_opaque_form=yes
15058 else
15059   enable_opaque_form=no
15060 fi;
15061 echo "$as_me:15061: result: $enable_opaque_form" >&5
15062 echo "${ECHO_T}$enable_opaque_form" >&6
15063
15064 echo "$as_me:15064: checking if you want opaque menu-library structures" >&5
15065 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15066
15067 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15068 if test "${enable_opaque_menu+set}" = set; then
15069   enableval="$enable_opaque_menu"
15070   enable_opaque_menu=yes
15071 else
15072   enable_opaque_menu=no
15073 fi;
15074 echo "$as_me:15074: result: $enable_opaque_menu" >&5
15075 echo "${ECHO_T}$enable_opaque_menu" >&6
15076
15077 echo "$as_me:15077: checking if you want opaque panel-library structures" >&5
15078 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15079
15080 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15081 if test "${enable_opaque_panel+set}" = set; then
15082   enableval="$enable_opaque_panel"
15083   enable_opaque_panel=yes
15084 else
15085   enable_opaque_panel=no
15086 fi;
15087 echo "$as_me:15087: result: $enable_opaque_panel" >&5
15088 echo "${ECHO_T}$enable_opaque_panel" >&6
15089
15090 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15091 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15092 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15093 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15094
15095 ### Allow using a different wrap-prefix
15096 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15097         echo "$as_me:15097: checking for prefix used to wrap public variables" >&5
15098 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15099
15100 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15101 if test "${with_wrap_prefix+set}" = set; then
15102   withval="$with_wrap_prefix"
15103   NCURSES_WRAP_PREFIX=$withval
15104 else
15105   NCURSES_WRAP_PREFIX=_nc_
15106 fi;
15107         echo "$as_me:15107: result: $NCURSES_WRAP_PREFIX" >&5
15108 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15109 else
15110         NCURSES_WRAP_PREFIX=_nc_
15111 fi
15112
15113 cat >>confdefs.h <<EOF
15114 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15115 EOF
15116
15117 ###############################################################################
15118 # These options are relatively safe to experiment with.
15119
15120 echo "$as_me:15120: checking if you want all development code" >&5
15121 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15122
15123 # Check whether --with-develop or --without-develop was given.
15124 if test "${with_develop+set}" = set; then
15125   withval="$with_develop"
15126   with_develop=$withval
15127 else
15128   with_develop=no
15129 fi;
15130 echo "$as_me:15130: result: $with_develop" >&5
15131 echo "${ECHO_T}$with_develop" >&6
15132
15133 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15134 echo "$as_me:15134: checking if you want hard-tabs code" >&5
15135 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15136
15137 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15138 if test "${enable_hard_tabs+set}" = set; then
15139   enableval="$enable_hard_tabs"
15140
15141 else
15142   enable_hard_tabs=$with_develop
15143 fi;
15144 echo "$as_me:15144: result: $enable_hard_tabs" >&5
15145 echo "${ECHO_T}$enable_hard_tabs" >&6
15146 test "x$enable_hard_tabs" = xyes &&
15147 cat >>confdefs.h <<\EOF
15148 #define USE_HARD_TABS 1
15149 EOF
15150
15151 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15152 echo "$as_me:15152: checking if you want limited support for xmc" >&5
15153 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15154
15155 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15156 if test "${enable_xmc_glitch+set}" = set; then
15157   enableval="$enable_xmc_glitch"
15158
15159 else
15160   enable_xmc_glitch=$with_develop
15161 fi;
15162 echo "$as_me:15162: result: $enable_xmc_glitch" >&5
15163 echo "${ECHO_T}$enable_xmc_glitch" >&6
15164 test "x$enable_xmc_glitch" = xyes &&
15165 cat >>confdefs.h <<\EOF
15166 #define USE_XMC_SUPPORT 1
15167 EOF
15168
15169 ###############################################################################
15170 # These are just experimental, probably should not be in a package:
15171
15172 echo "$as_me:15172: checking if you do not want to assume colors are white-on-black" >&5
15173 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15174
15175 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15176 if test "${enable_assumed_color+set}" = set; then
15177   enableval="$enable_assumed_color"
15178   with_assumed_color=$enableval
15179 else
15180   with_assumed_color=yes
15181 fi;
15182 echo "$as_me:15182: result: $with_assumed_color" >&5
15183 echo "${ECHO_T}$with_assumed_color" >&6
15184 test "x$with_assumed_color" = xyes &&
15185 cat >>confdefs.h <<\EOF
15186 #define USE_ASSUMED_COLOR 1
15187 EOF
15188
15189 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15190 echo "$as_me:15190: checking if you want hashmap scrolling-optimization code" >&5
15191 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15192
15193 # Check whether --enable-hashmap or --disable-hashmap was given.
15194 if test "${enable_hashmap+set}" = set; then
15195   enableval="$enable_hashmap"
15196   with_hashmap=$enableval
15197 else
15198   with_hashmap=yes
15199 fi;
15200 echo "$as_me:15200: result: $with_hashmap" >&5
15201 echo "${ECHO_T}$with_hashmap" >&6
15202 test "x$with_hashmap" = xyes &&
15203 cat >>confdefs.h <<\EOF
15204 #define USE_HASHMAP 1
15205 EOF
15206
15207 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15208 echo "$as_me:15208: checking if you want colorfgbg code" >&5
15209 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15210
15211 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15212 if test "${enable_colorfgbg+set}" = set; then
15213   enableval="$enable_colorfgbg"
15214   with_colorfgbg=$enableval
15215 else
15216   with_colorfgbg=no
15217 fi;
15218 echo "$as_me:15218: result: $with_colorfgbg" >&5
15219 echo "${ECHO_T}$with_colorfgbg" >&6
15220 test "x$with_colorfgbg" = xyes &&
15221 cat >>confdefs.h <<\EOF
15222 #define USE_COLORFGBG 1
15223 EOF
15224
15225 ###   use option --enable-interop to turn on use of bindings used for interop
15226 echo "$as_me:15226: checking if you want interop bindings" >&5
15227 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15228
15229 # Check whether --enable-interop or --disable-interop was given.
15230 if test "${enable_interop+set}" = set; then
15231   enableval="$enable_interop"
15232   with_exp_interop=$enableval
15233 else
15234   with_exp_interop=$cf_dft_interop
15235 fi;
15236 echo "$as_me:15236: result: $with_exp_interop" >&5
15237 echo "${ECHO_T}$with_exp_interop" >&6
15238
15239 NCURSES_INTEROP_FUNCS=0
15240 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15241
15242 echo "$as_me:15242: checking if you want experimental safe-sprintf code" >&5
15243 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15244
15245 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15246 if test "${enable_safe_sprintf+set}" = set; then
15247   enableval="$enable_safe_sprintf"
15248   with_safe_sprintf=$enableval
15249 else
15250   with_safe_sprintf=no
15251 fi;
15252 echo "$as_me:15252: result: $with_safe_sprintf" >&5
15253 echo "${ECHO_T}$with_safe_sprintf" >&6
15254
15255 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15256 # when hashmap is used scroll hints are useless
15257 if test "$with_hashmap" = no ; then
15258 echo "$as_me:15258: checking if you want to experiment without scrolling-hints code" >&5
15259 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15260
15261 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15262 if test "${enable_scroll_hints+set}" = set; then
15263   enableval="$enable_scroll_hints"
15264   with_scroll_hints=$enableval
15265 else
15266   with_scroll_hints=yes
15267 fi;
15268 echo "$as_me:15268: result: $with_scroll_hints" >&5
15269 echo "${ECHO_T}$with_scroll_hints" >&6
15270 test "x$with_scroll_hints" = xyes &&
15271 cat >>confdefs.h <<\EOF
15272 #define USE_SCROLL_HINTS 1
15273 EOF
15274
15275 fi
15276
15277 echo "$as_me:15277: checking if you want wgetch-events code" >&5
15278 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15279
15280 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15281 if test "${enable_wgetch_events+set}" = set; then
15282   enableval="$enable_wgetch_events"
15283   with_wgetch_events=$enableval
15284 else
15285   with_wgetch_events=no
15286 fi;
15287 echo "$as_me:15287: result: $with_wgetch_events" >&5
15288 echo "${ECHO_T}$with_wgetch_events" >&6
15289 test "x$with_wgetch_events" = xyes &&
15290 cat >>confdefs.h <<\EOF
15291 #define NCURSES_WGETCH_EVENTS 1
15292 EOF
15293
15294 ###############################################################################
15295
15296 ###     use option --disable-echo to suppress full display compiling commands
15297
15298 echo "$as_me:15298: checking if you want to see long compiling messages" >&5
15299 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15300
15301 # Check whether --enable-echo or --disable-echo was given.
15302 if test "${enable_echo+set}" = set; then
15303   enableval="$enable_echo"
15304   test "$enableval" != no && enableval=yes
15305         if test "$enableval" != "yes" ; then
15306
15307         ECHO_LT='--silent'
15308         ECHO_LD='@echo linking $@;'
15309         RULE_CC='@echo compiling $<'
15310         SHOW_CC='@echo compiling $@'
15311         ECHO_CC='@'
15312
15313         else
15314
15315         ECHO_LT=''
15316         ECHO_LD=''
15317         RULE_CC=''
15318         SHOW_CC=''
15319         ECHO_CC=''
15320
15321         fi
15322 else
15323   enableval=yes
15324
15325         ECHO_LT=''
15326         ECHO_LD=''
15327         RULE_CC=''
15328         SHOW_CC=''
15329         ECHO_CC=''
15330
15331 fi;
15332 echo "$as_me:15332: result: $enableval" >&5
15333 echo "${ECHO_T}$enableval" >&6
15334
15335 if test "x$enable_echo" = xyes; then
15336         ECHO_LINK=
15337 else
15338         ECHO_LINK='@ echo linking $@ ... ;'
15339         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15340         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15341 fi
15342
15343 # --disable-stripping is used for debugging
15344
15345 echo "$as_me:15345: checking if you want to install stripped executables" >&5
15346 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15347
15348 # Check whether --enable-stripping or --disable-stripping was given.
15349 if test "${enable_stripping+set}" = set; then
15350   enableval="$enable_stripping"
15351   test "$enableval" != no && enableval=yes
15352         if test "$enableval" != "yes" ; then
15353     with_stripping=no
15354         else
15355                 with_stripping=yes
15356         fi
15357 else
15358   enableval=yes
15359         with_stripping=yes
15360
15361 fi;
15362 echo "$as_me:15362: result: $with_stripping" >&5
15363 echo "${ECHO_T}$with_stripping" >&6
15364
15365 if test "$with_stripping" = yes
15366 then
15367         INSTALL_OPT_S="-s"
15368 else
15369         INSTALL_OPT_S=
15370 fi
15371
15372 : ${INSTALL:=install}
15373 echo "$as_me:15373: checking if install accepts -p option" >&5
15374 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15375 if test "${cf_cv_install_p+set}" = set; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378
15379         rm -rf conftest*
15380         date >conftest.in
15381         mkdir conftest.out
15382         sleep 3
15383         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15384         then
15385                 if test -f conftest.out/conftest.in
15386                 then
15387                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15388                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15389                         if test -s conftest.err
15390                         then
15391                                 cf_cv_install_p=no
15392                         else
15393                                 cf_cv_install_p=yes
15394                         fi
15395                 else
15396                         cf_cv_install_p=no
15397                 fi
15398         else
15399                 cf_cv_install_p=no
15400         fi
15401         rm -rf conftest*
15402
15403 fi
15404 echo "$as_me:15404: result: $cf_cv_install_p" >&5
15405 echo "${ECHO_T}$cf_cv_install_p" >&6
15406
15407 echo "$as_me:15407: checking if install needs to be told about ownership" >&5
15408 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15409 case `$ac_config_guess` in
15410 (*minix)
15411         with_install_o=yes
15412         ;;
15413 (*)
15414         with_install_o=no
15415         ;;
15416 esac
15417
15418 echo "$as_me:15418: result: $with_install_o" >&5
15419 echo "${ECHO_T}$with_install_o" >&6
15420 if test "x$with_install_o" = xyes
15421 then
15422         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
15423 else
15424         INSTALL_OPT_O=
15425 fi
15426
15427 # If we're avoiding relinking of shared libraries during install, that is to
15428 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15429 # the install program has "-p" (for preserving timestamps).
15430 cf_cv_do_reranlib=yes
15431 if test "x$cf_cv_install_p" = xyes
15432 then
15433         if test "x$cf_cv_do_relink" != xyes
15434         then
15435                 cf_cv_do_reranlib=no
15436                 INSTALL_OPT_P="-p"
15437                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15438         fi
15439 fi
15440
15441 ###     use option --enable-warnings to turn on all gcc warnings
15442 echo "$as_me:15442: checking if you want to see compiler warnings" >&5
15443 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15444
15445 # Check whether --enable-warnings or --disable-warnings was given.
15446 if test "${enable_warnings+set}" = set; then
15447   enableval="$enable_warnings"
15448   with_warnings=$enableval
15449 fi;
15450 echo "$as_me:15450: result: $with_warnings" >&5
15451 echo "${ECHO_T}$with_warnings" >&6
15452
15453 if test "x$with_warnings" = "xyes"; then
15454
15455         ADAFLAGS="$ADAFLAGS -gnatg"
15456
15457 if test "x$have_x" = xyes; then
15458 cat >conftest.$ac_ext <<_ACEOF
15459 #line 15459 "configure"
15460 #include "confdefs.h"
15461
15462 #include <stdlib.h>
15463 #include <X11/Intrinsic.h>
15464
15465 int
15466 main (void)
15467 {
15468 String foo = malloc(1)
15469   ;
15470   return 0;
15471 }
15472 _ACEOF
15473 rm -f conftest.$ac_objext
15474 if { (eval echo "$as_me:15474: \"$ac_compile\"") >&5
15475   (eval $ac_compile) 2>&5
15476   ac_status=$?
15477   echo "$as_me:15477: \$? = $ac_status" >&5
15478   (exit $ac_status); } &&
15479          { ac_try='test -s conftest.$ac_objext'
15480   { (eval echo "$as_me:15480: \"$ac_try\"") >&5
15481   (eval $ac_try) 2>&5
15482   ac_status=$?
15483   echo "$as_me:15483: \$? = $ac_status" >&5
15484   (exit $ac_status); }; }; then
15485
15486 echo "$as_me:15486: checking for X11/Xt const-feature" >&5
15487 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15488 if test "${cf_cv_const_x_string+set}" = set; then
15489   echo $ECHO_N "(cached) $ECHO_C" >&6
15490 else
15491
15492         cat >conftest.$ac_ext <<_ACEOF
15493 #line 15493 "configure"
15494 #include "confdefs.h"
15495
15496 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15497 #undef  XTSTRINGDEFINES /* X11R5 and later */
15498 #include <stdlib.h>
15499 #include <X11/Intrinsic.h>
15500
15501 int
15502 main (void)
15503 {
15504 String foo = malloc(1); *foo = 0
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext
15510 if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
15511   (eval $ac_compile) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); } &&
15515          { ac_try='test -s conftest.$ac_objext'
15516   { (eval echo "$as_me:15516: \"$ac_try\"") >&5
15517   (eval $ac_try) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); }; }; then
15521
15522                         cf_cv_const_x_string=no
15523
15524 else
15525   echo "$as_me: failed program was:" >&5
15526 cat conftest.$ac_ext >&5
15527
15528                         cf_cv_const_x_string=yes
15529
15530 fi
15531 rm -f conftest.$ac_objext conftest.$ac_ext
15532
15533 fi
15534 echo "$as_me:15534: result: $cf_cv_const_x_string" >&5
15535 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15536
15537 case $cf_cv_const_x_string in
15538 (no)
15539
15540         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15541         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15542
15543         ;;
15544 (*)
15545
15546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15547         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15548
15549         ;;
15550 esac
15551
15552 else
15553   echo "$as_me: failed program was:" >&5
15554 cat conftest.$ac_ext >&5
15555 fi
15556 rm -f conftest.$ac_objext conftest.$ac_ext
15557  fi
15558 cat > conftest.$ac_ext <<EOF
15559 #line 15559 "${as_me:-configure}"
15560 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15561 EOF
15562 if test "$INTEL_COMPILER" = yes
15563 then
15564 # The "-wdXXX" options suppress warnings:
15565 # remark #1419: external declaration in primary source file
15566 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15567 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15568 # remark #193: zero used for undefined preprocessing identifier
15569 # remark #593: variable "curs_sb_left_arrow" was set but never used
15570 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15571 # remark #869: parameter "tw" was never referenced
15572 # remark #981: operands are evaluated in unspecified order
15573 # warning #279: controlling expression is constant
15574
15575         { echo "$as_me:15575: checking for $CC warning options..." >&5
15576 echo "$as_me: checking for $CC warning options..." >&6;}
15577         cf_save_CFLAGS="$CFLAGS"
15578         EXTRA_CFLAGS="-Wall"
15579         for cf_opt in \
15580                 wd1419 \
15581                 wd1683 \
15582                 wd1684 \
15583                 wd193 \
15584                 wd593 \
15585                 wd279 \
15586                 wd810 \
15587                 wd869 \
15588                 wd981
15589         do
15590                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15591                 if { (eval echo "$as_me:15591: \"$ac_compile\"") >&5
15592   (eval $ac_compile) 2>&5
15593   ac_status=$?
15594   echo "$as_me:15594: \$? = $ac_status" >&5
15595   (exit $ac_status); }; then
15596                         test -n "$verbose" && echo "$as_me:15596: result: ... -$cf_opt" >&5
15597 echo "${ECHO_T}... -$cf_opt" >&6
15598                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15599                 fi
15600         done
15601         CFLAGS="$cf_save_CFLAGS"
15602 elif test "$GCC" = yes
15603 then
15604         { echo "$as_me:15604: checking for $CC warning options..." >&5
15605 echo "$as_me: checking for $CC warning options..." >&6;}
15606         cf_save_CFLAGS="$CFLAGS"
15607         EXTRA_CFLAGS=
15608         cf_warn_CONST=""
15609         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15610         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15611         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15612         for cf_opt in W Wall \
15613                 Wbad-function-cast \
15614                 Wcast-align \
15615                 Wcast-qual \
15616                 Wdeclaration-after-statement \
15617                 Wextra \
15618                 Winline \
15619                 Wmissing-declarations \
15620                 Wmissing-prototypes \
15621                 Wnested-externs \
15622                 Wpointer-arith \
15623                 Wshadow \
15624                 Wstrict-prototypes \
15625                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15626         do
15627                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15628                 if { (eval echo "$as_me:15628: \"$ac_compile\"") >&5
15629   (eval $ac_compile) 2>&5
15630   ac_status=$?
15631   echo "$as_me:15631: \$? = $ac_status" >&5
15632   (exit $ac_status); }; then
15633                         test -n "$verbose" && echo "$as_me:15633: result: ... -$cf_opt" >&5
15634 echo "${ECHO_T}... -$cf_opt" >&6
15635                         case $cf_opt in
15636                         (Winline)
15637                                 case $GCC_VERSION in
15638                                 ([34].*)
15639                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15640
15641 echo "${as_me:-configure}:15641: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15642
15643                                         continue;;
15644                                 esac
15645                                 ;;
15646                         (Wpointer-arith)
15647                                 case $GCC_VERSION in
15648                                 ([12].*)
15649                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15650
15651 echo "${as_me:-configure}:15651: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15652
15653                                         continue;;
15654                                 esac
15655                                 ;;
15656                         esac
15657                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15658                 fi
15659         done
15660         CFLAGS="$cf_save_CFLAGS"
15661 fi
15662 rm -rf conftest*
15663
15664         if test "x$cf_with_cxx" = xyes ; then
15665
15666 INTEL_CPLUSPLUS=no
15667
15668 if test "$GCC" = yes ; then
15669         case $host_os in
15670         (linux*|gnu*)
15671                 echo "$as_me:15671: checking if this is really Intel C++ compiler" >&5
15672 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15673                 cf_save_CFLAGS="$CXXFLAGS"
15674                 CXXFLAGS="$CXXFLAGS -no-gcc"
15675                 cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 int
15680 main (void)
15681 {
15682
15683 #ifdef __INTEL_COMPILER
15684 #else
15685 make an error
15686 #endif
15687
15688   ;
15689   return 0;
15690 }
15691 _ACEOF
15692 rm -f conftest.$ac_objext
15693 if { (eval echo "$as_me:15693: \"$ac_compile\"") >&5
15694   (eval $ac_compile) 2>&5
15695   ac_status=$?
15696   echo "$as_me:15696: \$? = $ac_status" >&5
15697   (exit $ac_status); } &&
15698          { ac_try='test -s conftest.$ac_objext'
15699   { (eval echo "$as_me:15699: \"$ac_try\"") >&5
15700   (eval $ac_try) 2>&5
15701   ac_status=$?
15702   echo "$as_me:15702: \$? = $ac_status" >&5
15703   (exit $ac_status); }; }; then
15704   INTEL_CPLUSPLUS=yes
15705 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15706
15707 else
15708   echo "$as_me: failed program was:" >&5
15709 cat conftest.$ac_ext >&5
15710 fi
15711 rm -f conftest.$ac_objext conftest.$ac_ext
15712                 CXXFLAGS="$cf_save_CFLAGS"
15713                 echo "$as_me:15713: result: $INTEL_CPLUSPLUS" >&5
15714 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15715                 ;;
15716         esac
15717 fi
15718
15719 CLANG_CPLUSPLUS=no
15720
15721 if test "$GCC" = yes ; then
15722         echo "$as_me:15722: checking if this is really Clang C++ compiler" >&5
15723 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15724         cf_save_CFLAGS="$CXXFLAGS"
15725         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15726         cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15729
15730 int
15731 main (void)
15732 {
15733
15734 #ifdef __clang__
15735 #else
15736 make an error
15737 #endif
15738
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:15744: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); } &&
15749          { ac_try='test -s conftest.$ac_objext'
15750   { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); }; }; then
15755   CLANG_CPLUSPLUS=yes
15756 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15757
15758 else
15759   echo "$as_me: failed program was:" >&5
15760 cat conftest.$ac_ext >&5
15761 fi
15762 rm -f conftest.$ac_objext conftest.$ac_ext
15763         CXXFLAGS="$cf_save_CFLAGS"
15764         echo "$as_me:15764: result: $CLANG_CPLUSPLUS" >&5
15765 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15766 fi
15767
15768 ac_ext=cc
15769 ac_cpp='$CXXCPP $CPPFLAGS'
15770 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15771 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15772 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15773 ac_main_return=return
15774
15775 cat > conftest.$ac_ext <<EOF
15776 #line 15776 "configure"
15777 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15778 EOF
15779
15780 if test "$INTEL_CPLUSPLUS" = yes
15781 then
15782 # The "-wdXXX" options suppress warnings:
15783 # remark #1419: external declaration in primary source file
15784 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15785 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15786 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15787 # remark #193: zero used for undefined preprocessing identifier
15788 # remark #593: variable "curs_sb_left_arrow" was set but never used
15789 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15790 # remark #869: parameter "tw" was never referenced
15791 # remark #981: operands are evaluated in unspecified order
15792 # warning #269: invalid format string conversion
15793
15794         { echo "$as_me:15794: checking for $CC warning options..." >&5
15795 echo "$as_me: checking for $CC warning options..." >&6;}
15796         cf_save_CXXFLAGS="$CXXFLAGS"
15797         EXTRA_CXXFLAGS="-Wall"
15798         for cf_opt in \
15799                 wd1419 \
15800                 wd1682 \
15801                 wd1683 \
15802                 wd1684 \
15803                 wd193 \
15804                 wd279 \
15805                 wd593 \
15806                 wd810 \
15807                 wd869 \
15808                 wd981
15809         do
15810                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15811                 if { (eval echo "$as_me:15811: \"$ac_compile\"") >&5
15812   (eval $ac_compile) 2>&5
15813   ac_status=$?
15814   echo "$as_me:15814: \$? = $ac_status" >&5
15815   (exit $ac_status); }; then
15816                         test -n "$verbose" && echo "$as_me:15816: result: ... -$cf_opt" >&5
15817 echo "${ECHO_T}... -$cf_opt" >&6
15818                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15819                 fi
15820         done
15821         CXXFLAGS="$cf_save_CXXFLAGS"
15822
15823 elif test "$GXX" = yes
15824 then
15825         { echo "$as_me:15825: checking for $CXX warning options..." >&5
15826 echo "$as_me: checking for $CXX warning options..." >&6;}
15827         cf_save_CXXFLAGS="$CXXFLAGS"
15828         EXTRA_CXXFLAGS="-W -Wall"
15829         cf_gxx_extra_warnings=""
15830         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15831         case "$GCC_VERSION" in
15832         ([1-2].*)
15833                 ;;
15834         (*)
15835                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15836                 ;;
15837         esac
15838         for cf_opt in \
15839                 Wabi \
15840                 fabi-version=0 \
15841                 Wextra \
15842                 Wignored-qualifiers \
15843                 Wlogical-op \
15844                 Woverloaded-virtual \
15845                 Wsign-promo \
15846                 Wsynth \
15847                 Wold-style-cast \
15848                 Wcast-align \
15849                 Wcast-qual \
15850                 Wpointer-arith \
15851                 Wshadow \
15852                 Wundef $cf_gxx_extra_warnings Wno-unused
15853         do
15854                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15855                 if { (eval echo "$as_me:15855: \"$ac_compile\"") >&5
15856   (eval $ac_compile) 2>&5
15857   ac_status=$?
15858   echo "$as_me:15858: \$? = $ac_status" >&5
15859   (exit $ac_status); }; then
15860                         test -n "$verbose" && echo "$as_me:15860: result: ... -$cf_opt" >&5
15861 echo "${ECHO_T}... -$cf_opt" >&6
15862                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15863                 else
15864                         test -n "$verbose" && echo "$as_me:15864: result: ... no -$cf_opt" >&5
15865 echo "${ECHO_T}... no -$cf_opt" >&6
15866                 fi
15867         done
15868         CXXFLAGS="$cf_save_CXXFLAGS"
15869 fi
15870
15871 rm -rf conftest*
15872 ac_ext=c
15873 ac_cpp='$CPP $CPPFLAGS'
15874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15877 ac_main_return=return
15878
15879         fi
15880 fi
15881
15882 if test "$GCC" = yes
15883 then
15884 cat > conftest.i <<EOF
15885 #ifndef GCC_PRINTF
15886 #define GCC_PRINTF 0
15887 #endif
15888 #ifndef GCC_SCANF
15889 #define GCC_SCANF 0
15890 #endif
15891 #ifndef GCC_NORETURN
15892 #define GCC_NORETURN /* nothing */
15893 #endif
15894 #ifndef GCC_UNUSED
15895 #define GCC_UNUSED /* nothing */
15896 #endif
15897 EOF
15898 if test "$GCC" = yes
15899 then
15900         { echo "$as_me:15900: checking for $CC __attribute__ directives..." >&5
15901 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15902 cat > conftest.$ac_ext <<EOF
15903 #line 15903 "${as_me:-configure}"
15904 #include "confdefs.h"
15905 #include "conftest.h"
15906 #include "conftest.i"
15907 #if     GCC_PRINTF
15908 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15909 #else
15910 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15911 #endif
15912 #if     GCC_SCANF
15913 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15914 #else
15915 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15916 #endif
15917 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15918 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15919 extern void foo(void) GCC_NORETURN;
15920 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15921 EOF
15922         cf_printf_attribute=no
15923         cf_scanf_attribute=no
15924         for cf_attribute in scanf printf unused noreturn
15925         do
15926
15927 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15928
15929                 cf_directive="__attribute__(($cf_attribute))"
15930                 echo "checking for $CC $cf_directive" 1>&5
15931
15932                 case $cf_attribute in
15933                 (printf)
15934                         cf_printf_attribute=yes
15935                         cat >conftest.h <<EOF
15936 #define GCC_$cf_ATTRIBUTE 1
15937 EOF
15938                         ;;
15939                 (scanf)
15940                         cf_scanf_attribute=yes
15941                         cat >conftest.h <<EOF
15942 #define GCC_$cf_ATTRIBUTE 1
15943 EOF
15944                         ;;
15945                 (*)
15946                         cat >conftest.h <<EOF
15947 #define GCC_$cf_ATTRIBUTE $cf_directive
15948 EOF
15949                         ;;
15950                 esac
15951
15952                 if { (eval echo "$as_me:15952: \"$ac_compile\"") >&5
15953   (eval $ac_compile) 2>&5
15954   ac_status=$?
15955   echo "$as_me:15955: \$? = $ac_status" >&5
15956   (exit $ac_status); }; then
15957                         test -n "$verbose" && echo "$as_me:15957: result: ... $cf_attribute" >&5
15958 echo "${ECHO_T}... $cf_attribute" >&6
15959                         cat conftest.h >>confdefs.h
15960                         case $cf_attribute in
15961                         (noreturn)
15962
15963 cat >>confdefs.h <<EOF
15964 #define GCC_NORETURN $cf_directive
15965 EOF
15966
15967                                 ;;
15968                         (printf)
15969                                 cf_value='/* nothing */'
15970                                 if test "$cf_printf_attribute" != no ; then
15971                                         cf_value='__attribute__((format(printf,fmt,var)))'
15972
15973 cat >>confdefs.h <<\EOF
15974 #define GCC_PRINTF 1
15975 EOF
15976
15977                                 fi
15978
15979 cat >>confdefs.h <<EOF
15980 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15981 EOF
15982
15983                                 ;;
15984                         (scanf)
15985                                 cf_value='/* nothing */'
15986                                 if test "$cf_scanf_attribute" != no ; then
15987                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15988
15989 cat >>confdefs.h <<\EOF
15990 #define GCC_SCANF 1
15991 EOF
15992
15993                                 fi
15994
15995 cat >>confdefs.h <<EOF
15996 #define GCC_SCANFLIKE(fmt,var) $cf_value
15997 EOF
15998
15999                                 ;;
16000                         (unused)
16001
16002 cat >>confdefs.h <<EOF
16003 #define GCC_UNUSED $cf_directive
16004 EOF
16005
16006                                 ;;
16007                         esac
16008                 fi
16009         done
16010 else
16011         fgrep define conftest.i >>confdefs.h
16012 fi
16013 rm -rf conftest*
16014 fi
16015
16016 echo "$as_me:16016: checking if you want to work around bogus compiler/loader warnings" >&5
16017 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16018
16019 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16020 if test "${enable_string_hacks+set}" = set; then
16021   enableval="$enable_string_hacks"
16022   with_string_hacks=$enableval
16023 else
16024   with_string_hacks=no
16025 fi;
16026 echo "$as_me:16026: result: $with_string_hacks" >&5
16027 echo "${ECHO_T}$with_string_hacks" >&6
16028
16029 if test "x$with_string_hacks" = "xyes"; then
16030
16031 cat >>confdefs.h <<\EOF
16032 #define USE_STRING_HACKS 1
16033 EOF
16034
16035         { echo "$as_me:16035: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16036 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16037         echo "$as_me:16037: checking for strlcat" >&5
16038 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16039 if test "${ac_cv_func_strlcat+set}" = set; then
16040   echo $ECHO_N "(cached) $ECHO_C" >&6
16041 else
16042   cat >conftest.$ac_ext <<_ACEOF
16043 #line 16043 "configure"
16044 #include "confdefs.h"
16045 #define strlcat autoconf_temporary
16046 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16047 #undef strlcat
16048
16049 #ifdef __cplusplus
16050 extern "C"
16051 #endif
16052
16053 /* We use char because int might match the return type of a gcc2
16054    builtin and then its argument prototype would still apply.  */
16055 char strlcat (void);
16056
16057 int
16058 main (void)
16059 {
16060
16061 /* The GNU C library defines stubs for functions which it implements
16062     to always fail with ENOSYS.  Some functions are actually named
16063     something starting with __ and the normal name is an alias.  */
16064 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16065 #error found stub for strlcat
16066 #endif
16067
16068         return strlcat ();
16069   ;
16070   return 0;
16071 }
16072 _ACEOF
16073 rm -f conftest.$ac_objext conftest$ac_exeext
16074 if { (eval echo "$as_me:16074: \"$ac_link\"") >&5
16075   (eval $ac_link) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); } &&
16079          { ac_try='test -s conftest$ac_exeext'
16080   { (eval echo "$as_me:16080: \"$ac_try\"") >&5
16081   (eval $ac_try) 2>&5
16082   ac_status=$?
16083   echo "$as_me:16083: \$? = $ac_status" >&5
16084   (exit $ac_status); }; }; then
16085   ac_cv_func_strlcat=yes
16086 else
16087   echo "$as_me: failed program was:" >&5
16088 cat conftest.$ac_ext >&5
16089 ac_cv_func_strlcat=no
16090 fi
16091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16092 fi
16093 echo "$as_me:16093: result: $ac_cv_func_strlcat" >&5
16094 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16095 if test $ac_cv_func_strlcat = yes; then
16096
16097 cat >>confdefs.h <<\EOF
16098 #define HAVE_STRLCAT 1
16099 EOF
16100
16101 else
16102
16103                 echo "$as_me:16103: checking for strlcat in -lbsd" >&5
16104 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16105 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16106   echo $ECHO_N "(cached) $ECHO_C" >&6
16107 else
16108   ac_check_lib_save_LIBS=$LIBS
16109 LIBS="-lbsd  $LIBS"
16110 cat >conftest.$ac_ext <<_ACEOF
16111 #line 16111 "configure"
16112 #include "confdefs.h"
16113
16114 /* Override any gcc2 internal prototype to avoid an error.  */
16115 #ifdef __cplusplus
16116 extern "C"
16117 #endif
16118 /* We use char because int might match the return type of a gcc2
16119    builtin and then its argument prototype would still apply.  */
16120 char strlcat ();
16121 int
16122 main (void)
16123 {
16124 strlcat ();
16125   ;
16126   return 0;
16127 }
16128 _ACEOF
16129 rm -f conftest.$ac_objext conftest$ac_exeext
16130 if { (eval echo "$as_me:16130: \"$ac_link\"") >&5
16131   (eval $ac_link) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } &&
16135          { ac_try='test -s conftest$ac_exeext'
16136   { (eval echo "$as_me:16136: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:16139: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   ac_cv_lib_bsd_strlcat=yes
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 cat conftest.$ac_ext >&5
16145 ac_cv_lib_bsd_strlcat=no
16146 fi
16147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16148 LIBS=$ac_check_lib_save_LIBS
16149 fi
16150 echo "$as_me:16150: result: $ac_cv_lib_bsd_strlcat" >&5
16151 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16152 if test $ac_cv_lib_bsd_strlcat = yes; then
16153
16154 cf_add_libs="$LIBS"
16155 # reverse order
16156 cf_add_0lib=
16157 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16158 # filter duplicates
16159 for cf_add_1lib in $cf_add_0lib; do
16160         for cf_add_2lib in $cf_add_libs; do
16161                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16162                         cf_add_1lib=
16163                         break
16164                 fi
16165         done
16166         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16167 done
16168 LIBS="$cf_add_libs"
16169
16170 for ac_header in bsd/string.h
16171 do
16172 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16173 echo "$as_me:16173: checking for $ac_header" >&5
16174 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16176   echo $ECHO_N "(cached) $ECHO_C" >&6
16177 else
16178   cat >conftest.$ac_ext <<_ACEOF
16179 #line 16179 "configure"
16180 #include "confdefs.h"
16181 #include <$ac_header>
16182 _ACEOF
16183 if { (eval echo "$as_me:16183: \"$ac_cpp conftest.$ac_ext\"") >&5
16184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16185   ac_status=$?
16186   egrep -v '^ *\+' conftest.er1 >conftest.err
16187   rm -f conftest.er1
16188   cat conftest.err >&5
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); } >/dev/null; then
16191   if test -s conftest.err; then
16192     ac_cpp_err=$ac_c_preproc_warn_flag
16193   else
16194     ac_cpp_err=
16195   fi
16196 else
16197   ac_cpp_err=yes
16198 fi
16199 if test -z "$ac_cpp_err"; then
16200   eval "$as_ac_Header=yes"
16201 else
16202   echo "$as_me: failed program was:" >&5
16203   cat conftest.$ac_ext >&5
16204   eval "$as_ac_Header=no"
16205 fi
16206 rm -f conftest.err conftest.$ac_ext
16207 fi
16208 echo "$as_me:16208: result: `eval echo '${'$as_ac_Header'}'`" >&5
16209 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16210 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16211   cat >>confdefs.h <<EOF
16212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16213 EOF
16214
16215 fi
16216 done
16217
16218 cat >>confdefs.h <<\EOF
16219 #define HAVE_STRLCAT 1
16220 EOF
16221
16222 fi
16223
16224 fi
16225
16226 for ac_func in strlcpy snprintf
16227 do
16228 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16229 echo "$as_me:16229: checking for $ac_func" >&5
16230 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16231 if eval "test \"\${$as_ac_var+set}\" = set"; then
16232   echo $ECHO_N "(cached) $ECHO_C" >&6
16233 else
16234   cat >conftest.$ac_ext <<_ACEOF
16235 #line 16235 "configure"
16236 #include "confdefs.h"
16237 #define $ac_func autoconf_temporary
16238 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16239 #undef $ac_func
16240
16241 #ifdef __cplusplus
16242 extern "C"
16243 #endif
16244
16245 /* We use char because int might match the return type of a gcc2
16246    builtin and then its argument prototype would still apply.  */
16247 char $ac_func (void);
16248
16249 int
16250 main (void)
16251 {
16252
16253 /* The GNU C library defines stubs for functions which it implements
16254     to always fail with ENOSYS.  Some functions are actually named
16255     something starting with __ and the normal name is an alias.  */
16256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16257 #error found stub for $ac_func
16258 #endif
16259
16260         return $ac_func ();
16261   ;
16262   return 0;
16263 }
16264 _ACEOF
16265 rm -f conftest.$ac_objext conftest$ac_exeext
16266 if { (eval echo "$as_me:16266: \"$ac_link\"") >&5
16267   (eval $ac_link) 2>&5
16268   ac_status=$?
16269   echo "$as_me:16269: \$? = $ac_status" >&5
16270   (exit $ac_status); } &&
16271          { ac_try='test -s conftest$ac_exeext'
16272   { (eval echo "$as_me:16272: \"$ac_try\"") >&5
16273   (eval $ac_try) 2>&5
16274   ac_status=$?
16275   echo "$as_me:16275: \$? = $ac_status" >&5
16276   (exit $ac_status); }; }; then
16277   eval "$as_ac_var=yes"
16278 else
16279   echo "$as_me: failed program was:" >&5
16280 cat conftest.$ac_ext >&5
16281 eval "$as_ac_var=no"
16282 fi
16283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16284 fi
16285 echo "$as_me:16285: result: `eval echo '${'$as_ac_var'}'`" >&5
16286 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16287 if test `eval echo '${'$as_ac_var'}'` = yes; then
16288   cat >>confdefs.h <<EOF
16289 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16290 EOF
16291
16292 fi
16293 done
16294
16295 fi
16296
16297 ###     use option --enable-assertions to turn on generation of assertion code
16298 echo "$as_me:16298: checking if you want to enable runtime assertions" >&5
16299 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16300
16301 # Check whether --enable-assertions or --disable-assertions was given.
16302 if test "${enable_assertions+set}" = set; then
16303   enableval="$enable_assertions"
16304   with_assertions=$enableval
16305 else
16306   with_assertions=no
16307 fi;
16308 echo "$as_me:16308: result: $with_assertions" >&5
16309 echo "${ECHO_T}$with_assertions" >&6
16310 if test -n "$GCC"
16311 then
16312         if test "$with_assertions" = no
16313         then
16314                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16315         else
16316
16317         ADAFLAGS="$ADAFLAGS -gnata"
16318
16319         fi
16320 fi
16321
16322 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16323
16324 echo "$as_me:16324: checking if you want to use dmalloc for testing" >&5
16325 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16326
16327 # Check whether --with-dmalloc or --without-dmalloc was given.
16328 if test "${with_dmalloc+set}" = set; then
16329   withval="$with_dmalloc"
16330
16331 cat >>confdefs.h <<EOF
16332 #define USE_DMALLOC 1
16333 EOF
16334
16335         : ${with_cflags:=-g}
16336         : ${with_no_leaks:=yes}
16337          with_dmalloc=yes
16338 else
16339   with_dmalloc=
16340 fi;
16341 echo "$as_me:16341: result: ${with_dmalloc:-no}" >&5
16342 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16343
16344 case .$with_cflags in
16345 (.*-g*)
16346         case .$CFLAGS in
16347         (.*-g*)
16348                 ;;
16349         (*)
16350
16351 cf_fix_cppflags=no
16352 cf_new_cflags=
16353 cf_new_cppflags=
16354 cf_new_extra_cppflags=
16355
16356 for cf_add_cflags in -g
16357 do
16358 case $cf_fix_cppflags in
16359 (no)
16360         case $cf_add_cflags in
16361         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16362                 case $cf_add_cflags in
16363                 (-D*)
16364                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16365
16366                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16367                                 && test -z "${cf_tst_cflags}" \
16368                                 && cf_fix_cppflags=yes
16369
16370                         if test $cf_fix_cppflags = yes ; then
16371
16372         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16373         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16374
16375                                 continue
16376                         elif test "${cf_tst_cflags}" = "\"'" ; then
16377
16378         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16379         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16380
16381                                 continue
16382                         fi
16383                         ;;
16384                 esac
16385                 case "$CPPFLAGS" in
16386                 (*$cf_add_cflags)
16387                         ;;
16388                 (*)
16389                         case $cf_add_cflags in
16390                         (-D*)
16391                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16392
16393 CPPFLAGS=`echo "$CPPFLAGS" | \
16394         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16395                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16396
16397                                 ;;
16398                         esac
16399
16400         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16401         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16402
16403                         ;;
16404                 esac
16405                 ;;
16406         (*)
16407
16408         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16409         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16410
16411                 ;;
16412         esac
16413         ;;
16414 (yes)
16415
16416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16418
16419         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16420
16421         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16422                 && test -z "${cf_tst_cflags}" \
16423                 && cf_fix_cppflags=no
16424         ;;
16425 esac
16426 done
16427
16428 if test -n "$cf_new_cflags" ; then
16429
16430         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16431         CFLAGS="${CFLAGS}$cf_new_cflags"
16432
16433 fi
16434
16435 if test -n "$cf_new_cppflags" ; then
16436
16437         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16438         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16439
16440 fi
16441
16442 if test -n "$cf_new_extra_cppflags" ; then
16443
16444         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16445         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16446
16447 fi
16448
16449                 ;;
16450         esac
16451         ;;
16452 esac
16453
16454 if test "$with_dmalloc" = yes ; then
16455         echo "$as_me:16455: checking for dmalloc.h" >&5
16456 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16457 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16458   echo $ECHO_N "(cached) $ECHO_C" >&6
16459 else
16460   cat >conftest.$ac_ext <<_ACEOF
16461 #line 16461 "configure"
16462 #include "confdefs.h"
16463 #include <dmalloc.h>
16464 _ACEOF
16465 if { (eval echo "$as_me:16465: \"$ac_cpp conftest.$ac_ext\"") >&5
16466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16467   ac_status=$?
16468   egrep -v '^ *\+' conftest.er1 >conftest.err
16469   rm -f conftest.er1
16470   cat conftest.err >&5
16471   echo "$as_me:16471: \$? = $ac_status" >&5
16472   (exit $ac_status); } >/dev/null; then
16473   if test -s conftest.err; then
16474     ac_cpp_err=$ac_c_preproc_warn_flag
16475   else
16476     ac_cpp_err=
16477   fi
16478 else
16479   ac_cpp_err=yes
16480 fi
16481 if test -z "$ac_cpp_err"; then
16482   ac_cv_header_dmalloc_h=yes
16483 else
16484   echo "$as_me: failed program was:" >&5
16485   cat conftest.$ac_ext >&5
16486   ac_cv_header_dmalloc_h=no
16487 fi
16488 rm -f conftest.err conftest.$ac_ext
16489 fi
16490 echo "$as_me:16490: result: $ac_cv_header_dmalloc_h" >&5
16491 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16492 if test $ac_cv_header_dmalloc_h = yes; then
16493
16494 echo "$as_me:16494: checking for dmalloc_debug in -ldmalloc" >&5
16495 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16496 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16497   echo $ECHO_N "(cached) $ECHO_C" >&6
16498 else
16499   ac_check_lib_save_LIBS=$LIBS
16500 LIBS="-ldmalloc  $LIBS"
16501 cat >conftest.$ac_ext <<_ACEOF
16502 #line 16502 "configure"
16503 #include "confdefs.h"
16504
16505 /* Override any gcc2 internal prototype to avoid an error.  */
16506 #ifdef __cplusplus
16507 extern "C"
16508 #endif
16509 /* We use char because int might match the return type of a gcc2
16510    builtin and then its argument prototype would still apply.  */
16511 char dmalloc_debug ();
16512 int
16513 main (void)
16514 {
16515 dmalloc_debug ();
16516   ;
16517   return 0;
16518 }
16519 _ACEOF
16520 rm -f conftest.$ac_objext conftest$ac_exeext
16521 if { (eval echo "$as_me:16521: \"$ac_link\"") >&5
16522   (eval $ac_link) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); } &&
16526          { ac_try='test -s conftest$ac_exeext'
16527   { (eval echo "$as_me:16527: \"$ac_try\"") >&5
16528   (eval $ac_try) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); }; }; then
16532   ac_cv_lib_dmalloc_dmalloc_debug=yes
16533 else
16534   echo "$as_me: failed program was:" >&5
16535 cat conftest.$ac_ext >&5
16536 ac_cv_lib_dmalloc_dmalloc_debug=no
16537 fi
16538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16539 LIBS=$ac_check_lib_save_LIBS
16540 fi
16541 echo "$as_me:16541: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16542 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16543 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16544   cat >>confdefs.h <<EOF
16545 #define HAVE_LIBDMALLOC 1
16546 EOF
16547
16548   LIBS="-ldmalloc $LIBS"
16549
16550 fi
16551
16552 fi
16553
16554 fi
16555
16556 echo "$as_me:16556: checking if you want to use dbmalloc for testing" >&5
16557 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16558
16559 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16560 if test "${with_dbmalloc+set}" = set; then
16561   withval="$with_dbmalloc"
16562
16563 cat >>confdefs.h <<EOF
16564 #define USE_DBMALLOC 1
16565 EOF
16566
16567         : ${with_cflags:=-g}
16568         : ${with_no_leaks:=yes}
16569          with_dbmalloc=yes
16570 else
16571   with_dbmalloc=
16572 fi;
16573 echo "$as_me:16573: result: ${with_dbmalloc:-no}" >&5
16574 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16575
16576 case .$with_cflags in
16577 (.*-g*)
16578         case .$CFLAGS in
16579         (.*-g*)
16580                 ;;
16581         (*)
16582
16583 cf_fix_cppflags=no
16584 cf_new_cflags=
16585 cf_new_cppflags=
16586 cf_new_extra_cppflags=
16587
16588 for cf_add_cflags in -g
16589 do
16590 case $cf_fix_cppflags in
16591 (no)
16592         case $cf_add_cflags in
16593         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16594                 case $cf_add_cflags in
16595                 (-D*)
16596                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16597
16598                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16599                                 && test -z "${cf_tst_cflags}" \
16600                                 && cf_fix_cppflags=yes
16601
16602                         if test $cf_fix_cppflags = yes ; then
16603
16604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16606
16607                                 continue
16608                         elif test "${cf_tst_cflags}" = "\"'" ; then
16609
16610         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16611         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16612
16613                                 continue
16614                         fi
16615                         ;;
16616                 esac
16617                 case "$CPPFLAGS" in
16618                 (*$cf_add_cflags)
16619                         ;;
16620                 (*)
16621                         case $cf_add_cflags in
16622                         (-D*)
16623                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16624
16625 CPPFLAGS=`echo "$CPPFLAGS" | \
16626         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16627                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16628
16629                                 ;;
16630                         esac
16631
16632         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16633         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16634
16635                         ;;
16636                 esac
16637                 ;;
16638         (*)
16639
16640         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16641         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16642
16643                 ;;
16644         esac
16645         ;;
16646 (yes)
16647
16648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16650
16651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16652
16653         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16654                 && test -z "${cf_tst_cflags}" \
16655                 && cf_fix_cppflags=no
16656         ;;
16657 esac
16658 done
16659
16660 if test -n "$cf_new_cflags" ; then
16661
16662         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16663         CFLAGS="${CFLAGS}$cf_new_cflags"
16664
16665 fi
16666
16667 if test -n "$cf_new_cppflags" ; then
16668
16669         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16670         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16671
16672 fi
16673
16674 if test -n "$cf_new_extra_cppflags" ; then
16675
16676         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16677         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16678
16679 fi
16680
16681                 ;;
16682         esac
16683         ;;
16684 esac
16685
16686 if test "$with_dbmalloc" = yes ; then
16687         echo "$as_me:16687: checking for dbmalloc.h" >&5
16688 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16689 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16690   echo $ECHO_N "(cached) $ECHO_C" >&6
16691 else
16692   cat >conftest.$ac_ext <<_ACEOF
16693 #line 16693 "configure"
16694 #include "confdefs.h"
16695 #include <dbmalloc.h>
16696 _ACEOF
16697 if { (eval echo "$as_me:16697: \"$ac_cpp conftest.$ac_ext\"") >&5
16698   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16699   ac_status=$?
16700   egrep -v '^ *\+' conftest.er1 >conftest.err
16701   rm -f conftest.er1
16702   cat conftest.err >&5
16703   echo "$as_me:16703: \$? = $ac_status" >&5
16704   (exit $ac_status); } >/dev/null; then
16705   if test -s conftest.err; then
16706     ac_cpp_err=$ac_c_preproc_warn_flag
16707   else
16708     ac_cpp_err=
16709   fi
16710 else
16711   ac_cpp_err=yes
16712 fi
16713 if test -z "$ac_cpp_err"; then
16714   ac_cv_header_dbmalloc_h=yes
16715 else
16716   echo "$as_me: failed program was:" >&5
16717   cat conftest.$ac_ext >&5
16718   ac_cv_header_dbmalloc_h=no
16719 fi
16720 rm -f conftest.err conftest.$ac_ext
16721 fi
16722 echo "$as_me:16722: result: $ac_cv_header_dbmalloc_h" >&5
16723 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16724 if test $ac_cv_header_dbmalloc_h = yes; then
16725
16726 echo "$as_me:16726: checking for debug_malloc in -ldbmalloc" >&5
16727 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16728 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16729   echo $ECHO_N "(cached) $ECHO_C" >&6
16730 else
16731   ac_check_lib_save_LIBS=$LIBS
16732 LIBS="-ldbmalloc  $LIBS"
16733 cat >conftest.$ac_ext <<_ACEOF
16734 #line 16734 "configure"
16735 #include "confdefs.h"
16736
16737 /* Override any gcc2 internal prototype to avoid an error.  */
16738 #ifdef __cplusplus
16739 extern "C"
16740 #endif
16741 /* We use char because int might match the return type of a gcc2
16742    builtin and then its argument prototype would still apply.  */
16743 char debug_malloc ();
16744 int
16745 main (void)
16746 {
16747 debug_malloc ();
16748   ;
16749   return 0;
16750 }
16751 _ACEOF
16752 rm -f conftest.$ac_objext conftest$ac_exeext
16753 if { (eval echo "$as_me:16753: \"$ac_link\"") >&5
16754   (eval $ac_link) 2>&5
16755   ac_status=$?
16756   echo "$as_me:16756: \$? = $ac_status" >&5
16757   (exit $ac_status); } &&
16758          { ac_try='test -s conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   ac_cv_lib_dbmalloc_debug_malloc=yes
16765 else
16766   echo "$as_me: failed program was:" >&5
16767 cat conftest.$ac_ext >&5
16768 ac_cv_lib_dbmalloc_debug_malloc=no
16769 fi
16770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16771 LIBS=$ac_check_lib_save_LIBS
16772 fi
16773 echo "$as_me:16773: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16774 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16775 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16776   cat >>confdefs.h <<EOF
16777 #define HAVE_LIBDBMALLOC 1
16778 EOF
16779
16780   LIBS="-ldbmalloc $LIBS"
16781
16782 fi
16783
16784 fi
16785
16786 fi
16787
16788 echo "$as_me:16788: checking if you want to use valgrind for testing" >&5
16789 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16790
16791 # Check whether --with-valgrind or --without-valgrind was given.
16792 if test "${with_valgrind+set}" = set; then
16793   withval="$with_valgrind"
16794
16795 cat >>confdefs.h <<EOF
16796 #define USE_VALGRIND 1
16797 EOF
16798
16799         : ${with_cflags:=-g}
16800         : ${with_no_leaks:=yes}
16801          with_valgrind=yes
16802 else
16803   with_valgrind=
16804 fi;
16805 echo "$as_me:16805: result: ${with_valgrind:-no}" >&5
16806 echo "${ECHO_T}${with_valgrind:-no}" >&6
16807
16808 case .$with_cflags in
16809 (.*-g*)
16810         case .$CFLAGS in
16811         (.*-g*)
16812                 ;;
16813         (*)
16814
16815 cf_fix_cppflags=no
16816 cf_new_cflags=
16817 cf_new_cppflags=
16818 cf_new_extra_cppflags=
16819
16820 for cf_add_cflags in -g
16821 do
16822 case $cf_fix_cppflags in
16823 (no)
16824         case $cf_add_cflags in
16825         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16826                 case $cf_add_cflags in
16827                 (-D*)
16828                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16829
16830                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16831                                 && test -z "${cf_tst_cflags}" \
16832                                 && cf_fix_cppflags=yes
16833
16834                         if test $cf_fix_cppflags = yes ; then
16835
16836         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16837         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16838
16839                                 continue
16840                         elif test "${cf_tst_cflags}" = "\"'" ; then
16841
16842         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16843         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16844
16845                                 continue
16846                         fi
16847                         ;;
16848                 esac
16849                 case "$CPPFLAGS" in
16850                 (*$cf_add_cflags)
16851                         ;;
16852                 (*)
16853                         case $cf_add_cflags in
16854                         (-D*)
16855                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16856
16857 CPPFLAGS=`echo "$CPPFLAGS" | \
16858         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16859                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16860
16861                                 ;;
16862                         esac
16863
16864         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16865         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16866
16867                         ;;
16868                 esac
16869                 ;;
16870         (*)
16871
16872         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16873         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16874
16875                 ;;
16876         esac
16877         ;;
16878 (yes)
16879
16880         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16881         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16882
16883         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16884
16885         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16886                 && test -z "${cf_tst_cflags}" \
16887                 && cf_fix_cppflags=no
16888         ;;
16889 esac
16890 done
16891
16892 if test -n "$cf_new_cflags" ; then
16893
16894         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16895         CFLAGS="${CFLAGS}$cf_new_cflags"
16896
16897 fi
16898
16899 if test -n "$cf_new_cppflags" ; then
16900
16901         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16902         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16903
16904 fi
16905
16906 if test -n "$cf_new_extra_cppflags" ; then
16907
16908         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16909         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16910
16911 fi
16912
16913                 ;;
16914         esac
16915         ;;
16916 esac
16917
16918 echo "$as_me:16918: checking if you want to perform memory-leak testing" >&5
16919 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16920
16921 # Check whether --enable-leaks or --disable-leaks was given.
16922 if test "${enable_leaks+set}" = set; then
16923   enableval="$enable_leaks"
16924   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16925 else
16926   : ${with_no_leaks:=no}
16927 fi;
16928 echo "$as_me:16928: result: $with_no_leaks" >&5
16929 echo "${ECHO_T}$with_no_leaks" >&6
16930
16931 if test "$with_no_leaks" = yes ; then
16932
16933 cat >>confdefs.h <<\EOF
16934 #define NO_LEAKS 1
16935 EOF
16936
16937 cat >>confdefs.h <<\EOF
16938 #define YY_NO_LEAKS 1
16939 EOF
16940
16941 fi
16942
16943 cat >>confdefs.h <<\EOF
16944 #define HAVE_NC_ALLOC_H 1
16945 EOF
16946
16947 ###     use option --enable-expanded to generate certain macros as functions
16948
16949 # Check whether --enable-expanded or --disable-expanded was given.
16950 if test "${enable_expanded+set}" = set; then
16951   enableval="$enable_expanded"
16952   test "x$enableval" = xyes &&
16953 cat >>confdefs.h <<\EOF
16954 #define NCURSES_EXPANDED 1
16955 EOF
16956
16957 fi;
16958
16959 ###     use option --disable-macros to suppress macros in favor of functions
16960
16961 # Check whether --enable-macros or --disable-macros was given.
16962 if test "${enable_macros+set}" = set; then
16963   enableval="$enable_macros"
16964   test "$enableval" = no &&
16965 cat >>confdefs.h <<\EOF
16966 #define NCURSES_NOMACROS 1
16967 EOF
16968
16969 fi;
16970
16971 # Normally we only add trace() to the debug-library.  Allow this to be
16972 # extended to all models of the ncurses library:
16973 cf_all_traces=no
16974 case "$CFLAGS $CPPFLAGS" in
16975 (*-DTRACE*)
16976         cf_all_traces=yes
16977         ;;
16978 esac
16979
16980 echo "$as_me:16980: checking whether to add trace feature to all models" >&5
16981 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16982
16983 # Check whether --with-trace or --without-trace was given.
16984 if test "${with_trace+set}" = set; then
16985   withval="$with_trace"
16986   cf_with_trace=$withval
16987 else
16988   cf_with_trace=$cf_all_traces
16989 fi;
16990 echo "$as_me:16990: result: $cf_with_trace" >&5
16991 echo "${ECHO_T}$cf_with_trace" >&6
16992
16993 if test "x$cf_with_trace" = xyes ; then
16994         LIB_TRACING=all
16995         ADA_TRACE=TRUE
16996
16997 cf_fix_cppflags=no
16998 cf_new_cflags=
16999 cf_new_cppflags=
17000 cf_new_extra_cppflags=
17001
17002 for cf_add_cflags in -DTRACE
17003 do
17004 case $cf_fix_cppflags in
17005 (no)
17006         case $cf_add_cflags in
17007         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17008                 case $cf_add_cflags in
17009                 (-D*)
17010                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17011
17012                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17013                                 && test -z "${cf_tst_cflags}" \
17014                                 && cf_fix_cppflags=yes
17015
17016                         if test $cf_fix_cppflags = yes ; then
17017
17018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17020
17021                                 continue
17022                         elif test "${cf_tst_cflags}" = "\"'" ; then
17023
17024         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17025         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17026
17027                                 continue
17028                         fi
17029                         ;;
17030                 esac
17031                 case "$CPPFLAGS" in
17032                 (*$cf_add_cflags)
17033                         ;;
17034                 (*)
17035                         case $cf_add_cflags in
17036                         (-D*)
17037                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17038
17039 CPPFLAGS=`echo "$CPPFLAGS" | \
17040         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17041                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17042
17043                                 ;;
17044                         esac
17045
17046         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17047         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17048
17049                         ;;
17050                 esac
17051                 ;;
17052         (*)
17053
17054         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17055         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17056
17057                 ;;
17058         esac
17059         ;;
17060 (yes)
17061
17062         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17063         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17064
17065         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17066
17067         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17068                 && test -z "${cf_tst_cflags}" \
17069                 && cf_fix_cppflags=no
17070         ;;
17071 esac
17072 done
17073
17074 if test -n "$cf_new_cflags" ; then
17075
17076         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17077         CFLAGS="${CFLAGS}$cf_new_cflags"
17078
17079 fi
17080
17081 if test -n "$cf_new_cppflags" ; then
17082
17083         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17084         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17085
17086 fi
17087
17088 if test -n "$cf_new_extra_cppflags" ; then
17089
17090         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17091         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17092
17093 fi
17094
17095 cat >>confdefs.h <<\EOF
17096 #define HAVE__TRACEF 1
17097 EOF
17098
17099 else
17100         LIB_TRACING=DEBUG
17101         ADA_TRACE=FALSE
17102 fi
17103
17104 echo "$as_me:17104: checking if we want to use GNAT projects" >&5
17105 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17106
17107 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17108 if test "${enable_gnat_projects+set}" = set; then
17109   enableval="$enable_gnat_projects"
17110   test "$enableval" != no && enableval=yes
17111         if test "$enableval" != "yes" ; then
17112     enable_gnat_projects=no
17113         else
17114                 enable_gnat_projects=yes
17115         fi
17116 else
17117   enableval=yes
17118         enable_gnat_projects=yes
17119
17120 fi;
17121 echo "$as_me:17121: result: $enable_gnat_projects" >&5
17122 echo "${ECHO_T}$enable_gnat_projects" >&6
17123
17124 ###     Checks for libraries.
17125 case $cf_cv_system_name in
17126 (*mingw32*|*mingw64*)
17127         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17128         # Note: WINVER may be a problem with Windows 10
17129         ;;
17130 (*)
17131 echo "$as_me:17131: checking for gettimeofday" >&5
17132 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17133 if test "${ac_cv_func_gettimeofday+set}" = set; then
17134   echo $ECHO_N "(cached) $ECHO_C" >&6
17135 else
17136   cat >conftest.$ac_ext <<_ACEOF
17137 #line 17137 "configure"
17138 #include "confdefs.h"
17139 #define gettimeofday autoconf_temporary
17140 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17141 #undef gettimeofday
17142
17143 #ifdef __cplusplus
17144 extern "C"
17145 #endif
17146
17147 /* We use char because int might match the return type of a gcc2
17148    builtin and then its argument prototype would still apply.  */
17149 char gettimeofday (void);
17150
17151 int
17152 main (void)
17153 {
17154
17155 /* The GNU C library defines stubs for functions which it implements
17156     to always fail with ENOSYS.  Some functions are actually named
17157     something starting with __ and the normal name is an alias.  */
17158 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17159 #error found stub for gettimeofday
17160 #endif
17161
17162         return gettimeofday ();
17163   ;
17164   return 0;
17165 }
17166 _ACEOF
17167 rm -f conftest.$ac_objext conftest$ac_exeext
17168 if { (eval echo "$as_me:17168: \"$ac_link\"") >&5
17169   (eval $ac_link) 2>&5
17170   ac_status=$?
17171   echo "$as_me:17171: \$? = $ac_status" >&5
17172   (exit $ac_status); } &&
17173          { ac_try='test -s conftest$ac_exeext'
17174   { (eval echo "$as_me:17174: \"$ac_try\"") >&5
17175   (eval $ac_try) 2>&5
17176   ac_status=$?
17177   echo "$as_me:17177: \$? = $ac_status" >&5
17178   (exit $ac_status); }; }; then
17179   ac_cv_func_gettimeofday=yes
17180 else
17181   echo "$as_me: failed program was:" >&5
17182 cat conftest.$ac_ext >&5
17183 ac_cv_func_gettimeofday=no
17184 fi
17185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17186 fi
17187 echo "$as_me:17187: result: $ac_cv_func_gettimeofday" >&5
17188 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17189 if test $ac_cv_func_gettimeofday = yes; then
17190
17191 cat >>confdefs.h <<\EOF
17192 #define HAVE_GETTIMEOFDAY 1
17193 EOF
17194
17195 else
17196
17197 echo "$as_me:17197: checking for gettimeofday in -lbsd" >&5
17198 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17199 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17200   echo $ECHO_N "(cached) $ECHO_C" >&6
17201 else
17202   ac_check_lib_save_LIBS=$LIBS
17203 LIBS="-lbsd  $LIBS"
17204 cat >conftest.$ac_ext <<_ACEOF
17205 #line 17205 "configure"
17206 #include "confdefs.h"
17207
17208 /* Override any gcc2 internal prototype to avoid an error.  */
17209 #ifdef __cplusplus
17210 extern "C"
17211 #endif
17212 /* We use char because int might match the return type of a gcc2
17213    builtin and then its argument prototype would still apply.  */
17214 char gettimeofday ();
17215 int
17216 main (void)
17217 {
17218 gettimeofday ();
17219   ;
17220   return 0;
17221 }
17222 _ACEOF
17223 rm -f conftest.$ac_objext conftest$ac_exeext
17224 if { (eval echo "$as_me:17224: \"$ac_link\"") >&5
17225   (eval $ac_link) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); } &&
17229          { ac_try='test -s conftest$ac_exeext'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); }; }; then
17235   ac_cv_lib_bsd_gettimeofday=yes
17236 else
17237   echo "$as_me: failed program was:" >&5
17238 cat conftest.$ac_ext >&5
17239 ac_cv_lib_bsd_gettimeofday=no
17240 fi
17241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17242 LIBS=$ac_check_lib_save_LIBS
17243 fi
17244 echo "$as_me:17244: result: $ac_cv_lib_bsd_gettimeofday" >&5
17245 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17246 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17247
17248 cat >>confdefs.h <<\EOF
17249 #define HAVE_GETTIMEOFDAY 1
17250 EOF
17251
17252 cf_add_libs="$LIBS"
17253 # reverse order
17254 cf_add_0lib=
17255 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17256 # filter duplicates
17257 for cf_add_1lib in $cf_add_0lib; do
17258         for cf_add_2lib in $cf_add_libs; do
17259                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17260                         cf_add_1lib=
17261                         break
17262                 fi
17263         done
17264         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17265 done
17266 LIBS="$cf_add_libs"
17267
17268 fi
17269
17270 fi
17271         ;;
17272 esac
17273
17274 echo "$as_me:17274: checking if -lm needed for math functions" >&5
17275 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17276 if test "${cf_cv_need_libm+set}" = set; then
17277   echo $ECHO_N "(cached) $ECHO_C" >&6
17278 else
17279
17280         cat >conftest.$ac_ext <<_ACEOF
17281 #line 17281 "configure"
17282 #include "confdefs.h"
17283
17284         #include <stdio.h>
17285         #include <stdlib.h>
17286         #include <math.h>
17287
17288 int
17289 main (void)
17290 {
17291 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17292   ;
17293   return 0;
17294 }
17295 _ACEOF
17296 rm -f conftest.$ac_objext conftest$ac_exeext
17297 if { (eval echo "$as_me:17297: \"$ac_link\"") >&5
17298   (eval $ac_link) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); } &&
17302          { ac_try='test -s conftest$ac_exeext'
17303   { (eval echo "$as_me:17303: \"$ac_try\"") >&5
17304   (eval $ac_try) 2>&5
17305   ac_status=$?
17306   echo "$as_me:17306: \$? = $ac_status" >&5
17307   (exit $ac_status); }; }; then
17308   cf_cv_need_libm=no
17309 else
17310   echo "$as_me: failed program was:" >&5
17311 cat conftest.$ac_ext >&5
17312 cf_cv_need_libm=yes
17313 fi
17314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17315 fi
17316 echo "$as_me:17316: result: $cf_cv_need_libm" >&5
17317 echo "${ECHO_T}$cf_cv_need_libm" >&6
17318 if test "$cf_cv_need_libm" = yes
17319 then
17320 MATH_LIB=-lm
17321 fi
17322
17323 ###     Checks for header files.
17324 echo "$as_me:17324: checking for ANSI C header files" >&5
17325 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17326 if test "${ac_cv_header_stdc+set}" = set; then
17327   echo $ECHO_N "(cached) $ECHO_C" >&6
17328 else
17329   cat >conftest.$ac_ext <<_ACEOF
17330 #line 17330 "configure"
17331 #include "confdefs.h"
17332 #include <stdlib.h>
17333 #include <stdarg.h>
17334 #include <string.h>
17335 #include <float.h>
17336
17337 _ACEOF
17338 if { (eval echo "$as_me:17338: \"$ac_cpp conftest.$ac_ext\"") >&5
17339   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17340   ac_status=$?
17341   egrep -v '^ *\+' conftest.er1 >conftest.err
17342   rm -f conftest.er1
17343   cat conftest.err >&5
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit $ac_status); } >/dev/null; then
17346   if test -s conftest.err; then
17347     ac_cpp_err=$ac_c_preproc_warn_flag
17348   else
17349     ac_cpp_err=
17350   fi
17351 else
17352   ac_cpp_err=yes
17353 fi
17354 if test -z "$ac_cpp_err"; then
17355   ac_cv_header_stdc=yes
17356 else
17357   echo "$as_me: failed program was:" >&5
17358   cat conftest.$ac_ext >&5
17359   ac_cv_header_stdc=no
17360 fi
17361 rm -f conftest.err conftest.$ac_ext
17362
17363 if test $ac_cv_header_stdc = yes; then
17364   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17365   cat >conftest.$ac_ext <<_ACEOF
17366 #line 17366 "configure"
17367 #include "confdefs.h"
17368 #include <string.h>
17369
17370 _ACEOF
17371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17372   egrep "memchr" >/dev/null 2>&1; then
17373   :
17374 else
17375   ac_cv_header_stdc=no
17376 fi
17377 rm -rf conftest*
17378
17379 fi
17380
17381 if test $ac_cv_header_stdc = yes; then
17382   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17383   cat >conftest.$ac_ext <<_ACEOF
17384 #line 17384 "configure"
17385 #include "confdefs.h"
17386 #include <stdlib.h>
17387
17388 _ACEOF
17389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17390   egrep "free" >/dev/null 2>&1; then
17391   :
17392 else
17393   ac_cv_header_stdc=no
17394 fi
17395 rm -rf conftest*
17396
17397 fi
17398
17399 if test $ac_cv_header_stdc = yes; then
17400   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17401   if test "$cross_compiling" = yes; then
17402   :
17403 else
17404   cat >conftest.$ac_ext <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17407 #include <ctype.h>
17408 #if ((' ' & 0x0FF) == 0x020)
17409 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17410 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17411 #else
17412 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17413                      || ('j' <= (c) && (c) <= 'r') \
17414                      || ('s' <= (c) && (c) <= 'z'))
17415 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17416 #endif
17417
17418 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17419 int
17420 main (void)
17421 {
17422   int i;
17423   for (i = 0; i < 256; i++)
17424     if (XOR (islower (i), ISLOWER (i))
17425         || toupper (i) != TOUPPER (i))
17426       $ac_main_return(2);
17427   $ac_main_return (0);
17428 }
17429 _ACEOF
17430 rm -f conftest$ac_exeext
17431 if { (eval echo "$as_me:17431: \"$ac_link\"") >&5
17432   (eval $ac_link) 2>&5
17433   ac_status=$?
17434   echo "$as_me:17434: \$? = $ac_status" >&5
17435   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17436   { (eval echo "$as_me:17436: \"$ac_try\"") >&5
17437   (eval $ac_try) 2>&5
17438   ac_status=$?
17439   echo "$as_me:17439: \$? = $ac_status" >&5
17440   (exit $ac_status); }; }; then
17441   :
17442 else
17443   echo "$as_me: program exited with status $ac_status" >&5
17444 echo "$as_me: failed program was:" >&5
17445 cat conftest.$ac_ext >&5
17446 ac_cv_header_stdc=no
17447 fi
17448 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17449 fi
17450 fi
17451 fi
17452 echo "$as_me:17452: result: $ac_cv_header_stdc" >&5
17453 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17454 if test $ac_cv_header_stdc = yes; then
17455
17456 cat >>confdefs.h <<\EOF
17457 #define STDC_HEADERS 1
17458 EOF
17459
17460 fi
17461
17462 ac_header_dirent=no
17463 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17464   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17465 echo "$as_me:17465: checking for $ac_hdr that defines DIR" >&5
17466 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17468   echo $ECHO_N "(cached) $ECHO_C" >&6
17469 else
17470   cat >conftest.$ac_ext <<_ACEOF
17471 #line 17471 "configure"
17472 #include "confdefs.h"
17473 #include <sys/types.h>
17474 #include <$ac_hdr>
17475
17476 int
17477 main (void)
17478 {
17479 if ((DIR *) 0)
17480 return 0;
17481   ;
17482   return 0;
17483 }
17484 _ACEOF
17485 rm -f conftest.$ac_objext
17486 if { (eval echo "$as_me:17486: \"$ac_compile\"") >&5
17487   (eval $ac_compile) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); } &&
17491          { ac_try='test -s conftest.$ac_objext'
17492   { (eval echo "$as_me:17492: \"$ac_try\"") >&5
17493   (eval $ac_try) 2>&5
17494   ac_status=$?
17495   echo "$as_me:17495: \$? = $ac_status" >&5
17496   (exit $ac_status); }; }; then
17497   eval "$as_ac_Header=yes"
17498 else
17499   echo "$as_me: failed program was:" >&5
17500 cat conftest.$ac_ext >&5
17501 eval "$as_ac_Header=no"
17502 fi
17503 rm -f conftest.$ac_objext conftest.$ac_ext
17504 fi
17505 echo "$as_me:17505: result: `eval echo '${'$as_ac_Header'}'`" >&5
17506 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17507 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17508   cat >>confdefs.h <<EOF
17509 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17510 EOF
17511
17512 ac_header_dirent=$ac_hdr; break
17513 fi
17514
17515 done
17516 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17517 if test $ac_header_dirent = dirent.h; then
17518   echo "$as_me:17518: checking for opendir in -ldir" >&5
17519 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17520 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17521   echo $ECHO_N "(cached) $ECHO_C" >&6
17522 else
17523   ac_check_lib_save_LIBS=$LIBS
17524 LIBS="-ldir  $LIBS"
17525 cat >conftest.$ac_ext <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528
17529 /* Override any gcc2 internal prototype to avoid an error.  */
17530 #ifdef __cplusplus
17531 extern "C"
17532 #endif
17533 /* We use char because int might match the return type of a gcc2
17534    builtin and then its argument prototype would still apply.  */
17535 char opendir ();
17536 int
17537 main (void)
17538 {
17539 opendir ();
17540   ;
17541   return 0;
17542 }
17543 _ACEOF
17544 rm -f conftest.$ac_objext conftest$ac_exeext
17545 if { (eval echo "$as_me:17545: \"$ac_link\"") >&5
17546   (eval $ac_link) 2>&5
17547   ac_status=$?
17548   echo "$as_me:17548: \$? = $ac_status" >&5
17549   (exit $ac_status); } &&
17550          { ac_try='test -s conftest$ac_exeext'
17551   { (eval echo "$as_me:17551: \"$ac_try\"") >&5
17552   (eval $ac_try) 2>&5
17553   ac_status=$?
17554   echo "$as_me:17554: \$? = $ac_status" >&5
17555   (exit $ac_status); }; }; then
17556   ac_cv_lib_dir_opendir=yes
17557 else
17558   echo "$as_me: failed program was:" >&5
17559 cat conftest.$ac_ext >&5
17560 ac_cv_lib_dir_opendir=no
17561 fi
17562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17563 LIBS=$ac_check_lib_save_LIBS
17564 fi
17565 echo "$as_me:17565: result: $ac_cv_lib_dir_opendir" >&5
17566 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17567 if test $ac_cv_lib_dir_opendir = yes; then
17568   LIBS="$LIBS -ldir"
17569 fi
17570
17571 else
17572   echo "$as_me:17572: checking for opendir in -lx" >&5
17573 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17574 if test "${ac_cv_lib_x_opendir+set}" = set; then
17575   echo $ECHO_N "(cached) $ECHO_C" >&6
17576 else
17577   ac_check_lib_save_LIBS=$LIBS
17578 LIBS="-lx  $LIBS"
17579 cat >conftest.$ac_ext <<_ACEOF
17580 #line 17580 "configure"
17581 #include "confdefs.h"
17582
17583 /* Override any gcc2 internal prototype to avoid an error.  */
17584 #ifdef __cplusplus
17585 extern "C"
17586 #endif
17587 /* We use char because int might match the return type of a gcc2
17588    builtin and then its argument prototype would still apply.  */
17589 char opendir ();
17590 int
17591 main (void)
17592 {
17593 opendir ();
17594   ;
17595   return 0;
17596 }
17597 _ACEOF
17598 rm -f conftest.$ac_objext conftest$ac_exeext
17599 if { (eval echo "$as_me:17599: \"$ac_link\"") >&5
17600   (eval $ac_link) 2>&5
17601   ac_status=$?
17602   echo "$as_me:17602: \$? = $ac_status" >&5
17603   (exit $ac_status); } &&
17604          { ac_try='test -s conftest$ac_exeext'
17605   { (eval echo "$as_me:17605: \"$ac_try\"") >&5
17606   (eval $ac_try) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit $ac_status); }; }; then
17610   ac_cv_lib_x_opendir=yes
17611 else
17612   echo "$as_me: failed program was:" >&5
17613 cat conftest.$ac_ext >&5
17614 ac_cv_lib_x_opendir=no
17615 fi
17616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17617 LIBS=$ac_check_lib_save_LIBS
17618 fi
17619 echo "$as_me:17619: result: $ac_cv_lib_x_opendir" >&5
17620 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17621 if test $ac_cv_lib_x_opendir = yes; then
17622   LIBS="$LIBS -lx"
17623 fi
17624
17625 fi
17626
17627 echo "$as_me:17627: checking whether time.h and sys/time.h may both be included" >&5
17628 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17629 if test "${ac_cv_header_time+set}" = set; then
17630   echo $ECHO_N "(cached) $ECHO_C" >&6
17631 else
17632   cat >conftest.$ac_ext <<_ACEOF
17633 #line 17633 "configure"
17634 #include "confdefs.h"
17635 #include <sys/types.h>
17636 #include <sys/time.h>
17637 #include <time.h>
17638
17639 int
17640 main (void)
17641 {
17642 if ((struct tm *) 0)
17643 return 0;
17644   ;
17645   return 0;
17646 }
17647 _ACEOF
17648 rm -f conftest.$ac_objext
17649 if { (eval echo "$as_me:17649: \"$ac_compile\"") >&5
17650   (eval $ac_compile) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit $ac_status); } &&
17654          { ac_try='test -s conftest.$ac_objext'
17655   { (eval echo "$as_me:17655: \"$ac_try\"") >&5
17656   (eval $ac_try) 2>&5
17657   ac_status=$?
17658   echo "$as_me:17658: \$? = $ac_status" >&5
17659   (exit $ac_status); }; }; then
17660   ac_cv_header_time=yes
17661 else
17662   echo "$as_me: failed program was:" >&5
17663 cat conftest.$ac_ext >&5
17664 ac_cv_header_time=no
17665 fi
17666 rm -f conftest.$ac_objext conftest.$ac_ext
17667 fi
17668 echo "$as_me:17668: result: $ac_cv_header_time" >&5
17669 echo "${ECHO_T}$ac_cv_header_time" >&6
17670 if test $ac_cv_header_time = yes; then
17671
17672 cat >>confdefs.h <<\EOF
17673 #define TIME_WITH_SYS_TIME 1
17674 EOF
17675
17676 fi
17677
17678 cf_regex_func=no
17679
17680 cf_regex_libs="regex re"
17681 case $host_os in
17682 (mingw*)
17683         cf_regex_libs="gnurx $cf_regex_libs"
17684         ;;
17685 esac
17686
17687 echo "$as_me:17687: checking for regcomp" >&5
17688 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17689 if test "${ac_cv_func_regcomp+set}" = set; then
17690   echo $ECHO_N "(cached) $ECHO_C" >&6
17691 else
17692   cat >conftest.$ac_ext <<_ACEOF
17693 #line 17693 "configure"
17694 #include "confdefs.h"
17695 #define regcomp autoconf_temporary
17696 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17697 #undef regcomp
17698
17699 #ifdef __cplusplus
17700 extern "C"
17701 #endif
17702
17703 /* We use char because int might match the return type of a gcc2
17704    builtin and then its argument prototype would still apply.  */
17705 char regcomp (void);
17706
17707 int
17708 main (void)
17709 {
17710
17711 /* The GNU C library defines stubs for functions which it implements
17712     to always fail with ENOSYS.  Some functions are actually named
17713     something starting with __ and the normal name is an alias.  */
17714 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17715 #error found stub for regcomp
17716 #endif
17717
17718         return regcomp ();
17719   ;
17720   return 0;
17721 }
17722 _ACEOF
17723 rm -f conftest.$ac_objext conftest$ac_exeext
17724 if { (eval echo "$as_me:17724: \"$ac_link\"") >&5
17725   (eval $ac_link) 2>&5
17726   ac_status=$?
17727   echo "$as_me:17727: \$? = $ac_status" >&5
17728   (exit $ac_status); } &&
17729          { ac_try='test -s conftest$ac_exeext'
17730   { (eval echo "$as_me:17730: \"$ac_try\"") >&5
17731   (eval $ac_try) 2>&5
17732   ac_status=$?
17733   echo "$as_me:17733: \$? = $ac_status" >&5
17734   (exit $ac_status); }; }; then
17735   ac_cv_func_regcomp=yes
17736 else
17737   echo "$as_me: failed program was:" >&5
17738 cat conftest.$ac_ext >&5
17739 ac_cv_func_regcomp=no
17740 fi
17741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17742 fi
17743 echo "$as_me:17743: result: $ac_cv_func_regcomp" >&5
17744 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17745 if test $ac_cv_func_regcomp = yes; then
17746   cf_regex_func=regcomp
17747 else
17748
17749         for cf_regex_lib in $cf_regex_libs
17750         do
17751                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17752 echo "$as_me:17752: checking for regcomp in -l$cf_regex_lib" >&5
17753 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17754 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17755   echo $ECHO_N "(cached) $ECHO_C" >&6
17756 else
17757   ac_check_lib_save_LIBS=$LIBS
17758 LIBS="-l$cf_regex_lib  $LIBS"
17759 cat >conftest.$ac_ext <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762
17763 /* Override any gcc2 internal prototype to avoid an error.  */
17764 #ifdef __cplusplus
17765 extern "C"
17766 #endif
17767 /* We use char because int might match the return type of a gcc2
17768    builtin and then its argument prototype would still apply.  */
17769 char regcomp ();
17770 int
17771 main (void)
17772 {
17773 regcomp ();
17774   ;
17775   return 0;
17776 }
17777 _ACEOF
17778 rm -f conftest.$ac_objext conftest$ac_exeext
17779 if { (eval echo "$as_me:17779: \"$ac_link\"") >&5
17780   (eval $ac_link) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit $ac_status); } &&
17784          { ac_try='test -s conftest$ac_exeext'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); }; }; then
17790   eval "$as_ac_Lib=yes"
17791 else
17792   echo "$as_me: failed program was:" >&5
17793 cat conftest.$ac_ext >&5
17794 eval "$as_ac_Lib=no"
17795 fi
17796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17797 LIBS=$ac_check_lib_save_LIBS
17798 fi
17799 echo "$as_me:17799: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17800 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17801 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17802
17803 cf_add_libs="$LIBS"
17804 # reverse order
17805 cf_add_0lib=
17806 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17807 # filter duplicates
17808 for cf_add_1lib in $cf_add_0lib; do
17809         for cf_add_2lib in $cf_add_libs; do
17810                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17811                         cf_add_1lib=
17812                         break
17813                 fi
17814         done
17815         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17816 done
17817 LIBS="$cf_add_libs"
17818
17819                                 cf_regex_func=regcomp
17820                                 break
17821 fi
17822
17823         done
17824
17825 fi
17826
17827 if test "$cf_regex_func" = no ; then
17828         echo "$as_me:17828: checking for compile" >&5
17829 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17830 if test "${ac_cv_func_compile+set}" = set; then
17831   echo $ECHO_N "(cached) $ECHO_C" >&6
17832 else
17833   cat >conftest.$ac_ext <<_ACEOF
17834 #line 17834 "configure"
17835 #include "confdefs.h"
17836 #define compile autoconf_temporary
17837 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17838 #undef compile
17839
17840 #ifdef __cplusplus
17841 extern "C"
17842 #endif
17843
17844 /* We use char because int might match the return type of a gcc2
17845    builtin and then its argument prototype would still apply.  */
17846 char compile (void);
17847
17848 int
17849 main (void)
17850 {
17851
17852 /* The GNU C library defines stubs for functions which it implements
17853     to always fail with ENOSYS.  Some functions are actually named
17854     something starting with __ and the normal name is an alias.  */
17855 #if defined (__stub_compile) || defined (__stub___compile)
17856 #error found stub for compile
17857 #endif
17858
17859         return compile ();
17860   ;
17861   return 0;
17862 }
17863 _ACEOF
17864 rm -f conftest.$ac_objext conftest$ac_exeext
17865 if { (eval echo "$as_me:17865: \"$ac_link\"") >&5
17866   (eval $ac_link) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit $ac_status); } &&
17870          { ac_try='test -s conftest$ac_exeext'
17871   { (eval echo "$as_me:17871: \"$ac_try\"") >&5
17872   (eval $ac_try) 2>&5
17873   ac_status=$?
17874   echo "$as_me:17874: \$? = $ac_status" >&5
17875   (exit $ac_status); }; }; then
17876   ac_cv_func_compile=yes
17877 else
17878   echo "$as_me: failed program was:" >&5
17879 cat conftest.$ac_ext >&5
17880 ac_cv_func_compile=no
17881 fi
17882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17883 fi
17884 echo "$as_me:17884: result: $ac_cv_func_compile" >&5
17885 echo "${ECHO_T}$ac_cv_func_compile" >&6
17886 if test $ac_cv_func_compile = yes; then
17887   cf_regex_func=compile
17888 else
17889
17890                 echo "$as_me:17890: checking for compile in -lgen" >&5
17891 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17892 if test "${ac_cv_lib_gen_compile+set}" = set; then
17893   echo $ECHO_N "(cached) $ECHO_C" >&6
17894 else
17895   ac_check_lib_save_LIBS=$LIBS
17896 LIBS="-lgen  $LIBS"
17897 cat >conftest.$ac_ext <<_ACEOF
17898 #line 17898 "configure"
17899 #include "confdefs.h"
17900
17901 /* Override any gcc2 internal prototype to avoid an error.  */
17902 #ifdef __cplusplus
17903 extern "C"
17904 #endif
17905 /* We use char because int might match the return type of a gcc2
17906    builtin and then its argument prototype would still apply.  */
17907 char compile ();
17908 int
17909 main (void)
17910 {
17911 compile ();
17912   ;
17913   return 0;
17914 }
17915 _ACEOF
17916 rm -f conftest.$ac_objext conftest$ac_exeext
17917 if { (eval echo "$as_me:17917: \"$ac_link\"") >&5
17918   (eval $ac_link) 2>&5
17919   ac_status=$?
17920   echo "$as_me:17920: \$? = $ac_status" >&5
17921   (exit $ac_status); } &&
17922          { ac_try='test -s conftest$ac_exeext'
17923   { (eval echo "$as_me:17923: \"$ac_try\"") >&5
17924   (eval $ac_try) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); }; }; then
17928   ac_cv_lib_gen_compile=yes
17929 else
17930   echo "$as_me: failed program was:" >&5
17931 cat conftest.$ac_ext >&5
17932 ac_cv_lib_gen_compile=no
17933 fi
17934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17935 LIBS=$ac_check_lib_save_LIBS
17936 fi
17937 echo "$as_me:17937: result: $ac_cv_lib_gen_compile" >&5
17938 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17939 if test $ac_cv_lib_gen_compile = yes; then
17940
17941 cf_add_libs="$LIBS"
17942 # reverse order
17943 cf_add_0lib=
17944 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17945 # filter duplicates
17946 for cf_add_1lib in $cf_add_0lib; do
17947         for cf_add_2lib in $cf_add_libs; do
17948                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17949                         cf_add_1lib=
17950                         break
17951                 fi
17952         done
17953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17954 done
17955 LIBS="$cf_add_libs"
17956
17957                                 cf_regex_func=compile
17958 fi
17959
17960 fi
17961
17962 fi
17963
17964 if test "$cf_regex_func" = no ; then
17965         { echo "$as_me:17965: WARNING: cannot find regular expression library" >&5
17966 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17967 fi
17968
17969 echo "$as_me:17969: checking for regular-expression headers" >&5
17970 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17971 if test "${cf_cv_regex_hdrs+set}" = set; then
17972   echo $ECHO_N "(cached) $ECHO_C" >&6
17973 else
17974
17975 cf_cv_regex_hdrs=no
17976 case $cf_regex_func in
17977 (compile)
17978         for cf_regex_hdr in regexp.h regexpr.h
17979         do
17980                 cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983 #include <$cf_regex_hdr>
17984 int
17985 main (void)
17986 {
17987
17988                         char *p = compile("", "", "", 0);
17989                         int x = step("", "");
17990
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext conftest$ac_exeext
17996 if { (eval echo "$as_me:17996: \"$ac_link\"") >&5
17997   (eval $ac_link) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest$ac_exeext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007
18008                         cf_cv_regex_hdrs=$cf_regex_hdr
18009                         break
18010
18011 else
18012   echo "$as_me: failed program was:" >&5
18013 cat conftest.$ac_ext >&5
18014 fi
18015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18016         done
18017         ;;
18018 (*)
18019         for cf_regex_hdr in regex.h
18020         do
18021                 cat >conftest.$ac_ext <<_ACEOF
18022 #line 18022 "configure"
18023 #include "confdefs.h"
18024 #include <sys/types.h>
18025 #include <$cf_regex_hdr>
18026 int
18027 main (void)
18028 {
18029
18030                         regex_t *p;
18031                         int x = regcomp(p, "", 0);
18032                         int y = regexec(p, "", 0, 0, 0);
18033                         regfree(p);
18034
18035   ;
18036   return 0;
18037 }
18038 _ACEOF
18039 rm -f conftest.$ac_objext conftest$ac_exeext
18040 if { (eval echo "$as_me:18040: \"$ac_link\"") >&5
18041   (eval $ac_link) 2>&5
18042   ac_status=$?
18043   echo "$as_me:18043: \$? = $ac_status" >&5
18044   (exit $ac_status); } &&
18045          { ac_try='test -s conftest$ac_exeext'
18046   { (eval echo "$as_me:18046: \"$ac_try\"") >&5
18047   (eval $ac_try) 2>&5
18048   ac_status=$?
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit $ac_status); }; }; then
18051
18052                         cf_cv_regex_hdrs=$cf_regex_hdr
18053                         break
18054
18055 else
18056   echo "$as_me: failed program was:" >&5
18057 cat conftest.$ac_ext >&5
18058 fi
18059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18060         done
18061         ;;
18062 esac
18063
18064 fi
18065 echo "$as_me:18065: result: $cf_cv_regex_hdrs" >&5
18066 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18067
18068 case $cf_cv_regex_hdrs in
18069         (no)            { echo "$as_me:18069: WARNING: no regular expression header found" >&5
18070 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18071         (regex.h)
18072 cat >>confdefs.h <<\EOF
18073 #define HAVE_REGEX_H_FUNCS 1
18074 EOF
18075  ;;
18076         (regexp.h)
18077 cat >>confdefs.h <<\EOF
18078 #define HAVE_REGEXP_H_FUNCS 1
18079 EOF
18080  ;;
18081         (regexpr.h)
18082 cat >>confdefs.h <<\EOF
18083 #define HAVE_REGEXPR_H_FUNCS 1
18084 EOF
18085  ;;
18086 esac
18087
18088 for ac_header in \
18089 fcntl.h \
18090 getopt.h \
18091 limits.h \
18092 locale.h \
18093 math.h \
18094 poll.h \
18095 sys/bsdtypes.h \
18096 sys/ioctl.h \
18097 sys/param.h \
18098 sys/poll.h \
18099 sys/select.h \
18100 sys/time.h \
18101 sys/times.h \
18102 ttyent.h \
18103 unistd.h \
18104 wctype.h \
18105
18106 do
18107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18108 echo "$as_me:18108: checking for $ac_header" >&5
18109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18111   echo $ECHO_N "(cached) $ECHO_C" >&6
18112 else
18113   cat >conftest.$ac_ext <<_ACEOF
18114 #line 18114 "configure"
18115 #include "confdefs.h"
18116 #include <$ac_header>
18117 _ACEOF
18118 if { (eval echo "$as_me:18118: \"$ac_cpp conftest.$ac_ext\"") >&5
18119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18120   ac_status=$?
18121   egrep -v '^ *\+' conftest.er1 >conftest.err
18122   rm -f conftest.er1
18123   cat conftest.err >&5
18124   echo "$as_me:18124: \$? = $ac_status" >&5
18125   (exit $ac_status); } >/dev/null; then
18126   if test -s conftest.err; then
18127     ac_cpp_err=$ac_c_preproc_warn_flag
18128   else
18129     ac_cpp_err=
18130   fi
18131 else
18132   ac_cpp_err=yes
18133 fi
18134 if test -z "$ac_cpp_err"; then
18135   eval "$as_ac_Header=yes"
18136 else
18137   echo "$as_me: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   eval "$as_ac_Header=no"
18140 fi
18141 rm -f conftest.err conftest.$ac_ext
18142 fi
18143 echo "$as_me:18143: result: `eval echo '${'$as_ac_Header'}'`" >&5
18144 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18145 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18146   cat >>confdefs.h <<EOF
18147 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18148 EOF
18149
18150 fi
18151 done
18152
18153 for ac_header in unistd.h getopt.h
18154 do
18155 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18156 echo "$as_me:18156: checking for $ac_header" >&5
18157 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18158 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18159   echo $ECHO_N "(cached) $ECHO_C" >&6
18160 else
18161   cat >conftest.$ac_ext <<_ACEOF
18162 #line 18162 "configure"
18163 #include "confdefs.h"
18164 #include <$ac_header>
18165 _ACEOF
18166 if { (eval echo "$as_me:18166: \"$ac_cpp conftest.$ac_ext\"") >&5
18167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18168   ac_status=$?
18169   egrep -v '^ *\+' conftest.er1 >conftest.err
18170   rm -f conftest.er1
18171   cat conftest.err >&5
18172   echo "$as_me:18172: \$? = $ac_status" >&5
18173   (exit $ac_status); } >/dev/null; then
18174   if test -s conftest.err; then
18175     ac_cpp_err=$ac_c_preproc_warn_flag
18176   else
18177     ac_cpp_err=
18178   fi
18179 else
18180   ac_cpp_err=yes
18181 fi
18182 if test -z "$ac_cpp_err"; then
18183   eval "$as_ac_Header=yes"
18184 else
18185   echo "$as_me: failed program was:" >&5
18186   cat conftest.$ac_ext >&5
18187   eval "$as_ac_Header=no"
18188 fi
18189 rm -f conftest.err conftest.$ac_ext
18190 fi
18191 echo "$as_me:18191: result: `eval echo '${'$as_ac_Header'}'`" >&5
18192 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18193 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18194   cat >>confdefs.h <<EOF
18195 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18196 EOF
18197
18198 fi
18199 done
18200
18201 echo "$as_me:18201: checking for header declaring getopt variables" >&5
18202 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18203 if test "${cf_cv_getopt_header+set}" = set; then
18204   echo $ECHO_N "(cached) $ECHO_C" >&6
18205 else
18206
18207 cf_cv_getopt_header=none
18208 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18209 do
18210 cat >conftest.$ac_ext <<_ACEOF
18211 #line 18211 "configure"
18212 #include "confdefs.h"
18213
18214 #include <$cf_header>
18215 int
18216 main (void)
18217 {
18218 int x = optind; char *y = optarg
18219   ;
18220   return 0;
18221 }
18222 _ACEOF
18223 rm -f conftest.$ac_objext
18224 if { (eval echo "$as_me:18224: \"$ac_compile\"") >&5
18225   (eval $ac_compile) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); } &&
18229          { ac_try='test -s conftest.$ac_objext'
18230   { (eval echo "$as_me:18230: \"$ac_try\"") >&5
18231   (eval $ac_try) 2>&5
18232   ac_status=$?
18233   echo "$as_me:18233: \$? = $ac_status" >&5
18234   (exit $ac_status); }; }; then
18235   cf_cv_getopt_header=$cf_header
18236  break
18237 else
18238   echo "$as_me: failed program was:" >&5
18239 cat conftest.$ac_ext >&5
18240 fi
18241 rm -f conftest.$ac_objext conftest.$ac_ext
18242 done
18243
18244 fi
18245 echo "$as_me:18245: result: $cf_cv_getopt_header" >&5
18246 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18247 if test $cf_cv_getopt_header != none ; then
18248
18249 cat >>confdefs.h <<\EOF
18250 #define HAVE_GETOPT_HEADER 1
18251 EOF
18252
18253 fi
18254 if test $cf_cv_getopt_header = getopt.h ; then
18255
18256 cat >>confdefs.h <<\EOF
18257 #define NEED_GETOPT_H 1
18258 EOF
18259
18260 fi
18261
18262 echo "$as_me:18262: checking if external environ is declared" >&5
18263 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18264 if test "${cf_cv_dcl_environ+set}" = set; then
18265   echo $ECHO_N "(cached) $ECHO_C" >&6
18266 else
18267
18268     cat >conftest.$ac_ext <<_ACEOF
18269 #line 18269 "configure"
18270 #include "confdefs.h"
18271
18272 #ifdef HAVE_STDLIB_H
18273 #include <stdlib.h>
18274 #endif
18275 #include <unistd.h>
18276 int
18277 main (void)
18278 {
18279 int x = (int) environ
18280   ;
18281   return 0;
18282 }
18283 _ACEOF
18284 rm -f conftest.$ac_objext
18285 if { (eval echo "$as_me:18285: \"$ac_compile\"") >&5
18286   (eval $ac_compile) 2>&5
18287   ac_status=$?
18288   echo "$as_me:18288: \$? = $ac_status" >&5
18289   (exit $ac_status); } &&
18290          { ac_try='test -s conftest.$ac_objext'
18291   { (eval echo "$as_me:18291: \"$ac_try\"") >&5
18292   (eval $ac_try) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); }; }; then
18296   cf_cv_dcl_environ=yes
18297 else
18298   echo "$as_me: failed program was:" >&5
18299 cat conftest.$ac_ext >&5
18300 cf_cv_dcl_environ=no
18301 fi
18302 rm -f conftest.$ac_objext conftest.$ac_ext
18303
18304 fi
18305 echo "$as_me:18305: result: $cf_cv_dcl_environ" >&5
18306 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18307
18308 if test "$cf_cv_dcl_environ" = no ; then
18309
18310 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18311
18312     cat >>confdefs.h <<EOF
18313 #define $cf_result 1
18314 EOF
18315
18316 fi
18317
18318 # It's possible (for near-UNIX clones) that the data doesn't exist
18319
18320 echo "$as_me:18320: checking if external environ exists" >&5
18321 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18322 if test "${cf_cv_have_environ+set}" = set; then
18323   echo $ECHO_N "(cached) $ECHO_C" >&6
18324 else
18325
18326         cat >conftest.$ac_ext <<_ACEOF
18327 #line 18327 "configure"
18328 #include "confdefs.h"
18329
18330 #undef environ
18331 extern int environ;
18332
18333 int
18334 main (void)
18335 {
18336 environ = 2
18337   ;
18338   return 0;
18339 }
18340 _ACEOF
18341 rm -f conftest.$ac_objext conftest$ac_exeext
18342 if { (eval echo "$as_me:18342: \"$ac_link\"") >&5
18343   (eval $ac_link) 2>&5
18344   ac_status=$?
18345   echo "$as_me:18345: \$? = $ac_status" >&5
18346   (exit $ac_status); } &&
18347          { ac_try='test -s conftest$ac_exeext'
18348   { (eval echo "$as_me:18348: \"$ac_try\"") >&5
18349   (eval $ac_try) 2>&5
18350   ac_status=$?
18351   echo "$as_me:18351: \$? = $ac_status" >&5
18352   (exit $ac_status); }; }; then
18353   cf_cv_have_environ=yes
18354 else
18355   echo "$as_me: failed program was:" >&5
18356 cat conftest.$ac_ext >&5
18357 cf_cv_have_environ=no
18358 fi
18359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18360
18361 fi
18362 echo "$as_me:18362: result: $cf_cv_have_environ" >&5
18363 echo "${ECHO_T}$cf_cv_have_environ" >&6
18364
18365 if test "$cf_cv_have_environ" = yes ; then
18366
18367 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18368
18369         cat >>confdefs.h <<EOF
18370 #define $cf_result 1
18371 EOF
18372
18373 fi
18374
18375 echo "$as_me:18375: checking for getenv" >&5
18376 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18377 if test "${ac_cv_func_getenv+set}" = set; then
18378   echo $ECHO_N "(cached) $ECHO_C" >&6
18379 else
18380   cat >conftest.$ac_ext <<_ACEOF
18381 #line 18381 "configure"
18382 #include "confdefs.h"
18383 #define getenv autoconf_temporary
18384 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18385 #undef getenv
18386
18387 #ifdef __cplusplus
18388 extern "C"
18389 #endif
18390
18391 /* We use char because int might match the return type of a gcc2
18392    builtin and then its argument prototype would still apply.  */
18393 char getenv (void);
18394
18395 int
18396 main (void)
18397 {
18398
18399 /* The GNU C library defines stubs for functions which it implements
18400     to always fail with ENOSYS.  Some functions are actually named
18401     something starting with __ and the normal name is an alias.  */
18402 #if defined (__stub_getenv) || defined (__stub___getenv)
18403 #error found stub for getenv
18404 #endif
18405
18406         return getenv ();
18407   ;
18408   return 0;
18409 }
18410 _ACEOF
18411 rm -f conftest.$ac_objext conftest$ac_exeext
18412 if { (eval echo "$as_me:18412: \"$ac_link\"") >&5
18413   (eval $ac_link) 2>&5
18414   ac_status=$?
18415   echo "$as_me:18415: \$? = $ac_status" >&5
18416   (exit $ac_status); } &&
18417          { ac_try='test -s conftest$ac_exeext'
18418   { (eval echo "$as_me:18418: \"$ac_try\"") >&5
18419   (eval $ac_try) 2>&5
18420   ac_status=$?
18421   echo "$as_me:18421: \$? = $ac_status" >&5
18422   (exit $ac_status); }; }; then
18423   ac_cv_func_getenv=yes
18424 else
18425   echo "$as_me: failed program was:" >&5
18426 cat conftest.$ac_ext >&5
18427 ac_cv_func_getenv=no
18428 fi
18429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18430 fi
18431 echo "$as_me:18431: result: $ac_cv_func_getenv" >&5
18432 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18433
18434 for ac_func in putenv setenv strdup
18435 do
18436 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18437 echo "$as_me:18437: checking for $ac_func" >&5
18438 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18439 if eval "test \"\${$as_ac_var+set}\" = set"; then
18440   echo $ECHO_N "(cached) $ECHO_C" >&6
18441 else
18442   cat >conftest.$ac_ext <<_ACEOF
18443 #line 18443 "configure"
18444 #include "confdefs.h"
18445 #define $ac_func autoconf_temporary
18446 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18447 #undef $ac_func
18448
18449 #ifdef __cplusplus
18450 extern "C"
18451 #endif
18452
18453 /* We use char because int might match the return type of a gcc2
18454    builtin and then its argument prototype would still apply.  */
18455 char $ac_func (void);
18456
18457 int
18458 main (void)
18459 {
18460
18461 /* The GNU C library defines stubs for functions which it implements
18462     to always fail with ENOSYS.  Some functions are actually named
18463     something starting with __ and the normal name is an alias.  */
18464 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18465 #error found stub for $ac_func
18466 #endif
18467
18468         return $ac_func ();
18469   ;
18470   return 0;
18471 }
18472 _ACEOF
18473 rm -f conftest.$ac_objext conftest$ac_exeext
18474 if { (eval echo "$as_me:18474: \"$ac_link\"") >&5
18475   (eval $ac_link) 2>&5
18476   ac_status=$?
18477   echo "$as_me:18477: \$? = $ac_status" >&5
18478   (exit $ac_status); } &&
18479          { ac_try='test -s conftest$ac_exeext'
18480   { (eval echo "$as_me:18480: \"$ac_try\"") >&5
18481   (eval $ac_try) 2>&5
18482   ac_status=$?
18483   echo "$as_me:18483: \$? = $ac_status" >&5
18484   (exit $ac_status); }; }; then
18485   eval "$as_ac_var=yes"
18486 else
18487   echo "$as_me: failed program was:" >&5
18488 cat conftest.$ac_ext >&5
18489 eval "$as_ac_var=no"
18490 fi
18491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18492 fi
18493 echo "$as_me:18493: result: `eval echo '${'$as_ac_var'}'`" >&5
18494 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18495 if test `eval echo '${'$as_ac_var'}'` = yes; then
18496   cat >>confdefs.h <<EOF
18497 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18498 EOF
18499
18500 fi
18501 done
18502
18503 echo "$as_me:18503: checking if getenv returns consistent values" >&5
18504 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18505 if test "${cf_cv_consistent_getenv+set}" = set; then
18506   echo $ECHO_N "(cached) $ECHO_C" >&6
18507 else
18508
18509 if test "$cross_compiling" = yes; then
18510   cf_cv_consistent_getenv=unknown
18511 else
18512   cat >conftest.$ac_ext <<_ACEOF
18513 #line 18513 "configure"
18514 #include "confdefs.h"
18515
18516 #include <stdlib.h>
18517 #include <unistd.h>
18518 #include <stdio.h>
18519 #include <string.h>
18520 #include <sys/types.h>
18521
18522 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18523 extern char **environ;  /* POSIX, but some systems are not... */
18524 #endif
18525
18526 #if defined(HAVE_STRDUP)
18527 #define str_alloc(s) strdup(s)
18528 #else
18529 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18530 #endif
18531
18532 static void set_value(const char *name, const char *value)
18533 {
18534 #if defined(HAVE_SETENV)
18535         setenv(name, value, 1);
18536 #elif defined(HAVE_PUTENV)
18537         char buffer[1024];
18538         sprintf(buffer, "%s=%s", name, value);
18539         putenv(str_alloc(buffer));
18540 #else
18541 #error neither putenv/setenv found
18542 #endif
18543 }
18544 int main(void)
18545 {
18546         int pass;
18547         size_t numenv, limit, j;
18548         char **mynames;
18549         char **myvalues;
18550         char **mypointer;
18551         char *equals;
18552         for (numenv = 0; environ[numenv]; ++numenv) ;
18553         limit = numenv + 10;
18554         mynames = (char **) calloc(limit + 1, sizeof(char *));
18555         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18556         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18557 #if defined(HAVE_ENVIRON)
18558         for (j = 0; environ[j]; ++j) {
18559                 mynames[j] = str_alloc(environ[j]);
18560                 equals = strchr(mynames[j], '=');
18561                 if (equals != 0) {
18562                         *equals++ = '\0';
18563                         myvalues[j] = str_alloc(equals);
18564                 } else {
18565                         myvalues[j] = str_alloc("");
18566                 }
18567         }
18568 #endif
18569         for (j = numenv; j < limit; ++j) {
18570                 char name[80];
18571                 char value[80];
18572                 size_t found;
18573                 size_t k = 0;
18574                 do {
18575                         size_t jk;
18576                         found = 0;
18577                         sprintf(name, "TERM%lu", (unsigned long) k);
18578                         for (jk = 0; jk < j; ++jk) {
18579                                 if (!strcmp(name, mynames[jk])) {
18580                                         found = 1;
18581                                         ++k;
18582                                         break;
18583                                 }
18584                         }
18585                 } while (found);
18586                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18587                 set_value(name, value);
18588                 mynames[j] = str_alloc(name);
18589                 myvalues[j] = str_alloc(value);
18590         }
18591         for (pass = 0; pass < 3; ++pass) {
18592                 for (j = 0; j < limit; ++j) {
18593                         char *value = getenv(mynames[j]);
18594                         if (pass) {
18595                                 if (value == 0) {
18596                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18597                                         ${cf_cv_main_return:-return}(1);
18598                                 } else if (value != mypointer[j]) {
18599                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18600                                         ${cf_cv_main_return:-return}(1);
18601                                 } else if (strcmp(value, myvalues[j])) {
18602                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18603                                         ${cf_cv_main_return:-return}(1);
18604                                 }
18605                         } else {
18606                                 size_t k;
18607                                 mypointer[j] = value;
18608                                 for (k = 0; k < j; ++k) {
18609                                         if (mypointer[j] == mypointer[k]) {
18610                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18611                                                 ${cf_cv_main_return:-return}(1);
18612                                         }
18613                                 }
18614                         }
18615                 }
18616         }
18617         ${cf_cv_main_return:-return}(0);
18618 }
18619
18620 _ACEOF
18621 rm -f conftest$ac_exeext
18622 if { (eval echo "$as_me:18622: \"$ac_link\"") >&5
18623   (eval $ac_link) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18627   { (eval echo "$as_me:18627: \"$ac_try\"") >&5
18628   (eval $ac_try) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit $ac_status); }; }; then
18632   cf_cv_consistent_getenv=yes
18633 else
18634   echo "$as_me: program exited with status $ac_status" >&5
18635 echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_cv_consistent_getenv=no
18638 fi
18639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18640 fi
18641
18642 fi
18643 echo "$as_me:18643: result: $cf_cv_consistent_getenv" >&5
18644 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18645
18646 if test "x$cf_cv_consistent_getenv" = xno
18647 then
18648
18649 cat >>confdefs.h <<\EOF
18650 #define HAVE_CONSISTENT_GETENV 1
18651 EOF
18652
18653 fi
18654
18655 if test "x$cf_cv_consistent_getenv" = xno && \
18656         test "x$cf_with_trace" = xyes
18657 then
18658         { echo "$as_me:18658: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18659 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18660 fi
18661
18662 # check for ISC (this may also define _POSIX_SOURCE)
18663 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18664 if test "x$ISC" = xyes ; then
18665
18666 echo "$as_me:18666: checking for main in -lcposix" >&5
18667 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18668 if test "${ac_cv_lib_cposix_main+set}" = set; then
18669   echo $ECHO_N "(cached) $ECHO_C" >&6
18670 else
18671   ac_check_lib_save_LIBS=$LIBS
18672 LIBS="-lcposix  $LIBS"
18673 cat >conftest.$ac_ext <<_ACEOF
18674 #line 18674 "configure"
18675 #include "confdefs.h"
18676
18677 int
18678 main (void)
18679 {
18680 main ();
18681   ;
18682   return 0;
18683 }
18684 _ACEOF
18685 rm -f conftest.$ac_objext conftest$ac_exeext
18686 if { (eval echo "$as_me:18686: \"$ac_link\"") >&5
18687   (eval $ac_link) 2>&5
18688   ac_status=$?
18689   echo "$as_me:18689: \$? = $ac_status" >&5
18690   (exit $ac_status); } &&
18691          { ac_try='test -s conftest$ac_exeext'
18692   { (eval echo "$as_me:18692: \"$ac_try\"") >&5
18693   (eval $ac_try) 2>&5
18694   ac_status=$?
18695   echo "$as_me:18695: \$? = $ac_status" >&5
18696   (exit $ac_status); }; }; then
18697   ac_cv_lib_cposix_main=yes
18698 else
18699   echo "$as_me: failed program was:" >&5
18700 cat conftest.$ac_ext >&5
18701 ac_cv_lib_cposix_main=no
18702 fi
18703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18704 LIBS=$ac_check_lib_save_LIBS
18705 fi
18706 echo "$as_me:18706: result: $ac_cv_lib_cposix_main" >&5
18707 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18708 if test $ac_cv_lib_cposix_main = yes; then
18709   cat >>confdefs.h <<EOF
18710 #define HAVE_LIBCPOSIX 1
18711 EOF
18712
18713   LIBS="-lcposix $LIBS"
18714
18715 fi
18716
18717         echo "$as_me:18717: checking for bzero in -linet" >&5
18718 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18719 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18720   echo $ECHO_N "(cached) $ECHO_C" >&6
18721 else
18722   ac_check_lib_save_LIBS=$LIBS
18723 LIBS="-linet  $LIBS"
18724 cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18727
18728 /* Override any gcc2 internal prototype to avoid an error.  */
18729 #ifdef __cplusplus
18730 extern "C"
18731 #endif
18732 /* We use char because int might match the return type of a gcc2
18733    builtin and then its argument prototype would still apply.  */
18734 char bzero ();
18735 int
18736 main (void)
18737 {
18738 bzero ();
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 rm -f conftest.$ac_objext conftest$ac_exeext
18744 if { (eval echo "$as_me:18744: \"$ac_link\"") >&5
18745   (eval $ac_link) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); } &&
18749          { ac_try='test -s conftest$ac_exeext'
18750   { (eval echo "$as_me:18750: \"$ac_try\"") >&5
18751   (eval $ac_try) 2>&5
18752   ac_status=$?
18753   echo "$as_me:18753: \$? = $ac_status" >&5
18754   (exit $ac_status); }; }; then
18755   ac_cv_lib_inet_bzero=yes
18756 else
18757   echo "$as_me: failed program was:" >&5
18758 cat conftest.$ac_ext >&5
18759 ac_cv_lib_inet_bzero=no
18760 fi
18761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18762 LIBS=$ac_check_lib_save_LIBS
18763 fi
18764 echo "$as_me:18764: result: $ac_cv_lib_inet_bzero" >&5
18765 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18766 if test $ac_cv_lib_inet_bzero = yes; then
18767
18768 cf_add_libs="$LIBS"
18769 # reverse order
18770 cf_add_0lib=
18771 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18772 # filter duplicates
18773 for cf_add_1lib in $cf_add_0lib; do
18774         for cf_add_2lib in $cf_add_libs; do
18775                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18776                         cf_add_1lib=
18777                         break
18778                 fi
18779         done
18780         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18781 done
18782 LIBS="$cf_add_libs"
18783
18784 fi
18785 fi
18786
18787 echo "$as_me:18787: checking if sys/time.h works with sys/select.h" >&5
18788 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18789 if test "${cf_cv_sys_time_select+set}" = set; then
18790   echo $ECHO_N "(cached) $ECHO_C" >&6
18791 else
18792
18793 cat >conftest.$ac_ext <<_ACEOF
18794 #line 18794 "configure"
18795 #include "confdefs.h"
18796
18797 #include <sys/types.h>
18798 #ifdef HAVE_SYS_TIME_H
18799 #include <sys/time.h>
18800 #endif
18801 #ifdef HAVE_SYS_SELECT_H
18802 #include <sys/select.h>
18803 #endif
18804
18805 int
18806 main (void)
18807 {
18808
18809   ;
18810   return 0;
18811 }
18812 _ACEOF
18813 rm -f conftest.$ac_objext
18814 if { (eval echo "$as_me:18814: \"$ac_compile\"") >&5
18815   (eval $ac_compile) 2>&5
18816   ac_status=$?
18817   echo "$as_me:18817: \$? = $ac_status" >&5
18818   (exit $ac_status); } &&
18819          { ac_try='test -s conftest.$ac_objext'
18820   { (eval echo "$as_me:18820: \"$ac_try\"") >&5
18821   (eval $ac_try) 2>&5
18822   ac_status=$?
18823   echo "$as_me:18823: \$? = $ac_status" >&5
18824   (exit $ac_status); }; }; then
18825   cf_cv_sys_time_select=yes
18826 else
18827   echo "$as_me: failed program was:" >&5
18828 cat conftest.$ac_ext >&5
18829 cf_cv_sys_time_select=no
18830 fi
18831 rm -f conftest.$ac_objext conftest.$ac_ext
18832
18833 fi
18834
18835 echo "$as_me:18835: result: $cf_cv_sys_time_select" >&5
18836 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18837 test "$cf_cv_sys_time_select" = yes &&
18838 cat >>confdefs.h <<\EOF
18839 #define HAVE_SYS_TIME_SELECT 1
18840 EOF
18841
18842 ###     checks for compiler characteristics
18843 ac_ext=c
18844 ac_cpp='$CPP $CPPFLAGS'
18845 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18846 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18848 ac_main_return=return
18849
18850 echo "$as_me:18850: checking for an ANSI C-conforming const" >&5
18851 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18852 if test "${ac_cv_c_const+set}" = set; then
18853   echo $ECHO_N "(cached) $ECHO_C" >&6
18854 else
18855   cat >conftest.$ac_ext <<_ACEOF
18856 #line 18856 "configure"
18857 #include "confdefs.h"
18858
18859 int
18860 main (void)
18861 {
18862 /* FIXME: Include the comments suggested by Paul. */
18863 #ifndef __cplusplus
18864   /* Ultrix mips cc rejects this.  */
18865   typedef int charset[2];
18866   const charset x;
18867   /* SunOS 4.1.1 cc rejects this.  */
18868   char const *const *ccp;
18869   char **p;
18870   /* NEC SVR4.0.2 mips cc rejects this.  */
18871   struct point {int x, y;};
18872   static struct point const zero = {0,0};
18873   /* AIX XL C 1.02.0.0 rejects this.
18874      It does not let you subtract one const X* pointer from another in
18875      an arm of an if-expression whose if-part is not a constant
18876      expression */
18877   const char *g = "string";
18878   ccp = &g + (g ? g-g : 0);
18879   /* HPUX 7.0 cc rejects these. */
18880   ++ccp;
18881   p = (char**) ccp;
18882   ccp = (char const *const *) p;
18883   { /* SCO 3.2v4 cc rejects this.  */
18884     char *t;
18885     char const *s = 0 ? (char *) 0 : (char const *) 0;
18886
18887     *t++ = 0;
18888   }
18889   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18890     int x[] = {25, 17};
18891     const int *foo = &x[0];
18892     ++foo;
18893   }
18894   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18895     typedef const int *iptr;
18896     iptr p = 0;
18897     ++p;
18898   }
18899   { /* AIX XL C 1.02.0.0 rejects this saying
18900        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18901     struct s { int j; const int *ap[3]; };
18902     struct s *b; b->j = 5;
18903   }
18904   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18905     const int foo = 10;
18906   }
18907 #endif
18908
18909   ;
18910   return 0;
18911 }
18912 _ACEOF
18913 rm -f conftest.$ac_objext
18914 if { (eval echo "$as_me:18914: \"$ac_compile\"") >&5
18915   (eval $ac_compile) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); } &&
18919          { ac_try='test -s conftest.$ac_objext'
18920   { (eval echo "$as_me:18920: \"$ac_try\"") >&5
18921   (eval $ac_try) 2>&5
18922   ac_status=$?
18923   echo "$as_me:18923: \$? = $ac_status" >&5
18924   (exit $ac_status); }; }; then
18925   ac_cv_c_const=yes
18926 else
18927   echo "$as_me: failed program was:" >&5
18928 cat conftest.$ac_ext >&5
18929 ac_cv_c_const=no
18930 fi
18931 rm -f conftest.$ac_objext conftest.$ac_ext
18932 fi
18933 echo "$as_me:18933: result: $ac_cv_c_const" >&5
18934 echo "${ECHO_T}$ac_cv_c_const" >&6
18935 if test $ac_cv_c_const = no; then
18936
18937 cat >>confdefs.h <<\EOF
18938 #define const
18939 EOF
18940
18941 fi
18942
18943 echo "$as_me:18943: checking for inline" >&5
18944 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18945 if test "${ac_cv_c_inline+set}" = set; then
18946   echo $ECHO_N "(cached) $ECHO_C" >&6
18947 else
18948   ac_cv_c_inline=no
18949 for ac_kw in inline __inline__ __inline; do
18950   cat >conftest.$ac_ext <<_ACEOF
18951 #line 18951 "configure"
18952 #include "confdefs.h"
18953 #ifndef __cplusplus
18954 static $ac_kw int static_foo () {return 0; }
18955 $ac_kw int foo () {return 0; }
18956 #endif
18957
18958 _ACEOF
18959 rm -f conftest.$ac_objext
18960 if { (eval echo "$as_me:18960: \"$ac_compile\"") >&5
18961   (eval $ac_compile) 2>&5
18962   ac_status=$?
18963   echo "$as_me:18963: \$? = $ac_status" >&5
18964   (exit $ac_status); } &&
18965          { ac_try='test -s conftest.$ac_objext'
18966   { (eval echo "$as_me:18966: \"$ac_try\"") >&5
18967   (eval $ac_try) 2>&5
18968   ac_status=$?
18969   echo "$as_me:18969: \$? = $ac_status" >&5
18970   (exit $ac_status); }; }; then
18971   ac_cv_c_inline=$ac_kw; break
18972 else
18973   echo "$as_me: failed program was:" >&5
18974 cat conftest.$ac_ext >&5
18975 fi
18976 rm -f conftest.$ac_objext conftest.$ac_ext
18977 done
18978
18979 fi
18980 echo "$as_me:18980: result: $ac_cv_c_inline" >&5
18981 echo "${ECHO_T}$ac_cv_c_inline" >&6
18982 case $ac_cv_c_inline in
18983   inline | yes) ;;
18984   no)
18985 cat >>confdefs.h <<\EOF
18986 #define inline
18987 EOF
18988  ;;
18989   *)  cat >>confdefs.h <<EOF
18990 #define inline $ac_cv_c_inline
18991 EOF
18992  ;;
18993 esac
18994
18995 NCURSES_INLINE=
18996 if test "$ac_cv_c_inline" != no ; then
18997         NCURSES_INLINE=inline
18998         if test "$INTEL_COMPILER" = yes
18999         then
19000                 :
19001         elif test "$CLANG_COMPILER" = yes
19002         then
19003                 :
19004         elif test "$GCC" = yes
19005         then
19006                 echo "$as_me:19006: checking if $CC supports options to tune inlining" >&5
19007 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19008 if test "${cf_cv_gcc_inline+set}" = set; then
19009   echo $ECHO_N "(cached) $ECHO_C" >&6
19010 else
19011
19012                 cf_save_CFLAGS=$CFLAGS
19013                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19014                 cat >conftest.$ac_ext <<_ACEOF
19015 #line 19015 "configure"
19016 #include "confdefs.h"
19017 inline int foo(void) { return 1; }
19018 int
19019 main (void)
19020 {
19021 ${cf_cv_main_return:-return} foo()
19022   ;
19023   return 0;
19024 }
19025 _ACEOF
19026 rm -f conftest.$ac_objext
19027 if { (eval echo "$as_me:19027: \"$ac_compile\"") >&5
19028   (eval $ac_compile) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit $ac_status); } &&
19032          { ac_try='test -s conftest.$ac_objext'
19033   { (eval echo "$as_me:19033: \"$ac_try\"") >&5
19034   (eval $ac_try) 2>&5
19035   ac_status=$?
19036   echo "$as_me:19036: \$? = $ac_status" >&5
19037   (exit $ac_status); }; }; then
19038   cf_cv_gcc_inline=yes
19039 else
19040   echo "$as_me: failed program was:" >&5
19041 cat conftest.$ac_ext >&5
19042 cf_cv_gcc_inline=no
19043 fi
19044 rm -f conftest.$ac_objext conftest.$ac_ext
19045                 CFLAGS=$cf_save_CFLAGS
19046
19047 fi
19048 echo "$as_me:19048: result: $cf_cv_gcc_inline" >&5
19049 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19050                 if test "$cf_cv_gcc_inline" = yes ; then
19051
19052 cf_fix_cppflags=no
19053 cf_new_cflags=
19054 cf_new_cppflags=
19055 cf_new_extra_cppflags=
19056
19057 for cf_add_cflags in --param max-inline-insns-single=1200
19058 do
19059 case $cf_fix_cppflags in
19060 (no)
19061         case $cf_add_cflags in
19062         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19063                 case $cf_add_cflags in
19064                 (-D*)
19065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19066
19067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19068                                 && test -z "${cf_tst_cflags}" \
19069                                 && cf_fix_cppflags=yes
19070
19071                         if test $cf_fix_cppflags = yes ; then
19072
19073         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19074         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19075
19076                                 continue
19077                         elif test "${cf_tst_cflags}" = "\"'" ; then
19078
19079         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19080         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19081
19082                                 continue
19083                         fi
19084                         ;;
19085                 esac
19086                 case "$CPPFLAGS" in
19087                 (*$cf_add_cflags)
19088                         ;;
19089                 (*)
19090                         case $cf_add_cflags in
19091                         (-D*)
19092                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19093
19094 CPPFLAGS=`echo "$CPPFLAGS" | \
19095         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19096                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19097
19098                                 ;;
19099                         esac
19100
19101         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19102         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19103
19104                         ;;
19105                 esac
19106                 ;;
19107         (*)
19108
19109         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19110         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19111
19112                 ;;
19113         esac
19114         ;;
19115 (yes)
19116
19117         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19118         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19119
19120         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19121
19122         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19123                 && test -z "${cf_tst_cflags}" \
19124                 && cf_fix_cppflags=no
19125         ;;
19126 esac
19127 done
19128
19129 if test -n "$cf_new_cflags" ; then
19130
19131         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19132         CFLAGS="${CFLAGS}$cf_new_cflags"
19133
19134 fi
19135
19136 if test -n "$cf_new_cppflags" ; then
19137
19138         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19139         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19140
19141 fi
19142
19143 if test -n "$cf_new_extra_cppflags" ; then
19144
19145         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19146         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19147
19148 fi
19149
19150                 fi
19151         fi
19152 fi
19153
19154 echo "$as_me:19154: checking for signal global datatype" >&5
19155 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19156 if test "${cf_cv_sig_atomic_t+set}" = set; then
19157   echo $ECHO_N "(cached) $ECHO_C" >&6
19158 else
19159
19160         for cf_type in \
19161                 "volatile sig_atomic_t" \
19162                 "sig_atomic_t" \
19163                 "int"
19164         do
19165         cat >conftest.$ac_ext <<_ACEOF
19166 #line 19166 "configure"
19167 #include "confdefs.h"
19168
19169 #include <sys/types.h>
19170 #include <signal.h>
19171 #include <stdio.h>
19172
19173 extern $cf_type x;
19174 $cf_type x;
19175 static void handler(int sig)
19176 {
19177         x = 5;
19178 }
19179 int
19180 main (void)
19181 {
19182 signal(SIGINT, handler);
19183                  x = 1
19184   ;
19185   return 0;
19186 }
19187 _ACEOF
19188 rm -f conftest.$ac_objext
19189 if { (eval echo "$as_me:19189: \"$ac_compile\"") >&5
19190   (eval $ac_compile) 2>&5
19191   ac_status=$?
19192   echo "$as_me:19192: \$? = $ac_status" >&5
19193   (exit $ac_status); } &&
19194          { ac_try='test -s conftest.$ac_objext'
19195   { (eval echo "$as_me:19195: \"$ac_try\"") >&5
19196   (eval $ac_try) 2>&5
19197   ac_status=$?
19198   echo "$as_me:19198: \$? = $ac_status" >&5
19199   (exit $ac_status); }; }; then
19200   cf_cv_sig_atomic_t=$cf_type
19201 else
19202   echo "$as_me: failed program was:" >&5
19203 cat conftest.$ac_ext >&5
19204 cf_cv_sig_atomic_t=no
19205 fi
19206 rm -f conftest.$ac_objext conftest.$ac_ext
19207                 test "$cf_cv_sig_atomic_t" != no && break
19208         done
19209
19210 fi
19211
19212 echo "$as_me:19212: result: $cf_cv_sig_atomic_t" >&5
19213 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19214 test "$cf_cv_sig_atomic_t" != no &&
19215 cat >>confdefs.h <<EOF
19216 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19217 EOF
19218
19219 if test $NCURSES_CHTYPE = auto ; then
19220
19221 echo "$as_me:19221: checking for type of chtype" >&5
19222 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19223 if test "${cf_cv_typeof_chtype+set}" = set; then
19224   echo $ECHO_N "(cached) $ECHO_C" >&6
19225 else
19226
19227                 if test "$cross_compiling" = yes; then
19228   cf_cv_typeof_chtype=long
19229 else
19230   cat >conftest.$ac_ext <<_ACEOF
19231 #line 19231 "configure"
19232 #include "confdefs.h"
19233
19234 #define WANT_BITS 31
19235 #include <stdio.h>
19236 int main(void)
19237 {
19238         FILE *fp = fopen("cf_test.out", "w");
19239         if (fp != 0) {
19240                 char *result = "long";
19241                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19242                         int n;
19243                         unsigned int x, y;
19244                         for (n = 0; n < WANT_BITS; n++) {
19245                                 x = (1 << n);
19246                                 y = (x >> n);
19247                                 if (y != 1 || x == 0) {
19248                                         x = 0;
19249                                         break;
19250                                 }
19251                         }
19252                         /*
19253                          * If x is nonzero, an int is big enough for the bits
19254                          * that we want.
19255                          */
19256                         result = (x != 0) ? "int" : "long";
19257                 }
19258                 fputs(result, fp);
19259                 fclose(fp);
19260         }
19261         ${cf_cv_main_return:-return}(0);
19262 }
19263
19264 _ACEOF
19265 rm -f conftest$ac_exeext
19266 if { (eval echo "$as_me:19266: \"$ac_link\"") >&5
19267   (eval $ac_link) 2>&5
19268   ac_status=$?
19269   echo "$as_me:19269: \$? = $ac_status" >&5
19270   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19271   { (eval echo "$as_me:19271: \"$ac_try\"") >&5
19272   (eval $ac_try) 2>&5
19273   ac_status=$?
19274   echo "$as_me:19274: \$? = $ac_status" >&5
19275   (exit $ac_status); }; }; then
19276   cf_cv_typeof_chtype=`cat cf_test.out`
19277 else
19278   echo "$as_me: program exited with status $ac_status" >&5
19279 echo "$as_me: failed program was:" >&5
19280 cat conftest.$ac_ext >&5
19281 cf_cv_typeof_chtype=long
19282 fi
19283 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19284 fi
19285                 rm -f cf_test.out
19286
19287 fi
19288
19289 echo "$as_me:19289: result: $cf_cv_typeof_chtype" >&5
19290 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19291
19292 cat >>confdefs.h <<EOF
19293 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19294 EOF
19295
19296 else
19297         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19298 fi
19299 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19300
19301 echo "$as_me:19301: checking if unsigned literals are legal" >&5
19302 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19303 if test "${cf_cv_unsigned_literals+set}" = set; then
19304   echo $ECHO_N "(cached) $ECHO_C" >&6
19305 else
19306
19307         cat >conftest.$ac_ext <<_ACEOF
19308 #line 19308 "configure"
19309 #include "confdefs.h"
19310
19311 int
19312 main (void)
19313 {
19314 long x = 1L + 1UL + 1U + 1
19315   ;
19316   return 0;
19317 }
19318 _ACEOF
19319 rm -f conftest.$ac_objext
19320 if { (eval echo "$as_me:19320: \"$ac_compile\"") >&5
19321   (eval $ac_compile) 2>&5
19322   ac_status=$?
19323   echo "$as_me:19323: \$? = $ac_status" >&5
19324   (exit $ac_status); } &&
19325          { ac_try='test -s conftest.$ac_objext'
19326   { (eval echo "$as_me:19326: \"$ac_try\"") >&5
19327   (eval $ac_try) 2>&5
19328   ac_status=$?
19329   echo "$as_me:19329: \$? = $ac_status" >&5
19330   (exit $ac_status); }; }; then
19331   cf_cv_unsigned_literals=yes
19332 else
19333   echo "$as_me: failed program was:" >&5
19334 cat conftest.$ac_ext >&5
19335 cf_cv_unsigned_literals=no
19336 fi
19337 rm -f conftest.$ac_objext conftest.$ac_ext
19338
19339 fi
19340
19341 echo "$as_me:19341: result: $cf_cv_unsigned_literals" >&5
19342 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19343
19344 cf_cv_1UL="1"
19345 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19346 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19347
19348 if test $NCURSES_MMASK_T = auto ; then
19349         cf_cv_typeof_mmask_t=long
19350 else
19351         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19352 fi
19353 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19354
19355 ###     Checks for external-data
19356
19357 echo "$as_me:19357: checking if external errno is declared" >&5
19358 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19359 if test "${cf_cv_dcl_errno+set}" = set; then
19360   echo $ECHO_N "(cached) $ECHO_C" >&6
19361 else
19362
19363         cat >conftest.$ac_ext <<_ACEOF
19364 #line 19364 "configure"
19365 #include "confdefs.h"
19366
19367 #ifdef HAVE_STDLIB_H
19368 #include <stdlib.h>
19369 #endif
19370 #include <stdio.h>
19371 #include <sys/types.h>
19372 #include <errno.h>
19373 int
19374 main (void)
19375 {
19376 int x = (int) errno
19377   ;
19378   return 0;
19379 }
19380 _ACEOF
19381 rm -f conftest.$ac_objext
19382 if { (eval echo "$as_me:19382: \"$ac_compile\"") >&5
19383   (eval $ac_compile) 2>&5
19384   ac_status=$?
19385   echo "$as_me:19385: \$? = $ac_status" >&5
19386   (exit $ac_status); } &&
19387          { ac_try='test -s conftest.$ac_objext'
19388   { (eval echo "$as_me:19388: \"$ac_try\"") >&5
19389   (eval $ac_try) 2>&5
19390   ac_status=$?
19391   echo "$as_me:19391: \$? = $ac_status" >&5
19392   (exit $ac_status); }; }; then
19393   cf_cv_dcl_errno=yes
19394 else
19395   echo "$as_me: failed program was:" >&5
19396 cat conftest.$ac_ext >&5
19397 cf_cv_dcl_errno=no
19398 fi
19399 rm -f conftest.$ac_objext conftest.$ac_ext
19400
19401 fi
19402 echo "$as_me:19402: result: $cf_cv_dcl_errno" >&5
19403 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19404
19405 if test "$cf_cv_dcl_errno" = no ; then
19406
19407 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19408
19409         cat >>confdefs.h <<EOF
19410 #define $cf_result 1
19411 EOF
19412
19413 fi
19414
19415 # It's possible (for near-UNIX clones) that the data doesn't exist
19416
19417 echo "$as_me:19417: checking if external errno exists" >&5
19418 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19419 if test "${cf_cv_have_errno+set}" = set; then
19420   echo $ECHO_N "(cached) $ECHO_C" >&6
19421 else
19422
19423         cat >conftest.$ac_ext <<_ACEOF
19424 #line 19424 "configure"
19425 #include "confdefs.h"
19426
19427 #undef errno
19428 extern int errno;
19429
19430 int
19431 main (void)
19432 {
19433 errno = 2
19434   ;
19435   return 0;
19436 }
19437 _ACEOF
19438 rm -f conftest.$ac_objext conftest$ac_exeext
19439 if { (eval echo "$as_me:19439: \"$ac_link\"") >&5
19440   (eval $ac_link) 2>&5
19441   ac_status=$?
19442   echo "$as_me:19442: \$? = $ac_status" >&5
19443   (exit $ac_status); } &&
19444          { ac_try='test -s conftest$ac_exeext'
19445   { (eval echo "$as_me:19445: \"$ac_try\"") >&5
19446   (eval $ac_try) 2>&5
19447   ac_status=$?
19448   echo "$as_me:19448: \$? = $ac_status" >&5
19449   (exit $ac_status); }; }; then
19450   cf_cv_have_errno=yes
19451 else
19452   echo "$as_me: failed program was:" >&5
19453 cat conftest.$ac_ext >&5
19454 cf_cv_have_errno=no
19455 fi
19456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19457
19458 fi
19459 echo "$as_me:19459: result: $cf_cv_have_errno" >&5
19460 echo "${ECHO_T}$cf_cv_have_errno" >&6
19461
19462 if test "$cf_cv_have_errno" = yes ; then
19463
19464 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19465
19466         cat >>confdefs.h <<EOF
19467 #define $cf_result 1
19468 EOF
19469
19470 fi
19471
19472 echo "$as_me:19472: checking if data-only library module links" >&5
19473 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19474 if test "${cf_cv_link_dataonly+set}" = set; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477
19478         rm -f conftest.a
19479         cat >conftest.$ac_ext <<EOF
19480 #line 19480 "configure"
19481 int     testdata[3] = { 123, 456, 789 };
19482 EOF
19483         if { (eval echo "$as_me:19483: \"$ac_compile\"") >&5
19484   (eval $ac_compile) 2>&5
19485   ac_status=$?
19486   echo "$as_me:19486: \$? = $ac_status" >&5
19487   (exit $ac_status); } ; then
19488                 mv conftest.o data.o && \
19489                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19490         fi
19491         rm -f conftest.$ac_ext data.o
19492         cat >conftest.$ac_ext <<EOF
19493 #line 19493 "configure"
19494 int     testfunc(void)
19495 {
19496 #if defined(NeXT)
19497         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19498 #else
19499         extern int testdata[3];
19500         return testdata[0] == 123
19501            &&  testdata[1] == 456
19502            &&  testdata[2] == 789;
19503 #endif
19504 }
19505 EOF
19506         if { (eval echo "$as_me:19506: \"$ac_compile\"") >&5
19507   (eval $ac_compile) 2>&5
19508   ac_status=$?
19509   echo "$as_me:19509: \$? = $ac_status" >&5
19510   (exit $ac_status); }; then
19511                 mv conftest.o func.o && \
19512                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19513         fi
19514         rm -f conftest.$ac_ext func.o
19515         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19516         cf_saveLIBS="$LIBS"
19517         LIBS="conftest.a $LIBS"
19518         if test "$cross_compiling" = yes; then
19519   cf_cv_link_dataonly=unknown
19520 else
19521   cat >conftest.$ac_ext <<_ACEOF
19522 #line 19522 "configure"
19523 #include "confdefs.h"
19524
19525         int main(void)
19526         {
19527                 extern int testfunc();
19528                 ${cf_cv_main_return:-return} (!testfunc());
19529         }
19530
19531 _ACEOF
19532 rm -f conftest$ac_exeext
19533 if { (eval echo "$as_me:19533: \"$ac_link\"") >&5
19534   (eval $ac_link) 2>&5
19535   ac_status=$?
19536   echo "$as_me:19536: \$? = $ac_status" >&5
19537   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19538   { (eval echo "$as_me:19538: \"$ac_try\"") >&5
19539   (eval $ac_try) 2>&5
19540   ac_status=$?
19541   echo "$as_me:19541: \$? = $ac_status" >&5
19542   (exit $ac_status); }; }; then
19543   cf_cv_link_dataonly=yes
19544 else
19545   echo "$as_me: program exited with status $ac_status" >&5
19546 echo "$as_me: failed program was:" >&5
19547 cat conftest.$ac_ext >&5
19548 cf_cv_link_dataonly=no
19549 fi
19550 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19551 fi
19552         LIBS="$cf_saveLIBS"
19553
19554 fi
19555
19556 echo "$as_me:19556: result: $cf_cv_link_dataonly" >&5
19557 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19558
19559 if test "$cf_cv_link_dataonly" = no ; then
19560
19561 cat >>confdefs.h <<\EOF
19562 #define BROKEN_LINKER 1
19563 EOF
19564
19565         BROKEN_LINKER=1
19566 fi
19567
19568 ###     Checks for library functions.
19569
19570 for ac_func in \
19571 getcwd \
19572 getegid \
19573 geteuid \
19574 getopt \
19575 getttynam \
19576 issetugid \
19577 localeconv \
19578 poll \
19579 putenv \
19580 remove \
19581 select \
19582 setbuf \
19583 setbuffer \
19584 setenv \
19585 setvbuf \
19586 sigaction \
19587 sigvec \
19588 strdup \
19589 strstr \
19590 sysconf \
19591 tcgetpgrp \
19592 times \
19593 tsearch \
19594 vsnprintf \
19595
19596 do
19597 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19598 echo "$as_me:19598: checking for $ac_func" >&5
19599 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19600 if eval "test \"\${$as_ac_var+set}\" = set"; then
19601   echo $ECHO_N "(cached) $ECHO_C" >&6
19602 else
19603   cat >conftest.$ac_ext <<_ACEOF
19604 #line 19604 "configure"
19605 #include "confdefs.h"
19606 #define $ac_func autoconf_temporary
19607 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19608 #undef $ac_func
19609
19610 #ifdef __cplusplus
19611 extern "C"
19612 #endif
19613
19614 /* We use char because int might match the return type of a gcc2
19615    builtin and then its argument prototype would still apply.  */
19616 char $ac_func (void);
19617
19618 int
19619 main (void)
19620 {
19621
19622 /* The GNU C library defines stubs for functions which it implements
19623     to always fail with ENOSYS.  Some functions are actually named
19624     something starting with __ and the normal name is an alias.  */
19625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19626 #error found stub for $ac_func
19627 #endif
19628
19629         return $ac_func ();
19630   ;
19631   return 0;
19632 }
19633 _ACEOF
19634 rm -f conftest.$ac_objext conftest$ac_exeext
19635 if { (eval echo "$as_me:19635: \"$ac_link\"") >&5
19636   (eval $ac_link) 2>&5
19637   ac_status=$?
19638   echo "$as_me:19638: \$? = $ac_status" >&5
19639   (exit $ac_status); } &&
19640          { ac_try='test -s conftest$ac_exeext'
19641   { (eval echo "$as_me:19641: \"$ac_try\"") >&5
19642   (eval $ac_try) 2>&5
19643   ac_status=$?
19644   echo "$as_me:19644: \$? = $ac_status" >&5
19645   (exit $ac_status); }; }; then
19646   eval "$as_ac_var=yes"
19647 else
19648   echo "$as_me: failed program was:" >&5
19649 cat conftest.$ac_ext >&5
19650 eval "$as_ac_var=no"
19651 fi
19652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19653 fi
19654 echo "$as_me:19654: result: `eval echo '${'$as_ac_var'}'`" >&5
19655 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19656 if test `eval echo '${'$as_ac_var'}'` = yes; then
19657   cat >>confdefs.h <<EOF
19658 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19659 EOF
19660
19661 fi
19662 done
19663
19664 if test "x$ac_cv_func_getopt" = xno && \
19665    test "x$cf_with_progs$cf_with_tests" != xnono; then
19666         { { echo "$as_me:19666: error: getopt is required for building programs" >&5
19667 echo "$as_me: error: getopt is required for building programs" >&2;}
19668    { (exit 1); exit 1; }; }
19669 fi
19670
19671 if test "x$with_safe_sprintf" = xyes
19672 then
19673         if test "x$ac_cv_func_vsnprintf" = xyes
19674         then
19675                 { echo "$as_me:19675: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19676 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19677         else
19678
19679 cat >>confdefs.h <<\EOF
19680 #define USE_SAFE_SPRINTF 1
19681 EOF
19682
19683         fi
19684 fi
19685
19686 if test "x$with_getcap" = "xyes" ; then
19687
19688 echo "$as_me:19688: checking for terminal-capability database functions" >&5
19689 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19690 if test "${cf_cv_cgetent+set}" = set; then
19691   echo $ECHO_N "(cached) $ECHO_C" >&6
19692 else
19693
19694 cat >conftest.$ac_ext <<_ACEOF
19695 #line 19695 "configure"
19696 #include "confdefs.h"
19697
19698 #include <stdlib.h>
19699 int
19700 main (void)
19701 {
19702
19703         char temp[128];
19704         char *buf = temp;
19705         char *db_array = temp;
19706         cgetent(&buf, &db_array, "vt100");
19707         cgetcap(buf, "tc", '=');
19708         cgetmatch(buf, "tc");
19709
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 rm -f conftest.$ac_objext conftest$ac_exeext
19715 if { (eval echo "$as_me:19715: \"$ac_link\"") >&5
19716   (eval $ac_link) 2>&5
19717   ac_status=$?
19718   echo "$as_me:19718: \$? = $ac_status" >&5
19719   (exit $ac_status); } &&
19720          { ac_try='test -s conftest$ac_exeext'
19721   { (eval echo "$as_me:19721: \"$ac_try\"") >&5
19722   (eval $ac_try) 2>&5
19723   ac_status=$?
19724   echo "$as_me:19724: \$? = $ac_status" >&5
19725   (exit $ac_status); }; }; then
19726   cf_cv_cgetent=yes
19727 else
19728   echo "$as_me: failed program was:" >&5
19729 cat conftest.$ac_ext >&5
19730 cf_cv_cgetent=no
19731 fi
19732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19733
19734 fi
19735 echo "$as_me:19735: result: $cf_cv_cgetent" >&5
19736 echo "${ECHO_T}$cf_cv_cgetent" >&6
19737
19738 if test "$cf_cv_cgetent" = yes
19739 then
19740
19741 cat >>confdefs.h <<\EOF
19742 #define HAVE_BSD_CGETENT 1
19743 EOF
19744
19745 echo "$as_me:19745: checking if cgetent uses const parameter" >&5
19746 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19747 if test "${cf_cv_cgetent_const+set}" = set; then
19748   echo $ECHO_N "(cached) $ECHO_C" >&6
19749 else
19750
19751 cat >conftest.$ac_ext <<_ACEOF
19752 #line 19752 "configure"
19753 #include "confdefs.h"
19754
19755 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19756 #include <stdlib.h>
19757 int
19758 main (void)
19759 {
19760
19761         char temp[128];
19762         char *buf = temp;
19763 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19764         const char *db_array = temp;
19765         cgetent(&buf, &db_array, "vt100");
19766 #endif
19767         cgetcap(buf, "tc", '=');
19768         cgetmatch(buf, "tc");
19769
19770   ;
19771   return 0;
19772 }
19773 _ACEOF
19774 rm -f conftest.$ac_objext conftest$ac_exeext
19775 if { (eval echo "$as_me:19775: \"$ac_link\"") >&5
19776   (eval $ac_link) 2>&5
19777   ac_status=$?
19778   echo "$as_me:19778: \$? = $ac_status" >&5
19779   (exit $ac_status); } &&
19780          { ac_try='test -s conftest$ac_exeext'
19781   { (eval echo "$as_me:19781: \"$ac_try\"") >&5
19782   (eval $ac_try) 2>&5
19783   ac_status=$?
19784   echo "$as_me:19784: \$? = $ac_status" >&5
19785   (exit $ac_status); }; }; then
19786   cf_cv_cgetent_const=yes
19787 else
19788   echo "$as_me: failed program was:" >&5
19789 cat conftest.$ac_ext >&5
19790 cf_cv_cgetent_const=no
19791 fi
19792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19793
19794 fi
19795 echo "$as_me:19795: result: $cf_cv_cgetent_const" >&5
19796 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19797         if test "$cf_cv_cgetent_const" = yes
19798         then
19799
19800 cat >>confdefs.h <<EOF
19801 #define CGETENT_CONST const
19802 EOF
19803
19804         fi
19805 fi
19806
19807 fi
19808
19809 echo "$as_me:19809: checking for isascii" >&5
19810 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19811 if test "${cf_cv_have_isascii+set}" = set; then
19812   echo $ECHO_N "(cached) $ECHO_C" >&6
19813 else
19814
19815         cat >conftest.$ac_ext <<_ACEOF
19816 #line 19816 "configure"
19817 #include "confdefs.h"
19818 #include <ctype.h>
19819 int
19820 main (void)
19821 {
19822 int x = isascii(' ')
19823   ;
19824   return 0;
19825 }
19826 _ACEOF
19827 rm -f conftest.$ac_objext conftest$ac_exeext
19828 if { (eval echo "$as_me:19828: \"$ac_link\"") >&5
19829   (eval $ac_link) 2>&5
19830   ac_status=$?
19831   echo "$as_me:19831: \$? = $ac_status" >&5
19832   (exit $ac_status); } &&
19833          { ac_try='test -s conftest$ac_exeext'
19834   { (eval echo "$as_me:19834: \"$ac_try\"") >&5
19835   (eval $ac_try) 2>&5
19836   ac_status=$?
19837   echo "$as_me:19837: \$? = $ac_status" >&5
19838   (exit $ac_status); }; }; then
19839   cf_cv_have_isascii=yes
19840 else
19841   echo "$as_me: failed program was:" >&5
19842 cat conftest.$ac_ext >&5
19843 cf_cv_have_isascii=no
19844 fi
19845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19846
19847 fi
19848 echo "$as_me:19848: result: $cf_cv_have_isascii" >&5
19849 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19850 test "$cf_cv_have_isascii" = yes &&
19851 cat >>confdefs.h <<\EOF
19852 #define HAVE_ISASCII 1
19853 EOF
19854
19855 if test "$ac_cv_func_sigaction" = yes; then
19856 echo "$as_me:19856: checking whether sigaction needs _POSIX_SOURCE" >&5
19857 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19858 cat >conftest.$ac_ext <<_ACEOF
19859 #line 19859 "configure"
19860 #include "confdefs.h"
19861
19862 #include <sys/types.h>
19863 #include <signal.h>
19864 int
19865 main (void)
19866 {
19867 struct sigaction act
19868   ;
19869   return 0;
19870 }
19871 _ACEOF
19872 rm -f conftest.$ac_objext
19873 if { (eval echo "$as_me:19873: \"$ac_compile\"") >&5
19874   (eval $ac_compile) 2>&5
19875   ac_status=$?
19876   echo "$as_me:19876: \$? = $ac_status" >&5
19877   (exit $ac_status); } &&
19878          { ac_try='test -s conftest.$ac_objext'
19879   { (eval echo "$as_me:19879: \"$ac_try\"") >&5
19880   (eval $ac_try) 2>&5
19881   ac_status=$?
19882   echo "$as_me:19882: \$? = $ac_status" >&5
19883   (exit $ac_status); }; }; then
19884   sigact_bad=no
19885 else
19886   echo "$as_me: failed program was:" >&5
19887 cat conftest.$ac_ext >&5
19888
19889 cat >conftest.$ac_ext <<_ACEOF
19890 #line 19890 "configure"
19891 #include "confdefs.h"
19892
19893 #define _POSIX_SOURCE
19894 #include <sys/types.h>
19895 #include <signal.h>
19896 int
19897 main (void)
19898 {
19899 struct sigaction act
19900   ;
19901   return 0;
19902 }
19903 _ACEOF
19904 rm -f conftest.$ac_objext
19905 if { (eval echo "$as_me:19905: \"$ac_compile\"") >&5
19906   (eval $ac_compile) 2>&5
19907   ac_status=$?
19908   echo "$as_me:19908: \$? = $ac_status" >&5
19909   (exit $ac_status); } &&
19910          { ac_try='test -s conftest.$ac_objext'
19911   { (eval echo "$as_me:19911: \"$ac_try\"") >&5
19912   (eval $ac_try) 2>&5
19913   ac_status=$?
19914   echo "$as_me:19914: \$? = $ac_status" >&5
19915   (exit $ac_status); }; }; then
19916   sigact_bad=yes
19917
19918 cat >>confdefs.h <<\EOF
19919 #define _POSIX_SOURCE 1
19920 EOF
19921
19922 else
19923   echo "$as_me: failed program was:" >&5
19924 cat conftest.$ac_ext >&5
19925 sigact_bad=unknown
19926 fi
19927 rm -f conftest.$ac_objext conftest.$ac_ext
19928 fi
19929 rm -f conftest.$ac_objext conftest.$ac_ext
19930 echo "$as_me:19930: result: $sigact_bad" >&5
19931 echo "${ECHO_T}$sigact_bad" >&6
19932 fi
19933
19934 echo "$as_me:19934: checking if nanosleep really works" >&5
19935 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19936 if test "${cf_cv_func_nanosleep+set}" = set; then
19937   echo $ECHO_N "(cached) $ECHO_C" >&6
19938 else
19939
19940 if test "$cross_compiling" = yes; then
19941   cf_cv_func_nanosleep=unknown
19942 else
19943   cat >conftest.$ac_ext <<_ACEOF
19944 #line 19944 "configure"
19945 #include "confdefs.h"
19946
19947 #include <stdio.h>
19948 #include <errno.h>
19949 #include <time.h>
19950
19951 #ifdef HAVE_SYS_TIME_H
19952 #include <sys/time.h>
19953 #endif
19954
19955 int main(void) {
19956         struct timespec ts1, ts2;
19957         int code;
19958         ts1.tv_sec  = 0;
19959         ts1.tv_nsec = 750000000;
19960         ts2.tv_sec  = 0;
19961         ts2.tv_nsec = 0;
19962         errno = 0;
19963         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19964         ${cf_cv_main_return:-return}(code != 0);
19965 }
19966
19967 _ACEOF
19968 rm -f conftest$ac_exeext
19969 if { (eval echo "$as_me:19969: \"$ac_link\"") >&5
19970   (eval $ac_link) 2>&5
19971   ac_status=$?
19972   echo "$as_me:19972: \$? = $ac_status" >&5
19973   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19974   { (eval echo "$as_me:19974: \"$ac_try\"") >&5
19975   (eval $ac_try) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit $ac_status); }; }; then
19979   cf_cv_func_nanosleep=yes
19980 else
19981   echo "$as_me: program exited with status $ac_status" >&5
19982 echo "$as_me: failed program was:" >&5
19983 cat conftest.$ac_ext >&5
19984 cf_cv_func_nanosleep=no
19985 fi
19986 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19987 fi
19988 fi
19989 echo "$as_me:19989: result: $cf_cv_func_nanosleep" >&5
19990 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19991
19992 test "$cf_cv_func_nanosleep" = "yes" &&
19993 cat >>confdefs.h <<\EOF
19994 #define HAVE_NANOSLEEP 1
19995 EOF
19996
19997 for ac_header in \
19998 termio.h \
19999 termios.h \
20000 unistd.h \
20001 sys/ioctl.h \
20002 sys/termio.h \
20003
20004 do
20005 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20006 echo "$as_me:20006: checking for $ac_header" >&5
20007 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20008 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20009   echo $ECHO_N "(cached) $ECHO_C" >&6
20010 else
20011   cat >conftest.$ac_ext <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014 #include <$ac_header>
20015 _ACEOF
20016 if { (eval echo "$as_me:20016: \"$ac_cpp conftest.$ac_ext\"") >&5
20017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20018   ac_status=$?
20019   egrep -v '^ *\+' conftest.er1 >conftest.err
20020   rm -f conftest.er1
20021   cat conftest.err >&5
20022   echo "$as_me:20022: \$? = $ac_status" >&5
20023   (exit $ac_status); } >/dev/null; then
20024   if test -s conftest.err; then
20025     ac_cpp_err=$ac_c_preproc_warn_flag
20026   else
20027     ac_cpp_err=
20028   fi
20029 else
20030   ac_cpp_err=yes
20031 fi
20032 if test -z "$ac_cpp_err"; then
20033   eval "$as_ac_Header=yes"
20034 else
20035   echo "$as_me: failed program was:" >&5
20036   cat conftest.$ac_ext >&5
20037   eval "$as_ac_Header=no"
20038 fi
20039 rm -f conftest.err conftest.$ac_ext
20040 fi
20041 echo "$as_me:20041: result: `eval echo '${'$as_ac_Header'}'`" >&5
20042 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20043 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20044   cat >>confdefs.h <<EOF
20045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20046 EOF
20047
20048 fi
20049 done
20050
20051 if test "$ac_cv_header_termios_h" = yes ; then
20052         case "$CFLAGS $CPPFLAGS" in
20053         (*-D_POSIX_SOURCE*)
20054                 termios_bad=dunno ;;
20055         (*)     termios_bad=maybe ;;
20056         esac
20057         if test "$termios_bad" = maybe ; then
20058         echo "$as_me:20058: checking whether termios.h needs _POSIX_SOURCE" >&5
20059 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20060         cat >conftest.$ac_ext <<_ACEOF
20061 #line 20061 "configure"
20062 #include "confdefs.h"
20063 #include <termios.h>
20064 int
20065 main (void)
20066 {
20067 struct termios foo; int x = foo.c_iflag
20068   ;
20069   return 0;
20070 }
20071 _ACEOF
20072 rm -f conftest.$ac_objext
20073 if { (eval echo "$as_me:20073: \"$ac_compile\"") >&5
20074   (eval $ac_compile) 2>&5
20075   ac_status=$?
20076   echo "$as_me:20076: \$? = $ac_status" >&5
20077   (exit $ac_status); } &&
20078          { ac_try='test -s conftest.$ac_objext'
20079   { (eval echo "$as_me:20079: \"$ac_try\"") >&5
20080   (eval $ac_try) 2>&5
20081   ac_status=$?
20082   echo "$as_me:20082: \$? = $ac_status" >&5
20083   (exit $ac_status); }; }; then
20084   termios_bad=no
20085 else
20086   echo "$as_me: failed program was:" >&5
20087 cat conftest.$ac_ext >&5
20088
20089                 cat >conftest.$ac_ext <<_ACEOF
20090 #line 20090 "configure"
20091 #include "confdefs.h"
20092
20093 #define _POSIX_SOURCE
20094 #include <termios.h>
20095 int
20096 main (void)
20097 {
20098 struct termios foo; int x = foo.c_iflag
20099   ;
20100   return 0;
20101 }
20102 _ACEOF
20103 rm -f conftest.$ac_objext
20104 if { (eval echo "$as_me:20104: \"$ac_compile\"") >&5
20105   (eval $ac_compile) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit $ac_status); } &&
20109          { ac_try='test -s conftest.$ac_objext'
20110   { (eval echo "$as_me:20110: \"$ac_try\"") >&5
20111   (eval $ac_try) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit $ac_status); }; }; then
20115   termios_bad=unknown
20116 else
20117   echo "$as_me: failed program was:" >&5
20118 cat conftest.$ac_ext >&5
20119 termios_bad=yes
20120 cat >>confdefs.h <<\EOF
20121 #define _POSIX_SOURCE 1
20122 EOF
20123
20124 fi
20125 rm -f conftest.$ac_objext conftest.$ac_ext
20126
20127 fi
20128 rm -f conftest.$ac_objext conftest.$ac_ext
20129         echo "$as_me:20129: result: $termios_bad" >&5
20130 echo "${ECHO_T}$termios_bad" >&6
20131         fi
20132 fi
20133
20134 echo "$as_me:20134: checking for tcgetattr" >&5
20135 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20136 if test "${cf_cv_have_tcgetattr+set}" = set; then
20137   echo $ECHO_N "(cached) $ECHO_C" >&6
20138 else
20139
20140 cat >conftest.$ac_ext <<_ACEOF
20141 #line 20141 "configure"
20142 #include "confdefs.h"
20143
20144 #include <sys/types.h>
20145 #ifdef HAVE_UNISTD_H
20146 #include <unistd.h>
20147 #endif
20148 #ifdef HAVE_TERMIOS_H
20149 #include <termios.h>
20150 #define TTY struct termios
20151 #else
20152 #ifdef HAVE_TERMIO_H
20153 #include <termio.h>
20154 #define TTY struct termio
20155 #endif
20156 #endif
20157
20158 int
20159 main (void)
20160 {
20161
20162 TTY foo;
20163 tcgetattr(1, &foo);
20164   ;
20165   return 0;
20166 }
20167 _ACEOF
20168 rm -f conftest.$ac_objext conftest$ac_exeext
20169 if { (eval echo "$as_me:20169: \"$ac_link\"") >&5
20170   (eval $ac_link) 2>&5
20171   ac_status=$?
20172   echo "$as_me:20172: \$? = $ac_status" >&5
20173   (exit $ac_status); } &&
20174          { ac_try='test -s conftest$ac_exeext'
20175   { (eval echo "$as_me:20175: \"$ac_try\"") >&5
20176   (eval $ac_try) 2>&5
20177   ac_status=$?
20178   echo "$as_me:20178: \$? = $ac_status" >&5
20179   (exit $ac_status); }; }; then
20180   cf_cv_have_tcgetattr=yes
20181 else
20182   echo "$as_me: failed program was:" >&5
20183 cat conftest.$ac_ext >&5
20184 cf_cv_have_tcgetattr=no
20185 fi
20186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20187 fi
20188 echo "$as_me:20188: result: $cf_cv_have_tcgetattr" >&5
20189 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20190 test "$cf_cv_have_tcgetattr" = yes &&
20191 cat >>confdefs.h <<\EOF
20192 #define HAVE_TCGETATTR 1
20193 EOF
20194
20195 echo "$as_me:20195: checking for vsscanf function or workaround" >&5
20196 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20197 if test "${cf_cv_func_vsscanf+set}" = set; then
20198   echo $ECHO_N "(cached) $ECHO_C" >&6
20199 else
20200
20201 cat >conftest.$ac_ext <<_ACEOF
20202 #line 20202 "configure"
20203 #include "confdefs.h"
20204
20205 #include <stdarg.h>
20206 #include <stdio.h>
20207 int
20208 main (void)
20209 {
20210
20211         va_list ap;
20212         vsscanf("from", "%d", ap)
20213   ;
20214   return 0;
20215 }
20216 _ACEOF
20217 rm -f conftest.$ac_objext conftest$ac_exeext
20218 if { (eval echo "$as_me:20218: \"$ac_link\"") >&5
20219   (eval $ac_link) 2>&5
20220   ac_status=$?
20221   echo "$as_me:20221: \$? = $ac_status" >&5
20222   (exit $ac_status); } &&
20223          { ac_try='test -s conftest$ac_exeext'
20224   { (eval echo "$as_me:20224: \"$ac_try\"") >&5
20225   (eval $ac_try) 2>&5
20226   ac_status=$?
20227   echo "$as_me:20227: \$? = $ac_status" >&5
20228   (exit $ac_status); }; }; then
20229   cf_cv_func_vsscanf=vsscanf
20230 else
20231   echo "$as_me: failed program was:" >&5
20232 cat conftest.$ac_ext >&5
20233
20234 cat >conftest.$ac_ext <<_ACEOF
20235 #line 20235 "configure"
20236 #include "confdefs.h"
20237
20238 #include <stdarg.h>
20239 #include <stdio.h>
20240 int
20241 main (void)
20242 {
20243
20244         FILE strbuf;
20245         char *str = "from";
20246
20247         strbuf._flag = _IOREAD;
20248         strbuf._ptr = strbuf._base = (unsigned char *) str;
20249         strbuf._cnt = strlen(str);
20250         strbuf._file = _NFILE;
20251         return (vfscanf(&strbuf, "%d", ap))
20252   ;
20253   return 0;
20254 }
20255 _ACEOF
20256 rm -f conftest.$ac_objext conftest$ac_exeext
20257 if { (eval echo "$as_me:20257: \"$ac_link\"") >&5
20258   (eval $ac_link) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit $ac_status); } &&
20262          { ac_try='test -s conftest$ac_exeext'
20263   { (eval echo "$as_me:20263: \"$ac_try\"") >&5
20264   (eval $ac_try) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit $ac_status); }; }; then
20268   cf_cv_func_vsscanf=vfscanf
20269 else
20270   echo "$as_me: failed program was:" >&5
20271 cat conftest.$ac_ext >&5
20272
20273 cat >conftest.$ac_ext <<_ACEOF
20274 #line 20274 "configure"
20275 #include "confdefs.h"
20276
20277 #include <stdarg.h>
20278 #include <stdio.h>
20279 int
20280 main (void)
20281 {
20282
20283         FILE strbuf;
20284         char *str = "from";
20285
20286         strbuf._flag = _IOREAD;
20287         strbuf._ptr = strbuf._base = (unsigned char *) str;
20288         strbuf._cnt = strlen(str);
20289         strbuf._file = _NFILE;
20290         return (_doscan(&strbuf, "%d", ap))
20291   ;
20292   return 0;
20293 }
20294 _ACEOF
20295 rm -f conftest.$ac_objext conftest$ac_exeext
20296 if { (eval echo "$as_me:20296: \"$ac_link\"") >&5
20297   (eval $ac_link) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); } &&
20301          { ac_try='test -s conftest$ac_exeext'
20302   { (eval echo "$as_me:20302: \"$ac_try\"") >&5
20303   (eval $ac_try) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit $ac_status); }; }; then
20307   cf_cv_func_vsscanf=_doscan
20308 else
20309   echo "$as_me: failed program was:" >&5
20310 cat conftest.$ac_ext >&5
20311
20312 cf_cv_func_vsscanf=no
20313 fi
20314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20315 fi
20316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20317 fi
20318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20319 fi
20320 echo "$as_me:20320: result: $cf_cv_func_vsscanf" >&5
20321 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20322
20323 case $cf_cv_func_vsscanf in
20324 (vsscanf)
20325 cat >>confdefs.h <<\EOF
20326 #define HAVE_VSSCANF 1
20327 EOF
20328 ;;
20329 (vfscanf)
20330 cat >>confdefs.h <<\EOF
20331 #define HAVE_VFSCANF 1
20332 EOF
20333 ;;
20334 (_doscan)
20335 cat >>confdefs.h <<\EOF
20336 #define HAVE__DOSCAN 1
20337 EOF
20338 ;;
20339 esac
20340
20341 for ac_header in \
20342 unistd.h \
20343
20344 do
20345 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20346 echo "$as_me:20346: checking for $ac_header" >&5
20347 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20348 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20349   echo $ECHO_N "(cached) $ECHO_C" >&6
20350 else
20351   cat >conftest.$ac_ext <<_ACEOF
20352 #line 20352 "configure"
20353 #include "confdefs.h"
20354 #include <$ac_header>
20355 _ACEOF
20356 if { (eval echo "$as_me:20356: \"$ac_cpp conftest.$ac_ext\"") >&5
20357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20358   ac_status=$?
20359   egrep -v '^ *\+' conftest.er1 >conftest.err
20360   rm -f conftest.er1
20361   cat conftest.err >&5
20362   echo "$as_me:20362: \$? = $ac_status" >&5
20363   (exit $ac_status); } >/dev/null; then
20364   if test -s conftest.err; then
20365     ac_cpp_err=$ac_c_preproc_warn_flag
20366   else
20367     ac_cpp_err=
20368   fi
20369 else
20370   ac_cpp_err=yes
20371 fi
20372 if test -z "$ac_cpp_err"; then
20373   eval "$as_ac_Header=yes"
20374 else
20375   echo "$as_me: failed program was:" >&5
20376   cat conftest.$ac_ext >&5
20377   eval "$as_ac_Header=no"
20378 fi
20379 rm -f conftest.err conftest.$ac_ext
20380 fi
20381 echo "$as_me:20381: result: `eval echo '${'$as_ac_Header'}'`" >&5
20382 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20383 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20384   cat >>confdefs.h <<EOF
20385 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20386 EOF
20387
20388 fi
20389 done
20390
20391 echo "$as_me:20391: checking for working mkstemp" >&5
20392 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20393 if test "${cf_cv_func_mkstemp+set}" = set; then
20394   echo $ECHO_N "(cached) $ECHO_C" >&6
20395 else
20396
20397 rm -rf conftest*
20398 if test "$cross_compiling" = yes; then
20399   cf_cv_func_mkstemp=maybe
20400 else
20401   cat >conftest.$ac_ext <<_ACEOF
20402 #line 20402 "configure"
20403 #include "confdefs.h"
20404
20405 #include <sys/types.h>
20406 #ifdef HAVE_UNISTD_H
20407 #include <unistd.h>
20408 #endif
20409 #include <stdlib.h>
20410 #include <stdio.h>
20411 #include <string.h>
20412 #include <sys/stat.h>
20413 int main(void)
20414 {
20415         char *tmpl = "conftestXXXXXX";
20416         char name[2][80];
20417         int n;
20418         int result = 0;
20419         int fd;
20420         struct stat sb;
20421
20422         umask(077);
20423         for (n = 0; n < 2; ++n) {
20424                 strcpy(name[n], tmpl);
20425                 if ((fd = mkstemp(name[n])) >= 0) {
20426                         if (!strcmp(name[n], tmpl)
20427                          || stat(name[n], &sb) != 0
20428                          || (sb.st_mode & S_IFMT) != S_IFREG
20429                          || (sb.st_mode & 077) != 0) {
20430                                 result = 1;
20431                         }
20432                         close(fd);
20433                 }
20434         }
20435         if (result == 0
20436          && !strcmp(name[0], name[1]))
20437                 result = 1;
20438         ${cf_cv_main_return:-return}(result);
20439 }
20440
20441 _ACEOF
20442 rm -f conftest$ac_exeext
20443 if { (eval echo "$as_me:20443: \"$ac_link\"") >&5
20444   (eval $ac_link) 2>&5
20445   ac_status=$?
20446   echo "$as_me:20446: \$? = $ac_status" >&5
20447   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20448   { (eval echo "$as_me:20448: \"$ac_try\"") >&5
20449   (eval $ac_try) 2>&5
20450   ac_status=$?
20451   echo "$as_me:20451: \$? = $ac_status" >&5
20452   (exit $ac_status); }; }; then
20453   cf_cv_func_mkstemp=yes
20454
20455 else
20456   echo "$as_me: program exited with status $ac_status" >&5
20457 echo "$as_me: failed program was:" >&5
20458 cat conftest.$ac_ext >&5
20459 cf_cv_func_mkstemp=no
20460
20461 fi
20462 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20463 fi
20464
20465 fi
20466 echo "$as_me:20466: result: $cf_cv_func_mkstemp" >&5
20467 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20468 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20469         echo "$as_me:20469: checking for mkstemp" >&5
20470 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20471 if test "${ac_cv_func_mkstemp+set}" = set; then
20472   echo $ECHO_N "(cached) $ECHO_C" >&6
20473 else
20474   cat >conftest.$ac_ext <<_ACEOF
20475 #line 20475 "configure"
20476 #include "confdefs.h"
20477 #define mkstemp autoconf_temporary
20478 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20479 #undef mkstemp
20480
20481 #ifdef __cplusplus
20482 extern "C"
20483 #endif
20484
20485 /* We use char because int might match the return type of a gcc2
20486    builtin and then its argument prototype would still apply.  */
20487 char mkstemp (void);
20488
20489 int
20490 main (void)
20491 {
20492
20493 /* The GNU C library defines stubs for functions which it implements
20494     to always fail with ENOSYS.  Some functions are actually named
20495     something starting with __ and the normal name is an alias.  */
20496 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20497 #error found stub for mkstemp
20498 #endif
20499
20500         return mkstemp ();
20501   ;
20502   return 0;
20503 }
20504 _ACEOF
20505 rm -f conftest.$ac_objext conftest$ac_exeext
20506 if { (eval echo "$as_me:20506: \"$ac_link\"") >&5
20507   (eval $ac_link) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit $ac_status); } &&
20511          { ac_try='test -s conftest$ac_exeext'
20512   { (eval echo "$as_me:20512: \"$ac_try\"") >&5
20513   (eval $ac_try) 2>&5
20514   ac_status=$?
20515   echo "$as_me:20515: \$? = $ac_status" >&5
20516   (exit $ac_status); }; }; then
20517   ac_cv_func_mkstemp=yes
20518 else
20519   echo "$as_me: failed program was:" >&5
20520 cat conftest.$ac_ext >&5
20521 ac_cv_func_mkstemp=no
20522 fi
20523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20524 fi
20525 echo "$as_me:20525: result: $ac_cv_func_mkstemp" >&5
20526 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20527
20528 fi
20529 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20530
20531 cat >>confdefs.h <<\EOF
20532 #define HAVE_MKSTEMP 1
20533 EOF
20534
20535 fi
20536
20537 # setup for prototype of fallback for vsscanf()
20538
20539 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20540         HAVE_VSSCANF=1
20541 else
20542         HAVE_VSSCANF=0
20543 fi
20544
20545 if test "x$cross_compiling" = xyes ; then
20546         { echo "$as_me:20546: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20547 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20548 else
20549         echo "$as_me:20549: checking whether setvbuf arguments are reversed" >&5
20550 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20551 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20552   echo $ECHO_N "(cached) $ECHO_C" >&6
20553 else
20554   if test "$cross_compiling" = yes; then
20555   { { echo "$as_me:20555: error: cannot run test program while cross compiling" >&5
20556 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20557    { (exit 1); exit 1; }; }
20558 else
20559   cat >conftest.$ac_ext <<_ACEOF
20560 #line 20560 "configure"
20561 #include "confdefs.h"
20562 #include <stdio.h>
20563 /* If setvbuf has the reversed format, exit 0. */
20564 int
20565 main (void)
20566 {
20567   /* This call has the arguments reversed.
20568      A reversed system may check and see that the address of main
20569      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20570   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20571     $ac_main_return(1);
20572   putc('\r', stdout);
20573   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20574 }
20575 _ACEOF
20576 rm -f conftest$ac_exeext
20577 if { (eval echo "$as_me:20577: \"$ac_link\"") >&5
20578   (eval $ac_link) 2>&5
20579   ac_status=$?
20580   echo "$as_me:20580: \$? = $ac_status" >&5
20581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20582   { (eval echo "$as_me:20582: \"$ac_try\"") >&5
20583   (eval $ac_try) 2>&5
20584   ac_status=$?
20585   echo "$as_me:20585: \$? = $ac_status" >&5
20586   (exit $ac_status); }; }; then
20587   ac_cv_func_setvbuf_reversed=yes
20588 else
20589   echo "$as_me: program exited with status $ac_status" >&5
20590 echo "$as_me: failed program was:" >&5
20591 cat conftest.$ac_ext >&5
20592 ac_cv_func_setvbuf_reversed=no
20593 fi
20594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20595 fi
20596 rm -f core core.* *.core
20597 fi
20598 echo "$as_me:20598: result: $ac_cv_func_setvbuf_reversed" >&5
20599 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20600 if test $ac_cv_func_setvbuf_reversed = yes; then
20601
20602 cat >>confdefs.h <<\EOF
20603 #define SETVBUF_REVERSED 1
20604 EOF
20605
20606 fi
20607
20608 fi
20609 echo "$as_me:20609: checking for intptr_t" >&5
20610 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20611 if test "${ac_cv_type_intptr_t+set}" = set; then
20612   echo $ECHO_N "(cached) $ECHO_C" >&6
20613 else
20614   cat >conftest.$ac_ext <<_ACEOF
20615 #line 20615 "configure"
20616 #include "confdefs.h"
20617 $ac_includes_default
20618 int
20619 main (void)
20620 {
20621 if ((intptr_t *) 0)
20622   return 0;
20623 if (sizeof (intptr_t))
20624   return 0;
20625   ;
20626   return 0;
20627 }
20628 _ACEOF
20629 rm -f conftest.$ac_objext
20630 if { (eval echo "$as_me:20630: \"$ac_compile\"") >&5
20631   (eval $ac_compile) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit $ac_status); } &&
20635          { ac_try='test -s conftest.$ac_objext'
20636   { (eval echo "$as_me:20636: \"$ac_try\"") >&5
20637   (eval $ac_try) 2>&5
20638   ac_status=$?
20639   echo "$as_me:20639: \$? = $ac_status" >&5
20640   (exit $ac_status); }; }; then
20641   ac_cv_type_intptr_t=yes
20642 else
20643   echo "$as_me: failed program was:" >&5
20644 cat conftest.$ac_ext >&5
20645 ac_cv_type_intptr_t=no
20646 fi
20647 rm -f conftest.$ac_objext conftest.$ac_ext
20648 fi
20649 echo "$as_me:20649: result: $ac_cv_type_intptr_t" >&5
20650 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20651 if test $ac_cv_type_intptr_t = yes; then
20652   :
20653 else
20654
20655 cat >>confdefs.h <<EOF
20656 #define intptr_t long
20657 EOF
20658
20659 fi
20660
20661 echo "$as_me:20661: checking for ssize_t" >&5
20662 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20663 if test "${ac_cv_type_ssize_t+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666   cat >conftest.$ac_ext <<_ACEOF
20667 #line 20667 "configure"
20668 #include "confdefs.h"
20669 $ac_includes_default
20670 int
20671 main (void)
20672 {
20673 if ((ssize_t *) 0)
20674   return 0;
20675 if (sizeof (ssize_t))
20676   return 0;
20677   ;
20678   return 0;
20679 }
20680 _ACEOF
20681 rm -f conftest.$ac_objext
20682 if { (eval echo "$as_me:20682: \"$ac_compile\"") >&5
20683   (eval $ac_compile) 2>&5
20684   ac_status=$?
20685   echo "$as_me:20685: \$? = $ac_status" >&5
20686   (exit $ac_status); } &&
20687          { ac_try='test -s conftest.$ac_objext'
20688   { (eval echo "$as_me:20688: \"$ac_try\"") >&5
20689   (eval $ac_try) 2>&5
20690   ac_status=$?
20691   echo "$as_me:20691: \$? = $ac_status" >&5
20692   (exit $ac_status); }; }; then
20693   ac_cv_type_ssize_t=yes
20694 else
20695   echo "$as_me: failed program was:" >&5
20696 cat conftest.$ac_ext >&5
20697 ac_cv_type_ssize_t=no
20698 fi
20699 rm -f conftest.$ac_objext conftest.$ac_ext
20700 fi
20701 echo "$as_me:20701: result: $ac_cv_type_ssize_t" >&5
20702 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20703 if test $ac_cv_type_ssize_t = yes; then
20704   :
20705 else
20706
20707 cat >>confdefs.h <<EOF
20708 #define ssize_t int
20709 EOF
20710
20711 fi
20712
20713 echo "$as_me:20713: checking for type sigaction_t" >&5
20714 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20715 if test "${cf_cv_type_sigaction+set}" = set; then
20716   echo $ECHO_N "(cached) $ECHO_C" >&6
20717 else
20718
20719         cat >conftest.$ac_ext <<_ACEOF
20720 #line 20720 "configure"
20721 #include "confdefs.h"
20722
20723 #include <signal.h>
20724 int
20725 main (void)
20726 {
20727 sigaction_t x
20728   ;
20729   return 0;
20730 }
20731 _ACEOF
20732 rm -f conftest.$ac_objext
20733 if { (eval echo "$as_me:20733: \"$ac_compile\"") >&5
20734   (eval $ac_compile) 2>&5
20735   ac_status=$?
20736   echo "$as_me:20736: \$? = $ac_status" >&5
20737   (exit $ac_status); } &&
20738          { ac_try='test -s conftest.$ac_objext'
20739   { (eval echo "$as_me:20739: \"$ac_try\"") >&5
20740   (eval $ac_try) 2>&5
20741   ac_status=$?
20742   echo "$as_me:20742: \$? = $ac_status" >&5
20743   (exit $ac_status); }; }; then
20744   cf_cv_type_sigaction=yes
20745 else
20746   echo "$as_me: failed program was:" >&5
20747 cat conftest.$ac_ext >&5
20748 cf_cv_type_sigaction=no
20749 fi
20750 rm -f conftest.$ac_objext conftest.$ac_ext
20751 fi
20752
20753 echo "$as_me:20753: result: $cf_cv_type_sigaction" >&5
20754 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20755 test "$cf_cv_type_sigaction" = yes &&
20756 cat >>confdefs.h <<\EOF
20757 #define HAVE_TYPE_SIGACTION 1
20758 EOF
20759
20760 echo "$as_me:20760: checking declaration of size-change" >&5
20761 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20762 if test "${cf_cv_sizechange+set}" = set; then
20763   echo $ECHO_N "(cached) $ECHO_C" >&6
20764 else
20765
20766         cf_cv_sizechange=unknown
20767         cf_save_CPPFLAGS="$CPPFLAGS"
20768
20769 for cf_opts in "" "NEED_PTEM_H"
20770 do
20771
20772         CPPFLAGS="$cf_save_CPPFLAGS"
20773         if test -n "$cf_opts"
20774         then
20775
20776         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20777         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20778
20779         fi
20780         cat >conftest.$ac_ext <<_ACEOF
20781 #line 20781 "configure"
20782 #include "confdefs.h"
20783 #include <sys/types.h>
20784 #ifdef HAVE_TERMIOS_H
20785 #include <termios.h>
20786 #else
20787 #ifdef HAVE_TERMIO_H
20788 #include <termio.h>
20789 #endif
20790 #endif
20791
20792 #ifdef NEED_PTEM_H
20793 /* This is a workaround for SCO:  they neglected to define struct winsize in
20794  * termios.h -- it's only in termio.h and ptem.h
20795  */
20796 #include <sys/stream.h>
20797 #include <sys/ptem.h>
20798 #endif
20799
20800 #ifdef HAVE_SYS_IOCTL_H
20801 #include <sys/ioctl.h>
20802 #endif
20803
20804 int
20805 main (void)
20806 {
20807
20808 #ifdef TIOCGSIZE
20809         struct ttysize win;     /* SunOS 3.0... */
20810         int y = win.ts_lines;
20811         int x = win.ts_cols;
20812 #else
20813 #ifdef TIOCGWINSZ
20814         struct winsize win;     /* everything else */
20815         int y = win.ws_row;
20816         int x = win.ws_col;
20817 #else
20818         no TIOCGSIZE or TIOCGWINSZ
20819 #endif /* TIOCGWINSZ */
20820 #endif /* TIOCGSIZE */
20821
20822   ;
20823   return 0;
20824 }
20825 _ACEOF
20826 rm -f conftest.$ac_objext
20827 if { (eval echo "$as_me:20827: \"$ac_compile\"") >&5
20828   (eval $ac_compile) 2>&5
20829   ac_status=$?
20830   echo "$as_me:20830: \$? = $ac_status" >&5
20831   (exit $ac_status); } &&
20832          { ac_try='test -s conftest.$ac_objext'
20833   { (eval echo "$as_me:20833: \"$ac_try\"") >&5
20834   (eval $ac_try) 2>&5
20835   ac_status=$?
20836   echo "$as_me:20836: \$? = $ac_status" >&5
20837   (exit $ac_status); }; }; then
20838   cf_cv_sizechange=yes
20839 else
20840   echo "$as_me: failed program was:" >&5
20841 cat conftest.$ac_ext >&5
20842 cf_cv_sizechange=no
20843 fi
20844 rm -f conftest.$ac_objext conftest.$ac_ext
20845
20846         CPPFLAGS="$cf_save_CPPFLAGS"
20847         if test "$cf_cv_sizechange" = yes ; then
20848                 echo "size-change succeeded ($cf_opts)" >&5
20849                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20850                 break
20851         fi
20852 done
20853
20854 fi
20855 echo "$as_me:20855: result: $cf_cv_sizechange" >&5
20856 echo "${ECHO_T}$cf_cv_sizechange" >&6
20857 if test "$cf_cv_sizechange" != no ; then
20858
20859 cat >>confdefs.h <<\EOF
20860 #define HAVE_SIZECHANGE 1
20861 EOF
20862
20863         case $cf_cv_sizechange in
20864         (NEED*)
20865                 cat >>confdefs.h <<EOF
20866 #define $cf_cv_sizechange  1
20867 EOF
20868
20869                 ;;
20870         esac
20871 fi
20872
20873 echo "$as_me:20873: checking for memmove" >&5
20874 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20875 if test "${ac_cv_func_memmove+set}" = set; then
20876   echo $ECHO_N "(cached) $ECHO_C" >&6
20877 else
20878   cat >conftest.$ac_ext <<_ACEOF
20879 #line 20879 "configure"
20880 #include "confdefs.h"
20881 #define memmove autoconf_temporary
20882 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20883 #undef memmove
20884
20885 #ifdef __cplusplus
20886 extern "C"
20887 #endif
20888
20889 /* We use char because int might match the return type of a gcc2
20890    builtin and then its argument prototype would still apply.  */
20891 char memmove (void);
20892
20893 int
20894 main (void)
20895 {
20896
20897 /* The GNU C library defines stubs for functions which it implements
20898     to always fail with ENOSYS.  Some functions are actually named
20899     something starting with __ and the normal name is an alias.  */
20900 #if defined (__stub_memmove) || defined (__stub___memmove)
20901 #error found stub for memmove
20902 #endif
20903
20904         return memmove ();
20905   ;
20906   return 0;
20907 }
20908 _ACEOF
20909 rm -f conftest.$ac_objext conftest$ac_exeext
20910 if { (eval echo "$as_me:20910: \"$ac_link\"") >&5
20911   (eval $ac_link) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); } &&
20915          { ac_try='test -s conftest$ac_exeext'
20916   { (eval echo "$as_me:20916: \"$ac_try\"") >&5
20917   (eval $ac_try) 2>&5
20918   ac_status=$?
20919   echo "$as_me:20919: \$? = $ac_status" >&5
20920   (exit $ac_status); }; }; then
20921   ac_cv_func_memmove=yes
20922 else
20923   echo "$as_me: failed program was:" >&5
20924 cat conftest.$ac_ext >&5
20925 ac_cv_func_memmove=no
20926 fi
20927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20928 fi
20929 echo "$as_me:20929: result: $ac_cv_func_memmove" >&5
20930 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20931 if test $ac_cv_func_memmove = yes; then
20932   :
20933 else
20934
20935 echo "$as_me:20935: checking for bcopy" >&5
20936 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20937 if test "${ac_cv_func_bcopy+set}" = set; then
20938   echo $ECHO_N "(cached) $ECHO_C" >&6
20939 else
20940   cat >conftest.$ac_ext <<_ACEOF
20941 #line 20941 "configure"
20942 #include "confdefs.h"
20943 #define bcopy autoconf_temporary
20944 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20945 #undef bcopy
20946
20947 #ifdef __cplusplus
20948 extern "C"
20949 #endif
20950
20951 /* We use char because int might match the return type of a gcc2
20952    builtin and then its argument prototype would still apply.  */
20953 char bcopy (void);
20954
20955 int
20956 main (void)
20957 {
20958
20959 /* The GNU C library defines stubs for functions which it implements
20960     to always fail with ENOSYS.  Some functions are actually named
20961     something starting with __ and the normal name is an alias.  */
20962 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20963 #error found stub for bcopy
20964 #endif
20965
20966         return bcopy ();
20967   ;
20968   return 0;
20969 }
20970 _ACEOF
20971 rm -f conftest.$ac_objext conftest$ac_exeext
20972 if { (eval echo "$as_me:20972: \"$ac_link\"") >&5
20973   (eval $ac_link) 2>&5
20974   ac_status=$?
20975   echo "$as_me:20975: \$? = $ac_status" >&5
20976   (exit $ac_status); } &&
20977          { ac_try='test -s conftest$ac_exeext'
20978   { (eval echo "$as_me:20978: \"$ac_try\"") >&5
20979   (eval $ac_try) 2>&5
20980   ac_status=$?
20981   echo "$as_me:20981: \$? = $ac_status" >&5
20982   (exit $ac_status); }; }; then
20983   ac_cv_func_bcopy=yes
20984 else
20985   echo "$as_me: failed program was:" >&5
20986 cat conftest.$ac_ext >&5
20987 ac_cv_func_bcopy=no
20988 fi
20989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20990 fi
20991 echo "$as_me:20991: result: $ac_cv_func_bcopy" >&5
20992 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20993 if test $ac_cv_func_bcopy = yes; then
20994
20995         echo "$as_me:20995: checking if bcopy does overlapping moves" >&5
20996 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20997 if test "${cf_cv_good_bcopy+set}" = set; then
20998   echo $ECHO_N "(cached) $ECHO_C" >&6
20999 else
21000
21001                 if test "$cross_compiling" = yes; then
21002   cf_cv_good_bcopy=unknown
21003 else
21004   cat >conftest.$ac_ext <<_ACEOF
21005 #line 21005 "configure"
21006 #include "confdefs.h"
21007
21008 int main(void) {
21009         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21010         char temp[40];
21011         bcopy(data, temp, sizeof(data));
21012         bcopy(temp+10, temp, 15);
21013         bcopy(temp+5, temp+15, 10);
21014         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21015 }
21016
21017 _ACEOF
21018 rm -f conftest$ac_exeext
21019 if { (eval echo "$as_me:21019: \"$ac_link\"") >&5
21020   (eval $ac_link) 2>&5
21021   ac_status=$?
21022   echo "$as_me:21022: \$? = $ac_status" >&5
21023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21024   { (eval echo "$as_me:21024: \"$ac_try\"") >&5
21025   (eval $ac_try) 2>&5
21026   ac_status=$?
21027   echo "$as_me:21027: \$? = $ac_status" >&5
21028   (exit $ac_status); }; }; then
21029   cf_cv_good_bcopy=yes
21030 else
21031   echo "$as_me: program exited with status $ac_status" >&5
21032 echo "$as_me: failed program was:" >&5
21033 cat conftest.$ac_ext >&5
21034 cf_cv_good_bcopy=no
21035 fi
21036 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21037 fi
21038
21039 fi
21040 echo "$as_me:21040: result: $cf_cv_good_bcopy" >&5
21041 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21042
21043 else
21044   cf_cv_good_bcopy=no
21045 fi
21046
21047         if test "$cf_cv_good_bcopy" = yes ; then
21048
21049 cat >>confdefs.h <<\EOF
21050 #define USE_OK_BCOPY 1
21051 EOF
21052
21053         else
21054
21055 cat >>confdefs.h <<\EOF
21056 #define USE_MY_MEMMOVE 1
21057 EOF
21058
21059         fi
21060
21061 fi
21062
21063 tty 2>&1 >/dev/null || {
21064 for ac_func in posix_openpt
21065 do
21066 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21067 echo "$as_me:21067: checking for $ac_func" >&5
21068 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21069 if eval "test \"\${$as_ac_var+set}\" = set"; then
21070   echo $ECHO_N "(cached) $ECHO_C" >&6
21071 else
21072   cat >conftest.$ac_ext <<_ACEOF
21073 #line 21073 "configure"
21074 #include "confdefs.h"
21075 #define $ac_func autoconf_temporary
21076 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21077 #undef $ac_func
21078
21079 #ifdef __cplusplus
21080 extern "C"
21081 #endif
21082
21083 /* We use char because int might match the return type of a gcc2
21084    builtin and then its argument prototype would still apply.  */
21085 char $ac_func (void);
21086
21087 int
21088 main (void)
21089 {
21090
21091 /* The GNU C library defines stubs for functions which it implements
21092     to always fail with ENOSYS.  Some functions are actually named
21093     something starting with __ and the normal name is an alias.  */
21094 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21095 #error found stub for $ac_func
21096 #endif
21097
21098         return $ac_func ();
21099   ;
21100   return 0;
21101 }
21102 _ACEOF
21103 rm -f conftest.$ac_objext conftest$ac_exeext
21104 if { (eval echo "$as_me:21104: \"$ac_link\"") >&5
21105   (eval $ac_link) 2>&5
21106   ac_status=$?
21107   echo "$as_me:21107: \$? = $ac_status" >&5
21108   (exit $ac_status); } &&
21109          { ac_try='test -s conftest$ac_exeext'
21110   { (eval echo "$as_me:21110: \"$ac_try\"") >&5
21111   (eval $ac_try) 2>&5
21112   ac_status=$?
21113   echo "$as_me:21113: \$? = $ac_status" >&5
21114   (exit $ac_status); }; }; then
21115   eval "$as_ac_var=yes"
21116 else
21117   echo "$as_me: failed program was:" >&5
21118 cat conftest.$ac_ext >&5
21119 eval "$as_ac_var=no"
21120 fi
21121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21122 fi
21123 echo "$as_me:21123: result: `eval echo '${'$as_ac_var'}'`" >&5
21124 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21125 if test `eval echo '${'$as_ac_var'}'` = yes; then
21126   cat >>confdefs.h <<EOF
21127 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21128 EOF
21129
21130 fi
21131 done
21132  }
21133 echo "$as_me:21133: checking if poll really works" >&5
21134 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21135 if test "${cf_cv_working_poll+set}" = set; then
21136   echo $ECHO_N "(cached) $ECHO_C" >&6
21137 else
21138
21139 if test "$cross_compiling" = yes; then
21140   cf_cv_working_poll=unknown
21141 else
21142   cat >conftest.$ac_ext <<_ACEOF
21143 #line 21143 "configure"
21144 #include "confdefs.h"
21145
21146 #include <stdlib.h>
21147 #include <stdio.h>
21148 #include <unistd.h>
21149 #include <fcntl.h>
21150 #ifdef HAVE_POLL_H
21151 #include <poll.h>
21152 #else
21153 #include <sys/poll.h>
21154 #endif
21155 int main(void) {
21156         struct pollfd myfds;
21157         int ret;
21158
21159         /* check for Darwin bug with respect to "devices" */
21160         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21161         if (myfds.fd < 0)
21162                 myfds.fd = 0;
21163         myfds.events = POLLIN;
21164         myfds.revents = 0;
21165
21166         ret = poll(&myfds, 1, 100);
21167
21168         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21169                 ret = -1;
21170         } else {
21171                 int fd = 0;
21172                 if (!isatty(fd)) {
21173                         fd = open("/dev/tty", 2);       /* O_RDWR */
21174                 }
21175 #ifdef HAVE_POSIX_OPENPT
21176                 if (fd < 0) {
21177                         fd = posix_openpt(O_RDWR);
21178                 }
21179 #endif
21180
21181                 if (fd >= 0) {
21182                         /* also check with standard input */
21183                         myfds.fd = fd;
21184                         myfds.events = POLLIN;
21185                         myfds.revents = 0;
21186                         ret = poll(&myfds, 1, 100);
21187                 } else {
21188                         ret = -1;
21189                 }
21190         }
21191         ${cf_cv_main_return:-return}(ret < 0);
21192 }
21193 _ACEOF
21194 rm -f conftest$ac_exeext
21195 if { (eval echo "$as_me:21195: \"$ac_link\"") >&5
21196   (eval $ac_link) 2>&5
21197   ac_status=$?
21198   echo "$as_me:21198: \$? = $ac_status" >&5
21199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21200   { (eval echo "$as_me:21200: \"$ac_try\"") >&5
21201   (eval $ac_try) 2>&5
21202   ac_status=$?
21203   echo "$as_me:21203: \$? = $ac_status" >&5
21204   (exit $ac_status); }; }; then
21205   cf_cv_working_poll=yes
21206 else
21207   echo "$as_me: program exited with status $ac_status" >&5
21208 echo "$as_me: failed program was:" >&5
21209 cat conftest.$ac_ext >&5
21210 cf_cv_working_poll=no
21211 fi
21212 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21213 fi
21214 fi
21215 echo "$as_me:21215: result: $cf_cv_working_poll" >&5
21216 echo "${ECHO_T}$cf_cv_working_poll" >&6
21217 test "$cf_cv_working_poll" = "yes" &&
21218 cat >>confdefs.h <<\EOF
21219 #define HAVE_WORKING_POLL 1
21220 EOF
21221
21222 echo "$as_me:21222: checking for va_copy" >&5
21223 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21224 if test "${cf_cv_have_va_copy+set}" = set; then
21225   echo $ECHO_N "(cached) $ECHO_C" >&6
21226 else
21227
21228 cat >conftest.$ac_ext <<_ACEOF
21229 #line 21229 "configure"
21230 #include "confdefs.h"
21231
21232 #include <stdarg.h>
21233
21234 int
21235 main (void)
21236 {
21237
21238         static va_list dst;
21239         static va_list src;
21240         va_copy(dst, src)
21241   ;
21242   return 0;
21243 }
21244 _ACEOF
21245 rm -f conftest.$ac_objext conftest$ac_exeext
21246 if { (eval echo "$as_me:21246: \"$ac_link\"") >&5
21247   (eval $ac_link) 2>&5
21248   ac_status=$?
21249   echo "$as_me:21249: \$? = $ac_status" >&5
21250   (exit $ac_status); } &&
21251          { ac_try='test -s conftest$ac_exeext'
21252   { (eval echo "$as_me:21252: \"$ac_try\"") >&5
21253   (eval $ac_try) 2>&5
21254   ac_status=$?
21255   echo "$as_me:21255: \$? = $ac_status" >&5
21256   (exit $ac_status); }; }; then
21257   cf_cv_have_va_copy=yes
21258 else
21259   echo "$as_me: failed program was:" >&5
21260 cat conftest.$ac_ext >&5
21261 cf_cv_have_va_copy=no
21262 fi
21263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21264 fi
21265 echo "$as_me:21265: result: $cf_cv_have_va_copy" >&5
21266 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21267
21268 if test "$cf_cv_have_va_copy" = yes;
21269 then
21270
21271 cat >>confdefs.h <<\EOF
21272 #define HAVE_VA_COPY 1
21273 EOF
21274
21275 else # !cf_cv_have_va_copy
21276
21277 echo "$as_me:21277: checking for __va_copy" >&5
21278 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21279 if test "${cf_cv_have___va_copy+set}" = set; then
21280   echo $ECHO_N "(cached) $ECHO_C" >&6
21281 else
21282
21283 cat >conftest.$ac_ext <<_ACEOF
21284 #line 21284 "configure"
21285 #include "confdefs.h"
21286
21287 #include <stdarg.h>
21288
21289 int
21290 main (void)
21291 {
21292
21293         static va_list dst;
21294         static va_list src;
21295         __va_copy(dst, src)
21296   ;
21297   return 0;
21298 }
21299 _ACEOF
21300 rm -f conftest.$ac_objext conftest$ac_exeext
21301 if { (eval echo "$as_me:21301: \"$ac_link\"") >&5
21302   (eval $ac_link) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit $ac_status); } &&
21306          { ac_try='test -s conftest$ac_exeext'
21307   { (eval echo "$as_me:21307: \"$ac_try\"") >&5
21308   (eval $ac_try) 2>&5
21309   ac_status=$?
21310   echo "$as_me:21310: \$? = $ac_status" >&5
21311   (exit $ac_status); }; }; then
21312   cf_cv_have___va_copy=yes
21313 else
21314   echo "$as_me: failed program was:" >&5
21315 cat conftest.$ac_ext >&5
21316 cf_cv_have___va_copy=no
21317 fi
21318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21319 fi
21320 echo "$as_me:21320: result: $cf_cv_have___va_copy" >&5
21321 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21322
21323 if test "$cf_cv_have___va_copy" = yes
21324 then
21325
21326 cat >>confdefs.h <<\EOF
21327 #define HAVE___VA_COPY 1
21328 EOF
21329
21330 else # !cf_cv_have___va_copy
21331
21332 echo "$as_me:21332: checking for __builtin_va_copy" >&5
21333 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21334 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21335   echo $ECHO_N "(cached) $ECHO_C" >&6
21336 else
21337
21338 cat >conftest.$ac_ext <<_ACEOF
21339 #line 21339 "configure"
21340 #include "confdefs.h"
21341
21342 #include <stdarg.h>
21343
21344 int
21345 main (void)
21346 {
21347
21348         static va_list dst;
21349         static va_list src;
21350         __builtin_va_copy(dst, src)
21351   ;
21352   return 0;
21353 }
21354 _ACEOF
21355 rm -f conftest.$ac_objext conftest$ac_exeext
21356 if { (eval echo "$as_me:21356: \"$ac_link\"") >&5
21357   (eval $ac_link) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit $ac_status); } &&
21361          { ac_try='test -s conftest$ac_exeext'
21362   { (eval echo "$as_me:21362: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:21365: \$? = $ac_status" >&5
21366   (exit $ac_status); }; }; then
21367   cf_cv_have___builtin_va_copy=yes
21368 else
21369   echo "$as_me: failed program was:" >&5
21370 cat conftest.$ac_ext >&5
21371 cf_cv_have___builtin_va_copy=no
21372 fi
21373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21374 fi
21375 echo "$as_me:21375: result: $cf_cv_have___builtin_va_copy" >&5
21376 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21377
21378 test "$cf_cv_have___builtin_va_copy" = yes &&
21379
21380 cat >>confdefs.h <<\EOF
21381 #define HAVE___BUILTIN_VA_COPY 1
21382 EOF
21383
21384 fi # cf_cv_have___va_copy
21385
21386 fi # cf_cv_have_va_copy
21387
21388 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21389 (*yes*)
21390         ;;
21391
21392 (*)
21393         echo "$as_me:21393: checking if we can simply copy va_list" >&5
21394 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21395 if test "${cf_cv_pointer_va_list+set}" = set; then
21396   echo $ECHO_N "(cached) $ECHO_C" >&6
21397 else
21398
21399 cat >conftest.$ac_ext <<_ACEOF
21400 #line 21400 "configure"
21401 #include "confdefs.h"
21402
21403 #include <stdarg.h>
21404
21405 int
21406 main (void)
21407 {
21408
21409         va_list dst;
21410         va_list src;
21411         dst = src
21412   ;
21413   return 0;
21414 }
21415 _ACEOF
21416 rm -f conftest.$ac_objext conftest$ac_exeext
21417 if { (eval echo "$as_me:21417: \"$ac_link\"") >&5
21418   (eval $ac_link) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit $ac_status); } &&
21422          { ac_try='test -s conftest$ac_exeext'
21423   { (eval echo "$as_me:21423: \"$ac_try\"") >&5
21424   (eval $ac_try) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit $ac_status); }; }; then
21428   cf_cv_pointer_va_list=yes
21429 else
21430   echo "$as_me: failed program was:" >&5
21431 cat conftest.$ac_ext >&5
21432 cf_cv_pointer_va_list=no
21433 fi
21434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21435 fi
21436 echo "$as_me:21436: result: $cf_cv_pointer_va_list" >&5
21437 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21438
21439         if test "$cf_cv_pointer_va_list" = no
21440         then
21441                 echo "$as_me:21441: checking if we can copy va_list indirectly" >&5
21442 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21443 if test "${cf_cv_array_va_list+set}" = set; then
21444   echo $ECHO_N "(cached) $ECHO_C" >&6
21445 else
21446
21447 cat >conftest.$ac_ext <<_ACEOF
21448 #line 21448 "configure"
21449 #include "confdefs.h"
21450
21451 #include <stdarg.h>
21452
21453 int
21454 main (void)
21455 {
21456
21457         va_list dst;
21458         va_list src;
21459         *dst = *src
21460   ;
21461   return 0;
21462 }
21463 _ACEOF
21464 rm -f conftest.$ac_objext conftest$ac_exeext
21465 if { (eval echo "$as_me:21465: \"$ac_link\"") >&5
21466   (eval $ac_link) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit $ac_status); } &&
21470          { ac_try='test -s conftest$ac_exeext'
21471   { (eval echo "$as_me:21471: \"$ac_try\"") >&5
21472   (eval $ac_try) 2>&5
21473   ac_status=$?
21474   echo "$as_me:21474: \$? = $ac_status" >&5
21475   (exit $ac_status); }; }; then
21476   cf_cv_array_va_list=yes
21477 else
21478   echo "$as_me: failed program was:" >&5
21479 cat conftest.$ac_ext >&5
21480 cf_cv_array_va_list=no
21481 fi
21482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21483 fi
21484 echo "$as_me:21484: result: $cf_cv_array_va_list" >&5
21485 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21486                 test "$cf_cv_array_va_list" = yes &&
21487 cat >>confdefs.h <<\EOF
21488 #define ARRAY_VA_LIST 1
21489 EOF
21490
21491         fi
21492         ;;
21493 esac
21494
21495 echo "$as_me:21495: checking for pid_t" >&5
21496 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21497 if test "${ac_cv_type_pid_t+set}" = set; then
21498   echo $ECHO_N "(cached) $ECHO_C" >&6
21499 else
21500   cat >conftest.$ac_ext <<_ACEOF
21501 #line 21501 "configure"
21502 #include "confdefs.h"
21503 $ac_includes_default
21504 int
21505 main (void)
21506 {
21507 if ((pid_t *) 0)
21508   return 0;
21509 if (sizeof (pid_t))
21510   return 0;
21511   ;
21512   return 0;
21513 }
21514 _ACEOF
21515 rm -f conftest.$ac_objext
21516 if { (eval echo "$as_me:21516: \"$ac_compile\"") >&5
21517   (eval $ac_compile) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit $ac_status); } &&
21521          { ac_try='test -s conftest.$ac_objext'
21522   { (eval echo "$as_me:21522: \"$ac_try\"") >&5
21523   (eval $ac_try) 2>&5
21524   ac_status=$?
21525   echo "$as_me:21525: \$? = $ac_status" >&5
21526   (exit $ac_status); }; }; then
21527   ac_cv_type_pid_t=yes
21528 else
21529   echo "$as_me: failed program was:" >&5
21530 cat conftest.$ac_ext >&5
21531 ac_cv_type_pid_t=no
21532 fi
21533 rm -f conftest.$ac_objext conftest.$ac_ext
21534 fi
21535 echo "$as_me:21535: result: $ac_cv_type_pid_t" >&5
21536 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21537 if test $ac_cv_type_pid_t = yes; then
21538   :
21539 else
21540
21541 cat >>confdefs.h <<EOF
21542 #define pid_t int
21543 EOF
21544
21545 fi
21546
21547 for ac_header in unistd.h vfork.h
21548 do
21549 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21550 echo "$as_me:21550: checking for $ac_header" >&5
21551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21553   echo $ECHO_N "(cached) $ECHO_C" >&6
21554 else
21555   cat >conftest.$ac_ext <<_ACEOF
21556 #line 21556 "configure"
21557 #include "confdefs.h"
21558 #include <$ac_header>
21559 _ACEOF
21560 if { (eval echo "$as_me:21560: \"$ac_cpp conftest.$ac_ext\"") >&5
21561   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21562   ac_status=$?
21563   egrep -v '^ *\+' conftest.er1 >conftest.err
21564   rm -f conftest.er1
21565   cat conftest.err >&5
21566   echo "$as_me:21566: \$? = $ac_status" >&5
21567   (exit $ac_status); } >/dev/null; then
21568   if test -s conftest.err; then
21569     ac_cpp_err=$ac_c_preproc_warn_flag
21570   else
21571     ac_cpp_err=
21572   fi
21573 else
21574   ac_cpp_err=yes
21575 fi
21576 if test -z "$ac_cpp_err"; then
21577   eval "$as_ac_Header=yes"
21578 else
21579   echo "$as_me: failed program was:" >&5
21580   cat conftest.$ac_ext >&5
21581   eval "$as_ac_Header=no"
21582 fi
21583 rm -f conftest.err conftest.$ac_ext
21584 fi
21585 echo "$as_me:21585: result: `eval echo '${'$as_ac_Header'}'`" >&5
21586 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21587 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21588   cat >>confdefs.h <<EOF
21589 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21590 EOF
21591
21592 fi
21593 done
21594
21595 for ac_func in fork vfork
21596 do
21597 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21598 echo "$as_me:21598: checking for $ac_func" >&5
21599 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21600 if eval "test \"\${$as_ac_var+set}\" = set"; then
21601   echo $ECHO_N "(cached) $ECHO_C" >&6
21602 else
21603   cat >conftest.$ac_ext <<_ACEOF
21604 #line 21604 "configure"
21605 #include "confdefs.h"
21606 #define $ac_func autoconf_temporary
21607 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21608 #undef $ac_func
21609
21610 #ifdef __cplusplus
21611 extern "C"
21612 #endif
21613
21614 /* We use char because int might match the return type of a gcc2
21615    builtin and then its argument prototype would still apply.  */
21616 char $ac_func (void);
21617
21618 int
21619 main (void)
21620 {
21621
21622 /* The GNU C library defines stubs for functions which it implements
21623     to always fail with ENOSYS.  Some functions are actually named
21624     something starting with __ and the normal name is an alias.  */
21625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21626 #error found stub for $ac_func
21627 #endif
21628
21629         return $ac_func ();
21630   ;
21631   return 0;
21632 }
21633 _ACEOF
21634 rm -f conftest.$ac_objext conftest$ac_exeext
21635 if { (eval echo "$as_me:21635: \"$ac_link\"") >&5
21636   (eval $ac_link) 2>&5
21637   ac_status=$?
21638   echo "$as_me:21638: \$? = $ac_status" >&5
21639   (exit $ac_status); } &&
21640          { ac_try='test -s conftest$ac_exeext'
21641   { (eval echo "$as_me:21641: \"$ac_try\"") >&5
21642   (eval $ac_try) 2>&5
21643   ac_status=$?
21644   echo "$as_me:21644: \$? = $ac_status" >&5
21645   (exit $ac_status); }; }; then
21646   eval "$as_ac_var=yes"
21647 else
21648   echo "$as_me: failed program was:" >&5
21649 cat conftest.$ac_ext >&5
21650 eval "$as_ac_var=no"
21651 fi
21652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21653 fi
21654 echo "$as_me:21654: result: `eval echo '${'$as_ac_var'}'`" >&5
21655 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21656 if test `eval echo '${'$as_ac_var'}'` = yes; then
21657   cat >>confdefs.h <<EOF
21658 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21659 EOF
21660
21661 fi
21662 done
21663
21664 ac_cv_func_fork_works=$ac_cv_func_fork
21665 if test "x$ac_cv_func_fork" = xyes; then
21666   echo "$as_me:21666: checking for working fork" >&5
21667 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21668 if test "${ac_cv_func_fork_works+set}" = set; then
21669   echo $ECHO_N "(cached) $ECHO_C" >&6
21670 else
21671   if test "$cross_compiling" = yes; then
21672   ac_cv_func_fork_works=cross
21673 else
21674   cat >conftest.$ac_ext <<_ACEOF
21675 /* By Rüdiger Kuhlmann. */
21676       #include <sys/types.h>
21677       #if HAVE_UNISTD_H
21678       # include <unistd.h>
21679       #endif
21680       /* Some systems only have a dummy stub for fork() */
21681       int main (void)
21682       {
21683         if (fork() < 0)
21684           $ac_main_return (1);
21685         $ac_main_return (0);
21686       }
21687 _ACEOF
21688 rm -f conftest$ac_exeext
21689 if { (eval echo "$as_me:21689: \"$ac_link\"") >&5
21690   (eval $ac_link) 2>&5
21691   ac_status=$?
21692   echo "$as_me:21692: \$? = $ac_status" >&5
21693   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21694   { (eval echo "$as_me:21694: \"$ac_try\"") >&5
21695   (eval $ac_try) 2>&5
21696   ac_status=$?
21697   echo "$as_me:21697: \$? = $ac_status" >&5
21698   (exit $ac_status); }; }; then
21699   ac_cv_func_fork_works=yes
21700 else
21701   echo "$as_me: program exited with status $ac_status" >&5
21702 echo "$as_me: failed program was:" >&5
21703 cat conftest.$ac_ext >&5
21704 ac_cv_func_fork_works=no
21705 fi
21706 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21707 fi
21708 fi
21709 echo "$as_me:21709: result: $ac_cv_func_fork_works" >&5
21710 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21711
21712 fi
21713 if test "x$ac_cv_func_fork_works" = xcross; then
21714   case $host in
21715     *-*-amigaos* | *-*-msdosdjgpp*)
21716       # Override, as these systems have only a dummy fork() stub
21717       ac_cv_func_fork_works=no
21718       ;;
21719     *)
21720       ac_cv_func_fork_works=yes
21721       ;;
21722   esac
21723   { echo "$as_me:21723: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21724 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21725 fi
21726 ac_cv_func_vfork_works=$ac_cv_func_vfork
21727 if test "x$ac_cv_func_vfork" = xyes; then
21728   echo "$as_me:21728: checking for working vfork" >&5
21729 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21730 if test "${ac_cv_func_vfork_works+set}" = set; then
21731   echo $ECHO_N "(cached) $ECHO_C" >&6
21732 else
21733   if test "$cross_compiling" = yes; then
21734   ac_cv_func_vfork_works=cross
21735 else
21736   cat >conftest.$ac_ext <<_ACEOF
21737 #line 21737 "configure"
21738 #include "confdefs.h"
21739 /* Thanks to Paul Eggert for this test.  */
21740 #include <stdio.h>
21741 #include <sys/types.h>
21742 #include <sys/stat.h>
21743 #if HAVE_UNISTD_H
21744 # include <unistd.h>
21745 #endif
21746 #if HAVE_VFORK_H
21747 # include <vfork.h>
21748 #endif
21749 /* On some sparc systems, changes by the child to local and incoming
21750    argument registers are propagated back to the parent.  The compiler
21751    is told about this with #include <vfork.h>, but some compilers
21752    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21753    static variable whose address is put into a register that is
21754    clobbered by the vfork.  */
21755 static
21756 #ifdef __cplusplus
21757 sparc_address_test (int arg)
21758 # else
21759 sparc_address_test (arg) int arg;
21760 #endif
21761 {
21762   static pid_t child;
21763   if (!child) {
21764     child = vfork ();
21765     if (child < 0) {
21766       perror ("vfork");
21767       _exit(2);
21768     }
21769     if (!child) {
21770       arg = getpid();
21771       write(-1, "", 0);
21772       _exit (arg);
21773     }
21774   }
21775 }
21776
21777 int
21778 main (void)
21779 {
21780   pid_t parent = getpid ();
21781   pid_t child;
21782
21783   sparc_address_test ();
21784
21785   child = vfork ();
21786
21787   if (child == 0) {
21788     /* Here is another test for sparc vfork register problems.  This
21789        test uses lots of local variables, at least as many local
21790        variables as main has allocated so far including compiler
21791        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21792        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21793        reuse the register of parent for one of the local variables,
21794        since it will think that parent can't possibly be used any more
21795        in this routine.  Assigning to the local variable will thus
21796        munge parent in the parent process.  */
21797     pid_t
21798       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21799       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21800     /* Convince the compiler that p..p7 are live; otherwise, it might
21801        use the same hardware register for all 8 local variables.  */
21802     if (p != p1 || p != p2 || p != p3 || p != p4
21803         || p != p5 || p != p6 || p != p7)
21804       _exit(1);
21805
21806     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21807        from child file descriptors.  If the child closes a descriptor
21808        before it execs or exits, this munges the parent's descriptor
21809        as well.  Test for this by closing stdout in the child.  */
21810     _exit(close(fileno(stdout)) != 0);
21811   } else {
21812     int status;
21813     struct stat st;
21814
21815     while (wait(&status) != child)
21816       ;
21817     $ac_main_return(
21818          /* Was there some problem with vforking?  */
21819          child < 0
21820
21821          /* Did the child fail?  (This shouldn't happen.)  */
21822          || status
21823
21824          /* Did the vfork/compiler bug occur?  */
21825          || parent != getpid()
21826
21827          /* Did the file descriptor bug occur?  */
21828          || fstat(fileno(stdout), &st) != 0
21829          );
21830   }
21831 }
21832 _ACEOF
21833 rm -f conftest$ac_exeext
21834 if { (eval echo "$as_me:21834: \"$ac_link\"") >&5
21835   (eval $ac_link) 2>&5
21836   ac_status=$?
21837   echo "$as_me:21837: \$? = $ac_status" >&5
21838   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21839   { (eval echo "$as_me:21839: \"$ac_try\"") >&5
21840   (eval $ac_try) 2>&5
21841   ac_status=$?
21842   echo "$as_me:21842: \$? = $ac_status" >&5
21843   (exit $ac_status); }; }; then
21844   ac_cv_func_vfork_works=yes
21845 else
21846   echo "$as_me: program exited with status $ac_status" >&5
21847 echo "$as_me: failed program was:" >&5
21848 cat conftest.$ac_ext >&5
21849 ac_cv_func_vfork_works=no
21850 fi
21851 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21852 fi
21853 fi
21854 echo "$as_me:21854: result: $ac_cv_func_vfork_works" >&5
21855 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21856
21857 fi;
21858 if test "x$ac_cv_func_fork_works" = xcross; then
21859   ac_cv_func_vfork_works=ac_cv_func_vfork
21860   { echo "$as_me:21860: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21861 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21862 fi
21863
21864 if test "x$ac_cv_func_vfork_works" = xyes; then
21865
21866 cat >>confdefs.h <<\EOF
21867 #define HAVE_WORKING_VFORK 1
21868 EOF
21869
21870 else
21871
21872 cat >>confdefs.h <<\EOF
21873 #define vfork fork
21874 EOF
21875
21876 fi
21877 if test "x$ac_cv_func_fork_works" = xyes; then
21878
21879 cat >>confdefs.h <<\EOF
21880 #define HAVE_WORKING_FORK 1
21881 EOF
21882
21883 fi
21884
21885 echo "$as_me:21885: checking if fopen accepts explicit binary mode" >&5
21886 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21887 if test "${cf_cv_fopen_bin_r+set}" = set; then
21888   echo $ECHO_N "(cached) $ECHO_C" >&6
21889 else
21890
21891         if test "$cross_compiling" = yes; then
21892   cf_cv_fopen_bin_r=unknown
21893 else
21894   cat >conftest.$ac_ext <<_ACEOF
21895 #line 21895 "configure"
21896 #include "confdefs.h"
21897
21898 #include <stdio.h>
21899 int main(void) {
21900         FILE *fp = fopen("conftest.tmp", "wb");
21901         int rc = 0;
21902         if (fp != 0) {
21903                 int p, q;
21904                 for (p = 0; p < 256; ++p) {
21905                         fputc(p, fp);
21906                 }
21907                 fclose(fp);
21908                 fp = fopen("conftest.tmp", "rb");
21909                 if (fp != 0) {
21910                         for (p = 0; p < 256; ++p) {
21911                                 q = fgetc(fp);
21912                                 if (q != p) {
21913                                         rc = 1;
21914                                         break;
21915                                 }
21916                         }
21917                 } else {
21918                         rc = 1;
21919                 }
21920         } else {
21921                 rc = 1;
21922         }
21923         ${cf_cv_main_return:-return} (rc);
21924 }
21925
21926 _ACEOF
21927 rm -f conftest$ac_exeext
21928 if { (eval echo "$as_me:21928: \"$ac_link\"") >&5
21929   (eval $ac_link) 2>&5
21930   ac_status=$?
21931   echo "$as_me:21931: \$? = $ac_status" >&5
21932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21933   { (eval echo "$as_me:21933: \"$ac_try\"") >&5
21934   (eval $ac_try) 2>&5
21935   ac_status=$?
21936   echo "$as_me:21936: \$? = $ac_status" >&5
21937   (exit $ac_status); }; }; then
21938   cf_cv_fopen_bin_r=yes
21939 else
21940   echo "$as_me: program exited with status $ac_status" >&5
21941 echo "$as_me: failed program was:" >&5
21942 cat conftest.$ac_ext >&5
21943 cf_cv_fopen_bin_r=no
21944 fi
21945 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21946 fi
21947
21948 fi
21949 echo "$as_me:21949: result: $cf_cv_fopen_bin_r" >&5
21950 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21951 test "x$cf_cv_fopen_bin_r" != xno &&
21952 cat >>confdefs.h <<\EOF
21953 #define USE_FOPEN_BIN_R 1
21954 EOF
21955
21956 # special check for test/ditto.c
21957
21958 echo "$as_me:21958: checking for openpty in -lutil" >&5
21959 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21960 if test "${ac_cv_lib_util_openpty+set}" = set; then
21961   echo $ECHO_N "(cached) $ECHO_C" >&6
21962 else
21963   ac_check_lib_save_LIBS=$LIBS
21964 LIBS="-lutil  $LIBS"
21965 cat >conftest.$ac_ext <<_ACEOF
21966 #line 21966 "configure"
21967 #include "confdefs.h"
21968
21969 /* Override any gcc2 internal prototype to avoid an error.  */
21970 #ifdef __cplusplus
21971 extern "C"
21972 #endif
21973 /* We use char because int might match the return type of a gcc2
21974    builtin and then its argument prototype would still apply.  */
21975 char openpty ();
21976 int
21977 main (void)
21978 {
21979 openpty ();
21980   ;
21981   return 0;
21982 }
21983 _ACEOF
21984 rm -f conftest.$ac_objext conftest$ac_exeext
21985 if { (eval echo "$as_me:21985: \"$ac_link\"") >&5
21986   (eval $ac_link) 2>&5
21987   ac_status=$?
21988   echo "$as_me:21988: \$? = $ac_status" >&5
21989   (exit $ac_status); } &&
21990          { ac_try='test -s conftest$ac_exeext'
21991   { (eval echo "$as_me:21991: \"$ac_try\"") >&5
21992   (eval $ac_try) 2>&5
21993   ac_status=$?
21994   echo "$as_me:21994: \$? = $ac_status" >&5
21995   (exit $ac_status); }; }; then
21996   ac_cv_lib_util_openpty=yes
21997 else
21998   echo "$as_me: failed program was:" >&5
21999 cat conftest.$ac_ext >&5
22000 ac_cv_lib_util_openpty=no
22001 fi
22002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22003 LIBS=$ac_check_lib_save_LIBS
22004 fi
22005 echo "$as_me:22005: result: $ac_cv_lib_util_openpty" >&5
22006 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22007 if test $ac_cv_lib_util_openpty = yes; then
22008   cf_cv_lib_util=yes
22009 else
22010   cf_cv_lib_util=no
22011 fi
22012
22013 echo "$as_me:22013: checking for openpty header" >&5
22014 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22015 if test "${cf_cv_func_openpty+set}" = set; then
22016   echo $ECHO_N "(cached) $ECHO_C" >&6
22017 else
22018
22019         cf_save_LIBS="$LIBS"
22020         test $cf_cv_lib_util = yes && {
22021 cf_add_libs="$LIBS"
22022 # reverse order
22023 cf_add_0lib=
22024 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22025 # filter duplicates
22026 for cf_add_1lib in $cf_add_0lib; do
22027         for cf_add_2lib in $cf_add_libs; do
22028                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22029                         cf_add_1lib=
22030                         break
22031                 fi
22032         done
22033         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22034 done
22035 LIBS="$cf_add_libs"
22036  }
22037         for cf_header in pty.h libutil.h util.h
22038         do
22039         cat >conftest.$ac_ext <<_ACEOF
22040 #line 22040 "configure"
22041 #include "confdefs.h"
22042
22043 #include <$cf_header>
22044
22045 int
22046 main (void)
22047 {
22048
22049         int x = openpty((int *)0, (int *)0, (char *)0,
22050                                    (struct termios *)0, (struct winsize *)0);
22051
22052   ;
22053   return 0;
22054 }
22055 _ACEOF
22056 rm -f conftest.$ac_objext conftest$ac_exeext
22057 if { (eval echo "$as_me:22057: \"$ac_link\"") >&5
22058   (eval $ac_link) 2>&5
22059   ac_status=$?
22060   echo "$as_me:22060: \$? = $ac_status" >&5
22061   (exit $ac_status); } &&
22062          { ac_try='test -s conftest$ac_exeext'
22063   { (eval echo "$as_me:22063: \"$ac_try\"") >&5
22064   (eval $ac_try) 2>&5
22065   ac_status=$?
22066   echo "$as_me:22066: \$? = $ac_status" >&5
22067   (exit $ac_status); }; }; then
22068
22069                 cf_cv_func_openpty=$cf_header
22070                 break
22071
22072 else
22073   echo "$as_me: failed program was:" >&5
22074 cat conftest.$ac_ext >&5
22075
22076                 cf_cv_func_openpty=no
22077
22078 fi
22079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22080         done
22081         LIBS="$cf_save_LIBS"
22082
22083 fi
22084 echo "$as_me:22084: result: $cf_cv_func_openpty" >&5
22085 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22086
22087 if test "$cf_cv_func_openpty" != no ; then
22088
22089 cat >>confdefs.h <<EOF
22090 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22091 EOF
22092
22093 cat >>confdefs.h <<\EOF
22094 #define USE_XTERM_PTY 1
22095 EOF
22096
22097         if test "x$cf_cv_lib_util" = xyes ; then
22098
22099 cf_add_libs="$TEST_LIBS"
22100 # reverse order
22101 cf_add_0lib=
22102 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22103 # filter duplicates
22104 for cf_add_1lib in $cf_add_0lib; do
22105         for cf_add_2lib in $cf_add_libs; do
22106                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22107                         cf_add_1lib=
22108                         break
22109                 fi
22110         done
22111         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22112 done
22113 TEST_LIBS="$cf_add_libs"
22114
22115         fi
22116 fi
22117
22118 if test "$with_hashed_db" != no ; then
22119
22120 cat >>confdefs.h <<\EOF
22121 #define USE_HASHED_DB 1
22122 EOF
22123
22124 case $with_hashed_db in
22125 (yes|*able*)
22126         ;;
22127 (*)
22128         if test -d "$with_hashed_db" ; then
22129
22130 if test -n "$with_hashed_db/include" ; then
22131   for cf_add_incdir in $with_hashed_db/include
22132   do
22133         while test $cf_add_incdir != /usr/include
22134         do
22135           if test -d $cf_add_incdir
22136           then
22137                 cf_have_incdir=no
22138                 if test -n "$CFLAGS$CPPFLAGS" ; then
22139                   # a loop is needed to ensure we can add subdirs of existing dirs
22140                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22141                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22142                           cf_have_incdir=yes; break
22143                         fi
22144                   done
22145                 fi
22146
22147                 if test "$cf_have_incdir" = no ; then
22148                   if test "$cf_add_incdir" = /usr/local/include ; then
22149                         if test "$GCC" = yes
22150                         then
22151                           cf_save_CPPFLAGS=$CPPFLAGS
22152
22153         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22154         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22155
22156                           cat >conftest.$ac_ext <<_ACEOF
22157 #line 22157 "configure"
22158 #include "confdefs.h"
22159 #include <stdio.h>
22160 int
22161 main (void)
22162 {
22163 printf("Hello")
22164   ;
22165   return 0;
22166 }
22167 _ACEOF
22168 rm -f conftest.$ac_objext
22169 if { (eval echo "$as_me:22169: \"$ac_compile\"") >&5
22170   (eval $ac_compile) 2>&5
22171   ac_status=$?
22172   echo "$as_me:22172: \$? = $ac_status" >&5
22173   (exit $ac_status); } &&
22174          { ac_try='test -s conftest.$ac_objext'
22175   { (eval echo "$as_me:22175: \"$ac_try\"") >&5
22176   (eval $ac_try) 2>&5
22177   ac_status=$?
22178   echo "$as_me:22178: \$? = $ac_status" >&5
22179   (exit $ac_status); }; }; then
22180   :
22181 else
22182   echo "$as_me: failed program was:" >&5
22183 cat conftest.$ac_ext >&5
22184 cf_have_incdir=yes
22185 fi
22186 rm -f conftest.$ac_objext conftest.$ac_ext
22187                           CPPFLAGS=$cf_save_CPPFLAGS
22188                         fi
22189                   fi
22190                 fi
22191
22192                 if test "$cf_have_incdir" = no ; then
22193                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22194
22195 echo "${as_me:-configure}:22195: testing adding $cf_add_incdir to include-path ..." 1>&5
22196
22197                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22198
22199                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22200                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22201                   cf_add_incdir="$cf_top_incdir"
22202                 else
22203                   break
22204                 fi
22205           else
22206                 break
22207           fi
22208         done
22209   done
22210 fi
22211
22212 if test -n "$with_hashed_db/lib" ; then
22213         for cf_add_libdir in $with_hashed_db/lib
22214         do
22215                 if test $cf_add_libdir = /usr/lib ; then
22216                         :
22217                 elif test -d $cf_add_libdir
22218                 then
22219                         cf_have_libdir=no
22220                         if test -n "$LDFLAGS$LIBS" ; then
22221                                 # a loop is needed to ensure we can add subdirs of existing dirs
22222                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22223                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22224                                                 cf_have_libdir=yes; break
22225                                         fi
22226                                 done
22227                         fi
22228                         if test "$cf_have_libdir" = no ; then
22229                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22230
22231 echo "${as_me:-configure}:22231: testing adding $cf_add_libdir to library-path ..." 1>&5
22232
22233                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22234                         fi
22235                 fi
22236         done
22237 fi
22238
22239         else
22240                 case "$with_hashed_db" in
22241                 (./*|../*|/*)
22242                         { echo "$as_me:22242: WARNING: no such directory $with_hashed_db" >&5
22243 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22244                         ;;
22245                 (*)
22246
22247 cf_search=
22248
22249 test "x$prefix" != "xNONE" && \
22250 test -d "$prefix" && \
22251  {
22252         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22253         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22254         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22255         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22256         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22257         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22258 }
22259
22260 for cf_subdir_prefix in \
22261         /usr \
22262         /usr/local \
22263         /usr/pkg \
22264         /opt \
22265         /opt/local \
22266         $HOME
22267 do
22268
22269 test "x$cf_subdir_prefix" != "x$prefix" && \
22270 test -d "$cf_subdir_prefix" && \
22271 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22272         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22273         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22274         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22275         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22276         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22277         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
22278 }
22279
22280 done
22281
22282         for cf_item in $cf_search
22283         do
22284                 case $cf_item in
22285                 (*/$with_hashed_db)
22286
22287 if test -n "$cf_item" ; then
22288   for cf_add_incdir in $cf_item
22289   do
22290         while test $cf_add_incdir != /usr/include
22291         do
22292           if test -d $cf_add_incdir
22293           then
22294                 cf_have_incdir=no
22295                 if test -n "$CFLAGS$CPPFLAGS" ; then
22296                   # a loop is needed to ensure we can add subdirs of existing dirs
22297                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22298                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22299                           cf_have_incdir=yes; break
22300                         fi
22301                   done
22302                 fi
22303
22304                 if test "$cf_have_incdir" = no ; then
22305                   if test "$cf_add_incdir" = /usr/local/include ; then
22306                         if test "$GCC" = yes
22307                         then
22308                           cf_save_CPPFLAGS=$CPPFLAGS
22309
22310         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22311         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22312
22313                           cat >conftest.$ac_ext <<_ACEOF
22314 #line 22314 "configure"
22315 #include "confdefs.h"
22316 #include <stdio.h>
22317 int
22318 main (void)
22319 {
22320 printf("Hello")
22321   ;
22322   return 0;
22323 }
22324 _ACEOF
22325 rm -f conftest.$ac_objext
22326 if { (eval echo "$as_me:22326: \"$ac_compile\"") >&5
22327   (eval $ac_compile) 2>&5
22328   ac_status=$?
22329   echo "$as_me:22329: \$? = $ac_status" >&5
22330   (exit $ac_status); } &&
22331          { ac_try='test -s conftest.$ac_objext'
22332   { (eval echo "$as_me:22332: \"$ac_try\"") >&5
22333   (eval $ac_try) 2>&5
22334   ac_status=$?
22335   echo "$as_me:22335: \$? = $ac_status" >&5
22336   (exit $ac_status); }; }; then
22337   :
22338 else
22339   echo "$as_me: failed program was:" >&5
22340 cat conftest.$ac_ext >&5
22341 cf_have_incdir=yes
22342 fi
22343 rm -f conftest.$ac_objext conftest.$ac_ext
22344                           CPPFLAGS=$cf_save_CPPFLAGS
22345                         fi
22346                   fi
22347                 fi
22348
22349                 if test "$cf_have_incdir" = no ; then
22350                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22351
22352 echo "${as_me:-configure}:22352: testing adding $cf_add_incdir to include-path ..." 1>&5
22353
22354                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22355
22356                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22357                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22358                   cf_add_incdir="$cf_top_incdir"
22359                 else
22360                   break
22361                 fi
22362           else
22363                 break
22364           fi
22365         done
22366   done
22367 fi
22368
22369                         ;;
22370                 esac
22371         done
22372
22373 cf_search=
22374
22375 test "x$prefix" != "xNONE" && \
22376 test -d "$prefix" && \
22377  {
22378         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22379         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22380         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22381         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22382         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22383         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22384 }
22385
22386 for cf_subdir_prefix in \
22387         /usr \
22388         /usr/local \
22389         /usr/pkg \
22390         /opt \
22391         /opt/local \
22392         $HOME
22393 do
22394
22395 test "x$cf_subdir_prefix" != "x$prefix" && \
22396 test -d "$cf_subdir_prefix" && \
22397 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22398         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22399         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22400         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22401         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22402         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22403         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
22404 }
22405
22406 done
22407
22408         for cf_item in $cf_search
22409         do
22410                 case $cf_item in
22411                 (*/$with_hashed_db)
22412
22413 if test -n "$cf_item" ; then
22414         for cf_add_libdir in $cf_item
22415         do
22416                 if test $cf_add_libdir = /usr/lib ; then
22417                         :
22418                 elif test -d $cf_add_libdir
22419                 then
22420                         cf_have_libdir=no
22421                         if test -n "$LDFLAGS$LIBS" ; then
22422                                 # a loop is needed to ensure we can add subdirs of existing dirs
22423                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22424                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22425                                                 cf_have_libdir=yes; break
22426                                         fi
22427                                 done
22428                         fi
22429                         if test "$cf_have_libdir" = no ; then
22430                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22431
22432 echo "${as_me:-configure}:22432: testing adding $cf_add_libdir to library-path ..." 1>&5
22433
22434                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22435                         fi
22436                 fi
22437         done
22438 fi
22439
22440                         ;;
22441                 esac
22442         done
22443
22444                         ;;
22445                 esac
22446         fi
22447 esac
22448
22449 echo "$as_me:22449: checking for db.h" >&5
22450 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22451 if test "${ac_cv_header_db_h+set}" = set; then
22452   echo $ECHO_N "(cached) $ECHO_C" >&6
22453 else
22454   cat >conftest.$ac_ext <<_ACEOF
22455 #line 22455 "configure"
22456 #include "confdefs.h"
22457 #include <db.h>
22458 _ACEOF
22459 if { (eval echo "$as_me:22459: \"$ac_cpp conftest.$ac_ext\"") >&5
22460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22461   ac_status=$?
22462   egrep -v '^ *\+' conftest.er1 >conftest.err
22463   rm -f conftest.er1
22464   cat conftest.err >&5
22465   echo "$as_me:22465: \$? = $ac_status" >&5
22466   (exit $ac_status); } >/dev/null; then
22467   if test -s conftest.err; then
22468     ac_cpp_err=$ac_c_preproc_warn_flag
22469   else
22470     ac_cpp_err=
22471   fi
22472 else
22473   ac_cpp_err=yes
22474 fi
22475 if test -z "$ac_cpp_err"; then
22476   ac_cv_header_db_h=yes
22477 else
22478   echo "$as_me: failed program was:" >&5
22479   cat conftest.$ac_ext >&5
22480   ac_cv_header_db_h=no
22481 fi
22482 rm -f conftest.err conftest.$ac_ext
22483 fi
22484 echo "$as_me:22484: result: $ac_cv_header_db_h" >&5
22485 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22486 if test $ac_cv_header_db_h = yes; then
22487
22488 echo "$as_me:22488: checking for version of db" >&5
22489 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22490 if test "${cf_cv_hashed_db_version+set}" = set; then
22491   echo $ECHO_N "(cached) $ECHO_C" >&6
22492 else
22493
22494 cf_cv_hashed_db_version=unknown
22495
22496 for cf_db_version in 1 2 3 4 5 6
22497 do
22498
22499 echo "${as_me:-configure}:22499: testing checking for db version $cf_db_version ..." 1>&5
22500
22501         cat >conftest.$ac_ext <<_ACEOF
22502 #line 22502 "configure"
22503 #include "confdefs.h"
22504
22505 $ac_includes_default
22506 #include <db.h>
22507
22508 #ifdef DB_VERSION_MAJOR
22509         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22510 #if $cf_db_version == DB_VERSION_MAJOR
22511         /* ok */
22512 #else
22513         make an error
22514 #endif
22515 #else
22516 #if $cf_db_version == 1
22517         /* ok: assuming this is DB 1.8.5 */
22518 #else
22519         make an error
22520 #endif
22521 #endif
22522
22523 int
22524 main (void)
22525 {
22526 DBT *foo = 0
22527   ;
22528   return 0;
22529 }
22530 _ACEOF
22531 rm -f conftest.$ac_objext
22532 if { (eval echo "$as_me:22532: \"$ac_compile\"") >&5
22533   (eval $ac_compile) 2>&5
22534   ac_status=$?
22535   echo "$as_me:22535: \$? = $ac_status" >&5
22536   (exit $ac_status); } &&
22537          { ac_try='test -s conftest.$ac_objext'
22538   { (eval echo "$as_me:22538: \"$ac_try\"") >&5
22539   (eval $ac_try) 2>&5
22540   ac_status=$?
22541   echo "$as_me:22541: \$? = $ac_status" >&5
22542   (exit $ac_status); }; }; then
22543
22544         cf_cv_hashed_db_version=$cf_db_version
22545         break
22546
22547 else
22548   echo "$as_me: failed program was:" >&5
22549 cat conftest.$ac_ext >&5
22550 fi
22551 rm -f conftest.$ac_objext conftest.$ac_ext
22552 done
22553
22554 fi
22555 echo "$as_me:22555: result: $cf_cv_hashed_db_version" >&5
22556 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22557
22558 if test "$cf_cv_hashed_db_version" = unknown ; then
22559         { { echo "$as_me:22559: error: Cannot determine version of db" >&5
22560 echo "$as_me: error: Cannot determine version of db" >&2;}
22561    { (exit 1); exit 1; }; }
22562 else
22563
22564 echo "$as_me:22564: checking for db libraries" >&5
22565 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22566 if test "${cf_cv_hashed_db_libs+set}" = set; then
22567   echo $ECHO_N "(cached) $ECHO_C" >&6
22568 else
22569
22570 cf_cv_hashed_db_libs=unknown
22571 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22572 do
22573         cf_save_libs="$LIBS"
22574         if test -n "$cf_db_libs"; then
22575
22576 cf_add_libs="$LIBS"
22577 # reverse order
22578 cf_add_0lib=
22579 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22580 # filter duplicates
22581 for cf_add_1lib in $cf_add_0lib; do
22582         for cf_add_2lib in $cf_add_libs; do
22583                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22584                         cf_add_1lib=
22585                         break
22586                 fi
22587         done
22588         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22589 done
22590 LIBS="$cf_add_libs"
22591
22592         fi
22593
22594 echo "${as_me:-configure}:22594: testing checking for library "$cf_db_libs" ..." 1>&5
22595
22596         cat >conftest.$ac_ext <<_ACEOF
22597 #line 22597 "configure"
22598 #include "confdefs.h"
22599
22600 $ac_includes_default
22601 #include <db.h>
22602
22603 int
22604 main (void)
22605 {
22606
22607         char *path = "/tmp/foo";
22608 #ifdef DB_VERSION_MAJOR
22609 #if DB_VERSION_MAJOR >= 4
22610         DB *result = 0;
22611         db_create(&result, NULL, 0);
22612         result->open(result,
22613                 NULL,
22614                 path,
22615                 path,
22616                 DB_HASH,
22617                 DB_CREATE,
22618                 0644);
22619 #elif DB_VERSION_MAJOR >= 3
22620         DB *result = 0;
22621         db_create(&result, NULL, 0);
22622         result->open(result,
22623                 path,
22624                 path,
22625                 DB_HASH,
22626                 DB_CREATE,
22627                 0644);
22628 #elif DB_VERSION_MAJOR >= 2
22629         DB *result = 0;
22630         db_open(path,
22631                 DB_HASH,
22632                 DB_CREATE,
22633                 0644,
22634                 (DB_ENV *) 0,
22635                 (DB_INFO *) 0,
22636                 &result);
22637 #endif /* DB_VERSION_MAJOR */
22638 #else
22639         DB *result = dbopen(path,
22640                      2,
22641                      0644,
22642                      DB_HASH,
22643                      0);
22644 #endif
22645         ${cf_cv_main_return:-return}(result != 0)
22646
22647   ;
22648   return 0;
22649 }
22650 _ACEOF
22651 rm -f conftest.$ac_objext conftest$ac_exeext
22652 if { (eval echo "$as_me:22652: \"$ac_link\"") >&5
22653   (eval $ac_link) 2>&5
22654   ac_status=$?
22655   echo "$as_me:22655: \$? = $ac_status" >&5
22656   (exit $ac_status); } &&
22657          { ac_try='test -s conftest$ac_exeext'
22658   { (eval echo "$as_me:22658: \"$ac_try\"") >&5
22659   (eval $ac_try) 2>&5
22660   ac_status=$?
22661   echo "$as_me:22661: \$? = $ac_status" >&5
22662   (exit $ac_status); }; }; then
22663
22664         if test -n "$cf_db_libs" ; then
22665                 cf_cv_hashed_db_libs=$cf_db_libs
22666         else
22667                 cf_cv_hashed_db_libs=default
22668         fi
22669         LIBS="$cf_save_libs"
22670         break
22671
22672 else
22673   echo "$as_me: failed program was:" >&5
22674 cat conftest.$ac_ext >&5
22675 fi
22676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22677         LIBS="$cf_save_libs"
22678 done
22679
22680 fi
22681 echo "$as_me:22681: result: $cf_cv_hashed_db_libs" >&5
22682 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22683
22684         if test "$cf_cv_hashed_db_libs" = unknown ; then
22685                 { { echo "$as_me:22685: error: Cannot determine library for db" >&5
22686 echo "$as_me: error: Cannot determine library for db" >&2;}
22687    { (exit 1); exit 1; }; }
22688         elif test "$cf_cv_hashed_db_libs" != default ; then
22689
22690 cf_add_libs="$LIBS"
22691 # reverse order
22692 cf_add_0lib=
22693 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22694 # filter duplicates
22695 for cf_add_1lib in $cf_add_0lib; do
22696         for cf_add_2lib in $cf_add_libs; do
22697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22698                         cf_add_1lib=
22699                         break
22700                 fi
22701         done
22702         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22703 done
22704 LIBS="$cf_add_libs"
22705
22706         fi
22707 fi
22708
22709 else
22710
22711         { { echo "$as_me:22711: error: Cannot find db.h" >&5
22712 echo "$as_me: error: Cannot find db.h" >&2;}
22713    { (exit 1); exit 1; }; }
22714
22715 fi
22716
22717 fi
22718
22719 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22720         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22721         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22722 fi
22723
22724 # Just in case, check if the C compiler has a bool type.
22725
22726 echo "$as_me:22726: checking if we should include stdbool.h" >&5
22727 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22728
22729 if test "${cf_cv_header_stdbool_h+set}" = set; then
22730   echo $ECHO_N "(cached) $ECHO_C" >&6
22731 else
22732
22733         cat >conftest.$ac_ext <<_ACEOF
22734 #line 22734 "configure"
22735 #include "confdefs.h"
22736
22737 int
22738 main (void)
22739 {
22740 bool foo = false
22741   ;
22742   return 0;
22743 }
22744 _ACEOF
22745 rm -f conftest.$ac_objext
22746 if { (eval echo "$as_me:22746: \"$ac_compile\"") >&5
22747   (eval $ac_compile) 2>&5
22748   ac_status=$?
22749   echo "$as_me:22749: \$? = $ac_status" >&5
22750   (exit $ac_status); } &&
22751          { ac_try='test -s conftest.$ac_objext'
22752   { (eval echo "$as_me:22752: \"$ac_try\"") >&5
22753   (eval $ac_try) 2>&5
22754   ac_status=$?
22755   echo "$as_me:22755: \$? = $ac_status" >&5
22756   (exit $ac_status); }; }; then
22757   cf_cv_header_stdbool_h=0
22758 else
22759   echo "$as_me: failed program was:" >&5
22760 cat conftest.$ac_ext >&5
22761 cat >conftest.$ac_ext <<_ACEOF
22762 #line 22762 "configure"
22763 #include "confdefs.h"
22764
22765 #ifndef __BEOS__
22766 #include <stdbool.h>
22767 #endif
22768
22769 int
22770 main (void)
22771 {
22772 bool foo = false
22773   ;
22774   return 0;
22775 }
22776 _ACEOF
22777 rm -f conftest.$ac_objext
22778 if { (eval echo "$as_me:22778: \"$ac_compile\"") >&5
22779   (eval $ac_compile) 2>&5
22780   ac_status=$?
22781   echo "$as_me:22781: \$? = $ac_status" >&5
22782   (exit $ac_status); } &&
22783          { ac_try='test -s conftest.$ac_objext'
22784   { (eval echo "$as_me:22784: \"$ac_try\"") >&5
22785   (eval $ac_try) 2>&5
22786   ac_status=$?
22787   echo "$as_me:22787: \$? = $ac_status" >&5
22788   (exit $ac_status); }; }; then
22789   cf_cv_header_stdbool_h=1
22790 else
22791   echo "$as_me: failed program was:" >&5
22792 cat conftest.$ac_ext >&5
22793 cf_cv_header_stdbool_h=0
22794 fi
22795 rm -f conftest.$ac_objext conftest.$ac_ext
22796 fi
22797 rm -f conftest.$ac_objext conftest.$ac_ext
22798 fi
22799
22800 if test "$cf_cv_header_stdbool_h" = 1
22801 then    echo "$as_me:22801: result: yes" >&5
22802 echo "${ECHO_T}yes" >&6
22803 else    echo "$as_me:22803: result: no" >&5
22804 echo "${ECHO_T}no" >&6
22805 fi
22806
22807 echo "$as_me:22807: checking for builtin bool type" >&5
22808 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22809
22810 if test "${cf_cv_cc_bool_type+set}" = set; then
22811   echo $ECHO_N "(cached) $ECHO_C" >&6
22812 else
22813
22814         cat >conftest.$ac_ext <<_ACEOF
22815 #line 22815 "configure"
22816 #include "confdefs.h"
22817
22818 #include <stdio.h>
22819 #include <sys/types.h>
22820
22821 int
22822 main (void)
22823 {
22824 bool x = false
22825   ;
22826   return 0;
22827 }
22828 _ACEOF
22829 rm -f conftest.$ac_objext
22830 if { (eval echo "$as_me:22830: \"$ac_compile\"") >&5
22831   (eval $ac_compile) 2>&5
22832   ac_status=$?
22833   echo "$as_me:22833: \$? = $ac_status" >&5
22834   (exit $ac_status); } &&
22835          { ac_try='test -s conftest.$ac_objext'
22836   { (eval echo "$as_me:22836: \"$ac_try\"") >&5
22837   (eval $ac_try) 2>&5
22838   ac_status=$?
22839   echo "$as_me:22839: \$? = $ac_status" >&5
22840   (exit $ac_status); }; }; then
22841   cf_cv_cc_bool_type=1
22842 else
22843   echo "$as_me: failed program was:" >&5
22844 cat conftest.$ac_ext >&5
22845 cf_cv_cc_bool_type=0
22846 fi
22847 rm -f conftest.$ac_objext conftest.$ac_ext
22848
22849 fi
22850
22851 if test "$cf_cv_cc_bool_type" = 1
22852 then    echo "$as_me:22852: result: yes" >&5
22853 echo "${ECHO_T}yes" >&6
22854 else    echo "$as_me:22854: result: no" >&5
22855 echo "${ECHO_T}no" >&6
22856 fi
22857
22858 # Check for C++ compiler characteristics (and ensure that it's there!)
22859 if test -n "$CXX" ; then
22860         ac_ext=cc
22861 ac_cpp='$CXXCPP $CPPFLAGS'
22862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22865 ac_main_return=return
22866
22867 if test -n "$GXX" ; then
22868
22869         cf_save="$LIBS"
22870         LIBS="$LIBS $CXXLIBS"
22871         echo "$as_me:22871: checking if we already have C++ library" >&5
22872 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22873         cat >conftest.$ac_ext <<_ACEOF
22874 #line 22874 "configure"
22875 #include "confdefs.h"
22876
22877                         #include <iostream>
22878 int
22879 main (void)
22880 {
22881
22882                         std::cout << "Hello World!" << std::endl;
22883   ;
22884   return 0;
22885 }
22886 _ACEOF
22887 rm -f conftest.$ac_objext conftest$ac_exeext
22888 if { (eval echo "$as_me:22888: \"$ac_link\"") >&5
22889   (eval $ac_link) 2>&5
22890   ac_status=$?
22891   echo "$as_me:22891: \$? = $ac_status" >&5
22892   (exit $ac_status); } &&
22893          { ac_try='test -s conftest$ac_exeext'
22894   { (eval echo "$as_me:22894: \"$ac_try\"") >&5
22895   (eval $ac_try) 2>&5
22896   ac_status=$?
22897   echo "$as_me:22897: \$? = $ac_status" >&5
22898   (exit $ac_status); }; }; then
22899   cf_have_libstdcpp=yes
22900 else
22901   echo "$as_me: failed program was:" >&5
22902 cat conftest.$ac_ext >&5
22903 cf_have_libstdcpp=no
22904 fi
22905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22906         echo "$as_me:22906: result: $cf_have_libstdcpp" >&5
22907 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22908         LIBS="$cf_save"
22909
22910         if test $cf_have_libstdcpp != yes
22911         then
22912                 case $cf_cv_system_name in
22913                 (os2*)
22914                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22915                                 cf_stdcpp_libname=stdcpp
22916                         else
22917                                 cf_stdcpp_libname=stdc++
22918                         fi
22919                         ;;
22920                 (*)
22921                         cf_stdcpp_libname=stdc++
22922                         ;;
22923                 esac
22924
22925                 echo "$as_me:22925: checking for library $cf_stdcpp_libname" >&5
22926 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22927 if test "${cf_cv_libstdcpp+set}" = set; then
22928   echo $ECHO_N "(cached) $ECHO_C" >&6
22929 else
22930
22931                         cf_save="$LIBS"
22932                         LIBS="$LIBS $CXXLIBS"
22933
22934 cf_add_libs="$LIBS"
22935 # reverse order
22936 cf_add_0lib=
22937 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22938 # filter duplicates
22939 for cf_add_1lib in $cf_add_0lib; do
22940         for cf_add_2lib in $cf_add_libs; do
22941                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22942                         cf_add_1lib=
22943                         break
22944                 fi
22945         done
22946         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22947 done
22948 LIBS="$cf_add_libs"
22949
22950                 cat >conftest.$ac_ext <<_ACEOF
22951 #line 22951 "configure"
22952 #include "confdefs.h"
22953
22954                                 #include <iostream>
22955 int
22956 main (void)
22957 {
22958
22959                                 std::cout << "Hello World!" << std::endl;
22960   ;
22961   return 0;
22962 }
22963 _ACEOF
22964 rm -f conftest.$ac_objext conftest$ac_exeext
22965 if { (eval echo "$as_me:22965: \"$ac_link\"") >&5
22966   (eval $ac_link) 2>&5
22967   ac_status=$?
22968   echo "$as_me:22968: \$? = $ac_status" >&5
22969   (exit $ac_status); } &&
22970          { ac_try='test -s conftest$ac_exeext'
22971   { (eval echo "$as_me:22971: \"$ac_try\"") >&5
22972   (eval $ac_try) 2>&5
22973   ac_status=$?
22974   echo "$as_me:22974: \$? = $ac_status" >&5
22975   (exit $ac_status); }; }; then
22976   cf_cv_libstdcpp=yes
22977 else
22978   echo "$as_me: failed program was:" >&5
22979 cat conftest.$ac_ext >&5
22980 cf_cv_libstdcpp=no
22981 fi
22982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22983                         LIBS="$cf_save"
22984
22985 fi
22986 echo "$as_me:22986: result: $cf_cv_libstdcpp" >&5
22987 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22988                 test "$cf_cv_libstdcpp" = yes && {
22989 cf_add_libs="$CXXLIBS"
22990 # reverse order
22991 cf_add_0lib=
22992 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22993 # filter duplicates
22994 for cf_add_1lib in $cf_add_0lib; do
22995         for cf_add_2lib in $cf_add_libs; do
22996                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22997                         cf_add_1lib=
22998                         break
22999                 fi
23000         done
23001         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23002 done
23003 CXXLIBS="$cf_add_libs"
23004  }
23005         fi
23006 fi
23007
23008         echo "$as_me:23008: checking whether $CXX understands -c and -o together" >&5
23009 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23010 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23011   echo $ECHO_N "(cached) $ECHO_C" >&6
23012 else
23013
23014 cat > conftest.$ac_ext <<CF_EOF
23015 int main(void)
23016 {
23017         ${cf_cv_main_return:-return}(0);
23018 }
23019 CF_EOF
23020 # We do the test twice because some compilers refuse to overwrite an
23021 # existing .o file with -o, though they will create one.
23022 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23023 if { (eval echo "$as_me:23023: \"$ac_try\"") >&5
23024   (eval $ac_try) 2>&5
23025   ac_status=$?
23026   echo "$as_me:23026: \$? = $ac_status" >&5
23027   (exit $ac_status); } &&
23028   test -f conftest2.$ac_objext && { (eval echo "$as_me:23028: \"$ac_try\"") >&5
23029   (eval $ac_try) 2>&5
23030   ac_status=$?
23031   echo "$as_me:23031: \$? = $ac_status" >&5
23032   (exit $ac_status); };
23033 then
23034   eval cf_cv_prog_CXX_c_o=yes
23035 else
23036   eval cf_cv_prog_CXX_c_o=no
23037 fi
23038 rm -rf conftest*
23039
23040 fi
23041 if test $cf_cv_prog_CXX_c_o = yes; then
23042   echo "$as_me:23042: result: yes" >&5
23043 echo "${ECHO_T}yes" >&6
23044 else
23045   echo "$as_me:23045: result: no" >&5
23046 echo "${ECHO_T}no" >&6
23047 fi
23048
23049         case $GXX_VERSION in
23050         (1*|2.0-6*)
23051                 cf_cxx_library=yes
23052                 ;;
23053         (*-2.7*|2.7*)
23054
23055 cf_cxx_library=unknown
23056 case $cf_cv_system_name in
23057 (os2*)
23058         cf_gpp_libname=gpp
23059         ;;
23060 (*)
23061         cf_gpp_libname=g++
23062         ;;
23063 esac
23064 if test "$GXX" = yes; then
23065         echo "$as_me:23065: checking for lib$cf_gpp_libname" >&5
23066 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23067         cf_save="$LIBS"
23068
23069 cf_add_libs="$LIBS"
23070 # reverse order
23071 cf_add_0lib=
23072 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23073 # filter duplicates
23074 for cf_add_1lib in $cf_add_0lib; do
23075         for cf_add_2lib in $cf_add_libs; do
23076                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23077                         cf_add_1lib=
23078                         break
23079                 fi
23080         done
23081         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23082 done
23083 LIBS="$cf_add_libs"
23084
23085         cat >conftest.$ac_ext <<_ACEOF
23086 #line 23086 "configure"
23087 #include "confdefs.h"
23088
23089 #include <$cf_gpp_libname/builtin.h>
23090
23091 int
23092 main (void)
23093 {
23094 two_arg_error_handler_t foo2 = lib_error_handler
23095   ;
23096   return 0;
23097 }
23098 _ACEOF
23099 rm -f conftest.$ac_objext conftest$ac_exeext
23100 if { (eval echo "$as_me:23100: \"$ac_link\"") >&5
23101   (eval $ac_link) 2>&5
23102   ac_status=$?
23103   echo "$as_me:23103: \$? = $ac_status" >&5
23104   (exit $ac_status); } &&
23105          { ac_try='test -s conftest$ac_exeext'
23106   { (eval echo "$as_me:23106: \"$ac_try\"") >&5
23107   (eval $ac_try) 2>&5
23108   ac_status=$?
23109   echo "$as_me:23109: \$? = $ac_status" >&5
23110   (exit $ac_status); }; }; then
23111   cf_cxx_library=yes
23112
23113 cf_add_libs="$CXXLIBS"
23114 # reverse order
23115 cf_add_0lib=
23116 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23117 # filter duplicates
23118 for cf_add_1lib in $cf_add_0lib; do
23119         for cf_add_2lib in $cf_add_libs; do
23120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23121                         cf_add_1lib=
23122                         break
23123                 fi
23124         done
23125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23126 done
23127 CXXLIBS="$cf_add_libs"
23128
23129          if test "$cf_gpp_libname" = cpp ; then
23130
23131 cat >>confdefs.h <<\EOF
23132 #define HAVE_GPP_BUILTIN_H 1
23133 EOF
23134
23135          else
23136
23137 cat >>confdefs.h <<\EOF
23138 #define HAVE_GXX_BUILTIN_H 1
23139 EOF
23140
23141          fi
23142 else
23143   echo "$as_me: failed program was:" >&5
23144 cat conftest.$ac_ext >&5
23145 cat >conftest.$ac_ext <<_ACEOF
23146 #line 23146 "configure"
23147 #include "confdefs.h"
23148
23149 #include <builtin.h>
23150
23151 int
23152 main (void)
23153 {
23154 two_arg_error_handler_t foo2 = lib_error_handler
23155   ;
23156   return 0;
23157 }
23158 _ACEOF
23159 rm -f conftest.$ac_objext conftest$ac_exeext
23160 if { (eval echo "$as_me:23160: \"$ac_link\"") >&5
23161   (eval $ac_link) 2>&5
23162   ac_status=$?
23163   echo "$as_me:23163: \$? = $ac_status" >&5
23164   (exit $ac_status); } &&
23165          { ac_try='test -s conftest$ac_exeext'
23166   { (eval echo "$as_me:23166: \"$ac_try\"") >&5
23167   (eval $ac_try) 2>&5
23168   ac_status=$?
23169   echo "$as_me:23169: \$? = $ac_status" >&5
23170   (exit $ac_status); }; }; then
23171   cf_cxx_library=yes
23172
23173 cf_add_libs="$CXXLIBS"
23174 # reverse order
23175 cf_add_0lib=
23176 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23177 # filter duplicates
23178 for cf_add_1lib in $cf_add_0lib; do
23179         for cf_add_2lib in $cf_add_libs; do
23180                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23181                         cf_add_1lib=
23182                         break
23183                 fi
23184         done
23185         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23186 done
23187 CXXLIBS="$cf_add_libs"
23188
23189 cat >>confdefs.h <<\EOF
23190 #define HAVE_BUILTIN_H 1
23191 EOF
23192
23193 else
23194   echo "$as_me: failed program was:" >&5
23195 cat conftest.$ac_ext >&5
23196 cf_cxx_library=no
23197 fi
23198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23199 fi
23200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23201         LIBS="$cf_save"
23202         echo "$as_me:23202: result: $cf_cxx_library" >&5
23203 echo "${ECHO_T}$cf_cxx_library" >&6
23204 fi
23205
23206                 ;;
23207         (*)
23208                 cf_cxx_library=no
23209                 ;;
23210         esac
23211
23212         ac_ext=cc
23213 ac_cpp='$CXXCPP $CPPFLAGS'
23214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23217 ac_main_return=return
23218 echo "$as_me:23218: checking how to run the C++ preprocessor" >&5
23219 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23220 if test -z "$CXXCPP"; then
23221   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23222   echo $ECHO_N "(cached) $ECHO_C" >&6
23223 else
23224       # Double quotes because CXXCPP needs to be expanded
23225     for CXXCPP in "$CXX -E" "/lib/cpp"
23226     do
23227       ac_preproc_ok=false
23228 for ac_cxx_preproc_warn_flag in '' yes
23229 do
23230   # Use a header file that comes with gcc, so configuring glibc
23231   # with a fresh cross-compiler works.
23232   # On the NeXT, cc -E runs the code through the compiler's parser,
23233   # not just through cpp. "Syntax error" is here to catch this case.
23234   cat >conftest.$ac_ext <<_ACEOF
23235 #line 23235 "configure"
23236 #include "confdefs.h"
23237 #include <assert.h>
23238                      Syntax error
23239 _ACEOF
23240 if { (eval echo "$as_me:23240: \"$ac_cpp conftest.$ac_ext\"") >&5
23241   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23242   ac_status=$?
23243   egrep -v '^ *\+' conftest.er1 >conftest.err
23244   rm -f conftest.er1
23245   cat conftest.err >&5
23246   echo "$as_me:23246: \$? = $ac_status" >&5
23247   (exit $ac_status); } >/dev/null; then
23248   if test -s conftest.err; then
23249     ac_cpp_err=$ac_cxx_preproc_warn_flag
23250   else
23251     ac_cpp_err=
23252   fi
23253 else
23254   ac_cpp_err=yes
23255 fi
23256 if test -z "$ac_cpp_err"; then
23257   :
23258 else
23259   echo "$as_me: failed program was:" >&5
23260   cat conftest.$ac_ext >&5
23261   # Broken: fails on valid input.
23262 continue
23263 fi
23264 rm -f conftest.err conftest.$ac_ext
23265
23266   # OK, works on sane cases.  Now check whether non-existent headers
23267   # can be detected and how.
23268   cat >conftest.$ac_ext <<_ACEOF
23269 #line 23269 "configure"
23270 #include "confdefs.h"
23271 #include <ac_nonexistent.h>
23272 _ACEOF
23273 if { (eval echo "$as_me:23273: \"$ac_cpp conftest.$ac_ext\"") >&5
23274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23275   ac_status=$?
23276   egrep -v '^ *\+' conftest.er1 >conftest.err
23277   rm -f conftest.er1
23278   cat conftest.err >&5
23279   echo "$as_me:23279: \$? = $ac_status" >&5
23280   (exit $ac_status); } >/dev/null; then
23281   if test -s conftest.err; then
23282     ac_cpp_err=$ac_cxx_preproc_warn_flag
23283   else
23284     ac_cpp_err=
23285   fi
23286 else
23287   ac_cpp_err=yes
23288 fi
23289 if test -z "$ac_cpp_err"; then
23290   # Broken: success on invalid input.
23291 continue
23292 else
23293   echo "$as_me: failed program was:" >&5
23294   cat conftest.$ac_ext >&5
23295   # Passes both tests.
23296 ac_preproc_ok=:
23297 break
23298 fi
23299 rm -f conftest.err conftest.$ac_ext
23300
23301 done
23302 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23303 rm -f conftest.err conftest.$ac_ext
23304 if $ac_preproc_ok; then
23305   break
23306 fi
23307
23308     done
23309     ac_cv_prog_CXXCPP=$CXXCPP
23310
23311 fi
23312   CXXCPP=$ac_cv_prog_CXXCPP
23313 else
23314   ac_cv_prog_CXXCPP=$CXXCPP
23315 fi
23316 echo "$as_me:23316: result: $CXXCPP" >&5
23317 echo "${ECHO_T}$CXXCPP" >&6
23318 ac_preproc_ok=false
23319 for ac_cxx_preproc_warn_flag in '' yes
23320 do
23321   # Use a header file that comes with gcc, so configuring glibc
23322   # with a fresh cross-compiler works.
23323   # On the NeXT, cc -E runs the code through the compiler's parser,
23324   # not just through cpp. "Syntax error" is here to catch this case.
23325   cat >conftest.$ac_ext <<_ACEOF
23326 #line 23326 "configure"
23327 #include "confdefs.h"
23328 #include <assert.h>
23329                      Syntax error
23330 _ACEOF
23331 if { (eval echo "$as_me:23331: \"$ac_cpp conftest.$ac_ext\"") >&5
23332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23333   ac_status=$?
23334   egrep -v '^ *\+' conftest.er1 >conftest.err
23335   rm -f conftest.er1
23336   cat conftest.err >&5
23337   echo "$as_me:23337: \$? = $ac_status" >&5
23338   (exit $ac_status); } >/dev/null; then
23339   if test -s conftest.err; then
23340     ac_cpp_err=$ac_cxx_preproc_warn_flag
23341   else
23342     ac_cpp_err=
23343   fi
23344 else
23345   ac_cpp_err=yes
23346 fi
23347 if test -z "$ac_cpp_err"; then
23348   :
23349 else
23350   echo "$as_me: failed program was:" >&5
23351   cat conftest.$ac_ext >&5
23352   # Broken: fails on valid input.
23353 continue
23354 fi
23355 rm -f conftest.err conftest.$ac_ext
23356
23357   # OK, works on sane cases.  Now check whether non-existent headers
23358   # can be detected and how.
23359   cat >conftest.$ac_ext <<_ACEOF
23360 #line 23360 "configure"
23361 #include "confdefs.h"
23362 #include <ac_nonexistent.h>
23363 _ACEOF
23364 if { (eval echo "$as_me:23364: \"$ac_cpp conftest.$ac_ext\"") >&5
23365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23366   ac_status=$?
23367   egrep -v '^ *\+' conftest.er1 >conftest.err
23368   rm -f conftest.er1
23369   cat conftest.err >&5
23370   echo "$as_me:23370: \$? = $ac_status" >&5
23371   (exit $ac_status); } >/dev/null; then
23372   if test -s conftest.err; then
23373     ac_cpp_err=$ac_cxx_preproc_warn_flag
23374   else
23375     ac_cpp_err=
23376   fi
23377 else
23378   ac_cpp_err=yes
23379 fi
23380 if test -z "$ac_cpp_err"; then
23381   # Broken: success on invalid input.
23382 continue
23383 else
23384   echo "$as_me: failed program was:" >&5
23385   cat conftest.$ac_ext >&5
23386   # Passes both tests.
23387 ac_preproc_ok=:
23388 break
23389 fi
23390 rm -f conftest.err conftest.$ac_ext
23391
23392 done
23393 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23394 rm -f conftest.err conftest.$ac_ext
23395 if $ac_preproc_ok; then
23396   :
23397 else
23398   { { echo "$as_me:23398: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23399 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23400    { (exit 1); exit 1; }; }
23401 fi
23402
23403 ac_ext=cc
23404 ac_cpp='$CXXCPP $CPPFLAGS'
23405 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23406 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23407 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23408 ac_main_return=return
23409
23410 for ac_header in typeinfo
23411 do
23412 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23413 echo "$as_me:23413: checking for $ac_header" >&5
23414 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23415 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23416   echo $ECHO_N "(cached) $ECHO_C" >&6
23417 else
23418   cat >conftest.$ac_ext <<_ACEOF
23419 #line 23419 "configure"
23420 #include "confdefs.h"
23421 #include <$ac_header>
23422 _ACEOF
23423 if { (eval echo "$as_me:23423: \"$ac_cpp conftest.$ac_ext\"") >&5
23424   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23425   ac_status=$?
23426   egrep -v '^ *\+' conftest.er1 >conftest.err
23427   rm -f conftest.er1
23428   cat conftest.err >&5
23429   echo "$as_me:23429: \$? = $ac_status" >&5
23430   (exit $ac_status); } >/dev/null; then
23431   if test -s conftest.err; then
23432     ac_cpp_err=$ac_cxx_preproc_warn_flag
23433   else
23434     ac_cpp_err=
23435   fi
23436 else
23437   ac_cpp_err=yes
23438 fi
23439 if test -z "$ac_cpp_err"; then
23440   eval "$as_ac_Header=yes"
23441 else
23442   echo "$as_me: failed program was:" >&5
23443   cat conftest.$ac_ext >&5
23444   eval "$as_ac_Header=no"
23445 fi
23446 rm -f conftest.err conftest.$ac_ext
23447 fi
23448 echo "$as_me:23448: result: `eval echo '${'$as_ac_Header'}'`" >&5
23449 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23450 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23451   cat >>confdefs.h <<EOF
23452 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23453 EOF
23454
23455 fi
23456 done
23457
23458 for ac_header in iostream
23459 do
23460 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23461 echo "$as_me:23461: checking for $ac_header" >&5
23462 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23464   echo $ECHO_N "(cached) $ECHO_C" >&6
23465 else
23466   cat >conftest.$ac_ext <<_ACEOF
23467 #line 23467 "configure"
23468 #include "confdefs.h"
23469 #include <$ac_header>
23470 _ACEOF
23471 if { (eval echo "$as_me:23471: \"$ac_cpp conftest.$ac_ext\"") >&5
23472   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23473   ac_status=$?
23474   egrep -v '^ *\+' conftest.er1 >conftest.err
23475   rm -f conftest.er1
23476   cat conftest.err >&5
23477   echo "$as_me:23477: \$? = $ac_status" >&5
23478   (exit $ac_status); } >/dev/null; then
23479   if test -s conftest.err; then
23480     ac_cpp_err=$ac_cxx_preproc_warn_flag
23481   else
23482     ac_cpp_err=
23483   fi
23484 else
23485   ac_cpp_err=yes
23486 fi
23487 if test -z "$ac_cpp_err"; then
23488   eval "$as_ac_Header=yes"
23489 else
23490   echo "$as_me: failed program was:" >&5
23491   cat conftest.$ac_ext >&5
23492   eval "$as_ac_Header=no"
23493 fi
23494 rm -f conftest.err conftest.$ac_ext
23495 fi
23496 echo "$as_me:23496: result: `eval echo '${'$as_ac_Header'}'`" >&5
23497 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23498 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23499   cat >>confdefs.h <<EOF
23500 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23501 EOF
23502
23503 fi
23504 done
23505
23506 if test x"$ac_cv_header_iostream" = xyes ; then
23507         echo "$as_me:23507: checking if iostream uses std-namespace" >&5
23508 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23509         cat >conftest.$ac_ext <<_ACEOF
23510 #line 23510 "configure"
23511 #include "confdefs.h"
23512
23513 #include <iostream>
23514 using std::endl;
23515 using std::cerr;
23516 int
23517 main (void)
23518 {
23519
23520 cerr << "testing" << endl;
23521
23522   ;
23523   return 0;
23524 }
23525 _ACEOF
23526 rm -f conftest.$ac_objext
23527 if { (eval echo "$as_me:23527: \"$ac_compile\"") >&5
23528   (eval $ac_compile) 2>&5
23529   ac_status=$?
23530   echo "$as_me:23530: \$? = $ac_status" >&5
23531   (exit $ac_status); } &&
23532          { ac_try='test -s conftest.$ac_objext'
23533   { (eval echo "$as_me:23533: \"$ac_try\"") >&5
23534   (eval $ac_try) 2>&5
23535   ac_status=$?
23536   echo "$as_me:23536: \$? = $ac_status" >&5
23537   (exit $ac_status); }; }; then
23538   cf_iostream_namespace=yes
23539 else
23540   echo "$as_me: failed program was:" >&5
23541 cat conftest.$ac_ext >&5
23542 cf_iostream_namespace=no
23543 fi
23544 rm -f conftest.$ac_objext conftest.$ac_ext
23545         echo "$as_me:23545: result: $cf_iostream_namespace" >&5
23546 echo "${ECHO_T}$cf_iostream_namespace" >&6
23547         if test "$cf_iostream_namespace" = yes ; then
23548
23549 cat >>confdefs.h <<\EOF
23550 #define IOSTREAM_NAMESPACE 1
23551 EOF
23552
23553         fi
23554 fi
23555
23556 echo "$as_me:23556: checking if we should include stdbool.h" >&5
23557 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23558
23559 if test "${cf_cv_header_stdbool_h+set}" = set; then
23560   echo $ECHO_N "(cached) $ECHO_C" >&6
23561 else
23562
23563         cat >conftest.$ac_ext <<_ACEOF
23564 #line 23564 "configure"
23565 #include "confdefs.h"
23566
23567 int
23568 main (void)
23569 {
23570 bool foo = false
23571   ;
23572   return 0;
23573 }
23574 _ACEOF
23575 rm -f conftest.$ac_objext
23576 if { (eval echo "$as_me:23576: \"$ac_compile\"") >&5
23577   (eval $ac_compile) 2>&5
23578   ac_status=$?
23579   echo "$as_me:23579: \$? = $ac_status" >&5
23580   (exit $ac_status); } &&
23581          { ac_try='test -s conftest.$ac_objext'
23582   { (eval echo "$as_me:23582: \"$ac_try\"") >&5
23583   (eval $ac_try) 2>&5
23584   ac_status=$?
23585   echo "$as_me:23585: \$? = $ac_status" >&5
23586   (exit $ac_status); }; }; then
23587   cf_cv_header_stdbool_h=0
23588 else
23589   echo "$as_me: failed program was:" >&5
23590 cat conftest.$ac_ext >&5
23591 cat >conftest.$ac_ext <<_ACEOF
23592 #line 23592 "configure"
23593 #include "confdefs.h"
23594
23595 #ifndef __BEOS__
23596 #include <stdbool.h>
23597 #endif
23598
23599 int
23600 main (void)
23601 {
23602 bool foo = false
23603   ;
23604   return 0;
23605 }
23606 _ACEOF
23607 rm -f conftest.$ac_objext
23608 if { (eval echo "$as_me:23608: \"$ac_compile\"") >&5
23609   (eval $ac_compile) 2>&5
23610   ac_status=$?
23611   echo "$as_me:23611: \$? = $ac_status" >&5
23612   (exit $ac_status); } &&
23613          { ac_try='test -s conftest.$ac_objext'
23614   { (eval echo "$as_me:23614: \"$ac_try\"") >&5
23615   (eval $ac_try) 2>&5
23616   ac_status=$?
23617   echo "$as_me:23617: \$? = $ac_status" >&5
23618   (exit $ac_status); }; }; then
23619   cf_cv_header_stdbool_h=1
23620 else
23621   echo "$as_me: failed program was:" >&5
23622 cat conftest.$ac_ext >&5
23623 cf_cv_header_stdbool_h=0
23624 fi
23625 rm -f conftest.$ac_objext conftest.$ac_ext
23626 fi
23627 rm -f conftest.$ac_objext conftest.$ac_ext
23628 fi
23629
23630 if test "$cf_cv_header_stdbool_h" = 1
23631 then    echo "$as_me:23631: result: yes" >&5
23632 echo "${ECHO_T}yes" >&6
23633 else    echo "$as_me:23633: result: no" >&5
23634 echo "${ECHO_T}no" >&6
23635 fi
23636
23637 echo "$as_me:23637: checking for builtin bool type" >&5
23638 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23639
23640 if test "${cf_cv_builtin_bool+set}" = set; then
23641   echo $ECHO_N "(cached) $ECHO_C" >&6
23642 else
23643
23644         cat >conftest.$ac_ext <<_ACEOF
23645 #line 23645 "configure"
23646 #include "confdefs.h"
23647
23648 #include <stdio.h>
23649 #include <sys/types.h>
23650
23651 int
23652 main (void)
23653 {
23654 bool x = false
23655   ;
23656   return 0;
23657 }
23658 _ACEOF
23659 rm -f conftest.$ac_objext
23660 if { (eval echo "$as_me:23660: \"$ac_compile\"") >&5
23661   (eval $ac_compile) 2>&5
23662   ac_status=$?
23663   echo "$as_me:23663: \$? = $ac_status" >&5
23664   (exit $ac_status); } &&
23665          { ac_try='test -s conftest.$ac_objext'
23666   { (eval echo "$as_me:23666: \"$ac_try\"") >&5
23667   (eval $ac_try) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit $ac_status); }; }; then
23671   cf_cv_builtin_bool=1
23672 else
23673   echo "$as_me: failed program was:" >&5
23674 cat conftest.$ac_ext >&5
23675 cf_cv_builtin_bool=0
23676 fi
23677 rm -f conftest.$ac_objext conftest.$ac_ext
23678
23679 fi
23680
23681 if test "$cf_cv_builtin_bool" = 1
23682 then    echo "$as_me:23682: result: yes" >&5
23683 echo "${ECHO_T}yes" >&6
23684 else    echo "$as_me:23684: result: no" >&5
23685 echo "${ECHO_T}no" >&6
23686 fi
23687
23688 echo "$as_me:23688: checking for size of bool" >&5
23689 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23690 if test "${cf_cv_type_of_bool+set}" = set; then
23691   echo $ECHO_N "(cached) $ECHO_C" >&6
23692 else
23693
23694         rm -f cf_test.out
23695         if test "$cross_compiling" = yes; then
23696   cf_cv_type_of_bool=unknown
23697 else
23698   cat >conftest.$ac_ext <<_ACEOF
23699 #line 23699 "configure"
23700 #include "confdefs.h"
23701
23702 #include <stdlib.h>
23703 #include <stdio.h>
23704
23705 #if defined(__cplusplus)
23706
23707 #ifdef HAVE_GXX_BUILTIN_H
23708 #include <g++/builtin.h>
23709 #elif HAVE_GPP_BUILTIN_H
23710 #include <gpp/builtin.h>
23711 #elif HAVE_BUILTIN_H
23712 #include <builtin.h>
23713 #endif
23714
23715 #else
23716
23717 #if $cf_cv_header_stdbool_h
23718 #include <stdbool.h>
23719 #endif
23720
23721 #endif
23722
23723 int main(void)
23724 {
23725         FILE *fp = fopen("cf_test.out", "w");
23726         if (fp != 0) {
23727                 bool x = true;
23728                 if ((bool)(-x) >= 0)
23729                         fputs("unsigned ", fp);
23730                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23731                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23732                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23733                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23734                 fclose(fp);
23735         }
23736         ${cf_cv_main_return:-return}(0);
23737 }
23738
23739 _ACEOF
23740 rm -f conftest$ac_exeext
23741 if { (eval echo "$as_me:23741: \"$ac_link\"") >&5
23742   (eval $ac_link) 2>&5
23743   ac_status=$?
23744   echo "$as_me:23744: \$? = $ac_status" >&5
23745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23746   { (eval echo "$as_me:23746: \"$ac_try\"") >&5
23747   (eval $ac_try) 2>&5
23748   ac_status=$?
23749   echo "$as_me:23749: \$? = $ac_status" >&5
23750   (exit $ac_status); }; }; then
23751   cf_cv_type_of_bool=`cat cf_test.out`
23752                  if test -z "$cf_cv_type_of_bool"; then
23753                    cf_cv_type_of_bool=unknown
23754                  fi
23755 else
23756   echo "$as_me: program exited with status $ac_status" >&5
23757 echo "$as_me: failed program was:" >&5
23758 cat conftest.$ac_ext >&5
23759 cf_cv_type_of_bool=unknown
23760 fi
23761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23762 fi
23763
23764 fi
23765
23766         rm -f cf_test.out
23767 echo "$as_me:23767: result: $cf_cv_type_of_bool" >&5
23768 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23769 if test "$cf_cv_type_of_bool" = unknown ; then
23770         case .$NCURSES_BOOL in
23771         (.auto|.) NCURSES_BOOL=unsigned;;
23772         esac
23773         { echo "$as_me:23773: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23774 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23775         cf_cv_type_of_bool=$NCURSES_BOOL
23776 fi
23777
23778 echo "$as_me:23778: checking for special defines needed for etip.h" >&5
23779 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23780 cf_save_CXXFLAGS="$CXXFLAGS"
23781 cf_result="none"
23782
23783 # etip.h includes ncurses.h which includes ncurses_dll.h
23784 # But ncurses_dll.h is generated - fix here.
23785 test -d include || mkdir include
23786 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
23787
23788 for cf_math in "" MATH_H
23789 do
23790 for cf_excp in "" MATH_EXCEPTION
23791 do
23792         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23793         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23794         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23795 cat >conftest.$ac_ext <<_ACEOF
23796 #line 23796 "configure"
23797 #include "confdefs.h"
23798
23799 #include <etip.h.in>
23800
23801 int
23802 main (void)
23803 {
23804
23805   ;
23806   return 0;
23807 }
23808 _ACEOF
23809 rm -f conftest.$ac_objext
23810 if { (eval echo "$as_me:23810: \"$ac_compile\"") >&5
23811   (eval $ac_compile) 2>&5
23812   ac_status=$?
23813   echo "$as_me:23813: \$? = $ac_status" >&5
23814   (exit $ac_status); } &&
23815          { ac_try='test -s conftest.$ac_objext'
23816   { (eval echo "$as_me:23816: \"$ac_try\"") >&5
23817   (eval $ac_try) 2>&5
23818   ac_status=$?
23819   echo "$as_me:23819: \$? = $ac_status" >&5
23820   (exit $ac_status); }; }; then
23821
23822         test -n "$cf_math" && cat >>confdefs.h <<EOF
23823 #define ETIP_NEEDS_${cf_math} 1
23824 EOF
23825
23826         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23827 #define ETIP_NEEDS_${cf_excp} 1
23828 EOF
23829
23830         cf_result="$cf_math $cf_excp"
23831         break 2
23832
23833 else
23834   echo "$as_me: failed program was:" >&5
23835 cat conftest.$ac_ext >&5
23836 fi
23837 rm -f conftest.$ac_objext conftest.$ac_ext
23838 done
23839 done
23840 echo "$as_me:23840: result: $cf_result" >&5
23841 echo "${ECHO_T}$cf_result" >&6
23842 CXXFLAGS="$cf_save_CXXFLAGS"
23843
23844 if test -n "$CXX"; then
23845 echo "$as_me:23845: checking if $CXX accepts parameter initialization" >&5
23846 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23847 if test "${cf_cv_cpp_param_init+set}" = set; then
23848   echo $ECHO_N "(cached) $ECHO_C" >&6
23849 else
23850
23851         ac_ext=cc
23852 ac_cpp='$CXXCPP $CPPFLAGS'
23853 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23854 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23855 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23856 ac_main_return=return
23857
23858         if test "$cross_compiling" = yes; then
23859   cf_cv_cpp_param_init=unknown
23860 else
23861   cat >conftest.$ac_ext <<_ACEOF
23862 #line 23862 "configure"
23863 #include "confdefs.h"
23864
23865 class TEST {
23866 private:
23867         int value;
23868 public:
23869         TEST(int x = 1);
23870         ~TEST();
23871 };
23872
23873 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23874 {
23875         value = x;
23876 }
23877 int main(void) { }
23878
23879 _ACEOF
23880 rm -f conftest$ac_exeext
23881 if { (eval echo "$as_me:23881: \"$ac_link\"") >&5
23882   (eval $ac_link) 2>&5
23883   ac_status=$?
23884   echo "$as_me:23884: \$? = $ac_status" >&5
23885   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23886   { (eval echo "$as_me:23886: \"$ac_try\"") >&5
23887   (eval $ac_try) 2>&5
23888   ac_status=$?
23889   echo "$as_me:23889: \$? = $ac_status" >&5
23890   (exit $ac_status); }; }; then
23891   cf_cv_cpp_param_init=yes
23892 else
23893   echo "$as_me: program exited with status $ac_status" >&5
23894 echo "$as_me: failed program was:" >&5
23895 cat conftest.$ac_ext >&5
23896 cf_cv_cpp_param_init=no
23897 fi
23898 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23899 fi
23900         ac_ext=cc
23901 ac_cpp='$CXXCPP $CPPFLAGS'
23902 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23903 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23904 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23905 ac_main_return=return
23906
23907 fi
23908 echo "$as_me:23908: result: $cf_cv_cpp_param_init" >&5
23909 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23910 fi
23911 test "$cf_cv_cpp_param_init" = yes &&
23912 cat >>confdefs.h <<\EOF
23913 #define CPP_HAS_PARAM_INIT 1
23914 EOF
23915
23916 if test -n "$CXX"; then
23917
23918 echo "$as_me:23918: checking if $CXX accepts static_cast" >&5
23919 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23920 if test "${cf_cv_cpp_static_cast+set}" = set; then
23921   echo $ECHO_N "(cached) $ECHO_C" >&6
23922 else
23923
23924         ac_ext=cc
23925 ac_cpp='$CXXCPP $CPPFLAGS'
23926 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23927 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23928 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23929 ac_main_return=return
23930
23931         cat >conftest.$ac_ext <<_ACEOF
23932 #line 23932 "configure"
23933 #include "confdefs.h"
23934
23935 class NCursesPanel
23936 {
23937 public:
23938   NCursesPanel(int nlines,
23939                int ncols,
23940                int begin_y = 0,
23941                int begin_x = 0)
23942   {
23943   }
23944   NCursesPanel();
23945   ~NCursesPanel();
23946 };
23947
23948 template<class T> class NCursesUserPanel : public NCursesPanel
23949 {
23950 public:
23951   NCursesUserPanel (int nlines,
23952                     int ncols,
23953                     int begin_y = 0,
23954                     int begin_x = 0,
23955                     const T* p_UserData = static_cast<T*>(0))
23956     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23957   {
23958   };
23959   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23960   {
23961   };
23962
23963   virtual ~NCursesUserPanel() {};
23964 };
23965
23966 int
23967 main (void)
23968 {
23969
23970         const char* p_UserData = static_cast<char*>(0)
23971   ;
23972   return 0;
23973 }
23974 _ACEOF
23975 rm -f conftest.$ac_objext
23976 if { (eval echo "$as_me:23976: \"$ac_compile\"") >&5
23977   (eval $ac_compile) 2>&5
23978   ac_status=$?
23979   echo "$as_me:23979: \$? = $ac_status" >&5
23980   (exit $ac_status); } &&
23981          { ac_try='test -s conftest.$ac_objext'
23982   { (eval echo "$as_me:23982: \"$ac_try\"") >&5
23983   (eval $ac_try) 2>&5
23984   ac_status=$?
23985   echo "$as_me:23985: \$? = $ac_status" >&5
23986   (exit $ac_status); }; }; then
23987   cf_cv_cpp_static_cast=yes
23988 else
23989   echo "$as_me: failed program was:" >&5
23990 cat conftest.$ac_ext >&5
23991 cf_cv_cpp_static_cast=no
23992 fi
23993 rm -f conftest.$ac_objext conftest.$ac_ext
23994
23995         ac_ext=cc
23996 ac_cpp='$CXXCPP $CPPFLAGS'
23997 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23998 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23999 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24000 ac_main_return=return
24001
24002 fi
24003 echo "$as_me:24003: result: $cf_cv_cpp_static_cast" >&5
24004 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24005
24006 fi
24007
24008 test "$cf_cv_cpp_static_cast" = yes &&
24009 cat >>confdefs.h <<\EOF
24010 #define CPP_HAS_STATIC_CAST 1
24011 EOF
24012
24013         CXX_AR='$(AR)'
24014         CXX_ARFLAGS='$(ARFLAGS)'
24015         case $cf_cv_system_name in
24016         (irix*)
24017             if test "$GXX" != yes ; then
24018                 CXX_AR='$(CXX)'
24019                 CXX_ARFLAGS='-ar -o'
24020             fi
24021             ;;
24022         (sco3.2v5*)
24023             CXXLDFLAGS="-u main"
24024             ;;
24025         (solaris2*)
24026             if test "$GXX" != yes ; then
24027                 CXX_AR='$(CXX)'
24028                 CXX_ARFLAGS='-xar -o'
24029             fi
24030             ;;
24031         esac
24032
24033 else
24034         cf_cxx_library=no
24035         cf_cv_builtin_bool=1
24036
24037         # Just because we are not configuring against C++ right now does not
24038         # mean that a user will not want to use C++.  Some distributors disable
24039         # the C++ portion of this configuration as a shortcut (or just to avoid
24040         # compiling the demo in the c++ directory).  So we need a reasonable
24041         # default for the 'bool' type.
24042         #
24043         # Caveat: since the storage of the bool type is not standardized, it
24044         # may change.
24045
24046         if test "$NCURSES_BOOL" != auto ; then
24047                 cf_cv_type_of_bool=$NCURSES_BOOL
24048                 cf_cv_header_stdbool_h=0
24049         else
24050                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24051
24052 echo "$as_me:24052: checking for size of bool" >&5
24053 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24054 if test "${cf_cv_type_of_bool+set}" = set; then
24055   echo $ECHO_N "(cached) $ECHO_C" >&6
24056 else
24057
24058         rm -f cf_test.out
24059         if test "$cross_compiling" = yes; then
24060   cf_cv_type_of_bool=unknown
24061 else
24062   cat >conftest.$ac_ext <<_ACEOF
24063 #line 24063 "configure"
24064 #include "confdefs.h"
24065
24066 #include <stdlib.h>
24067 #include <stdio.h>
24068
24069 #if defined(__cplusplus)
24070
24071 #ifdef HAVE_GXX_BUILTIN_H
24072 #include <g++/builtin.h>
24073 #elif HAVE_GPP_BUILTIN_H
24074 #include <gpp/builtin.h>
24075 #elif HAVE_BUILTIN_H
24076 #include <builtin.h>
24077 #endif
24078
24079 #else
24080
24081 #if $cf_cv_header_stdbool_h
24082 #include <stdbool.h>
24083 #endif
24084
24085 #endif
24086
24087 int main(void)
24088 {
24089         FILE *fp = fopen("cf_test.out", "w");
24090         if (fp != 0) {
24091                 bool x = true;
24092                 if ((bool)(-x) >= 0)
24093                         fputs("unsigned ", fp);
24094                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24095                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24096                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24097                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24098                 fclose(fp);
24099         }
24100         ${cf_cv_main_return:-return}(0);
24101 }
24102
24103 _ACEOF
24104 rm -f conftest$ac_exeext
24105 if { (eval echo "$as_me:24105: \"$ac_link\"") >&5
24106   (eval $ac_link) 2>&5
24107   ac_status=$?
24108   echo "$as_me:24108: \$? = $ac_status" >&5
24109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24110   { (eval echo "$as_me:24110: \"$ac_try\"") >&5
24111   (eval $ac_try) 2>&5
24112   ac_status=$?
24113   echo "$as_me:24113: \$? = $ac_status" >&5
24114   (exit $ac_status); }; }; then
24115   cf_cv_type_of_bool=`cat cf_test.out`
24116                  if test -z "$cf_cv_type_of_bool"; then
24117                    cf_cv_type_of_bool=unknown
24118                  fi
24119 else
24120   echo "$as_me: program exited with status $ac_status" >&5
24121 echo "$as_me: failed program was:" >&5
24122 cat conftest.$ac_ext >&5
24123 cf_cv_type_of_bool=unknown
24124 fi
24125 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24126 fi
24127
24128 fi
24129
24130         rm -f cf_test.out
24131 echo "$as_me:24131: result: $cf_cv_type_of_bool" >&5
24132 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24133 if test "$cf_cv_type_of_bool" = unknown ; then
24134         case .$NCURSES_BOOL in
24135         (.auto|.) NCURSES_BOOL=unsigned;;
24136         esac
24137         { echo "$as_me:24137: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24138 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24139         cf_cv_type_of_bool=$NCURSES_BOOL
24140 fi
24141
24142                 else
24143                         echo "$as_me:24143: checking for fallback type of bool" >&5
24144 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24145                         case "$host_cpu" in
24146                         (i?86)  cf_cv_type_of_bool=char ;;
24147                         (*)     cf_cv_type_of_bool=int  ;;
24148                         esac
24149                         echo "$as_me:24149: result: $cf_cv_type_of_bool" >&5
24150 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24151                 fi
24152         fi
24153 fi
24154
24155 # If the C compiler did not declare bool, and we did not determine that the C++
24156 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24157 # ncurses library use the same type as C++ bool.  Note that this allows one to
24158 # specify the type of bool in a configure-script option and postpone
24159 # integration with the C++ compiler provided that the types are compatible.
24160 USE_CXX_BOOL=1
24161 if test $cf_cv_cc_bool_type = 1
24162 then
24163         # oops: C has a bool.  Unlikely, but C++ could differ.
24164         USE_CXX_BOOL=0
24165 elif test $cf_cv_builtin_bool = 0
24166 then
24167         # C++ has no bool
24168         USE_CXX_BOOL=0
24169 else
24170         # this is the normal case
24171         USE_CXX_BOOL='defined(__cplusplus)'
24172 fi
24173
24174 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24175
24176         if test "$cf_with_ada" != "no" ; then
24177                 if test "$with_libtool" != "no"; then
24178                         { echo "$as_me:24178: WARNING: libtool does not support Ada - disabling feature" >&5
24179 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24180                         cf_with_ada=no
24181                 fi
24182         fi
24183
24184         if test "$cf_with_ada" != "no" ; then
24185
24186 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24187 do
24188
24189 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24190
24191         unset ac_cv_path_cf_TEMP_gnat
24192         unset cf_TEMP_gnat
24193         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24194 set dummy $cf_prog_gnat; ac_word=$2
24195 echo "$as_me:24195: checking for $ac_word" >&5
24196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24197 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24198   echo $ECHO_N "(cached) $ECHO_C" >&6
24199 else
24200   case $cf_TEMP_gnat in
24201   [\\/]* | ?:[\\/]*)
24202   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24203   ;;
24204   *)
24205   ac_save_IFS=$IFS; IFS=$ac_path_separator
24206 ac_dummy="$PATH"
24207 for ac_dir in $ac_dummy; do
24208   IFS=$ac_save_IFS
24209   test -z "$ac_dir" && ac_dir=.
24210   if $as_executable_p "$ac_dir/$ac_word"; then
24211    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24212    echo "$as_me:24212: found $ac_dir/$ac_word" >&5
24213    break
24214 fi
24215 done
24216
24217   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24218   ;;
24219 esac
24220 fi
24221 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24222
24223 if test -n "$cf_TEMP_gnat"; then
24224   echo "$as_me:24224: result: $cf_TEMP_gnat" >&5
24225 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24226 else
24227   echo "$as_me:24227: result: no" >&5
24228 echo "${ECHO_T}no" >&6
24229 fi
24230
24231         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24232
24233         if test "x$cf_TEMP_gnat" != xno; then
24234                 unset cf_cv_gnat_version
24235                 unset cf_TEMP_gnat
24236
24237 echo "$as_me:24237: checking for $cf_prog_gnat version" >&5
24238 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24239 if test "${cf_cv_gnat_version+set}" = set; then
24240   echo $ECHO_N "(cached) $ECHO_C" >&6
24241 else
24242
24243 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24244         grep '[0-9].[0-9][0-9]*' |\
24245         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24246
24247 fi
24248 echo "$as_me:24248: result: $cf_cv_gnat_version" >&5
24249 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24250 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24251 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24252
24253         fi
24254         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24255
24256         unset cf_TEMP_gnat
24257         unset cf_cv_gnat_version
24258         unset ac_cv_path_cf_TEMP_gnat
24259 done
24260
24261 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24262         cf_ada_make=
24263         cf_cv_prog_gnat_correct=no
24264 else
24265         cf_ada_make=gnatmake
24266         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24267                 # gprconfig is newer than gnatmake; we can continue...
24268                 cf_ada_config="##"
24269         else
24270                 rm -rf conftest* *~conftest*
24271                 if mkdir conftest.src
24272                 then
24273                         cf_ada_config=""
24274                         cd conftest.src
24275                         for cf_gprconfig in Ada C
24276                         do
24277                                 echo "$as_me:24277: checking for gprconfig name for $cf_gprconfig" >&5
24278 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24279                                 if test $cf_gprconfig = C
24280                                 then
24281                                         for cf_gprconfig_param in \
24282                                                 $cf_gprconfig,,,,GNATGCC \
24283                                                 $cf_gprconfig,,,,GCC \
24284                                                 $cf_gprconfig
24285                                         do
24286                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24287                                                 test -n "$cf_gprconfig_value" && break
24288                                         done
24289                                 else
24290                                         cf_gprconfig_param=$cf_gprconfig
24291                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24292                                 fi
24293                                 if test -n "$cf_gprconfig_value"
24294                                 then
24295                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24296                                         echo "$as_me:24296: result: $cf_gprconfig_value" >&5
24297 echo "${ECHO_T}$cf_gprconfig_value" >&6
24298                                 else
24299                                         echo "$as_me:24299: result: missing" >&5
24300 echo "${ECHO_T}missing" >&6
24301                                         cf_ada_config="#"
24302                                         break
24303                                 fi
24304                         done
24305                         cd ..
24306                         rm -rf conftest* *~conftest*
24307                 fi
24308         fi
24309         if test "x$cf_ada_config" != "x#"
24310         then
24311
24312 echo "$as_me:24312: checking for gnat version" >&5
24313 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24314 if test "${cf_cv_gnat_version+set}" = set; then
24315   echo $ECHO_N "(cached) $ECHO_C" >&6
24316 else
24317
24318 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24319         grep '[0-9].[0-9][0-9]*' |\
24320         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24321
24322 fi
24323 echo "$as_me:24323: result: $cf_cv_gnat_version" >&5
24324 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24325 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24326
24327 case $cf_cv_gnat_version in
24328 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24329         cf_cv_prog_gnat_correct=yes
24330         ;;
24331 (*)
24332         { echo "$as_me:24332: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24333 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24334         cf_cv_prog_gnat_correct=no
24335         ;;
24336 esac
24337
24338                 # Extract the first word of "m4", so it can be a program name with args.
24339 set dummy m4; ac_word=$2
24340 echo "$as_me:24340: checking for $ac_word" >&5
24341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24342 if test "${ac_cv_prog_M4_exists+set}" = set; then
24343   echo $ECHO_N "(cached) $ECHO_C" >&6
24344 else
24345   if test -n "$M4_exists"; then
24346   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24347 else
24348   ac_save_IFS=$IFS; IFS=$ac_path_separator
24349 ac_dummy="$PATH"
24350 for ac_dir in $ac_dummy; do
24351   IFS=$ac_save_IFS
24352   test -z "$ac_dir" && ac_dir=.
24353   $as_executable_p "$ac_dir/$ac_word" || continue
24354 ac_cv_prog_M4_exists="yes"
24355 echo "$as_me:24355: found $ac_dir/$ac_word" >&5
24356 break
24357 done
24358
24359   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24360 fi
24361 fi
24362 M4_exists=$ac_cv_prog_M4_exists
24363 if test -n "$M4_exists"; then
24364   echo "$as_me:24364: result: $M4_exists" >&5
24365 echo "${ECHO_T}$M4_exists" >&6
24366 else
24367   echo "$as_me:24367: result: no" >&5
24368 echo "${ECHO_T}no" >&6
24369 fi
24370
24371                 if test "$ac_cv_prog_M4_exists" = no; then
24372                         cf_cv_prog_gnat_correct=no
24373                         { echo "$as_me:24373: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24374 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24375                 fi
24376                 if test "$cf_cv_prog_gnat_correct" = yes; then
24377                         echo "$as_me:24377: checking if GNAT works" >&5
24378 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24379
24380 rm -rf conftest* *~conftest*
24381 cat >>conftest.ads <<CF_EOF
24382 procedure conftest;
24383 CF_EOF
24384 cat >>conftest.adb <<CF_EOF
24385 with Text_IO;
24386 with GNAT.OS_Lib;
24387 procedure conftest is
24388 begin
24389    Text_IO.Put ("Hello World");
24390    Text_IO.New_Line;
24391    GNAT.OS_Lib.OS_Exit (0);
24392 end conftest;
24393 CF_EOF
24394 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24395    if ( ./conftest 1>&5 2>&1 ) ; then
24396       cf_cv_prog_gnat_correct=yes
24397    else
24398       cf_cv_prog_gnat_correct=no
24399    fi
24400 else
24401    cf_cv_prog_gnat_correct=no
24402 fi
24403 rm -rf conftest* *~conftest*
24404
24405                         echo "$as_me:24405: result: $cf_cv_prog_gnat_correct" >&5
24406 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24407                 fi
24408         else
24409                 cf_cv_prog_gnat_correct=no
24410         fi
24411 fi
24412
24413                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24414
24415         ADAFLAGS="$ADAFLAGS -gnatpn"
24416
24417         echo "$as_me:24417: checking optimization options for ADAFLAGS" >&5
24418 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24419         case "$CFLAGS" in
24420         (*-g*)
24421
24422         ADAFLAGS="$ADAFLAGS -g"
24423
24424                 ;;
24425         esac
24426         case "$CFLAGS" in
24427         (*-O*)
24428                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24429
24430         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24431
24432                 ;;
24433         esac
24434         echo "$as_me:24434: result: $ADAFLAGS" >&5
24435 echo "${ECHO_T}$ADAFLAGS" >&6
24436
24437 echo "$as_me:24437: checking if GNATPREP supports -T option" >&5
24438 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24439 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24440   echo $ECHO_N "(cached) $ECHO_C" >&6
24441 else
24442
24443 cf_cv_gnatprep_opt_t=no
24444 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24445
24446 fi
24447 echo "$as_me:24447: result: $cf_cv_gnatprep_opt_t" >&5
24448 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24449 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24450
24451 echo "$as_me:24451: checking if GNAT supports generics" >&5
24452 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24453 case $cf_cv_gnat_version in
24454 (3.[1-9]*|[4-9].*)
24455         cf_gnat_generics=yes
24456         ;;
24457 (*)
24458         cf_gnat_generics=no
24459         ;;
24460 esac
24461 echo "$as_me:24461: result: $cf_gnat_generics" >&5
24462 echo "${ECHO_T}$cf_gnat_generics" >&6
24463
24464 if test "$cf_gnat_generics" = yes
24465 then
24466         cf_compile_generics=generics
24467         cf_generic_objects="\${GENOBJS}"
24468 else
24469         cf_compile_generics=
24470         cf_generic_objects=
24471 fi
24472
24473 echo "$as_me:24473: checking if GNAT supports SIGINT" >&5
24474 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24475 if test "${cf_cv_gnat_sigint+set}" = set; then
24476   echo $ECHO_N "(cached) $ECHO_C" >&6
24477 else
24478
24479 rm -rf conftest* *~conftest*
24480 cat >>conftest.ads <<CF_EOF
24481 with Ada.Interrupts.Names;
24482
24483 package ConfTest is
24484
24485    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24486    pragma Unreserve_All_Interrupts;
24487    pragma Warnings (On);
24488
24489    protected Process is
24490       procedure Stop;
24491       function Continue return Boolean;
24492       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24493    private
24494       Done : Boolean := False;
24495    end Process;
24496
24497 end ConfTest;
24498 CF_EOF
24499 cat >>conftest.adb <<CF_EOF
24500 package body ConfTest is
24501    protected body Process is
24502       procedure Stop is
24503       begin
24504          Done := True;
24505       end Stop;
24506       function Continue return Boolean is
24507       begin
24508          return not Done;
24509       end Continue;
24510    end Process;
24511 end ConfTest;
24512 CF_EOF
24513 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24514       cf_cv_gnat_sigint=yes
24515 else
24516    cf_cv_gnat_sigint=no
24517 fi
24518 rm -rf conftest* *~conftest*
24519
24520 fi
24521 echo "$as_me:24521: result: $cf_cv_gnat_sigint" >&5
24522 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24523
24524 if test $cf_cv_gnat_sigint = yes ; then
24525         USE_GNAT_SIGINT=""
24526 else
24527         USE_GNAT_SIGINT="#"
24528 fi
24529
24530 cf_gnat_libraries=no
24531 cf_gnat_projects=no
24532
24533 if test "$enable_gnat_projects" != no ; then
24534 echo "$as_me:24534: checking if GNAT supports project files" >&5
24535 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24536 case $cf_cv_gnat_version in
24537 (3.[0-9]*)
24538         ;;
24539 (*)
24540         case $cf_cv_system_name in
24541         (cygwin*|msys*)
24542                 ;;
24543         (*)
24544                 rm -rf conftest* *~conftest*
24545                 if mkdir conftest.src conftest.bin conftest.lib
24546                 then
24547                         cd conftest.src
24548                         rm -rf conftest* *~conftest*
24549                         cat >>library.gpr <<CF_EOF
24550 project Library is
24551   Kind := External ("LIB_KIND");
24552   for Library_Name use "ConfTest";
24553   for Object_Dir use ".";
24554   for Library_ALI_Dir use External("LIBRARY_DIR");
24555   for Library_Version use External ("SONAME");
24556   for Library_Kind use Kind;
24557   for Library_Dir use External("BUILD_DIR");
24558   Source_Dir := External ("SOURCE_DIR");
24559   for Source_Dirs use (Source_Dir);
24560 end Library;
24561 CF_EOF
24562                         cat >>confpackage.ads <<CF_EOF
24563 package ConfPackage is
24564    procedure conftest;
24565 end ConfPackage;
24566 CF_EOF
24567                         cat >>confpackage.adb <<CF_EOF
24568 with Text_IO;
24569 package body ConfPackage is
24570    procedure conftest is
24571    begin
24572       Text_IO.Put ("Hello World");
24573       Text_IO.New_Line;
24574    end conftest;
24575 end ConfPackage;
24576 CF_EOF
24577                         if ( $cf_ada_make $ADAFLAGS \
24578                                         -Plibrary.gpr \
24579                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24580                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24581                                         -XSOURCE_DIR=`pwd` \
24582                                         -XSONAME=libConfTest.so.1 \
24583                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24584                                 cf_gnat_projects=yes
24585                         fi
24586                         cd ..
24587                 fi
24588                 if test -f conftest.lib/confpackage.ali
24589                 then
24590                         cf_gnat_libraries=yes
24591                 fi
24592                 rm -rf conftest* *~conftest*
24593                 ;;
24594         esac
24595         ;;
24596 esac
24597 echo "$as_me:24597: result: $cf_gnat_projects" >&5
24598 echo "${ECHO_T}$cf_gnat_projects" >&6
24599 fi # enable_gnat_projects
24600
24601 if test $cf_gnat_projects = yes
24602 then
24603         echo "$as_me:24603: checking if GNAT supports libraries" >&5
24604 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24605         echo "$as_me:24605: result: $cf_gnat_libraries" >&5
24606 echo "${ECHO_T}$cf_gnat_libraries" >&6
24607 fi
24608
24609 if test "$cf_gnat_projects" = yes
24610 then
24611         USE_OLD_MAKERULES="#"
24612         USE_GNAT_PROJECTS=""
24613 else
24614         USE_OLD_MAKERULES=""
24615         USE_GNAT_PROJECTS="#"
24616 fi
24617
24618 if test "$cf_gnat_libraries" = yes
24619 then
24620         USE_GNAT_LIBRARIES=""
24621 else
24622         USE_GNAT_LIBRARIES="#"
24623 fi
24624
24625 echo "$as_me:24625: checking for ada-compiler" >&5
24626 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24627
24628 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24629 if test "${with_ada_compiler+set}" = set; then
24630   withval="$with_ada_compiler"
24631   cf_ada_compiler=$withval
24632 else
24633   cf_ada_compiler=gnatmake
24634 fi;
24635
24636 echo "$as_me:24636: result: $cf_ada_compiler" >&5
24637 echo "${ECHO_T}$cf_ada_compiler" >&6
24638
24639                         cf_ada_package=terminal_interface
24640
24641 echo "$as_me:24641: checking for ada-include" >&5
24642 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24643
24644 # Check whether --with-ada-include or --without-ada-include was given.
24645 if test "${with_ada_include+set}" = set; then
24646   withval="$with_ada_include"
24647
24648 else
24649   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24650 fi; if test -n "$prefix/share/ada/adainclude" ; then
24651
24652 if test "x$prefix" != xNONE; then
24653         cf_path_syntax="$prefix"
24654 else
24655         cf_path_syntax="$ac_default_prefix"
24656 fi
24657
24658 case ".$withval" in
24659 (.\$\(*\)*|.\'*\'*)
24660         ;;
24661 (..|./*|.\\*)
24662         ;;
24663 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24664         ;;
24665 (.\${*prefix}*|.\${*dir}*)
24666         eval withval="$withval"
24667         case ".$withval" in
24668         (.NONE/*)
24669                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24670                 ;;
24671         esac
24672         ;;
24673 (.no|.NONE/*)
24674         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24675         ;;
24676 (*)
24677         { { echo "$as_me:24677: error: expected a pathname, not \"$withval\"" >&5
24678 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24679    { (exit 1); exit 1; }; }
24680         ;;
24681 esac
24682
24683 fi
24684 eval ADA_INCLUDE="$withval"
24685
24686 echo "$as_me:24686: result: $ADA_INCLUDE" >&5
24687 echo "${ECHO_T}$ADA_INCLUDE" >&6
24688
24689 echo "$as_me:24689: checking for ada-objects" >&5
24690 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24691
24692 # Check whether --with-ada-objects or --without-ada-objects was given.
24693 if test "${with_ada_objects+set}" = set; then
24694   withval="$with_ada_objects"
24695
24696 else
24697   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24698 fi; if test -n "$prefix/lib/ada/adalib" ; then
24699
24700 if test "x$prefix" != xNONE; then
24701         cf_path_syntax="$prefix"
24702 else
24703         cf_path_syntax="$ac_default_prefix"
24704 fi
24705
24706 case ".$withval" in
24707 (.\$\(*\)*|.\'*\'*)
24708         ;;
24709 (..|./*|.\\*)
24710         ;;
24711 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24712         ;;
24713 (.\${*prefix}*|.\${*dir}*)
24714         eval withval="$withval"
24715         case ".$withval" in
24716         (.NONE/*)
24717                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24718                 ;;
24719         esac
24720         ;;
24721 (.no|.NONE/*)
24722         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24723         ;;
24724 (*)
24725         { { echo "$as_me:24725: error: expected a pathname, not \"$withval\"" >&5
24726 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24727    { (exit 1); exit 1; }; }
24728         ;;
24729 esac
24730
24731 fi
24732 eval ADA_OBJECTS="$withval"
24733
24734 echo "$as_me:24734: result: $ADA_OBJECTS" >&5
24735 echo "${ECHO_T}$ADA_OBJECTS" >&6
24736
24737 echo "$as_me:24737: checking if an Ada95 shared-library should be built" >&5
24738 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24739
24740 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24741 if test "${with_ada_sharedlib+set}" = set; then
24742   withval="$with_ada_sharedlib"
24743   with_ada_sharedlib=$withval
24744 else
24745   with_ada_sharedlib=no
24746 fi;
24747 echo "$as_me:24747: result: $with_ada_sharedlib" >&5
24748 echo "${ECHO_T}$with_ada_sharedlib" >&6
24749
24750 if test "x$with_ada_sharedlib" != xno
24751 then
24752         if test "x$cf_gnat_projects" != xyes
24753         then
24754                 { echo "$as_me:24754: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24755 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24756                 with_ada_sharedlib=no
24757         fi
24758 fi
24759
24760 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24761 MAKE_ADA_SHAREDLIB="#"
24762
24763 if test "x$with_ada_sharedlib" != xno
24764 then
24765         MAKE_ADA_SHAREDLIB=
24766         if test "x$with_ada_sharedlib" != xyes
24767         then
24768                 ADA_SHAREDLIB="$with_ada_sharedlib"
24769         fi
24770 fi
24771
24772                         # allow the Ada binding to be renamed
24773
24774 echo "$as_me:24774: checking for ada-libname" >&5
24775 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24776
24777 # Check whether --with-ada-libname or --without-ada-libname was given.
24778 if test "${with_ada_libname+set}" = set; then
24779   withval="$with_ada_libname"
24780   ADA_LIBNAME=$withval
24781 else
24782   ADA_LIBNAME=AdaCurses
24783 fi;
24784 case "x$ADA_LIBNAME" in
24785 (x|xyes|xno)
24786         ADA_LIBNAME=AdaCurses
24787         ;;
24788 esac
24789
24790 echo "$as_me:24790: result: $ADA_LIBNAME" >&5
24791 echo "${ECHO_T}$ADA_LIBNAME" >&6
24792
24793                 fi
24794         fi
24795 else
24796         cf_with_ada=no
24797 fi
24798
24799 # do this "late" to avoid conflict with header-checks
24800 if test "x$with_widec" = xyes ; then
24801         echo "$as_me:24801: checking for wchar_t" >&5
24802 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24803 if test "${ac_cv_type_wchar_t+set}" = set; then
24804   echo $ECHO_N "(cached) $ECHO_C" >&6
24805 else
24806   cat >conftest.$ac_ext <<_ACEOF
24807 #line 24807 "configure"
24808 #include "confdefs.h"
24809 $ac_includes_default
24810 int
24811 main (void)
24812 {
24813 if ((wchar_t *) 0)
24814   return 0;
24815 if (sizeof (wchar_t))
24816   return 0;
24817   ;
24818   return 0;
24819 }
24820 _ACEOF
24821 rm -f conftest.$ac_objext
24822 if { (eval echo "$as_me:24822: \"$ac_compile\"") >&5
24823   (eval $ac_compile) 2>&5
24824   ac_status=$?
24825   echo "$as_me:24825: \$? = $ac_status" >&5
24826   (exit $ac_status); } &&
24827          { ac_try='test -s conftest.$ac_objext'
24828   { (eval echo "$as_me:24828: \"$ac_try\"") >&5
24829   (eval $ac_try) 2>&5
24830   ac_status=$?
24831   echo "$as_me:24831: \$? = $ac_status" >&5
24832   (exit $ac_status); }; }; then
24833   ac_cv_type_wchar_t=yes
24834 else
24835   echo "$as_me: failed program was:" >&5
24836 cat conftest.$ac_ext >&5
24837 ac_cv_type_wchar_t=no
24838 fi
24839 rm -f conftest.$ac_objext conftest.$ac_ext
24840 fi
24841 echo "$as_me:24841: result: $ac_cv_type_wchar_t" >&5
24842 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24843
24844 echo "$as_me:24844: checking size of wchar_t" >&5
24845 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24846 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24847   echo $ECHO_N "(cached) $ECHO_C" >&6
24848 else
24849   if test "$ac_cv_type_wchar_t" = yes; then
24850   if test "$cross_compiling" = yes; then
24851   # Depending upon the size, compute the lo and hi bounds.
24852 cat >conftest.$ac_ext <<_ACEOF
24853 #line 24853 "configure"
24854 #include "confdefs.h"
24855 $ac_includes_default
24856 int
24857 main (void)
24858 {
24859 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24860   ;
24861   return 0;
24862 }
24863 _ACEOF
24864 rm -f conftest.$ac_objext
24865 if { (eval echo "$as_me:24865: \"$ac_compile\"") >&5
24866   (eval $ac_compile) 2>&5
24867   ac_status=$?
24868   echo "$as_me:24868: \$? = $ac_status" >&5
24869   (exit $ac_status); } &&
24870          { ac_try='test -s conftest.$ac_objext'
24871   { (eval echo "$as_me:24871: \"$ac_try\"") >&5
24872   (eval $ac_try) 2>&5
24873   ac_status=$?
24874   echo "$as_me:24874: \$? = $ac_status" >&5
24875   (exit $ac_status); }; }; then
24876   ac_lo=0 ac_mid=0
24877   while :; do
24878     cat >conftest.$ac_ext <<_ACEOF
24879 #line 24879 "configure"
24880 #include "confdefs.h"
24881 $ac_includes_default
24882 int
24883 main (void)
24884 {
24885 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24886   ;
24887   return 0;
24888 }
24889 _ACEOF
24890 rm -f conftest.$ac_objext
24891 if { (eval echo "$as_me:24891: \"$ac_compile\"") >&5
24892   (eval $ac_compile) 2>&5
24893   ac_status=$?
24894   echo "$as_me:24894: \$? = $ac_status" >&5
24895   (exit $ac_status); } &&
24896          { ac_try='test -s conftest.$ac_objext'
24897   { (eval echo "$as_me:24897: \"$ac_try\"") >&5
24898   (eval $ac_try) 2>&5
24899   ac_status=$?
24900   echo "$as_me:24900: \$? = $ac_status" >&5
24901   (exit $ac_status); }; }; then
24902   ac_hi=$ac_mid; break
24903 else
24904   echo "$as_me: failed program was:" >&5
24905 cat conftest.$ac_ext >&5
24906 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24907 fi
24908 rm -f conftest.$ac_objext conftest.$ac_ext
24909   done
24910 else
24911   echo "$as_me: failed program was:" >&5
24912 cat conftest.$ac_ext >&5
24913 ac_hi=-1 ac_mid=-1
24914   while :; do
24915     cat >conftest.$ac_ext <<_ACEOF
24916 #line 24916 "configure"
24917 #include "confdefs.h"
24918 $ac_includes_default
24919 int
24920 main (void)
24921 {
24922 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24923   ;
24924   return 0;
24925 }
24926 _ACEOF
24927 rm -f conftest.$ac_objext
24928 if { (eval echo "$as_me:24928: \"$ac_compile\"") >&5
24929   (eval $ac_compile) 2>&5
24930   ac_status=$?
24931   echo "$as_me:24931: \$? = $ac_status" >&5
24932   (exit $ac_status); } &&
24933          { ac_try='test -s conftest.$ac_objext'
24934   { (eval echo "$as_me:24934: \"$ac_try\"") >&5
24935   (eval $ac_try) 2>&5
24936   ac_status=$?
24937   echo "$as_me:24937: \$? = $ac_status" >&5
24938   (exit $ac_status); }; }; then
24939   ac_lo=$ac_mid; break
24940 else
24941   echo "$as_me: failed program was:" >&5
24942 cat conftest.$ac_ext >&5
24943 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24944 fi
24945 rm -f conftest.$ac_objext conftest.$ac_ext
24946   done
24947 fi
24948 rm -f conftest.$ac_objext conftest.$ac_ext
24949 # Binary search between lo and hi bounds.
24950 while test "x$ac_lo" != "x$ac_hi"; do
24951   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24952   cat >conftest.$ac_ext <<_ACEOF
24953 #line 24953 "configure"
24954 #include "confdefs.h"
24955 $ac_includes_default
24956 int
24957 main (void)
24958 {
24959 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24960   ;
24961   return 0;
24962 }
24963 _ACEOF
24964 rm -f conftest.$ac_objext
24965 if { (eval echo "$as_me:24965: \"$ac_compile\"") >&5
24966   (eval $ac_compile) 2>&5
24967   ac_status=$?
24968   echo "$as_me:24968: \$? = $ac_status" >&5
24969   (exit $ac_status); } &&
24970          { ac_try='test -s conftest.$ac_objext'
24971   { (eval echo "$as_me:24971: \"$ac_try\"") >&5
24972   (eval $ac_try) 2>&5
24973   ac_status=$?
24974   echo "$as_me:24974: \$? = $ac_status" >&5
24975   (exit $ac_status); }; }; then
24976   ac_hi=$ac_mid
24977 else
24978   echo "$as_me: failed program was:" >&5
24979 cat conftest.$ac_ext >&5
24980 ac_lo=`expr $ac_mid + 1`
24981 fi
24982 rm -f conftest.$ac_objext conftest.$ac_ext
24983 done
24984 ac_cv_sizeof_wchar_t=$ac_lo
24985 else
24986   if test "$cross_compiling" = yes; then
24987   { { echo "$as_me:24987: error: cannot run test program while cross compiling" >&5
24988 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24989    { (exit 1); exit 1; }; }
24990 else
24991   cat >conftest.$ac_ext <<_ACEOF
24992 #line 24992 "configure"
24993 #include "confdefs.h"
24994 $ac_includes_default
24995 int
24996 main (void)
24997 {
24998 FILE *f = fopen ("conftest.val", "w");
24999 if (!f)
25000   $ac_main_return (1);
25001 fprintf (f, "%d", (sizeof (wchar_t)));
25002 fclose (f);
25003   ;
25004   return 0;
25005 }
25006 _ACEOF
25007 rm -f conftest$ac_exeext
25008 if { (eval echo "$as_me:25008: \"$ac_link\"") >&5
25009   (eval $ac_link) 2>&5
25010   ac_status=$?
25011   echo "$as_me:25011: \$? = $ac_status" >&5
25012   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25013   { (eval echo "$as_me:25013: \"$ac_try\"") >&5
25014   (eval $ac_try) 2>&5
25015   ac_status=$?
25016   echo "$as_me:25016: \$? = $ac_status" >&5
25017   (exit $ac_status); }; }; then
25018   ac_cv_sizeof_wchar_t=`cat conftest.val`
25019 else
25020   echo "$as_me: program exited with status $ac_status" >&5
25021 echo "$as_me: failed program was:" >&5
25022 cat conftest.$ac_ext >&5
25023 fi
25024 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25025 fi
25026 fi
25027 rm -f conftest.val
25028 else
25029   ac_cv_sizeof_wchar_t=0
25030 fi
25031 fi
25032 echo "$as_me:25032: result: $ac_cv_sizeof_wchar_t" >&5
25033 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25034 cat >>confdefs.h <<EOF
25035 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25036 EOF
25037
25038 fi
25039
25040 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25041 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25042 ###
25043 ### ticlib modules may be a separate library, otherwise contained in termlib.
25044 ### termlib modules may be a separate library, otherwise contained in ncurses.
25045 ###
25046 ### The of "+" or " " between the tokens controls the way the script
25047 ### chooses to split module lists into libraries.
25048 ###
25049 ### (see CF_LIB_RULES).
25050 echo "$as_me:25050: checking for library subsets" >&5
25051 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25052 LIB_SUBSETS=
25053
25054 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25055         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25056         if test "$with_ticlib" != no ; then
25057                 LIB_SUBSETS="${LIB_SUBSETS} "
25058         else
25059                 LIB_SUBSETS="${LIB_SUBSETS}+"
25060         fi
25061 fi
25062
25063 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25064 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25065
25066 if test "$with_termlib" != no ; then
25067         LIB_SUBSETS="${LIB_SUBSETS} "
25068 else
25069         LIB_SUBSETS="${LIB_SUBSETS}+"
25070 fi
25071
25072 LIB_SUBSETS="${LIB_SUBSETS}base"
25073
25074 # Most term-driver calls are to tinfo, but some like init_pair are to the
25075 # base library (so it resides in base).
25076 if test "$with_term_driver" != no ; then
25077         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25078         case $cf_cv_system_name in
25079         (*mingw32*|*mingw64*)
25080                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25081                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25082                 ;;
25083         (*)
25084                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25085                 ;;
25086         esac
25087 fi
25088
25089 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25090 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25091
25092 echo "$as_me:25092: result: $LIB_SUBSETS" >&5
25093 echo "${ECHO_T}$LIB_SUBSETS" >&6
25094
25095 ### Construct the list of include-directories to be generated
25096
25097 if test "$srcdir" != "."; then
25098         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25099 fi
25100 CPPFLAGS="-I../include $CPPFLAGS"
25101 if test "$srcdir" != "."; then
25102         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25103 fi
25104 CPPFLAGS="-I. $CPPFLAGS"
25105
25106 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25107 if test "$srcdir" != "."; then
25108         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25109 fi
25110 if test "$GCC" != yes; then
25111         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25112 elif test "$includedir" != "/usr/include"; then
25113         if test "$includedir" = '${prefix}/include' ; then
25114                 if test x$prefix != x/usr ; then
25115                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25116                 fi
25117         else
25118                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25119         fi
25120 fi
25121
25122 ### Build up pieces for makefile rules
25123 echo "$as_me:25123: checking default library suffix" >&5
25124 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25125
25126         case $DFT_LWR_MODEL in
25127         (libtool) DFT_ARG_SUFFIX=''   ;;
25128         (normal)  DFT_ARG_SUFFIX=''   ;;
25129         (debug)   DFT_ARG_SUFFIX='_g' ;;
25130         (profile) DFT_ARG_SUFFIX='_p' ;;
25131         (shared)  DFT_ARG_SUFFIX=''   ;;
25132         esac
25133         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25134 echo "$as_me:25134: result: $DFT_ARG_SUFFIX" >&5
25135 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25136
25137 echo "$as_me:25137: checking default library-dependency suffix" >&5
25138 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25139
25140         case X$DFT_LWR_MODEL in
25141         (Xlibtool)
25142                 DFT_LIB_SUFFIX='.la'
25143                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25144                 ;;
25145         (Xdebug)
25146                 DFT_LIB_SUFFIX='_g.a'
25147                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25148                 ;;
25149         (Xprofile)
25150                 DFT_LIB_SUFFIX='_p.a'
25151                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25152                 ;;
25153         (Xshared)
25154                 case $cf_cv_system_name in
25155                 (aix[5-7]*)
25156                         DFT_LIB_SUFFIX='.so'
25157                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25158                         ;;
25159                 (cygwin*|msys*|mingw*)
25160                         DFT_LIB_SUFFIX='.dll'
25161                         DFT_DEP_SUFFIX='.dll.a'
25162                         ;;
25163                 (darwin*)
25164                         DFT_LIB_SUFFIX='.dylib'
25165                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25166                         ;;
25167                 (hpux*)
25168                         case $target in
25169                         (ia64*)
25170                                 DFT_LIB_SUFFIX='.so'
25171                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25172                                 ;;
25173                         (*)
25174                                 DFT_LIB_SUFFIX='.sl'
25175                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25176                                 ;;
25177                         esac
25178                         ;;
25179                 (*)
25180                         DFT_LIB_SUFFIX='.so'
25181                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25182                         ;;
25183                 esac
25184                 ;;
25185         (*)
25186                 DFT_LIB_SUFFIX='.a'
25187                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25188                 ;;
25189         esac
25190         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25191         then
25192                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25193                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25194         fi
25195 echo "$as_me:25195: result: $DFT_DEP_SUFFIX" >&5
25196 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25197
25198 echo "$as_me:25198: checking default object directory" >&5
25199 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25200
25201         case $DFT_LWR_MODEL in
25202         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25203         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25204         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25205         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25206         (shared)
25207                 case $cf_cv_system_name in
25208                 (cygwin|msys)
25209                         DFT_OBJ_SUBDIR='objects' ;;
25210                 (*)
25211                         DFT_OBJ_SUBDIR='obj_s' ;;
25212                 esac
25213         esac
25214 echo "$as_me:25214: result: $DFT_OBJ_SUBDIR" >&5
25215 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25216
25217 if test "x$cf_with_cxx" = xyes ; then
25218 echo "$as_me:25218: checking c++ library-dependency suffix" >&5
25219 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25220 if test "$with_libtool" != "no"; then
25221         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25222         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25223 elif test "$with_shared_cxx" != "no"; then
25224         # also for g++ users...
25225         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25226 else
25227         # we normally make a static library because C/C++ library rules differ
25228
25229         case Xnormal in
25230         (Xlibtool)
25231                 CXX_LIB_SUFFIX='.la'
25232                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25233                 ;;
25234         (Xdebug)
25235                 CXX_LIB_SUFFIX='_g.a'
25236                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25237                 ;;
25238         (Xprofile)
25239                 CXX_LIB_SUFFIX='_p.a'
25240                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25241                 ;;
25242         (Xshared)
25243                 case $cf_cv_system_name in
25244                 (aix[5-7]*)
25245                         CXX_LIB_SUFFIX='.so'
25246                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25247                         ;;
25248                 (cygwin*|msys*|mingw*)
25249                         CXX_LIB_SUFFIX='.dll'
25250                         CXX_DEP_SUFFIX='.dll.a'
25251                         ;;
25252                 (darwin*)
25253                         CXX_LIB_SUFFIX='.dylib'
25254                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25255                         ;;
25256                 (hpux*)
25257                         case $target in
25258                         (ia64*)
25259                                 CXX_LIB_SUFFIX='.so'
25260                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25261                                 ;;
25262                         (*)
25263                                 CXX_LIB_SUFFIX='.sl'
25264                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25265                                 ;;
25266                         esac
25267                         ;;
25268                 (*)
25269                         CXX_LIB_SUFFIX='.so'
25270                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25271                         ;;
25272                 esac
25273                 ;;
25274         (*)
25275                 CXX_LIB_SUFFIX='.a'
25276                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25277                 ;;
25278         esac
25279         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25280         then
25281                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25282                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25283         fi
25284
25285 fi
25286 echo "$as_me:25286: result: $CXX_LIB_SUFFIX" >&5
25287 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25288
25289 fi
25290
25291 # do not want -ldl in build except as needed for -lncurses dependency
25292 if test "x$with_dlsym" = xyes ; then
25293 if test $DFT_LWR_MODEL = shared || \
25294    test $DFT_LWR_MODEL = libtool ; then
25295
25296 # remove dl library from $LIBS
25297 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25298
25299 fi
25300 fi
25301 ### Set up low-level terminfo dependencies for makefiles.
25302
25303 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25304 # do not need libdl
25305 TICS_LIST=
25306 if test "x$with_dlsym" = xyes ; then
25307
25308 # remove dl library from $SHLIB_LIST
25309 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25310
25311 fi
25312
25313 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25314 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25315 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25316 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25317 then
25318         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25319 fi
25320
25321 if test "$with_ticlib" != no ; then
25322
25323         if test "x$with_ticlib" != xyes ; then
25324                 TICS_NAME=$with_ticlib
25325                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25326                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25327                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25328                 TICS_LIB_SUFFIX="${with_ticlib}"
25329         else
25330                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25331                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25332                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25333                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25334         fi
25335         TICS_LDFLAGS="-L${LIB_DIR}"
25336         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25337 else
25338         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25339         TICS_LDFLAGS="-L${LIB_DIR}"
25340         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25341 fi
25342
25343 if test "$with_termlib" != no ; then
25344
25345         if test "x$with_termlib" != xyes ; then
25346                 TINFO_NAME=$with_termlib
25347                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25348                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25349                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25350                 TINFO_LIB_SUFFIX="${with_termlib}"
25351         else
25352                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25353                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25354                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25355                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25356         fi
25357
25358         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25359         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25360         if test "$DFT_LWR_MODEL" = "libtool"; then
25361                 TEST_ARGS="${TEST_DEPS}"
25362                 TEST_ARG2="${TEST_DEP2}"
25363                 TINFO_LDFLAGS="-L${LIB_DIR}"
25364                 TINFO_LIBS="$TEST_ARGS"
25365                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25366                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25367         else
25368                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25369                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25370                 if test "x$with_term_driver" != xno ; then
25371                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25372                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25373                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25374                 else
25375                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25376                         TINFO_LIBS="$TEST_ARGS"
25377                 fi
25378                 TINFO_LDFLAGS="-L${LIB_DIR}"
25379                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25380         fi
25381 else
25382         # the next lines are needed for linking libtic over libncurses
25383         TINFO_NAME=${LIB_NAME}
25384         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25385         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25386         if test "x$with_tic_depends" = xyes ; then
25387                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25388         else
25389                 TICS_LIST="$SHLIB_LIST"
25390         fi
25391
25392         TINFO_LDFLAGS="-L${LIB_DIR}"
25393         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25394 fi
25395
25396 if test "$DFT_LWR_MODEL" = shared ; then
25397         case $cf_cv_system_name in
25398         (cygwin*|msys*)
25399                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25400                 TINFO_SUFFIX=.dll
25401                 ;;
25402         esac
25403 fi
25404
25405 if test "x$with_dlsym" = xyes ; then
25406
25407 # remove dl library from $TICS_LIST
25408 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25409
25410 fi
25411
25412 if test "$DFT_LWR_MODEL" = "libtool"; then
25413         OBJEXT=lo
25414 fi
25415
25416 # needed for Ada95
25417 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25418
25419 case $DFT_LWR_MODEL in
25420 (normal|debug|profile)
25421
25422 if test "$GCC" = yes ; then
25423         case $cf_cv_system_name in
25424         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25425                 LDFLAGS_STATIC=
25426                 LDFLAGS_SHARED=
25427                 ;;
25428         (*)     # normally, except when broken
25429                 LDFLAGS_STATIC=-static
25430                 LDFLAGS_SHARED=-dynamic
25431                 ;;
25432         esac
25433 else
25434         case $cf_cv_system_name in
25435         (aix[4-7]*)     # from ld manpage
25436                 LDFLAGS_STATIC=-bstatic
25437                 LDFLAGS_SHARED=-bdynamic
25438                 ;;
25439         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25440                 # We could also use just "archive" and "shared".
25441                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25442                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25443                 ;;
25444         (irix*)         # from ld manpage IRIX64
25445                 LDFLAGS_STATIC=-Bstatic
25446                 LDFLAGS_SHARED=-Bdynamic
25447                 ;;
25448         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25449                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25450                 LDFLAGS_STATIC=-noso
25451                 LDFLAGS_SHARED=-so_archive
25452                 ;;
25453         (solaris2*)
25454                 LDFLAGS_STATIC=-Bstatic
25455                 LDFLAGS_SHARED=-Bdynamic
25456                 ;;
25457         esac
25458 fi
25459
25460 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25461 then
25462         echo "$as_me:25462: checking if linker supports switching between static/dynamic" >&5
25463 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25464
25465         rm -f libconftest.a
25466         cat >conftest.$ac_ext <<EOF
25467 #line 25467 "configure"
25468 #include <stdio.h>
25469 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25470 EOF
25471         if { (eval echo "$as_me:25471: \"$ac_compile\"") >&5
25472   (eval $ac_compile) 2>&5
25473   ac_status=$?
25474   echo "$as_me:25474: \$? = $ac_status" >&5
25475   (exit $ac_status); } ; then
25476                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25477                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25478         fi
25479         rm -f conftest.*
25480
25481         cf_save_LIBS="$LIBS"
25482
25483         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25484         cat >conftest.$ac_ext <<_ACEOF
25485 #line 25485 "configure"
25486 #include "confdefs.h"
25487
25488 #line 25488 "configure"
25489 #include <stdio.h>
25490 int cf_ldflags_static(FILE *fp);
25491
25492 int
25493 main (void)
25494 {
25495
25496         return cf_ldflags_static(stdin);
25497
25498   ;
25499   return 0;
25500 }
25501 _ACEOF
25502 rm -f conftest.$ac_objext conftest$ac_exeext
25503 if { (eval echo "$as_me:25503: \"$ac_link\"") >&5
25504   (eval $ac_link) 2>&5
25505   ac_status=$?
25506   echo "$as_me:25506: \$? = $ac_status" >&5
25507   (exit $ac_status); } &&
25508          { ac_try='test -s conftest$ac_exeext'
25509   { (eval echo "$as_me:25509: \"$ac_try\"") >&5
25510   (eval $ac_try) 2>&5
25511   ac_status=$?
25512   echo "$as_me:25512: \$? = $ac_status" >&5
25513   (exit $ac_status); }; }; then
25514
25515         # some linkers simply ignore the -dynamic
25516         case x`file conftest$ac_exeext 2>/dev/null` in
25517         (*static*)
25518                 cf_ldflags_static=no
25519                 ;;
25520         (*)
25521                 cf_ldflags_static=yes
25522                 ;;
25523         esac
25524
25525 else
25526   echo "$as_me: failed program was:" >&5
25527 cat conftest.$ac_ext >&5
25528 cf_ldflags_static=no
25529 fi
25530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25531
25532         rm -f libconftest.*
25533         LIBS="$cf_save_LIBS"
25534
25535         echo "$as_me:25535: result: $cf_ldflags_static" >&5
25536 echo "${ECHO_T}$cf_ldflags_static" >&6
25537
25538         if test $cf_ldflags_static != yes
25539         then
25540                 LDFLAGS_STATIC=
25541                 LDFLAGS_SHARED=
25542         fi
25543 else
25544         LDFLAGS_STATIC=
25545         LDFLAGS_SHARED=
25546 fi
25547
25548         ;;
25549 esac
25550
25551 echo "$as_me:25551: checking where we will install curses.h" >&5
25552 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25553
25554 includesubdir=
25555 if test "$with_overwrite" = no && \
25556  ( test "x$includedir" = 'x${prefix}/include' || \
25557    test "x$includedir" = "x${prefix}/include" )
25558 then
25559         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25560 fi
25561 echo "$as_me:25561: result: ${includedir}${includesubdir}" >&5
25562 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25563
25564 ### Resolve a conflict between normal and wide-curses by forcing applications
25565 ### that will need libutf8 to add it to their configure script.
25566 if test "$with_overwrite" != no ; then
25567 if test "$NCURSES_LIBUTF8" = 1 ; then
25568         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25569         { echo "$as_me:25569: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25570 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25571 fi
25572 fi
25573 WITH_OVERWRITE=$with_overwrite
25574
25575 # used to separate tack out of the tree
25576 NCURSES_TREE=
25577
25578 ### predefined stuff for the test programs
25579
25580 cat >>confdefs.h <<\EOF
25581 #define HAVE_SLK_COLOR 1
25582 EOF
25583
25584 ### Construct the list of subdirectories for which we'll customize makefiles
25585 ### with the appropriate compile-rules.
25586
25587 echo "$as_me:25587: checking for src modules" >&5
25588 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25589
25590 # dependencies and linker-arguments for test-programs
25591 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25592 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25593 if test "$DFT_LWR_MODEL" = "libtool"; then
25594         TEST_ARGS="${TEST_DEPS}"
25595         TEST_ARG2="${TEST_DEP2}"
25596 else
25597         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25598         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25599 fi
25600
25601 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25602 cf_cv_src_modules=
25603 for cf_dir in $modules_to_build
25604 do
25605         if test -f $srcdir/$cf_dir/modules; then
25606
25607                 # We may/may not have tack in the distribution, though the
25608                 # makefile is.
25609                 if test $cf_dir = tack ; then
25610                         if test "x$cf_with_tack" != "xyes"; then
25611                                 continue
25612                         fi
25613                 fi
25614
25615                 if test -z "$cf_cv_src_modules"; then
25616                         cf_cv_src_modules=$cf_dir
25617                 else
25618                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25619                 fi
25620
25621                 # Make the ncurses_cfg.h file record the library interface files as
25622                 # well.  These are header files that are the same name as their
25623                 # directory.  Ncurses is the only library that does not follow
25624                 # that pattern.
25625                 if test $cf_dir = tack ; then
25626                         continue
25627                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25628
25629 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25630
25631                         cat >>confdefs.h <<EOF
25632 #define HAVE_${cf_have_include}_H 1
25633 EOF
25634
25635                         cat >>confdefs.h <<EOF
25636 #define HAVE_LIB${cf_have_include} 1
25637 EOF
25638
25639                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25640                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25641                         if test "$DFT_LWR_MODEL" = "libtool"; then
25642                                 TEST_ARGS="${TEST_DEPS}"
25643                                 TEST_ARG2="${TEST_DEP2}"
25644                         else
25645                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25646                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25647                         fi
25648                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25649                 fi
25650         fi
25651 done
25652 echo "$as_me:25652: result: $cf_cv_src_modules" >&5
25653 echo "${ECHO_T}$cf_cv_src_modules" >&6
25654
25655 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25656 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25657
25658 SRC_SUBDIRS=
25659 if test "x$cf_with_manpages" != xno ; then
25660         SRC_SUBDIRS="$SRC_SUBDIRS man"
25661 fi
25662 SRC_SUBDIRS="$SRC_SUBDIRS include"
25663 for cf_dir in $cf_cv_src_modules
25664 do
25665         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25666 done
25667 if test "x$cf_with_tests" != "xno" ; then
25668         SRC_SUBDIRS="$SRC_SUBDIRS test"
25669 fi
25670 # always make this, to install the ncurses-config script
25671 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25672 if test "$cf_with_cxx_binding" != no; then
25673         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25674         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25675 fi
25676
25677 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25678 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25679
25680 ADA_SUBDIRS=
25681 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25682         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25683         ADA_SUBDIRS="gen src"
25684         if test "x$cf_with_tests" != "xno" ; then
25685                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25686         fi
25687 fi
25688
25689 SUB_MAKEFILES=
25690 for cf_dir in $SRC_SUBDIRS
25691 do
25692         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25693 done
25694
25695 if test -n "$ADA_SUBDIRS"; then
25696         for cf_dir in $ADA_SUBDIRS
25697         do
25698                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25699         done
25700
25701 fi
25702
25703 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25704    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25705    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25706    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25707 fi
25708
25709 DIRS_TO_MAKE="lib"
25710 for cf_item in $cf_list_models
25711 do
25712
25713         case $cf_item in
25714         (libtool) cf_subdir='obj_lo'  ;;
25715         (normal)  cf_subdir='objects' ;;
25716         (debug)   cf_subdir='obj_g' ;;
25717         (profile) cf_subdir='obj_p' ;;
25718         (shared)
25719                 case $cf_cv_system_name in
25720                 (cygwin|msys)
25721                         cf_subdir='objects' ;;
25722                 (*)
25723                         cf_subdir='obj_s' ;;
25724                 esac
25725         esac
25726
25727         for cf_item2 in $DIRS_TO_MAKE
25728         do
25729                 test $cf_item2 = $cf_subdir && break
25730         done
25731         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25732 done
25733 for cf_dir in $DIRS_TO_MAKE
25734 do
25735         test ! -d $cf_dir && mkdir $cf_dir
25736 done
25737
25738 # symbols that differ when compiling Ada95 by itself.
25739 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25740
25741 # values to use as strings
25742
25743 cat >>confdefs.h <<EOF
25744 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25745 EOF
25746
25747 cat >>confdefs.h <<EOF
25748 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25749 EOF
25750
25751 ### Now that we're done running tests, add the compiler-warnings, if any
25752
25753 cf_fix_cppflags=no
25754 cf_new_cflags=
25755 cf_new_cppflags=
25756 cf_new_extra_cppflags=
25757
25758 for cf_add_cflags in $EXTRA_CFLAGS
25759 do
25760 case $cf_fix_cppflags in
25761 (no)
25762         case $cf_add_cflags in
25763         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25764                 case $cf_add_cflags in
25765                 (-D*)
25766                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25767
25768                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25769                                 && test -z "${cf_tst_cflags}" \
25770                                 && cf_fix_cppflags=yes
25771
25772                         if test $cf_fix_cppflags = yes ; then
25773
25774         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25775         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25776
25777                                 continue
25778                         elif test "${cf_tst_cflags}" = "\"'" ; then
25779
25780         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25781         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25782
25783                                 continue
25784                         fi
25785                         ;;
25786                 esac
25787                 case "$CPPFLAGS" in
25788                 (*$cf_add_cflags)
25789                         ;;
25790                 (*)
25791                         case $cf_add_cflags in
25792                         (-D*)
25793                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25794
25795 CPPFLAGS=`echo "$CPPFLAGS" | \
25796         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25797                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25798
25799                                 ;;
25800                         esac
25801
25802         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25803         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25804
25805                         ;;
25806                 esac
25807                 ;;
25808         (*)
25809
25810         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25811         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25812
25813                 ;;
25814         esac
25815         ;;
25816 (yes)
25817
25818         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25819         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25820
25821         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25822
25823         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25824                 && test -z "${cf_tst_cflags}" \
25825                 && cf_fix_cppflags=no
25826         ;;
25827 esac
25828 done
25829
25830 if test -n "$cf_new_cflags" ; then
25831
25832         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25833         CFLAGS="${CFLAGS}$cf_new_cflags"
25834
25835 fi
25836
25837 if test -n "$cf_new_cppflags" ; then
25838
25839         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25840         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25841
25842 fi
25843
25844 if test -n "$cf_new_extra_cppflags" ; then
25845
25846         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25847         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25848
25849 fi
25850
25851 ### Define substitutions for header files to avoid name-pollution
25852
25853 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25854         HAVE_TCGETATTR=1
25855 else
25856         HAVE_TCGETATTR=0
25857 fi
25858
25859 if test "x$ac_cv_header_stdint_h" = xyes ; then
25860         HAVE_STDINT_H=1
25861 else
25862         HAVE_STDINT_H=0
25863 fi
25864
25865 if test "x$ac_cv_header_termio_h" = xyes ; then
25866         HAVE_TERMIO_H=1
25867 else
25868         HAVE_TERMIO_H=0
25869 fi
25870
25871 if test "x$ac_cv_header_termios_h" = xyes ; then
25872         HAVE_TERMIOS_H=1
25873 else
25874         HAVE_TERMIOS_H=0
25875 fi
25876
25877 ################################################################################
25878 test "x$use_database" = xyes && \
25879 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25880
25881 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25882 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25883
25884 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25885 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25886 fi
25887
25888 if test "x$cf_with_tests" != xno ; then
25889         MAKE_TESTS=
25890 else
25891         MAKE_TESTS="#"
25892 fi
25893
25894 ADAHTML_DIR=../../doc/html/ada
25895
25896 # these could be configurable, but are not currently
25897 PANEL_NAME=panel
25898 MENU_NAME=menu
25899 FORM_NAME=form
25900 CXX_NAME=ncurses++
25901
25902 # workaround for OS/2 (20151017)
25903 case $cf_cv_system_name in
25904 (os2*)
25905         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25906         ;;
25907 (*)
25908         LIBTOOL_OPTS_CXX=
25909         ;;
25910 esac
25911
25912 # workaround for g++ versus Solaris (20131116)
25913 case $cf_cv_system_name in
25914 (solaris2*)
25915         case "x$CPPFLAGS" in
25916         (*-D_XOPEN_SOURCE_EXTENDED*)
25917                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25918
25919 echo "${as_me:-configure}:25919: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25920
25921                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25922                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25923                 ;;
25924         esac
25925         ;;
25926 esac
25927
25928 # Help to automatically enable the extended curses features when using either
25929 # the *-config or the ".pc" files by adding defines.
25930 echo "$as_me:25930: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25931 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25932 PKG_CFLAGS=
25933 for cf_loop1 in $CPPFLAGS_after_XOPEN
25934 do
25935         cf_found=no
25936         for cf_loop2 in $CPPFLAGS_before_XOPEN
25937         do
25938                 if test "x$cf_loop1" = "x$cf_loop2"
25939                 then
25940                         cf_found=yes
25941                         break
25942                 fi
25943         done
25944         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25945 done
25946 echo "$as_me:25946: result: $PKG_CFLAGS" >&5
25947 echo "${ECHO_T}$PKG_CFLAGS" >&6
25948
25949 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25950 case "x$NCURSES_OSPEED" in
25951 (*short*)
25952         cf_compatible=1
25953         ;;
25954 (*)
25955         cf_compatible=0
25956         ;;
25957 esac
25958
25959 cat >>confdefs.h <<EOF
25960 #define NCURSES_OSPEED_COMPAT $cf_compatible
25961 EOF
25962
25963 case "x$cf_cv_typeof_chtype" in
25964 (xshort|xint|xlong)
25965         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25966         ;;
25967 esac
25968
25969 case "x$cf_cv_typeof_mmask_t" in
25970 (xshort|xint|xlong)
25971         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25972         ;;
25973 esac
25974
25975 # substitute into misc/Makefile to suppress
25976 # (un)install.data from the
25977 # (un)install rules.
25978 if test "x$cf_with_db_install" = "xno"; then
25979         MISC_INSTALL_DATA=
25980         MISC_UNINSTALL_DATA=
25981 else
25982         MISC_INSTALL_DATA=install.data
25983         MISC_UNINSTALL_DATA=uninstall.data
25984 fi
25985
25986 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
25987         MAKE_DATABASE="#"
25988 else
25989         MAKE_DATABASE="$MAKE_TERMINFO"
25990 fi
25991
25992 if test -n "$PACKAGE"
25993 then
25994         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
25995         export PACKAGE
25996         echo "package: $PACKAGE"
25997 fi
25998
25999 UNALTERED_SYMS=
26000 cf_filter_syms=no
26001
26002 if test -n "$RESULTING_SYMS"
26003 then
26004         cf_filter_syms=$cf_dft_filter_syms
26005         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26006
26007 echo "${as_me:-configure}:26007: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26008
26009 fi
26010
26011 if test "x$WILDCARD_SYMS" = xno
26012 then
26013         cf_filter_syms=yes
26014 fi
26015
26016 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26017
26018 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26019 if test $cf_filter_syms = yes
26020 then
26021         RESULTING_SYMS=resulting.map
26022 fi
26023
26024 if test "x$cross_compiling" = xyes ; then
26025         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26026         CHECK_BUILD="#"
26027 else
26028         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26029         CHECK_BUILD=
26030 fi
26031
26032 # This is used for the *-config script and *.pc data files.
26033
26034 echo "$as_me:26034: checking for linker search path" >&5
26035 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26036 if test "${cf_cv_ld_searchpath+set}" = set; then
26037   echo $ECHO_N "(cached) $ECHO_C" >&6
26038 else
26039
26040 if test "$cross_compiling" != yes ; then
26041
26042 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26043 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26044
26045 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26046 # update the cache, which makes it run faster.
26047 test -z "$cf_pathlist" && \
26048         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26049
26050 test -z "$cf_pathlist" &&
26051         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26052
26053 # This works with OpenBSD 6.5, which lists only filenames
26054 test -z "$cf_pathlist" &&
26055         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26056
26057 if test -z "$cf_pathlist"
26058 then
26059         # dyld default path with MacOS
26060         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26061         then
26062                 # do this to bypass check
26063                 cf_cv_ld_searchpath='$HOME/lib'
26064                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26065         fi
26066 fi
26067
26068 if test -z "$cf_pathlist"
26069 then
26070         # Solaris is hardcoded
26071         if test -d /opt/SUNWspro/lib
26072         then
26073                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26074         elif test -d /usr/ccs/lib
26075         then
26076                 cf_pathlist="/usr/ccs/lib /usr/lib"
26077         fi
26078 fi
26079
26080 fi
26081
26082 # If nothing else, assume it is conventional
26083 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26084
26085 # Finally, check that this is only directories
26086 for cf_path in $0 $cf_pathlist
26087 do
26088         if test -d "$cf_path"; then
26089                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26090                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26091         fi
26092 done
26093
26094 # Ensure that it is nonempty
26095 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26096
26097 fi
26098 echo "$as_me:26098: result: $cf_cv_ld_searchpath" >&5
26099 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26100
26101 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26102
26103 cat >>confdefs.h <<\EOF
26104 #define HAVE_CURSES_DATA_BOOLNAMES 1
26105 EOF
26106
26107 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_MAKEFILES Makefile"
26108 ac_config_commands="$ac_config_commands default"
26109 cat >confcache <<\_ACEOF
26110 # This file is a shell script that caches the results of configure
26111 # tests run on this system so they can be shared between configure
26112 # scripts and configure runs, see configure's option --config-cache.
26113 # It is not useful on other systems.  If it contains results you don't
26114 # want to keep, you may remove or edit it.
26115 #
26116 # config.status only pays attention to the cache file if you give it
26117 # the --recheck option to rerun configure.
26118 #
26119 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26120 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26121 # following values.
26122
26123 _ACEOF
26124
26125 # The following way of writing the cache mishandles newlines in values,
26126 # but we know of no workaround that is simple, portable, and efficient.
26127 # So, don't put newlines in cache variables' values.
26128 # Ultrix sh set writes to stderr and can't be redirected directly,
26129 # and sets the high bit in the cache file unless we assign to the vars.
26130 {
26131   (set) 2>&1 |
26132     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26133     *ac_space=\ *)
26134       # `set' does not quote correctly, so add quotes (double-quote
26135       # substitution turns \\\\ into \\, and sed turns \\ into \).
26136       sed -n \
26137         "s/'/'\\\\''/g;
26138           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26139       ;;
26140     *)
26141       # `set' quotes correctly as required by POSIX, so do not add quotes.
26142       sed -n \
26143         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26144       ;;
26145     esac;
26146 } |
26147   sed '
26148      t clear
26149      : clear
26150      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26151      t end
26152      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26153      : end' >>confcache
26154 if cmp -s $cache_file confcache; then :; else
26155   if test -w $cache_file; then
26156     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26157     cat confcache >$cache_file
26158   else
26159     echo "not updating unwritable cache $cache_file"
26160   fi
26161 fi
26162 rm -f confcache
26163
26164 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26165 # Let make expand exec_prefix.
26166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26167
26168 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26169 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26170 # trailing colons and then remove the whole line if VPATH becomes empty
26171 # (actually we leave an empty line to preserve line numbers).
26172 if test "x$srcdir" = x.; then
26173   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26174 s/:*\$(srcdir):*/:/;
26175 s/:*\${srcdir}:*/:/;
26176 s/:*@srcdir@:*/:/;
26177 s/^\([^=]*=[    ]*\):*/\1/;
26178 s/:*$//;
26179 s/^[^=]*=[      ]*$//;
26180 }'
26181 fi
26182
26183 DEFS=-DHAVE_CONFIG_H
26184
26185 : ${CONFIG_STATUS=./config.status}
26186 ac_clean_files_save=$ac_clean_files
26187 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26188 { echo "$as_me:26188: creating $CONFIG_STATUS" >&5
26189 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26190 cat >$CONFIG_STATUS <<_ACEOF
26191 #! $SHELL
26192 # Generated automatically by configure.
26193 # Run this file to recreate the current configuration.
26194 # Compiler output produced by configure, useful for debugging
26195 # configure, is in config.log if it exists.
26196
26197 debug=false
26198 SHELL=\${CONFIG_SHELL-$SHELL}
26199 ac_cs_invocation="\$0 \$@"
26200
26201 _ACEOF
26202
26203 cat >>$CONFIG_STATUS <<\_ACEOF
26204 # Be Bourne compatible
26205 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26206   emulate sh
26207   NULLCMD=:
26208 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26209   set -o posix
26210 fi
26211
26212 # Name of the executable.
26213 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26214
26215 if expr a : '\(a\)' >/dev/null 2>&1; then
26216   as_expr=expr
26217 else
26218   as_expr=false
26219 fi
26220
26221 rm -f conf$$ conf$$.exe conf$$.file
26222 echo >conf$$.file
26223 if ln -s conf$$.file conf$$ 2>/dev/null; then
26224   # We could just check for DJGPP; but this test a) works b) is more generic
26225   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26226   if test -f conf$$.exe; then
26227     # Don't use ln at all; we don't have any links
26228     as_ln_s='cp -p'
26229   else
26230     as_ln_s='ln -s'
26231   fi
26232 elif ln conf$$.file conf$$ 2>/dev/null; then
26233   as_ln_s=ln
26234 else
26235   as_ln_s='cp -p'
26236 fi
26237 rm -f conf$$ conf$$.exe conf$$.file
26238
26239 as_executable_p="test -f"
26240
26241 # Support unset when possible.
26242 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26243   as_unset=unset
26244 else
26245   as_unset=false
26246 fi
26247
26248 # NLS nuisances.
26249 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26250 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26251 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26252 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26253 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26254 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26255 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26256 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26257
26258 # IFS
26259 # We need space, tab and new line, in precisely that order.
26260 as_nl='
26261 '
26262 IFS="   $as_nl"
26263
26264 # CDPATH.
26265 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26266
26267 exec 6>&1
26268
26269 _ACEOF
26270
26271 # Files that config.status was made for.
26272 if test -n "$ac_config_files"; then
26273   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26274 fi
26275
26276 if test -n "$ac_config_headers"; then
26277   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26278 fi
26279
26280 if test -n "$ac_config_links"; then
26281   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26282 fi
26283
26284 if test -n "$ac_config_commands"; then
26285   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26286 fi
26287
26288 cat >>$CONFIG_STATUS <<\EOF
26289
26290 ac_cs_usage="\
26291 \`$as_me' instantiates files from templates according to the
26292 current configuration.
26293
26294 Usage: $0 [OPTIONS] [FILE]...
26295
26296   -h, --help       print this help, then exit
26297   -V, --version    print version number, then exit
26298   -d, --debug      don't remove temporary files
26299       --recheck    update $as_me by reconfiguring in the same conditions
26300   --file=FILE[:TEMPLATE]
26301                    instantiate the configuration file FILE
26302   --header=FILE[:TEMPLATE]
26303                    instantiate the configuration header FILE
26304
26305 Configuration files:
26306 $config_files
26307
26308 Configuration headers:
26309 $config_headers
26310
26311 Configuration commands:
26312 $config_commands
26313
26314 Report bugs to <dickey@invisible-island.net>."
26315 EOF
26316
26317 cat >>$CONFIG_STATUS <<EOF
26318 ac_cs_version="\\
26319 config.status
26320 configured by $0, generated by GNU Autoconf 2.52.20190901,
26321   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26322
26323 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26324 Free Software Foundation, Inc.
26325 This config.status script is free software; the Free Software Foundation
26326 gives unlimited permission to copy, distribute and modify it."
26327 srcdir=$srcdir
26328 INSTALL="$INSTALL"
26329 EOF
26330
26331 cat >>$CONFIG_STATUS <<\EOF
26332 # If no file are specified by the user, then we need to provide default
26333 # value.  By we need to know if files were specified by the user.
26334 ac_need_defaults=:
26335 while test $# != 0
26336 do
26337   case $1 in
26338   --*=*)
26339     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26340     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26341     shift
26342     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26343     shift
26344     ;;
26345   -*);;
26346   *) # This is not an option, so the user has probably given explicit
26347      # arguments.
26348      ac_need_defaults=false;;
26349   esac
26350
26351   case $1 in
26352   # Handling of the options.
26353 EOF
26354 cat >>$CONFIG_STATUS <<EOF
26355   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26356     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26357     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26358 EOF
26359 cat >>$CONFIG_STATUS <<\EOF
26360   --version | --vers* | -V )
26361     echo "$ac_cs_version"; exit 0 ;;
26362   --he | --h)
26363     # Conflict between --help and --header
26364     { { echo "$as_me:26364: error: ambiguous option: $1
26365 Try \`$0 --help' for more information." >&5
26366 echo "$as_me: error: ambiguous option: $1
26367 Try \`$0 --help' for more information." >&2;}
26368    { (exit 1); exit 1; }; };;
26369   --help | --hel | -h )
26370     echo "$ac_cs_usage"; exit 0 ;;
26371   --debug | --d* | -d )
26372     debug=: ;;
26373   --file | --fil | --fi | --f )
26374     shift
26375     CONFIG_FILES="$CONFIG_FILES $1"
26376     ac_need_defaults=false;;
26377   --header | --heade | --head | --hea )
26378     shift
26379     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26380     ac_need_defaults=false;;
26381
26382   # This is an error.
26383   -*) { { echo "$as_me:26383: error: unrecognized option: $1
26384 Try \`$0 --help' for more information." >&5
26385 echo "$as_me: error: unrecognized option: $1
26386 Try \`$0 --help' for more information." >&2;}
26387    { (exit 1); exit 1; }; } ;;
26388
26389   *) ac_config_targets="$ac_config_targets $1" ;;
26390
26391   esac
26392   shift
26393 done
26394
26395 exec 5>>config.log
26396 cat >&5 << _ACEOF
26397
26398 ## ----------------------- ##
26399 ## Running config.status.  ##
26400 ## ----------------------- ##
26401
26402 This file was extended by $as_me 2.52.20190901, executed with
26403   CONFIG_FILES    = $CONFIG_FILES
26404   CONFIG_HEADERS  = $CONFIG_HEADERS
26405   CONFIG_LINKS    = $CONFIG_LINKS
26406   CONFIG_COMMANDS = $CONFIG_COMMANDS
26407   > $ac_cs_invocation
26408 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26409
26410 _ACEOF
26411 EOF
26412
26413 cat >>$CONFIG_STATUS <<EOF
26414 #
26415 # INIT-COMMANDS section.
26416 #
26417
26418 ### Special initialization commands, used to pass information from the
26419 ### configuration-run into config.status
26420
26421 AWK="$AWK"
26422 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26423 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26424 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26425 ECHO_LD="$ECHO_LD"
26426 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26427 LDCONFIG="$LDCONFIG"
26428 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26429 LIB_NAME="$LIB_NAME"
26430 LIB_PREFIX="$LIB_PREFIX"
26431 LIB_SUBSETS="$LIB_SUBSETS"
26432 LIB_SUFFIX="$LIB_SUFFIX"
26433 LIB_TRACING="$LIB_TRACING"
26434 LN_S="$LN_S"
26435 MAKE_TERMINFO="$MAKE_TERMINFO"
26436 NCURSES_MAJOR="$NCURSES_MAJOR"
26437 NCURSES_MINOR="$NCURSES_MINOR"
26438 NCURSES_OSPEED="$NCURSES_OSPEED"
26439 NCURSES_PATCH="$NCURSES_PATCH"
26440 SRC_SUBDIRS="$SRC_SUBDIRS"
26441 TERMINFO="$TERMINFO"
26442 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26443 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26444 TICS_NAME="$TICS_NAME"
26445 TICS_SUFFIX="$TICS_SUFFIX"
26446 TIC_PATH="$TIC_PATH"
26447 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26448 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26449 TINFO_NAME="$TINFO_NAME"
26450 TINFO_SUFFIX="$TINFO_SUFFIX"
26451 UNALTERED_SYMS="$UNALTERED_SYMS"
26452 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26453 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26454 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26455 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26456 WILDCARD_SYMS="$WILDCARD_SYMS"
26457 WITH_CURSES_H="$with_curses_h"
26458 WITH_ECHO="${enable_echo:=yes}"
26459 WITH_OVERWRITE="$with_overwrite"
26460 cf_LIST_MODELS="$cf_list_models"
26461 cf_cv_abi_version="$cf_cv_abi_version"
26462 cf_cv_do_relink="$cf_cv_do_relink"
26463 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26464 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26465 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26466 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26467 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26468 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26469 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26470 cf_cv_rel_version="$cf_cv_rel_version"
26471 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26472 cf_cv_shared_soname='$cf_cv_shared_soname'
26473 cf_cv_shlib_version="$cf_cv_shlib_version"
26474 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26475 cf_cv_system_name="$cf_cv_system_name"
26476 cf_cv_term_driver="$with_term_driver"
26477 cf_with_ada="$cf_with_ada"
26478 cf_with_cxx_binding="$cf_with_cxx_binding"
26479 cf_with_db_install="$cf_with_db_install"
26480 cf_with_manpages="$cf_with_manpages"
26481 cf_with_tests="$cf_with_tests"
26482 host="$host"
26483 target="$target"
26484 with_shared_cxx="$with_shared_cxx"
26485
26486 EOF
26487
26488 cat >>$CONFIG_STATUS <<\EOF
26489 for ac_config_target in $ac_config_targets
26490 do
26491   case "$ac_config_target" in
26492   # Handling of arguments.
26493   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26494   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26495   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26496   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26497   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26498   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26499   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26500   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26501   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26502   *) { { echo "$as_me:26502: error: invalid argument: $ac_config_target" >&5
26503 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26504    { (exit 1); exit 1; }; };;
26505   esac
26506 done
26507
26508 # If the user did not use the arguments to specify the items to instantiate,
26509 # then the envvar interface is used.  Set only those that are not.
26510 # We use the long form for the default assignment because of an extremely
26511 # bizarre bug on SunOS 4.1.3.
26512 if $ac_need_defaults; then
26513   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26514   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26515   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26516 fi
26517
26518 # Create a temporary directory, and hook for its removal unless debugging.
26519 $debug ||
26520 {
26521   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26522   trap '{ (exit 1); exit 1; }' 1 2 13 15
26523 }
26524
26525 # Create a (secure) tmp directory for tmp files.
26526 : ${TMPDIR=/tmp}
26527 {
26528   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26529   test -n "$tmp" && test -d "$tmp"
26530 }  ||
26531 {
26532   tmp=$TMPDIR/cs$$-$RANDOM
26533   (umask 077 && mkdir $tmp)
26534 } ||
26535 {
26536    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26537    { (exit 1); exit 1; }
26538 }
26539
26540 EOF
26541
26542 cat >>$CONFIG_STATUS <<EOF
26543
26544 #
26545 # CONFIG_FILES section.
26546 #
26547
26548 # No need to generate the scripts if there are no CONFIG_FILES.
26549 # This happens for instance when ./config.status config.h
26550 if test -n "\$CONFIG_FILES"; then
26551   # Protect against being on the right side of a sed subst in config.status.
26552   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26553    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26554 s,@SHELL@,$SHELL,;t t
26555 s,@exec_prefix@,$exec_prefix,;t t
26556 s,@prefix@,$prefix,;t t
26557 s,@program_transform_name@,$program_transform_name,;t t
26558 s,@bindir@,$bindir,;t t
26559 s,@sbindir@,$sbindir,;t t
26560 s,@libexecdir@,$libexecdir,;t t
26561 s,@datarootdir@,$datarootdir,;t t
26562 s,@datadir@,$datadir,;t t
26563 s,@sysconfdir@,$sysconfdir,;t t
26564 s,@sharedstatedir@,$sharedstatedir,;t t
26565 s,@localstatedir@,$localstatedir,;t t
26566 s,@runstatedir@,$runstatedir,;t t
26567 s,@libdir@,$libdir,;t t
26568 s,@includedir@,$includedir,;t t
26569 s,@oldincludedir@,$oldincludedir,;t t
26570 s,@infodir@,$infodir,;t t
26571 s,@mandir@,$mandir,;t t
26572 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26573 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26574 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26575 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26576 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26577 s,@build_alias@,$build_alias,;t t
26578 s,@host_alias@,$host_alias,;t t
26579 s,@target_alias@,$target_alias,;t t
26580 s,@ECHO_C@,$ECHO_C,;t t
26581 s,@ECHO_N@,$ECHO_N,;t t
26582 s,@ECHO_T@,$ECHO_T,;t t
26583 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26584 s,@DEFS@,$DEFS,;t t
26585 s,@LIBS@,$LIBS,;t t
26586 s,@top_builddir@,$top_builddir,;t t
26587 s,@EGREP@,$EGREP,;t t
26588 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26589 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26590 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26591 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26592 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26593 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26594 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26595 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26596 s,@VERSION@,$VERSION,;t t
26597 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26598 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26599 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26600 s,@PACKAGE@,$PACKAGE,;t t
26601 s,@build@,$build,;t t
26602 s,@build_cpu@,$build_cpu,;t t
26603 s,@build_vendor@,$build_vendor,;t t
26604 s,@build_os@,$build_os,;t t
26605 s,@host@,$host,;t t
26606 s,@host_cpu@,$host_cpu,;t t
26607 s,@host_vendor@,$host_vendor,;t t
26608 s,@host_os@,$host_os,;t t
26609 s,@target@,$target,;t t
26610 s,@target_cpu@,$target_cpu,;t t
26611 s,@target_vendor@,$target_vendor,;t t
26612 s,@target_os@,$target_os,;t t
26613 s,@CC@,$CC,;t t
26614 s,@CFLAGS@,$CFLAGS,;t t
26615 s,@LDFLAGS@,$LDFLAGS,;t t
26616 s,@CPPFLAGS@,$CPPFLAGS,;t t
26617 s,@ac_ct_CC@,$ac_ct_CC,;t t
26618 s,@EXEEXT@,$EXEEXT,;t t
26619 s,@OBJEXT@,$OBJEXT,;t t
26620 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26621 s,@CPP@,$CPP,;t t
26622 s,@LDCONFIG@,$LDCONFIG,;t t
26623 s,@CXX@,$CXX,;t t
26624 s,@CXXFLAGS@,$CXXFLAGS,;t t
26625 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26626 s,@AWK@,$AWK,;t t
26627 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26628 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26629 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26630 s,@LINT@,$LINT,;t t
26631 s,@LINT_OPTS@,$LINT_OPTS,;t t
26632 s,@LN_S@,$LN_S,;t t
26633 s,@cf_config_suffix@,$cf_config_suffix,;t t
26634 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26635 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26636 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26637 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26638 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26639 s,@SET_MAKE@,$SET_MAKE,;t t
26640 s,@CTAGS@,$CTAGS,;t t
26641 s,@ETAGS@,$ETAGS,;t t
26642 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26643 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26644 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26645 s,@RANLIB@,$RANLIB,;t t
26646 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26647 s,@LD@,$LD,;t t
26648 s,@ac_ct_LD@,$ac_ct_LD,;t t
26649 s,@AR@,$AR,;t t
26650 s,@ac_ct_AR@,$ac_ct_AR,;t t
26651 s,@NM@,$NM,;t t
26652 s,@ac_ct_NM@,$ac_ct_NM,;t t
26653 s,@ARFLAGS@,$ARFLAGS,;t t
26654 s,@DESTDIR@,$DESTDIR,;t t
26655 s,@BUILD_CC@,$BUILD_CC,;t t
26656 s,@BUILD_CPP@,$BUILD_CPP,;t t
26657 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26658 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26659 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26660 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26661 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26662 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26663 s,@cf_list_models@,$cf_list_models,;t t
26664 s,@ABI_VERSION@,$ABI_VERSION,;t t
26665 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26666 s,@LIBTOOL@,$LIBTOOL,;t t
26667 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26668 s,@LT_UNDEF@,$LT_UNDEF,;t t
26669 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26670 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26671 s,@LIB_CREATE@,$LIB_CREATE,;t t
26672 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26673 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26674 s,@LIB_PREP@,$LIB_PREP,;t t
26675 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26676 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26677 s,@LIB_LINK@,$LIB_LINK,;t t
26678 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26679 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26680 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26681 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26682 s,@TICS_NAME@,$TICS_NAME,;t t
26683 s,@TINFO_NAME@,$TINFO_NAME,;t t
26684 s,@LIB_NAME@,$LIB_NAME,;t t
26685 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26686 s,@CC_G_OPT@,$CC_G_OPT,;t t
26687 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26688 s,@LD_MODEL@,$LD_MODEL,;t t
26689 s,@shlibdir@,$shlibdir,;t t
26690 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26691 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26692 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26693 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26694 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26695 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26696 s,@LINK_PROGS@,$LINK_PROGS,;t t
26697 s,@LINK_TESTS@,$LINK_TESTS,;t t
26698 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26699 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26700 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26701 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26702 s,@RPATH_LIST@,$RPATH_LIST,;t t
26703 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26704 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26705 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26706 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26707 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26708 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26709 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26710 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26711 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26712 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26713 s,@TIC@,$TIC,;t t
26714 s,@INFOCMP@,$INFOCMP,;t t
26715 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26716 s,@XTERM_KBS@,$XTERM_KBS,;t t
26717 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26718 s,@TERMINFO@,$TERMINFO,;t t
26719 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26720 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26721 s,@TERMPATH@,$TERMPATH,;t t
26722 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26723 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26724 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26725 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26726 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26727 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26728 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26729 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26730 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26731 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26732 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26733 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26734 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26735 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26736 s,@RGB_PATH@,$RGB_PATH,;t t
26737 s,@no_x11_rgb@,$no_x11_rgb,;t t
26738 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26739 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26740 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26741 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26742 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26743 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26744 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26745 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26746 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26747 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26748 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26749 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26750 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26751 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26752 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26753 s,@PTHREAD@,$PTHREAD,;t t
26754 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26755 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26756 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26757 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26758 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26759 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26760 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26761 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26762 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26763 s,@ECHO_LT@,$ECHO_LT,;t t
26764 s,@ECHO_LD@,$ECHO_LD,;t t
26765 s,@RULE_CC@,$RULE_CC,;t t
26766 s,@SHOW_CC@,$SHOW_CC,;t t
26767 s,@ECHO_CC@,$ECHO_CC,;t t
26768 s,@ECHO_LINK@,$ECHO_LINK,;t t
26769 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26770 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26771 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26772 s,@ADAFLAGS@,$ADAFLAGS,;t t
26773 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26774 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26775 s,@ADA_TRACE@,$ADA_TRACE,;t t
26776 s,@MATH_LIB@,$MATH_LIB,;t t
26777 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26778 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26779 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26780 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26781 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26782 s,@TEST_LIBS@,$TEST_LIBS,;t t
26783 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26784 s,@CXXCPP@,$CXXCPP,;t t
26785 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26786 s,@CXX_AR@,$CXX_AR,;t t
26787 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26788 s,@CXXLIBS@,$CXXLIBS,;t t
26789 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26790 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26791 s,@M4_exists@,$M4_exists,;t t
26792 s,@cf_ada_make@,$cf_ada_make,;t t
26793 s,@cf_ada_config@,$cf_ada_config,;t t
26794 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26795 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26796 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26797 s,@cf_compile_generics@,$cf_compile_generics,;t t
26798 s,@cf_generic_objects@,$cf_generic_objects,;t t
26799 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26800 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26801 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26802 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26803 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26804 s,@cf_ada_package@,$cf_ada_package,;t t
26805 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26806 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26807 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26808 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26809 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26810 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26811 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26812 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26813 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26814 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26815 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26816 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26817 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26818 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26819 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26820 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26821 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26822 s,@TICS_LIBS@,$TICS_LIBS,;t t
26823 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26824 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26825 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26826 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26827 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26828 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26829 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26830 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26831 s,@includesubdir@,$includesubdir,;t t
26832 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26833 s,@TICS_LIST@,$TICS_LIST,;t t
26834 s,@TINFO_LIST@,$TINFO_LIST,;t t
26835 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26836 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26837 s,@TEST_ARGS@,$TEST_ARGS,;t t
26838 s,@TEST_DEPS@,$TEST_DEPS,;t t
26839 s,@TEST_ARG2@,$TEST_ARG2,;t t
26840 s,@TEST_DEP2@,$TEST_DEP2,;t t
26841 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26842 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26843 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26844 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26845 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26846 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26847 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26848 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26849 s,@cross_compiling@,$cross_compiling,;t t
26850 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26851 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26852 s,@PANEL_NAME@,$PANEL_NAME,;t t
26853 s,@MENU_NAME@,$MENU_NAME,;t t
26854 s,@FORM_NAME@,$FORM_NAME,;t t
26855 s,@CXX_NAME@,$CXX_NAME,;t t
26856 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26857 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26858 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26859 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26860 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26861 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26862 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26863 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26864 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26865 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26866 CEOF
26867
26868 EOF
26869
26870   cat >>$CONFIG_STATUS <<\EOF
26871   # Split the substitutions into bite-sized pieces for seds with
26872   # small command number limits, like on Digital OSF/1 and HP-UX.
26873   ac_max_sed_lines=48
26874   ac_sed_frag=1 # Number of current file.
26875   ac_beg=1 # First line for current file.
26876   ac_end=$ac_max_sed_lines # Line after last line for current file.
26877   ac_more_lines=:
26878   ac_sed_cmds=
26879   while $ac_more_lines; do
26880     if test $ac_beg -gt 1; then
26881       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26882     else
26883       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26884     fi
26885     if test ! -s $tmp/subs.frag; then
26886       ac_more_lines=false
26887     else
26888       # The purpose of the label and of the branching condition is to
26889       # speed up the sed processing (if there are no `@' at all, there
26890       # is no need to browse any of the substitutions).
26891       # These are the two extra sed commands mentioned above.
26892       (echo ':t
26893   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26894       # It is possible to make a multiline substitution using escaped newlines.
26895       # Ensure that we do not split the substitution between script fragments.
26896       ac_BEG=$ac_end
26897       ac_END=`expr $ac_end + $ac_max_sed_lines`
26898       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26899       if test -s $tmp/subs.next; then
26900         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26901         if test ! -s $tmp/subs.edit; then
26902           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26903           if test ! -s $tmp/subs.edit; then
26904             if test $ac_beg -gt 1; then
26905               ac_end=`expr $ac_end - 1`
26906               continue
26907             fi
26908           fi
26909         fi
26910       fi
26911
26912       if test -z "$ac_sed_cmds"; then
26913         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26914       else
26915         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26916       fi
26917       ac_sed_frag=`expr $ac_sed_frag + 1`
26918       ac_beg=$ac_end
26919       ac_end=`expr $ac_end + $ac_max_sed_lines`
26920     fi
26921   done
26922   if test -z "$ac_sed_cmds"; then
26923     ac_sed_cmds=cat
26924   fi
26925 fi # test -n "$CONFIG_FILES"
26926
26927 EOF
26928 cat >>$CONFIG_STATUS <<\EOF
26929 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26930   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26931   case $ac_file in
26932   - | *:- | *:-:* ) # input from stdin
26933         cat >$tmp/stdin
26934         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26935         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26936   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26937         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26938   * )   ac_file_in=$ac_file.in ;;
26939   esac
26940
26941   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26942   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26943          X"$ac_file" : 'X\(//\)[^/]' \| \
26944          X"$ac_file" : 'X\(//\)$' \| \
26945          X"$ac_file" : 'X\(/\)' \| \
26946          .     : '\(.\)' 2>/dev/null ||
26947 echo X"$ac_file" |
26948     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26949           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26950           /^X\(\/\/\)$/{ s//\1/; q; }
26951           /^X\(\/\).*/{ s//\1/; q; }
26952           s/.*/./; q'`
26953   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26954     { case "$ac_dir" in
26955   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26956   *)                      as_incr_dir=.;;
26957 esac
26958 as_dummy="$ac_dir"
26959 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26960   case $as_mkdir_dir in
26961     # Skip DOS drivespec
26962     ?:) as_incr_dir=$as_mkdir_dir ;;
26963     *)
26964       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26965       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26966     ;;
26967   esac
26968 done; }
26969
26970     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26971     # A "../" for each directory in $ac_dir_suffix.
26972     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26973   else
26974     ac_dir_suffix= ac_dots=
26975   fi
26976
26977   case $srcdir in
26978   .)  ac_srcdir=.
26979       if test -z "$ac_dots"; then
26980          ac_top_srcdir=.
26981       else
26982          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
26983       fi ;;
26984   [\\/]* | ?:[\\/]* )
26985       ac_srcdir=$srcdir$ac_dir_suffix;
26986       ac_top_srcdir=$srcdir ;;
26987   *) # Relative path.
26988     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
26989     ac_top_srcdir=$ac_dots$srcdir ;;
26990   esac
26991
26992   case $INSTALL in
26993   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26994   *) ac_INSTALL=$ac_dots$INSTALL ;;
26995   esac
26996
26997   if test x"$ac_file" != x-; then
26998     { echo "$as_me:26998: creating $ac_file" >&5
26999 echo "$as_me: creating $ac_file" >&6;}
27000     rm -f "$ac_file"
27001   fi
27002   # Let's still pretend it is `configure' which instantiates (i.e., don't
27003   # use $as_me), people would be surprised to read:
27004   #    /* config.h.  Generated automatically by config.status.  */
27005   configure_input="Generated automatically from `echo $ac_file_in |
27006                                                  sed 's,.*/,,'` by configure."
27007
27008   # First look for the input files in the build tree, otherwise in the
27009   # src tree.
27010   ac_file_inputs=`IFS=:
27011     for f in $ac_file_in; do
27012       case $f in
27013       -) echo $tmp/stdin ;;
27014       [\\/$]*)
27015          # Absolute (can't be DOS-style, as IFS=:)
27016          test -f "$f" || { { echo "$as_me:27016: error: cannot find input file: $f" >&5
27017 echo "$as_me: error: cannot find input file: $f" >&2;}
27018    { (exit 1); exit 1; }; }
27019          echo $f;;
27020       *) # Relative
27021          if test -f "$f"; then
27022            # Build tree
27023            echo $f
27024          elif test -f "$srcdir/$f"; then
27025            # Source tree
27026            echo $srcdir/$f
27027          else
27028            # /dev/null tree
27029            { { echo "$as_me:27029: error: cannot find input file: $f" >&5
27030 echo "$as_me: error: cannot find input file: $f" >&2;}
27031    { (exit 1); exit 1; }; }
27032          fi;;
27033       esac
27034     done` || { (exit 1); exit 1; }
27035 EOF
27036 cat >>$CONFIG_STATUS <<\EOF
27037   ac_warn_datarootdir=no
27038   if test x"$ac_file" != x-; then
27039     for ac_item in $ac_file_inputs
27040     do
27041       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27042       if test -n "$ac_seen"; then
27043         ac_used=`grep '@datarootdir@' $ac_item`
27044         if test -z "$ac_used"; then
27045           { echo "$as_me:27045: WARNING: datarootdir was used implicitly but not set:
27046 $ac_seen" >&5
27047 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27048 $ac_seen" >&2;}
27049           ac_warn_datarootdir=yes
27050         fi
27051       fi
27052       ac_seen=`grep '${datarootdir}' $ac_item`
27053       if test -n "$ac_seen"; then
27054         { echo "$as_me:27054: WARNING: datarootdir was used explicitly but not set:
27055 $ac_seen" >&5
27056 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27057 $ac_seen" >&2;}
27058         ac_warn_datarootdir=yes
27059       fi
27060     done
27061   fi
27062
27063 if test "x$ac_warn_datarootdir" = xyes; then
27064   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27065 fi
27066
27067 EOF
27068 cat >>$CONFIG_STATUS <<EOF
27069   sed "$ac_vpsub
27070 $extrasub
27071 EOF
27072 cat >>$CONFIG_STATUS <<\EOF
27073 :t
27074 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27075 s,@configure_input@,$configure_input,;t t
27076 s,@srcdir@,$ac_srcdir,;t t
27077 s,@top_srcdir@,$ac_top_srcdir,;t t
27078 s,@INSTALL@,$ac_INSTALL,;t t
27079 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27080   rm -f $tmp/stdin
27081   if test x"$ac_file" != x-; then
27082     cp $tmp/out $ac_file
27083
27084     for ac_name in prefix exec_prefix datarootdir
27085     do
27086         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27087         if test -n "$ac_seen"; then
27088             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27089             if test -z "$ac_init"; then
27090               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27091               { echo "$as_me:27091: WARNING: Variable $ac_name is used but was not set:
27092 $ac_seen" >&5
27093 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27094 $ac_seen" >&2;}
27095             fi
27096         fi
27097     done
27098     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27099     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27100     if test -s $tmp/out; then
27101       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27102       { echo "$as_me:27102: WARNING: Some variables may not be substituted:
27103 $ac_seen" >&5
27104 echo "$as_me: WARNING: Some variables may not be substituted:
27105 $ac_seen" >&2;}
27106     fi
27107   else
27108     cat $tmp/out
27109   fi
27110   rm -f $tmp/out
27111
27112 done
27113 EOF
27114 cat >>$CONFIG_STATUS <<\EOF
27115
27116 #
27117 # CONFIG_HEADER section.
27118 #
27119
27120 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27121 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27122 #
27123 # ac_d sets the value in "#define NAME VALUE" lines.
27124 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27125 ac_dB='[        ].*$,\1#\2'
27126 ac_dC=' '
27127 ac_dD=',;t'
27128 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27129 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27130 ac_iB='\([      ]\),\1#\2define\3'
27131 ac_iC=' '
27132 ac_iD='\4,;t'
27133 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27134 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27135 ac_uB='$,\1#\2define\3'
27136 ac_uC=' '
27137 ac_uD=',;t'
27138
27139 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27140   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27141   case $ac_file in
27142   - | *:- | *:-:* ) # input from stdin
27143         cat >$tmp/stdin
27144         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27145         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27146   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27147         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27148   * )   ac_file_in=$ac_file.in ;;
27149   esac
27150
27151   test x"$ac_file" != x- && { echo "$as_me:27151: creating $ac_file" >&5
27152 echo "$as_me: creating $ac_file" >&6;}
27153
27154   # First look for the input files in the build tree, otherwise in the
27155   # src tree.
27156   ac_file_inputs=`IFS=:
27157     for f in $ac_file_in; do
27158       case $f in
27159       -) echo $tmp/stdin ;;
27160       [\\/$]*)
27161          # Absolute (can't be DOS-style, as IFS=:)
27162          test -f "$f" || { { echo "$as_me:27162: error: cannot find input file: $f" >&5
27163 echo "$as_me: error: cannot find input file: $f" >&2;}
27164    { (exit 1); exit 1; }; }
27165          echo $f;;
27166       *) # Relative
27167          if test -f "$f"; then
27168            # Build tree
27169            echo $f
27170          elif test -f "$srcdir/$f"; then
27171            # Source tree
27172            echo $srcdir/$f
27173          else
27174            # /dev/null tree
27175            { { echo "$as_me:27175: error: cannot find input file: $f" >&5
27176 echo "$as_me: error: cannot find input file: $f" >&2;}
27177    { (exit 1); exit 1; }; }
27178          fi;;
27179       esac
27180     done` || { (exit 1); exit 1; }
27181   # Remove the trailing spaces.
27182   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27183
27184 EOF
27185
27186 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27187 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27188 # be either 'cat' or 'sort'.
27189 cat confdefs.h | uniq >conftest.vals
27190
27191 # Break up conftest.vals because some shells have a limit on
27192 # the size of here documents, and old seds have small limits too.
27193
27194 rm -f conftest.tail
27195 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27196 while grep . conftest.vals >/dev/null
27197 do
27198   # Write chunks of a limited-size here document to conftest.frag.
27199   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27200   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27201   echo 'CEOF' >> $CONFIG_STATUS
27202   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27203   rm -f conftest.vals
27204   mv conftest.tail conftest.vals
27205 done
27206 rm -f conftest.vals
27207
27208 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27209 # marker @DEFS@.
27210 echo '  cat >> conftest.edit <<CEOF
27211 /@DEFS@/r conftest.frag
27212 /@DEFS@/d
27213 CEOF
27214 sed -f conftest.edit $tmp/in > $tmp/out
27215 rm -f $tmp/in
27216 mv $tmp/out $tmp/in
27217 rm -f conftest.edit conftest.frag
27218 ' >> $CONFIG_STATUS
27219
27220 cat >>$CONFIG_STATUS <<\EOF
27221   # Let's still pretend it is `configure' which instantiates (i.e., don't
27222   # use $as_me), people would be surprised to read:
27223   #    /* config.h.  Generated automatically by config.status.  */
27224   if test x"$ac_file" = x-; then
27225     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27226   else
27227     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27228   fi
27229   cat $tmp/in >>$tmp/config.h
27230   rm -f $tmp/in
27231   if test x"$ac_file" != x-; then
27232     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27233       { echo "$as_me:27233: $ac_file is unchanged" >&5
27234 echo "$as_me: $ac_file is unchanged" >&6;}
27235     else
27236       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27237          X"$ac_file" : 'X\(//\)[^/]' \| \
27238          X"$ac_file" : 'X\(//\)$' \| \
27239          X"$ac_file" : 'X\(/\)' \| \
27240          .     : '\(.\)' 2>/dev/null ||
27241 echo X"$ac_file" |
27242     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27243           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27244           /^X\(\/\/\)$/{ s//\1/; q; }
27245           /^X\(\/\).*/{ s//\1/; q; }
27246           s/.*/./; q'`
27247       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27248         { case "$ac_dir" in
27249   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27250   *)                      as_incr_dir=.;;
27251 esac
27252 as_dummy="$ac_dir"
27253 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27254   case $as_mkdir_dir in
27255     # Skip DOS drivespec
27256     ?:) as_incr_dir=$as_mkdir_dir ;;
27257     *)
27258       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27259       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27260     ;;
27261   esac
27262 done; }
27263
27264       fi
27265       rm -f $ac_file
27266       mv $tmp/config.h $ac_file
27267     fi
27268   else
27269     cat $tmp/config.h
27270     rm -f $tmp/config.h
27271   fi
27272 done
27273 EOF
27274 cat >>$CONFIG_STATUS <<\EOF
27275 #
27276 # CONFIG_COMMANDS section.
27277 #
27278 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27279   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27280   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27281
27282   case $ac_dest in
27283     default )
27284 if test "x$cf_with_tests" != xno ; then
27285
27286 for cf_dir in test
27287 do
27288         if test ! -d $srcdir/$cf_dir; then
27289                 continue
27290         elif test -f $srcdir/$cf_dir/programs; then
27291                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27292         fi
27293 done
27294
27295 fi
27296
27297 cf_prefix=$LIB_PREFIX
27298
27299 case $cf_cv_shlib_version in
27300 (cygdll|msysdll|mingw)
27301         TINFO_NAME=$TINFO_ARG_SUFFIX
27302         TINFO_SUFFIX=.dll
27303         ;;
27304 esac
27305
27306 if test -n "$TINFO_SUFFIX" ; then
27307         case $TINFO_SUFFIX in
27308         (tw*)
27309                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27310                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27311                 ;;
27312         (t*)
27313                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27314                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27315                 ;;
27316         (w*)
27317                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27318                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27319                 ;;
27320         esac
27321 fi
27322
27323 for cf_dir in $SRC_SUBDIRS
27324 do
27325         if test ! -d $srcdir/$cf_dir ; then
27326                 continue
27327         elif test -f $srcdir/$cf_dir/modules; then
27328
27329                 SHARED_LIB=
27330                 Libs_To_Make=
27331                 cf_awk_program=
27332                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27333                 then
27334                         cf_awk_program="$cf_awk_program\
27335 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27336 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27337 "
27338                 fi
27339
27340                 if test "x$WILDCARD_SYMS" = xno
27341                 then
27342                         cf_awk_program="$cf_awk_program\
27343 /[      ]_\\*;/ { skip=1; next; }\
27344 "
27345                 fi
27346
27347                 if test "x$cf_awk_program" != "x"
27348                 then
27349                         cat >>$cf_dir/Makefile <<CF_EOF
27350
27351 # Generated by CF_LIB_RULES
27352 resulting.map: $UNALTERED_SYMS
27353         $AWK 'BEGIN { skip = 1; last=""; } \
27354 $cf_awk_program \
27355 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27356  skip = 0; last = \$\$0; } \
27357 END { print last; }' < $UNALTERED_SYMS >\$@
27358
27359 distclean::
27360         rm -f resulting.map
27361 CF_EOF
27362                 fi
27363
27364                 for cf_item in $cf_LIST_MODELS
27365                 do
27366
27367         case X$cf_item in
27368         (Xlibtool)
27369                 cf_suffix='.la'
27370                 cf_depsuf=$cf_suffix
27371                 ;;
27372         (Xdebug)
27373                 cf_suffix='_g.a'
27374                 cf_depsuf=$cf_suffix
27375                 ;;
27376         (Xprofile)
27377                 cf_suffix='_p.a'
27378                 cf_depsuf=$cf_suffix
27379                 ;;
27380         (Xshared)
27381                 case $cf_cv_system_name in
27382                 (aix[5-7]*)
27383                         cf_suffix='.so'
27384                         cf_depsuf=$cf_suffix
27385                         ;;
27386                 (cygwin*|msys*|mingw*)
27387                         cf_suffix='.dll'
27388                         cf_depsuf='.dll.a'
27389                         ;;
27390                 (darwin*)
27391                         cf_suffix='.dylib'
27392                         cf_depsuf=$cf_suffix
27393                         ;;
27394                 (hpux*)
27395                         case $target in
27396                         (ia64*)
27397                                 cf_suffix='.so'
27398                                 cf_depsuf=$cf_suffix
27399                                 ;;
27400                         (*)
27401                                 cf_suffix='.sl'
27402                                 cf_depsuf=$cf_suffix
27403                                 ;;
27404                         esac
27405                         ;;
27406                 (*)
27407                         cf_suffix='.so'
27408                         cf_depsuf=$cf_suffix
27409                         ;;
27410                 esac
27411                 ;;
27412         (*)
27413                 cf_suffix='.a'
27414                 cf_depsuf=$cf_suffix
27415                 ;;
27416         esac
27417         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27418         then
27419                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27420                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27421         fi
27422
27423                         cf_libname=$cf_dir
27424                         test "$cf_dir" = c++ && cf_libname=ncurses++
27425                         if test $cf_item = shared ; then
27426                                 if test -n "${LIB_SUFFIX}"
27427                                 then
27428                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27429                                 else
27430                                         cf_shared_suffix="$cf_suffix"
27431                                 fi
27432                                 if test "$cf_cv_do_symlinks" = yes ; then
27433                                         cf_version_name=
27434
27435                                         case "$cf_cv_shlib_version" in
27436                                         (rel)
27437                                                 cf_version_name=REL_VERSION
27438                                                 ;;
27439                                         (abi)
27440                                                 cf_version_name=ABI_VERSION
27441                                                 ;;
27442                                         esac
27443
27444                                         if test -n "$cf_version_name"
27445                                         then
27446                                                 case "$cf_cv_system_name" in
27447                                                 (darwin*)
27448                                                         # "w", etc?
27449                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27450                                                         ;;
27451                                                 (*)
27452                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27453                                                         ;;
27454                                                 esac
27455                                         fi
27456                                         if test -n "${USE_LIB_SUFFIX}"
27457                                         then
27458                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27459                                         else
27460                                                 cf_shared_suffix="$cf_suffix"
27461                                         fi
27462                                 fi
27463                                 # cygwin needs import library, and has unique naming convention
27464                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27465                                 # use 'cyg' prefix for shared lib.
27466                                 case $cf_cv_shlib_version in
27467                                 (cygdll)
27468                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27469                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27470                                         ;;
27471                                 (msysdll)
27472                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27473                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27474                                         ;;
27475                                 (mingw)
27476                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27477                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27478                                         ;;
27479                                 (*)
27480                                         cf_add_lib=
27481                                         ;;
27482                                 esac
27483                                 if test -n "$cf_add_lib"
27484                                 then
27485                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27486                                         continue
27487                                 fi
27488                         fi
27489                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27490                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27491                 done
27492
27493                 if test $cf_dir = ncurses ; then
27494                         cf_subsets="$LIB_SUBSETS"
27495                         cf_r_parts="$cf_subsets"
27496                         cf_liblist="$Libs_To_Make"
27497
27498                         while test -n "$cf_r_parts"
27499                         do
27500                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27501                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27502                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27503                                         cf_add_lib=
27504                                         case $cf_l_parts in
27505                                         (*termlib*)
27506                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27507                                                 ;;
27508                                         (*ticlib*)
27509                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27510                                                 ;;
27511                                         (*)
27512                                                 break
27513                                                 ;;
27514                                         esac
27515                                         if test -n "$cf_add_lib"; then
27516                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27517                                         fi
27518                                 else
27519                                         break
27520                                 fi
27521                         done
27522                 else
27523                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27524                 fi
27525
27526                 if test $cf_dir = c++; then
27527                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27528                                 cf_list=
27529                                 for cf_item in $Libs_To_Make
27530                                 do
27531                                         case $cf_item in
27532                                         (*.a)
27533                                                 ;;
27534                                         (*)
27535                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27536                                                 ;;
27537                                         esac
27538                                         for cf_test in $cf_list
27539                                         do
27540                                                 if test "$cf_test" = "$cf_item"
27541                                                 then
27542                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27543                                                         cf_item=
27544                                                         break
27545                                                 fi
27546                                         done
27547                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27548                                 done
27549                                 Libs_To_Make="$cf_list"
27550                         fi
27551                 fi
27552
27553                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27554                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27555                         $cf_dir/Makefile >$cf_dir/Makefile.out
27556                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27557
27558                 $AWK -f $srcdir/mk-0th.awk \
27559                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27560                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27561
27562                 for cf_subset in $cf_subsets
27563                 do
27564                         cf_subdirs=
27565                         for cf_item in $cf_LIST_MODELS
27566                         do
27567
27568                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27569
27570 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27571
27572                         CXX_MODEL=$cf_ITEM
27573                         if test "$CXX_MODEL" = SHARED; then
27574                                 case $cf_cv_shlib_version in
27575                                 (cygdll|msysdll|mingw)
27576                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27577
27578 echo "${as_me:-configure}:27578: testing overriding CXX_MODEL to SHARED ..." 1>&5
27579
27580                                         with_shared_cxx=yes
27581                                         ;;
27582                                 (*)
27583                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27584                                         ;;
27585                                 esac
27586                         fi
27587
27588         case X$cf_item in
27589         (Xlibtool)
27590                 cf_suffix='.la'
27591                 cf_depsuf=$cf_suffix
27592                 ;;
27593         (Xdebug)
27594                 cf_suffix='_g.a'
27595                 cf_depsuf=$cf_suffix
27596                 ;;
27597         (Xprofile)
27598                 cf_suffix='_p.a'
27599                 cf_depsuf=$cf_suffix
27600                 ;;
27601         (Xshared)
27602                 case $cf_cv_system_name in
27603                 (aix[5-7]*)
27604                         cf_suffix='.so'
27605                         cf_depsuf=$cf_suffix
27606                         ;;
27607                 (cygwin*|msys*|mingw*)
27608                         cf_suffix='.dll'
27609                         cf_depsuf='.dll.a'
27610                         ;;
27611                 (darwin*)
27612                         cf_suffix='.dylib'
27613                         cf_depsuf=$cf_suffix
27614                         ;;
27615                 (hpux*)
27616                         case $target in
27617                         (ia64*)
27618                                 cf_suffix='.so'
27619                                 cf_depsuf=$cf_suffix
27620                                 ;;
27621                         (*)
27622                                 cf_suffix='.sl'
27623                                 cf_depsuf=$cf_suffix
27624                                 ;;
27625                         esac
27626                         ;;
27627                 (*)
27628                         cf_suffix='.so'
27629                         cf_depsuf=$cf_suffix
27630                         ;;
27631                 esac
27632                 ;;
27633         (*)
27634                 cf_suffix='.a'
27635                 cf_depsuf=$cf_suffix
27636                 ;;
27637         esac
27638         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27639         then
27640                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27641                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27642         fi
27643
27644         case $cf_item in
27645         (libtool) cf_subdir='obj_lo'  ;;
27646         (normal)  cf_subdir='objects' ;;
27647         (debug)   cf_subdir='obj_g' ;;
27648         (profile) cf_subdir='obj_p' ;;
27649         (shared)
27650                 case $cf_cv_system_name in
27651                 (cygwin|msys)
27652                         cf_subdir='objects' ;;
27653                 (*)
27654                         cf_subdir='obj_s' ;;
27655                 esac
27656         esac
27657
27658                         # Test for case where we build libtinfo with a different name.
27659                         cf_libname=$cf_dir
27660                         if test $cf_dir = ncurses ; then
27661                                 case $cf_subset in
27662                                 (*base*)
27663                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27664                                         ;;
27665                                 (*termlib*)
27666                                         cf_libname=$TINFO_LIB_SUFFIX
27667                                         ;;
27668                                 (ticlib*)
27669                                         cf_libname=$TICS_LIB_SUFFIX
27670                                         ;;
27671                                 esac
27672                         elif test $cf_dir = c++ ; then
27673                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27674                         else
27675                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27676                         fi
27677                         if test -n "${USE_ARG_SUFFIX}" ; then
27678                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27679                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27680                         fi
27681
27682                         # These dependencies really are for development, not
27683                         # builds, but they are useful in porting, too.
27684                         cf_depend="../include/ncurses_cfg.h"
27685                         if test "$srcdir" = "."; then
27686                                 cf_reldir="."
27687                         else
27688                                 cf_reldir="\${srcdir}"
27689                         fi
27690
27691                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27692                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27693                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27694                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27695                         fi
27696
27697                         cf_dir_suffix=
27698                         old_cf_suffix="$cf_suffix"
27699                         if test "$cf_cv_shlib_version_infix" = yes ; then
27700                         if test -n "$USE_LIB_SUFFIX" ; then
27701                                 case $USE_LIB_SUFFIX in
27702                                 (tw*)
27703                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27704                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27705                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27706                                         ;;
27707                                 (t*)
27708                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27709                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27710                                         cf_dir_suffix=t$EXTRA_SUFFIX
27711                                         ;;
27712                                 (w*)
27713                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27714                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27715                                         cf_dir_suffix=w$EXTRA_SUFFIX
27716                                         ;;
27717                                 (*)
27718                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27719                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27720                                         cf_dir_suffix=$EXTRA_SUFFIX
27721                                         ;;
27722                                 esac
27723                         fi
27724                         fi
27725
27726                         $AWK -f $srcdir/mk-1st.awk \
27727                                 name=${cf_libname}${cf_dir_suffix} \
27728                                 traces=$LIB_TRACING \
27729                                 MODEL=$cf_ITEM \
27730                                 CXX_MODEL=$CXX_MODEL \
27731                                 model=$cf_subdir \
27732                                 prefix=$cf_prefix \
27733                                 suffix=$cf_suffix \
27734                                 subset=$cf_subset \
27735                                 driver=$cf_cv_term_driver \
27736                                 SymLink="$LN_S" \
27737                                 TermlibRoot=$TINFO_NAME \
27738                                 TermlibSuffix=$TINFO_SUFFIX \
27739                                 ShlibVer=$cf_cv_shlib_version \
27740                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27741                                 ReLink=${cf_cv_do_relink:-no} \
27742                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27743                                 DoLinks=$cf_cv_do_symlinks \
27744                                 rmSoLocs=$cf_cv_rm_so_locs \
27745                                 ldconfig="$LDCONFIG" \
27746                                 overwrite=$WITH_OVERWRITE \
27747                                 depend="$cf_depend" \
27748                                 host="$host" \
27749                                 libtool_version="$LIBTOOL_VERSION" \
27750                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27751
27752                         cf_suffix="$old_cf_suffix"
27753
27754                         for cf_subdir2 in $cf_subdirs lib
27755                         do
27756                                 test $cf_subdir = $cf_subdir2 && break
27757                         done
27758                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27759                         $AWK -f $srcdir/mk-2nd.awk \
27760                                 name=$cf_dir \
27761                                 traces=$LIB_TRACING \
27762                                 MODEL=$cf_ITEM \
27763                                 model=$cf_subdir \
27764                                 subset=$cf_subset \
27765                                 srcdir=$srcdir \
27766                                 echo=$WITH_ECHO \
27767                                 crenames=$cf_cv_prog_CC_c_o \
27768                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27769                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27770                         cf_subdirs="$cf_subdirs $cf_subdir"
27771                         done
27772                 done
27773         fi
27774
27775         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27776 done
27777
27778 for cf_dir in $SRC_SUBDIRS
27779 do
27780         if test ! -d $srcdir/$cf_dir ; then
27781                 continue
27782         fi
27783
27784         if test -f $cf_dir/Makefile ; then
27785                 case "$cf_dir" in
27786                 (Ada95)
27787                         echo 'libs \' >> Makefile
27788                         echo 'install.libs \' >> Makefile
27789                         echo 'uninstall.libs ::' >> Makefile
27790                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27791                         ;;
27792                 esac
27793         fi
27794
27795         if test -f $srcdir/$cf_dir/modules; then
27796                 echo >> Makefile
27797                 if test -f $srcdir/$cf_dir/headers; then
27798 cat >> Makefile <<CF_EOF
27799 install.includes \\
27800 uninstall.includes \\
27801 CF_EOF
27802                 fi
27803 if test "$cf_dir" != "c++" ; then
27804 echo 'lint \' >> Makefile
27805 fi
27806 cat >> Makefile <<CF_EOF
27807 libs \\
27808 lintlib \\
27809 install.libs \\
27810 uninstall.libs \\
27811 install.$cf_dir \\
27812 uninstall.$cf_dir ::
27813         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27814 CF_EOF
27815         elif test -f $srcdir/$cf_dir/headers; then
27816 cat >> Makefile <<CF_EOF
27817
27818 libs \\
27819 install.libs \\
27820 uninstall.libs \\
27821 install.includes \\
27822 uninstall.includes ::
27823         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27824 CF_EOF
27825 fi
27826 done
27827
27828 if test "x$cf_with_db_install" = xyes; then
27829 cat >> Makefile <<CF_EOF
27830
27831 install.libs uninstall.libs \\
27832 install.data uninstall.data ::
27833 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27834 CF_EOF
27835 else
27836 cat >> Makefile <<CF_EOF
27837
27838 install.libs uninstall.libs ::
27839         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27840 CF_EOF
27841 fi
27842
27843 if test "x$cf_with_manpages" = xyes; then
27844 cat >> Makefile <<CF_EOF
27845
27846 install.man \\
27847 uninstall.man ::
27848         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27849 CF_EOF
27850 fi
27851
27852 cat >> Makefile <<CF_EOF
27853
27854 distclean ::
27855         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27856         rm -f headers.sh headers.sed mk_shared_lib.sh
27857         rm -f edit_man.* man_alias.*
27858         rm -rf \${DIRS_TO_MAKE}
27859 CF_EOF
27860
27861 # Special case: tack's manpage lives in its own directory.
27862 if test "x$cf_with_manpages" = xyes; then
27863 if test "x$cf_with_tack" = "xyes"; then
27864 cat >> Makefile <<CF_EOF
27865
27866 install.man \\
27867 uninstall.man ::
27868         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27869 CF_EOF
27870 fi
27871 fi
27872
27873 rm -f headers.sed headers.sh
27874
27875 echo creating headers.sh
27876 cat >headers.sh <<CF_EOF
27877 #! $SHELL
27878 # This shell script is generated by the 'configure' script.  It is invoked in a
27879 # subdirectory of the build tree.  It generates a sed-script in the parent
27880 # directory that is used to adjust includes for header files that reside in a
27881 # subdirectory of /usr/include, etc.
27882 PRG=""
27883 while test \$# != 3
27884 do
27885 PRG="\$PRG \$1"; shift
27886 done
27887 DST=\$1
27888 REF=\$2
27889 SRC=\$3
27890 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27891 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27892 echo installing \$SRC in \$DST
27893 CF_EOF
27894
27895 if test $WITH_CURSES_H = yes; then
27896         cat >>headers.sh <<CF_EOF
27897 case \$DST in
27898 (/*/include/*)
27899         END=\`basename \$DST\`
27900         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27901         do
27902                 NAME=\`basename \$i\`
27903                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27904         done
27905         ;;
27906 (*)
27907         echo "" >> \$TMPSED
27908         ;;
27909 esac
27910 CF_EOF
27911
27912 else
27913         cat >>headers.sh <<CF_EOF
27914 case \$DST in
27915 (/*/include/*)
27916         END=\`basename \$DST\`
27917         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27918         do
27919                 NAME=\`basename \$i\`
27920                 if test "\$NAME" = "curses.h"
27921                 then
27922                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27923                         NAME=ncurses.h
27924                 fi
27925                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27926         done
27927         ;;
27928 (*)
27929         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27930         ;;
27931 esac
27932 CF_EOF
27933 fi
27934 cat >>headers.sh <<CF_EOF
27935 rm -f \$TMPSRC
27936 sed -f \$TMPSED \$SRC > \$TMPSRC
27937 NAME=\`basename \$SRC\`
27938 CF_EOF
27939 if test $WITH_CURSES_H != yes; then
27940         cat >>headers.sh <<CF_EOF
27941 test "\$NAME" = "curses.h" && NAME=ncurses.h
27942 CF_EOF
27943 fi
27944 cat >>headers.sh <<CF_EOF
27945 # Just in case someone gzip'd manpages, remove the conflicting copy.
27946 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27947
27948 eval \$PRG \$TMPSRC \$DST/\$NAME
27949 rm -f \$TMPSRC \$TMPSED
27950 CF_EOF
27951
27952 chmod 0755 headers.sh
27953
27954 for cf_dir in $SRC_SUBDIRS
27955 do
27956         if test ! -d $srcdir/$cf_dir ; then
27957                 continue
27958         fi
27959
27960         if test -f $srcdir/$cf_dir/headers; then
27961                 $AWK -f $srcdir/mk-hdr.awk \
27962                         subset="$LIB_SUBSETS" \
27963                         compat="$WITH_CURSES_H" \
27964                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27965         fi
27966
27967         if test -f $srcdir/$cf_dir/modules; then
27968                 if test "$cf_dir" != "c++" ; then
27969                         cat >>$cf_dir/Makefile <<"CF_EOF"
27970 depend : ${AUTO_SRC}
27971         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27972
27973 # DO NOT DELETE THIS LINE -- make depend depends on it.
27974 CF_EOF
27975                 fi
27976         fi
27977 done
27978
27979 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27980 if test -z "$USE_OLD_MAKERULES" ; then
27981         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
27982 fi
27983 fi
27984  ;;
27985   esac
27986 done
27987 EOF
27988
27989 cat >>$CONFIG_STATUS <<\EOF
27990
27991 { (exit 0); exit 0; }
27992 EOF
27993 chmod +x $CONFIG_STATUS
27994 ac_clean_files=$ac_clean_files_save
27995
27996 # configure is writing to config.log, and then calls config.status.
27997 # config.status does its own redirection, appending to config.log.
27998 # Unfortunately, on DOS this fails, as config.log is still kept open
27999 # by configure, so config.status won't be able to write to it; its
28000 # output is simply discarded.  So we exec the FD to /dev/null,
28001 # effectively closing config.log, so it can be properly (re)opened and
28002 # appended to by config.status.  When coming back to configure, we
28003 # need to make the FD available again.
28004 if test "$no_create" != yes; then
28005   ac_cs_success=:
28006   exec 5>/dev/null
28007   $SHELL $CONFIG_STATUS || ac_cs_success=false
28008   exec 5>>config.log
28009   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28010   # would make configure fail if this is the last instruction.
28011   $ac_cs_success || { (exit 1); exit 1; }
28012 fi
28013 ${MAKE:-make} preinstall