]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20181020
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.666 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
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 Ada95, 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   --without-xterm-new     specify if xterm terminfo should be old version
771   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
772   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
773   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
774   --disable-big-core      assume machine has little memory
775   --disable-big-strings   assume compiler has only standard-size strings
776   --enable-termcap        compile in termcap fallback support
777   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
778   --enable-getcap         fast termcap load, no xrefs to terminfo
779   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
780   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
781   --disable-root-environ  restrict environment when running as root
782   --enable-symlinks       make tic use symbolic links not hard links
783   --enable-broken_linker  compile with broken-linker support code
784   --enable-bsdpad         recognize BSD-style prefix padding
785   --enable-widec          compile with wide-char/UTF-8 code
786   --disable-lp64          allow chtype to be long (ignore _LP64)
787   --disable-largefile     omit support for large files
788   --disable-tparm-varargs compile tparm() without varargs interface
789   --disable-tic-depends   link tic library without explicit dependency on ncurses library
790   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
791   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
792   --with-bool=TYPE        override fallback type of bool variable
793   --with-caps=alt         compile with alternate Caps file
794   --with-chtype=TYPE      override type of chtype
795   --with-ospeed=TYPE      override type of ospeed variable
796   --with-mmask-t=TYPE     override type of mmask_t
797   --with-ccharw-max=XXX   override size CCHARW_MAX
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --with-tparm-arg=TYPE   override parameter type of tparm
800   --with-rcs-ids          compile-in RCS identifiers
801 Options to Specify How Manpages are Installed:
802   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
803                           optionally formatted/catonly, e.g., gzip,formatted
804   --with-manpage-renames  specify manpage-renaming
805   --with-manpage-aliases  specify manpage-aliases using .so
806   --with-manpage-symlinks specify manpage-aliases using symlinks
807   --with-manpage-tbl      specify manpage processing with tbl
808 Extensions:
809   --disable-ext-funcs     disable function-extensions
810   --enable-sp-funcs       enable SCREEN-extensions
811   --enable-term-driver    enable terminal-driver
812   --enable-const          compile with extra/non-standard const
813   --enable-ext-colors     compile for 256-color support
814   --enable-ext-mouse      compile for extended mouse-encoding
815   --enable-ext-putwin     compile with extended putwin/screendump
816   --enable-no-padding     compile with $NCURSES_NO_PADDING code
817   --enable-sigwinch       compile with SIGWINCH handler
818   --enable-tcap-names     compile with user-definable terminal capabilities
819 Reentrant Code:
820   --with-pthread          use POSIX thread library
821   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
822   --enable-weak-symbols   enable weak-symbols for pthreads
823   --enable-reentrant      compile with reentrant code
824   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
825   --enable-opaque-form    make form-library structures "opaque"
826   --enable-opaque-menu    make menu-library structures "opaque"
827   --enable-opaque-panel   make panel-library structures "opaque"
828   --with-wrap-prefix=XXX  override prefix used for public variables
829 Development Code:
830   --without-develop       disable development options
831   --enable-hard-tabs      compile with hard-tabs code
832   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
833 Experimental Code:
834   --disable-assumed-color do not assume anything about default-colors
835   --disable-hashmap       compile without hashmap scrolling-optimization
836   --enable-colorfgbg      compile-in experimental $COLORFGBG code
837   --enable-interop        compile-in interop bindings
838   --enable-safe-sprintf   compile with experimental safe-sprintf code
839   --disable-scroll-hints  compile without scroll-hints code
840   --enable-wgetch-events  compile with wgetch-events code
841 Testing/development Options:
842   --disable-echo          do not display "compiling" commands
843   --disable-stripping     do not strip (debug info) installed executables
844   --enable-warnings       build: turn on GCC compiler warnings
845   --enable-string-hacks   work around bogus compiler/loader warnings
846   --enable-assertions     test: turn on generation of assertion code
847   --with-dmalloc          test: use Gray Watson's dmalloc library
848   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
849   --with-valgrind         test: use valgrind
850   --disable-leaks         test: free permanent memory, analyze leaks
851   --enable-expanded       test: generate functions for certain macros
852   --disable-macros        test: use functions rather than macros
853   --with-trace            test: add trace() function to all models of ncurses
854   --disable-gnat-projects test: disable GNAT projects even if usable
855 Ada95 Binding Options:
856   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
857   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
858   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
859   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
860
861 Some influential environment variables:
862   CC          C compiler command
863   CFLAGS      C compiler flags
864   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
865               nonstandard directory <lib dir>
866   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
867               headers in a nonstandard directory <include dir>
868   CPP         C preprocessor
869   CXX         C++ compiler command
870   CXXFLAGS    C++ compiler flags
871   CXXCPP      C++ preprocessor
872
873 Use these variables to override the choices made by `configure' or to help
874 it to find libraries and programs with nonstandard names/locations.
875
876 EOF
877 fi
878
879 if test "$ac_init_help" = "recursive"; then
880   # If there are subdirs, report their specific --help.
881   ac_popdir=`pwd`
882   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
883     cd $ac_subdir
884     # A "../" for each directory in /$ac_subdir.
885     ac_dots=`echo $ac_subdir |
886              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
887
888     case $srcdir in
889     .) # No --srcdir option.  We are building in place.
890       ac_sub_srcdir=$srcdir ;;
891     [\\/]* | ?:[\\/]* ) # Absolute path.
892       ac_sub_srcdir=$srcdir/$ac_subdir ;;
893     *) # Relative path.
894       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
895     esac
896
897     # Check for guested configure; otherwise get Cygnus style configure.
898     if test -f $ac_sub_srcdir/configure.gnu; then
899       echo
900       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
901     elif test -f $ac_sub_srcdir/configure; then
902       echo
903       $SHELL $ac_sub_srcdir/configure  --help=recursive
904     elif test -f $ac_sub_srcdir/configure.ac ||
905            test -f $ac_sub_srcdir/configure.in; then
906       echo
907       $ac_configure --help
908     else
909       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
910     fi
911     cd $ac_popdir
912   done
913 fi
914
915 test -n "$ac_init_help" && exit 0
916 if $ac_init_version; then
917   cat <<\EOF
918
919 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
920 Free Software Foundation, Inc.
921 This configure script is free software; the Free Software Foundation
922 gives unlimited permission to copy, distribute and modify it.
923 EOF
924   exit 0
925 fi
926 exec 5>config.log
927 cat >&5 <<EOF
928 This file contains any messages produced by compilers while
929 running configure, to aid debugging if configure makes a mistake.
930
931 It was created by $as_me, which was
932 generated by GNU Autoconf 2.52.20181006.  Invocation command line was
933
934   $ $0 $@
935
936 EOF
937 {
938 cat <<_ASUNAME
939 ## ---------- ##
940 ## Platform.  ##
941 ## ---------- ##
942
943 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
944 uname -m = `(uname -m) 2>/dev/null || echo unknown`
945 uname -r = `(uname -r) 2>/dev/null || echo unknown`
946 uname -s = `(uname -s) 2>/dev/null || echo unknown`
947 uname -v = `(uname -v) 2>/dev/null || echo unknown`
948
949 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
950 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
951
952 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
953 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
954 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
955 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
956 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
957 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
958 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
959
960 PATH = $PATH
961
962 _ASUNAME
963 } >&5
964
965 cat >&5 <<EOF
966 ## ------------ ##
967 ## Core tests.  ##
968 ## ------------ ##
969
970 EOF
971
972 # Keep a trace of the command line.
973 # Strip out --no-create and --no-recursion so they do not pile up.
974 # Also quote any args containing shell meta-characters.
975 ac_configure_args=
976 ac_sep=
977 for ac_arg
978 do
979   case $ac_arg in
980   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
981   | --no-cr | --no-c) ;;
982   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
983   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
984   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
985     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
986     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
987     ac_sep=" " ;;
988   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
989      ac_sep=" " ;;
990   esac
991   # Get rid of the leading space.
992 done
993
994 # When interrupted or exit'd, cleanup temporary files, and complete
995 # config.log.  We remove comments because anyway the quotes in there
996 # would cause problems or look ugly.
997 trap 'exit_status=$?
998   # Save into config.log some information that might help in debugging.
999   echo >&5
1000   echo "## ----------------- ##" >&5
1001   echo "## Cache variables.  ##" >&5
1002   echo "## ----------------- ##" >&5
1003   echo >&5
1004   # The following way of writing the cache mishandles newlines in values,
1005 {
1006   (set) 2>&1 |
1007     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1008     *ac_space=\ *)
1009       sed -n \
1010         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1011           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1012       ;;
1013     *)
1014       sed -n \
1015         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1016       ;;
1017     esac;
1018 } >&5
1019   sed "/^$/d" confdefs.h >conftest.log
1020   if test -s conftest.log; then
1021     echo >&5
1022     echo "## ------------ ##" >&5
1023     echo "## confdefs.h.  ##" >&5
1024     echo "## ------------ ##" >&5
1025     echo >&5
1026     cat conftest.log >&5
1027   fi
1028   (echo; echo) >&5
1029   test "$ac_signal" != 0 &&
1030     echo "$as_me: caught signal $ac_signal" >&5
1031   echo "$as_me: exit $exit_status" >&5
1032   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1033     exit $exit_status
1034      ' 0
1035 for ac_signal in 1 2 13 15; do
1036   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1037 done
1038 ac_signal=0
1039
1040 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1041 rm -rf conftest* confdefs.h
1042 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1043 echo >confdefs.h
1044
1045 # Let the site file select an alternate cache file if it wants to.
1046 # Prefer explicitly selected file to automatically selected ones.
1047 if test -z "$CONFIG_SITE"; then
1048   if test "x$prefix" != xNONE; then
1049     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1050   else
1051     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1052   fi
1053 fi
1054 for ac_site_file in $CONFIG_SITE; do
1055   if test -r "$ac_site_file"; then
1056     { echo "$as_me:1056: loading site script $ac_site_file" >&5
1057 echo "$as_me: loading site script $ac_site_file" >&6;}
1058     cat "$ac_site_file" >&5
1059     . "$ac_site_file"
1060   fi
1061 done
1062
1063 if test -r "$cache_file"; then
1064   # Some versions of bash will fail to source /dev/null (special
1065   # files actually), so we avoid doing that.
1066   if test -f "$cache_file"; then
1067     { echo "$as_me:1067: loading cache $cache_file" >&5
1068 echo "$as_me: loading cache $cache_file" >&6;}
1069     case $cache_file in
1070       [\\/]* | ?:[\\/]* ) . $cache_file;;
1071       *)                      . ./$cache_file;;
1072     esac
1073   fi
1074 else
1075   { echo "$as_me:1075: creating cache $cache_file" >&5
1076 echo "$as_me: creating cache $cache_file" >&6;}
1077   >$cache_file
1078 fi
1079
1080 # Check that the precious variables saved in the cache have kept the same
1081 # value.
1082 ac_cache_corrupted=false
1083 for ac_var in `(set) 2>&1 |
1084                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1085   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1086   eval ac_new_set=\$ac_env_${ac_var}_set
1087   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1088   eval ac_new_val="\$ac_env_${ac_var}_value"
1089   case $ac_old_set,$ac_new_set in
1090     set,)
1091       { echo "$as_me:1091: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1092 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1093       ac_cache_corrupted=: ;;
1094     ,set)
1095       { echo "$as_me:1095: error: \`$ac_var' was not set in the previous run" >&5
1096 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1097       ac_cache_corrupted=: ;;
1098     ,);;
1099     *)
1100       if test "x$ac_old_val" != "x$ac_new_val"; then
1101         { echo "$as_me:1101: error: \`$ac_var' has changed since the previous run:" >&5
1102 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1103         { echo "$as_me:1103:   former value:  $ac_old_val" >&5
1104 echo "$as_me:   former value:  $ac_old_val" >&2;}
1105         { echo "$as_me:1105:   current value: $ac_new_val" >&5
1106 echo "$as_me:   current value: $ac_new_val" >&2;}
1107         ac_cache_corrupted=:
1108       fi;;
1109   esac
1110   # Pass precious variables to config.status.  It doesn't matter if
1111   # we pass some twice (in addition to the command line arguments).
1112   if test "$ac_new_set" = set; then
1113     case $ac_new_val in
1114     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1115       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1116       ac_configure_args="$ac_configure_args '$ac_arg'"
1117       ;;
1118     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1119        ;;
1120     esac
1121   fi
1122 done
1123 if $ac_cache_corrupted; then
1124   { echo "$as_me:1124: error: changes in the environment can compromise the build" >&5
1125 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1126   { { echo "$as_me:1126: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1127 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1128    { (exit 1); exit 1; }; }
1129 fi
1130
1131 ac_ext=c
1132 ac_cpp='$CPP $CPPFLAGS'
1133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1136 ac_main_return=return
1137
1138 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1139   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1140                    ECHO_T='     ' ;;
1141   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1142   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1143 esac
1144 echo "#! $SHELL" >conftest.sh
1145 echo  "exit 0"   >>conftest.sh
1146 chmod +x conftest.sh
1147 if { (echo "$as_me:1147: PATH=\".;.\"; conftest.sh") >&5
1148   (PATH=".;."; conftest.sh) 2>&5
1149   ac_status=$?
1150   echo "$as_me:1150: \$? = $ac_status" >&5
1151   (exit $ac_status); }; then
1152   ac_path_separator=';'
1153 else
1154   ac_path_separator=:
1155 fi
1156 PATH_SEPARATOR="$ac_path_separator"
1157 rm -f conftest.sh
1158
1159 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1160
1161 top_builddir=`pwd`
1162
1163 echo "$as_me:1163: checking for egrep" >&5
1164 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1165 if test "${ac_cv_prog_egrep+set}" = set; then
1166   echo $ECHO_N "(cached) $ECHO_C" >&6
1167 else
1168   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1169                 then ac_cv_prog_egrep='grep -E'
1170                 else ac_cv_prog_egrep='egrep'
1171         fi
1172 fi
1173 echo "$as_me:1173: result: $ac_cv_prog_egrep" >&5
1174 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1175         EGREP=$ac_cv_prog_egrep
1176
1177         test -z "$EGREP" && { { echo "$as_me:1177: error: No egrep program found" >&5
1178 echo "$as_me: error: No egrep program found" >&2;}
1179    { (exit 1); exit 1; }; }
1180
1181 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1182 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1183 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1184 cf_cv_abi_version=${NCURSES_MAJOR}
1185 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1186 cf_cv_timestamp=`date`
1187 echo "$as_me:1187: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1188 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1189
1190 if test -f $srcdir/VERSION ; then
1191         echo "$as_me:1191: checking for package version" >&5
1192 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1193
1194         # if there are not enough fields, cut returns the last one...
1195         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1196         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1197         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1198
1199         # this is how CF_BUNDLED_INTL uses $VERSION:
1200         VERSION="$cf_field1"
1201
1202         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1203         test -z "$VERSION_MAJOR" && { { echo "$as_me:1203: error: missing major-version" >&5
1204 echo "$as_me: error: missing major-version" >&2;}
1205    { (exit 1); exit 1; }; }
1206
1207         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1208         test -z "$VERSION_MINOR" && { { echo "$as_me:1208: error: missing minor-version" >&5
1209 echo "$as_me: error: missing minor-version" >&2;}
1210    { (exit 1); exit 1; }; }
1211
1212         echo "$as_me:1212: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1213 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1214
1215         echo "$as_me:1215: checking for package patch date" >&5
1216 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1217         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1218         case .$VERSION_PATCH in
1219         (.)
1220                 { { echo "$as_me:1220: error: missing patch-date $VERSION_PATCH" >&5
1221 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1222    { (exit 1); exit 1; }; }
1223                 ;;
1224         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1225                 ;;
1226         (*)
1227                 { { echo "$as_me:1227: error: illegal patch-date $VERSION_PATCH" >&5
1228 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1229    { (exit 1); exit 1; }; }
1230                 ;;
1231         esac
1232         echo "$as_me:1232: result: $VERSION_PATCH" >&5
1233 echo "${ECHO_T}$VERSION_PATCH" >&6
1234 else
1235         { { echo "$as_me:1235: error: did not find $srcdir/VERSION" >&5
1236 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1237    { (exit 1); exit 1; }; }
1238 fi
1239
1240 # show the actual data that we have for versions:
1241 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing ABI VERSION $VERSION ..." 1>&5
1244
1245 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1246
1247 echo "${as_me:-configure}:1247: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1248
1249 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1250
1251 echo "${as_me:-configure}:1251: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1252
1253 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1254
1255 echo "${as_me:-configure}:1255: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1256
1257         cf_PACKAGE=NCURSES
1258         PACKAGE=ncurses
1259
1260 cat >>confdefs.h <<EOF
1261 #define PACKAGE "$PACKAGE"
1262 EOF
1263
1264 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1265
1266         cat >>confdefs.h <<EOF
1267 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1268 EOF
1269
1270         cat >>confdefs.h <<EOF
1271 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1272 EOF
1273
1274 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1275
1276 # Check whether --with-rel-version or --without-rel-version was given.
1277 if test "${with_rel_version+set}" = set; then
1278   withval="$with_rel_version"
1279   { echo "$as_me:1279: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1280 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1281  cf_cv_rel_version=$withval
1282 fi;
1283
1284  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1285  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1286
1287 if test -n "$NCURSES_MAJOR" ; then
1288   case $NCURSES_MAJOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1293 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release major-version value is empty" >&5
1299 echo "$as_me: error: Release major-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 if test -n "$NCURSES_MINOR" ; then
1304   case $NCURSES_MINOR in
1305   ([0-9]*)
1306         ;;
1307   (*)
1308         { { echo "$as_me:1308: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1309 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1310    { (exit 1); exit 1; }; }
1311         ;;
1312   esac
1313 else
1314   { { echo "$as_me:1314: error: Release minor-version value is empty" >&5
1315 echo "$as_me: error: Release minor-version value is empty" >&2;}
1316    { (exit 1); exit 1; }; }
1317 fi
1318
1319 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1320
1321 # Check whether --with-abi-version or --without-abi-version was given.
1322 if test "${with_abi_version+set}" = set; then
1323   withval="$with_abi_version"
1324
1325         if test "x$cf_cv_abi_version" != "x$withval"
1326         then
1327                 { echo "$as_me:1327: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1328 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1329                 case $cf_cv_rel_version in
1330                 (5.*)
1331                         cf_cv_rel_version=$withval.0
1332                         ;;
1333                 (6.*)
1334                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1335                         ;;
1336                 esac
1337         fi
1338         cf_cv_abi_version=$withval
1339 fi;
1340
1341 if test -n "$cf_cv_abi_version" ; then
1342   case $cf_cv_abi_version in
1343   ([0-9]*)
1344         ;;
1345   (*)
1346         { { echo "$as_me:1346: error: ABI version is not a number: $cf_cv_abi_version" >&5
1347 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1348    { (exit 1); exit 1; }; }
1349         ;;
1350   esac
1351 else
1352   { { echo "$as_me:1352: error: ABI version value is empty" >&5
1353 echo "$as_me: error: ABI version value is empty" >&2;}
1354    { (exit 1); exit 1; }; }
1355 fi
1356
1357 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1358 then
1359         case $cf_cv_rel_version in
1360         (5.*)
1361                 cf_cv_rel_version=$with_abi_version.0
1362                 ;;
1363         esac
1364 fi
1365
1366 ac_aux_dir=
1367 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1368   if test -f $ac_dir/install-sh; then
1369     ac_aux_dir=$ac_dir
1370     ac_install_sh="$ac_aux_dir/install-sh -c"
1371     break
1372   elif test -f $ac_dir/install.sh; then
1373     ac_aux_dir=$ac_dir
1374     ac_install_sh="$ac_aux_dir/install.sh -c"
1375     break
1376   elif test -f $ac_dir/shtool; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/shtool install -c"
1379     break
1380   fi
1381 done
1382 if test -z "$ac_aux_dir"; then
1383   { { echo "$as_me:1383: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1384 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1385    { (exit 1); exit 1; }; }
1386 fi
1387 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1390
1391 # Make sure we can run config.sub.
1392 $ac_config_sub sun4 >/dev/null 2>&1 ||
1393   { { echo "$as_me:1393: error: cannot run $ac_config_sub" >&5
1394 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 echo "$as_me:1397: checking build system type" >&5
1398 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1399 if test "${ac_cv_build+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   ac_cv_build_alias=$build_alias
1403 test -z "$ac_cv_build_alias" &&
1404   ac_cv_build_alias=`$ac_config_guess`
1405 test -z "$ac_cv_build_alias" &&
1406   { { echo "$as_me:1406: error: cannot guess build type; you must specify one" >&5
1407 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1408    { (exit 1); exit 1; }; }
1409 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_build" >&5
1416 echo "${ECHO_T}$ac_cv_build" >&6
1417 build=$ac_cv_build
1418 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 echo "$as_me:1422: checking host system type" >&5
1423 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1424 if test "${ac_cv_host+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_host_alias=$host_alias
1428 test -z "$ac_cv_host_alias" &&
1429   ac_cv_host_alias=$ac_cv_build_alias
1430 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_host" >&5
1437 echo "${ECHO_T}$ac_cv_host" >&6
1438 host=$ac_cv_host
1439 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1444         echo "$as_me:1444: checking target system type" >&5
1445 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1446 if test "${ac_cv_target+set}" = set; then
1447   echo $ECHO_N "(cached) $ECHO_C" >&6
1448 else
1449   ac_cv_target_alias=$target_alias
1450 test "x$ac_cv_target_alias" = "x" &&
1451   ac_cv_target_alias=$ac_cv_host_alias
1452 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1453   { { echo "$as_me:1453: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1454 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1455    { (exit 1); exit 1; }; }
1456
1457 fi
1458 echo "$as_me:1458: result: $ac_cv_target" >&5
1459 echo "${ECHO_T}$ac_cv_target" >&6
1460 target=$ac_cv_target
1461 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1462 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1463 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1464
1465 # The aliases save the names the user supplied, while $host etc.
1466 # will get canonicalized.
1467 test -n "$target_alias" &&
1468   test "$program_prefix$program_suffix$program_transform_name" = \
1469     NONENONEs,x,x, &&
1470   program_prefix=${target_alias}-
1471         system_name="$host_os"
1472 else
1473         system_name="`(uname -s -r) 2>/dev/null`"
1474         if test -z "$system_name" ; then
1475                 system_name="`(hostname) 2>/dev/null`"
1476         fi
1477 fi
1478 test -n "$system_name" &&
1479 cat >>confdefs.h <<EOF
1480 #define SYSTEM_NAME "$system_name"
1481 EOF
1482
1483 if test "${cf_cv_system_name+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   cf_cv_system_name="$system_name"
1487 fi
1488
1489 test -z "$system_name" && system_name="$cf_cv_system_name"
1490 test -n "$cf_cv_system_name" && echo "$as_me:1490: result: Configuring for $cf_cv_system_name" >&5
1491 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1492
1493 if test ".$system_name" != ".$cf_cv_system_name" ; then
1494         echo "$as_me:1494: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1495 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1496         { { echo "$as_me:1496: error: \"Please remove config.cache and try again.\"" >&5
1497 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1498    { (exit 1); exit 1; }; }
1499 fi
1500
1501 # Check whether --with-system-type or --without-system-type was given.
1502 if test "${with_system_type+set}" = set; then
1503   withval="$with_system_type"
1504   { echo "$as_me:1504: WARNING: overriding system type to $withval" >&5
1505 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1506         cf_cv_system_name=$withval
1507         host_os=$withval
1508
1509 fi;
1510
1511 ###     Save the given $CFLAGS to allow user-override.
1512 cf_user_CFLAGS="$CFLAGS"
1513
1514 ###     Default install-location
1515
1516 echo "$as_me:1516: checking for prefix" >&5
1517 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1518 if test "x$prefix" = "xNONE" ; then
1519         case "$cf_cv_system_name" in
1520                 # non-vendor systems don't have a conflict
1521         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1522                 prefix=/usr
1523                 ;;
1524         (*)     prefix=$ac_default_prefix
1525                 ;;
1526         esac
1527 fi
1528 echo "$as_me:1528: result: $prefix" >&5
1529 echo "${ECHO_T}$prefix" >&6
1530
1531 if test "x$prefix" = "xNONE" ; then
1532 echo "$as_me:1532: checking for default include-directory" >&5
1533 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1534 test -n "$verbose" && echo 1>&6
1535 for cf_symbol in \
1536         $includedir \
1537         $includedir/ncurses \
1538         $prefix/include \
1539         $prefix/include/ncurses \
1540         /usr/local/include \
1541         /usr/local/include/ncurses \
1542         /usr/include \
1543         /usr/include/ncurses
1544 do
1545         cf_dir=`eval echo $cf_symbol`
1546         if test -f $cf_dir/curses.h ; then
1547         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1548                 includedir="$cf_symbol"
1549                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1550                 break
1551         fi
1552         fi
1553         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1554 done
1555 echo "$as_me:1555: result: $includedir" >&5
1556 echo "${ECHO_T}$includedir" >&6
1557 fi
1558
1559 ### Defaults for ncurses ABI
1560
1561 case x$cf_cv_abi_version in
1562 (x[6789])
1563         cf_dft_ext_colors=yes
1564         cf_dft_ext_const=yes
1565         cf_dft_ext_mouse=yes
1566         cf_dft_ext_putwin=yes
1567         cf_dft_ext_spfuncs=yes
1568         cf_dft_filter_syms=yes
1569         cf_dft_chtype=uint32_t
1570         cf_dft_mmask_t=uint32_t
1571         cf_dft_interop=yes
1572         cf_dft_tparm_arg=intptr_t
1573         cf_dft_with_lp64=yes
1574         ;;
1575 (*)
1576         cf_dft_ext_colors=no
1577         cf_dft_ext_const=no
1578         cf_dft_ext_mouse=no
1579         cf_dft_ext_putwin=no
1580         cf_dft_ext_spfuncs=no
1581         cf_dft_filter_syms=no
1582         cf_dft_chtype=auto
1583         cf_dft_mmask_t=auto
1584         cf_dft_interop=no
1585         cf_dft_tparm_arg=long
1586         cf_dft_with_lp64=no
1587         ;;
1588 esac
1589
1590 ###     Checks for programs.
1591
1592 # Check whether --with-ada or --without-ada was given.
1593 if test "${with_ada+set}" = set; then
1594   withval="$with_ada"
1595   cf_with_ada=$withval
1596 else
1597   cf_with_ada=yes
1598 fi;
1599 if test "x$cf_with_ada" = xyes
1600 then
1601         cf_PROG_CC="gnatgcc gcc cc"
1602 else
1603         cf_PROG_CC="gcc cc"
1604 fi
1605
1606 ac_ext=c
1607 ac_cpp='$CPP $CPPFLAGS'
1608 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1609 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1611 ac_main_return=return
1612 if test -n "$ac_tool_prefix"; then
1613   for ac_prog in $cf_PROG_CC
1614   do
1615     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1616 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1617 echo "$as_me:1617: checking for $ac_word" >&5
1618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1619 if test "${ac_cv_prog_CC+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   ac_save_IFS=$IFS; IFS=$ac_path_separator
1626 ac_dummy="$PATH"
1627 for ac_dir in $ac_dummy; do
1628   IFS=$ac_save_IFS
1629   test -z "$ac_dir" && ac_dir=.
1630   $as_executable_p "$ac_dir/$ac_word" || continue
1631 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:1632: found $ac_dir/$ac_word" >&5
1633 break
1634 done
1635
1636 fi
1637 fi
1638 CC=$ac_cv_prog_CC
1639 if test -n "$CC"; then
1640   echo "$as_me:1640: result: $CC" >&5
1641 echo "${ECHO_T}$CC" >&6
1642 else
1643   echo "$as_me:1643: result: no" >&5
1644 echo "${ECHO_T}no" >&6
1645 fi
1646
1647     test -n "$CC" && break
1648   done
1649 fi
1650 if test -z "$CC"; then
1651   ac_ct_CC=$CC
1652   for ac_prog in $cf_PROG_CC
1653 do
1654   # Extract the first word of "$ac_prog", so it can be a program name with args.
1655 set dummy $ac_prog; ac_word=$2
1656 echo "$as_me:1656: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664   ac_save_IFS=$IFS; IFS=$ac_path_separator
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667   IFS=$ac_save_IFS
1668   test -z "$ac_dir" && ac_dir=.
1669   $as_executable_p "$ac_dir/$ac_word" || continue
1670 ac_cv_prog_ac_ct_CC="$ac_prog"
1671 echo "$as_me:1671: found $ac_dir/$ac_word" >&5
1672 break
1673 done
1674
1675 fi
1676 fi
1677 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1678 if test -n "$ac_ct_CC"; then
1679   echo "$as_me:1679: result: $ac_ct_CC" >&5
1680 echo "${ECHO_T}$ac_ct_CC" >&6
1681 else
1682   echo "$as_me:1682: result: no" >&5
1683 echo "${ECHO_T}no" >&6
1684 fi
1685
1686   test -n "$ac_ct_CC" && break
1687 done
1688
1689   CC=$ac_ct_CC
1690 fi
1691
1692 test -z "$CC" && { { echo "$as_me:1692: error: no acceptable cc found in \$PATH" >&5
1693 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1694    { (exit 1); exit 1; }; }
1695
1696 # Provide some information about the compiler.
1697 echo "$as_me:1697:" \
1698      "checking for C compiler version" >&5
1699 ac_compiler=`set X $ac_compile; echo $2`
1700 { (eval echo "$as_me:1700: \"$ac_compiler --version </dev/null >&5\"") >&5
1701   (eval $ac_compiler --version </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705 { (eval echo "$as_me:1705: \"$ac_compiler -v </dev/null >&5\"") >&5
1706   (eval $ac_compiler -v </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -V </dev/null >&5\"") >&5
1711   (eval $ac_compiler -V </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715
1716 cat >conftest.$ac_ext <<_ACEOF
1717 #line 1717 "configure"
1718 #include "confdefs.h"
1719
1720 int
1721 main (void)
1722 {
1723
1724   ;
1725   return 0;
1726 }
1727 _ACEOF
1728 ac_clean_files_save=$ac_clean_files
1729 ac_clean_files="$ac_clean_files a.out a.exe"
1730 # Try to create an executable without -o first, disregard a.out.
1731 # It will help us diagnose broken compilers, and finding out an intuition
1732 # of exeext.
1733 echo "$as_me:1733: checking for C compiler default output" >&5
1734 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1735 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1736 if { (eval echo "$as_me:1736: \"$ac_link_default\"") >&5
1737   (eval $ac_link_default) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; then
1741   # Find the output, starting from the most likely.  This scheme is
1742 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1743 # resort.
1744 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1745                 ls a.out conftest 2>/dev/null;
1746                 ls a.* conftest.* 2>/dev/null`; do
1747   case $ac_file in
1748     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1749     a.out ) # We found the default executable, but exeext='' is most
1750             # certainly right.
1751             break;;
1752     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1753           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1754           export ac_cv_exeext
1755           break;;
1756     * ) break;;
1757   esac
1758 done
1759 else
1760   echo "$as_me: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 { { echo "$as_me:1762: error: C compiler cannot create executables" >&5
1763 echo "$as_me: error: C compiler cannot create executables" >&2;}
1764    { (exit 77); exit 77; }; }
1765 fi
1766
1767 ac_exeext=$ac_cv_exeext
1768 echo "$as_me:1768: result: $ac_file" >&5
1769 echo "${ECHO_T}$ac_file" >&6
1770
1771 # Check the compiler produces executables we can run.  If not, either
1772 # the compiler is broken, or we cross compile.
1773 echo "$as_me:1773: checking whether the C compiler works" >&5
1774 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1775 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1776 # If not cross compiling, check that we can run a simple program.
1777 if test "$cross_compiling" != yes; then
1778   if { ac_try='./$ac_file'
1779   { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780   (eval $ac_try) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); }; }; then
1784     cross_compiling=no
1785   else
1786     if test "$cross_compiling" = maybe; then
1787         cross_compiling=yes
1788     else
1789         { { echo "$as_me:1789: error: cannot run C compiled programs.
1790 If you meant to cross compile, use \`--host'." >&5
1791 echo "$as_me: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&2;}
1793    { (exit 1); exit 1; }; }
1794     fi
1795   fi
1796 fi
1797 echo "$as_me:1797: result: yes" >&5
1798 echo "${ECHO_T}yes" >&6
1799
1800 rm -f a.out a.exe conftest$ac_cv_exeext
1801 ac_clean_files=$ac_clean_files_save
1802 # Check the compiler produces executables we can run.  If not, either
1803 # the compiler is broken, or we cross compile.
1804 echo "$as_me:1804: checking whether we are cross compiling" >&5
1805 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1806 echo "$as_me:1806: result: $cross_compiling" >&5
1807 echo "${ECHO_T}$cross_compiling" >&6
1808
1809 echo "$as_me:1809: checking for executable suffix" >&5
1810 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1811 if { (eval echo "$as_me:1811: \"$ac_link\"") >&5
1812   (eval $ac_link) 2>&5
1813   ac_status=$?
1814   echo "$as_me:1814: \$? = $ac_status" >&5
1815   (exit $ac_status); }; then
1816   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1817 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1818 # work properly (i.e., refer to `conftest.exe'), while it won't with
1819 # `rm'.
1820 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1821   case $ac_file in
1822     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1823     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824           export ac_cv_exeext
1825           break;;
1826     * ) break;;
1827   esac
1828 done
1829 else
1830   { { echo "$as_me:1830: error: cannot compute EXEEXT: cannot compile and link" >&5
1831 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1832    { (exit 1); exit 1; }; }
1833 fi
1834
1835 rm -f conftest$ac_cv_exeext
1836 echo "$as_me:1836: result: $ac_cv_exeext" >&5
1837 echo "${ECHO_T}$ac_cv_exeext" >&6
1838
1839 rm -f conftest.$ac_ext
1840 EXEEXT=$ac_cv_exeext
1841 ac_exeext=$EXEEXT
1842 echo "$as_me:1842: checking for object suffix" >&5
1843 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1844 if test "${ac_cv_objext+set}" = set; then
1845   echo $ECHO_N "(cached) $ECHO_C" >&6
1846 else
1847   cat >conftest.$ac_ext <<_ACEOF
1848 #line 1848 "configure"
1849 #include "confdefs.h"
1850
1851 int
1852 main (void)
1853 {
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.o conftest.obj
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); }; then
1865   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1866   case $ac_file in
1867     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1868     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1869        break;;
1870   esac
1871 done
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 { { echo "$as_me:1875: error: cannot compute OBJEXT: cannot compile" >&5
1876 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1877    { (exit 1); exit 1; }; }
1878 fi
1879
1880 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1881 fi
1882 echo "$as_me:1882: result: $ac_cv_objext" >&5
1883 echo "${ECHO_T}$ac_cv_objext" >&6
1884 OBJEXT=$ac_cv_objext
1885 ac_objext=$OBJEXT
1886 echo "$as_me:1886: checking whether we are using the GNU C compiler" >&5
1887 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1888 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1889   echo $ECHO_N "(cached) $ECHO_C" >&6
1890 else
1891   cat >conftest.$ac_ext <<_ACEOF
1892 #line 1892 "configure"
1893 #include "confdefs.h"
1894
1895 int
1896 main (void)
1897 {
1898 #ifndef __GNUC__
1899        choke me
1900 #endif
1901
1902   ;
1903   return 0;
1904 }
1905 _ACEOF
1906 rm -f conftest.$ac_objext
1907 if { (eval echo "$as_me:1907: \"$ac_compile\"") >&5
1908   (eval $ac_compile) 2>&5
1909   ac_status=$?
1910   echo "$as_me:1910: \$? = $ac_status" >&5
1911   (exit $ac_status); } &&
1912          { ac_try='test -s conftest.$ac_objext'
1913   { (eval echo "$as_me:1913: \"$ac_try\"") >&5
1914   (eval $ac_try) 2>&5
1915   ac_status=$?
1916   echo "$as_me:1916: \$? = $ac_status" >&5
1917   (exit $ac_status); }; }; then
1918   ac_compiler_gnu=yes
1919 else
1920   echo "$as_me: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1922 ac_compiler_gnu=no
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1926
1927 fi
1928 echo "$as_me:1928: result: $ac_cv_c_compiler_gnu" >&5
1929 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1930 GCC=`test $ac_compiler_gnu = yes && echo yes`
1931 ac_test_CFLAGS=${CFLAGS+set}
1932 ac_save_CFLAGS=$CFLAGS
1933 CFLAGS="-g"
1934 echo "$as_me:1934: checking whether $CC accepts -g" >&5
1935 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1936 if test "${ac_cv_prog_cc_g+set}" = set; then
1937   echo $ECHO_N "(cached) $ECHO_C" >&6
1938 else
1939   cat >conftest.$ac_ext <<_ACEOF
1940 #line 1940 "configure"
1941 #include "confdefs.h"
1942
1943 int
1944 main (void)
1945 {
1946
1947   ;
1948   return 0;
1949 }
1950 _ACEOF
1951 rm -f conftest.$ac_objext
1952 if { (eval echo "$as_me:1952: \"$ac_compile\"") >&5
1953   (eval $ac_compile) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit $ac_status); } &&
1957          { ac_try='test -s conftest.$ac_objext'
1958   { (eval echo "$as_me:1958: \"$ac_try\"") >&5
1959   (eval $ac_try) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); }; }; then
1963   ac_cv_prog_cc_g=yes
1964 else
1965   echo "$as_me: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1967 ac_cv_prog_cc_g=no
1968 fi
1969 rm -f conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 echo "$as_me:1971: result: $ac_cv_prog_cc_g" >&5
1972 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1973 if test "$ac_test_CFLAGS" = set; then
1974   CFLAGS=$ac_save_CFLAGS
1975 elif test $ac_cv_prog_cc_g = yes; then
1976   if test "$GCC" = yes; then
1977     CFLAGS="-g -O2"
1978   else
1979     CFLAGS="-g"
1980   fi
1981 else
1982   if test "$GCC" = yes; then
1983     CFLAGS="-O2"
1984   else
1985     CFLAGS=
1986   fi
1987 fi
1988 # Some people use a C++ compiler to compile C.  Since we use `exit',
1989 # in C++ we need to declare it.  In case someone uses the same compiler
1990 # for both compiling C and C++ we need to have the C++ compiler decide
1991 # the declaration of exit, since it's the most demanding environment.
1992 cat >conftest.$ac_ext <<_ACEOF
1993 #ifndef __cplusplus
1994   choke me
1995 #endif
1996 _ACEOF
1997 rm -f conftest.$ac_objext
1998 if { (eval echo "$as_me:1998: \"$ac_compile\"") >&5
1999   (eval $ac_compile) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); } &&
2003          { ac_try='test -s conftest.$ac_objext'
2004   { (eval echo "$as_me:2004: \"$ac_try\"") >&5
2005   (eval $ac_try) 2>&5
2006   ac_status=$?
2007   echo "$as_me:2007: \$? = $ac_status" >&5
2008   (exit $ac_status); }; }; then
2009   for ac_declaration in \
2010    ''\
2011    '#include <stdlib.h>' \
2012    'extern "C" void std::exit (int) throw (); using std::exit;' \
2013    'extern "C" void std::exit (int); using std::exit;' \
2014    'extern "C" void exit (int) throw ();' \
2015    'extern "C" void exit (int);' \
2016    'void exit (int);'
2017 do
2018   cat >conftest.$ac_ext <<_ACEOF
2019 #line 2019 "configure"
2020 #include "confdefs.h"
2021 #include <stdlib.h>
2022 $ac_declaration
2023 int
2024 main (void)
2025 {
2026 exit (42);
2027   ;
2028   return 0;
2029 }
2030 _ACEOF
2031 rm -f conftest.$ac_objext
2032 if { (eval echo "$as_me:2032: \"$ac_compile\"") >&5
2033   (eval $ac_compile) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit $ac_status); } &&
2037          { ac_try='test -s conftest.$ac_objext'
2038   { (eval echo "$as_me:2038: \"$ac_try\"") >&5
2039   (eval $ac_try) 2>&5
2040   ac_status=$?
2041   echo "$as_me:2041: \$? = $ac_status" >&5
2042   (exit $ac_status); }; }; then
2043   :
2044 else
2045   echo "$as_me: failed program was:" >&5
2046 cat conftest.$ac_ext >&5
2047 continue
2048 fi
2049 rm -f conftest.$ac_objext conftest.$ac_ext
2050   cat >conftest.$ac_ext <<_ACEOF
2051 #line 2051 "configure"
2052 #include "confdefs.h"
2053 $ac_declaration
2054 int
2055 main (void)
2056 {
2057 exit (42);
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 rm -f conftest.$ac_objext
2063 if { (eval echo "$as_me:2063: \"$ac_compile\"") >&5
2064   (eval $ac_compile) 2>&5
2065   ac_status=$?
2066   echo "$as_me:2066: \$? = $ac_status" >&5
2067   (exit $ac_status); } &&
2068          { ac_try='test -s conftest.$ac_objext'
2069   { (eval echo "$as_me:2069: \"$ac_try\"") >&5
2070   (eval $ac_try) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit $ac_status); }; }; then
2074   break
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 done
2081 rm -rf conftest*
2082 if test -n "$ac_declaration"; then
2083   echo '#ifdef __cplusplus' >>confdefs.h
2084   echo $ac_declaration      >>confdefs.h
2085   echo '#endif'             >>confdefs.h
2086 fi
2087
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 fi
2092 rm -f conftest.$ac_objext conftest.$ac_ext
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 ac_main_return=return
2099
2100 GCC_VERSION=none
2101 if test "$GCC" = yes ; then
2102         echo "$as_me:2102: checking version of $CC" >&5
2103 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2104         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.].*//'`"
2105         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2106         echo "$as_me:2106: result: $GCC_VERSION" >&5
2107 echo "${ECHO_T}$GCC_VERSION" >&6
2108 fi
2109
2110 echo "$as_me:2110: checking for $CC option to accept ANSI C" >&5
2111 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2112 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115   ac_cv_prog_cc_stdc=no
2116 ac_save_CC=$CC
2117 cat >conftest.$ac_ext <<_ACEOF
2118 #line 2118 "configure"
2119 #include "confdefs.h"
2120 #include <stdarg.h>
2121 #include <stdio.h>
2122 #include <sys/types.h>
2123 #include <sys/stat.h>
2124 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2125 struct buf { int x; };
2126 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2127 static char *e (p, i)
2128      char **p;
2129      int i;
2130 {
2131   return p[i];
2132 }
2133 static char *f (char * (*g) (char **, int), char **p, ...)
2134 {
2135   char *s;
2136   va_list v;
2137   va_start (v,p);
2138   s = g (p, va_arg (v,int));
2139   va_end (v);
2140   return s;
2141 }
2142 int test (int i, double x);
2143 struct s1 {int (*f) (int a);};
2144 struct s2 {int (*f) (double a);};
2145 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2146 int argc;
2147 char **argv;
2148 int
2149 main (void)
2150 {
2151 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2152   ;
2153   return 0;
2154 }
2155 _ACEOF
2156 # Don't try gcc -ansi; that turns off useful extensions and
2157 # breaks some systems' header files.
2158 # AIX                   -qlanglvl=ansi
2159 # Ultrix and OSF/1      -std1
2160 # HP-UX 10.20 and later -Ae
2161 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2162 # SVR4                  -Xc -D__EXTENSIONS__
2163 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2164 do
2165   CC="$ac_save_CC $ac_arg"
2166   rm -f conftest.$ac_objext
2167 if { (eval echo "$as_me:2167: \"$ac_compile\"") >&5
2168   (eval $ac_compile) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit $ac_status); } &&
2172          { ac_try='test -s conftest.$ac_objext'
2173   { (eval echo "$as_me:2173: \"$ac_try\"") >&5
2174   (eval $ac_try) 2>&5
2175   ac_status=$?
2176   echo "$as_me:2176: \$? = $ac_status" >&5
2177   (exit $ac_status); }; }; then
2178   ac_cv_prog_cc_stdc=$ac_arg
2179 break
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat conftest.$ac_ext >&5
2183 fi
2184 rm -f conftest.$ac_objext
2185 done
2186 rm -f conftest.$ac_ext conftest.$ac_objext
2187 CC=$ac_save_CC
2188
2189 fi
2190
2191 case "x$ac_cv_prog_cc_stdc" in
2192   x|xno)
2193     echo "$as_me:2193: result: none needed" >&5
2194 echo "${ECHO_T}none needed" >&6 ;;
2195   *)
2196     echo "$as_me:2196: result: $ac_cv_prog_cc_stdc" >&5
2197 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2198     CC="$CC $ac_cv_prog_cc_stdc" ;;
2199 esac
2200
2201 # This should have been defined by AC_PROG_CC
2202 : ${CC:=cc}
2203
2204 echo "$as_me:2204: checking \$CFLAGS variable" >&5
2205 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2206 case "x$CFLAGS" in
2207 (*-[IUD]*)
2208         echo "$as_me:2208: result: broken" >&5
2209 echo "${ECHO_T}broken" >&6
2210         { echo "$as_me:2210: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2211 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2212         cf_flags="$CFLAGS"
2213         CFLAGS=
2214         for cf_arg in $cf_flags
2215         do
2216
2217 cf_fix_cppflags=no
2218 cf_new_cflags=
2219 cf_new_cppflags=
2220 cf_new_extra_cppflags=
2221
2222 for cf_add_cflags in $cf_arg
2223 do
2224 case $cf_fix_cppflags in
2225 (no)
2226         case $cf_add_cflags in
2227         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2228                 case $cf_add_cflags in
2229                 (-D*)
2230                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2231
2232                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2233                                 && test -z "${cf_tst_cflags}" \
2234                                 && cf_fix_cppflags=yes
2235
2236                         if test $cf_fix_cppflags = yes ; then
2237
2238         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2239         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2240
2241                                 continue
2242                         elif test "${cf_tst_cflags}" = "\"'" ; then
2243
2244         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2245         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2246
2247                                 continue
2248                         fi
2249                         ;;
2250                 esac
2251                 case "$CPPFLAGS" in
2252                 (*$cf_add_cflags)
2253                         ;;
2254                 (*)
2255                         case $cf_add_cflags in
2256                         (-D*)
2257                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2258
2259 CPPFLAGS=`echo "$CPPFLAGS" | \
2260         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2261                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2262
2263                                 ;;
2264                         esac
2265
2266         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2267         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2268
2269                         ;;
2270                 esac
2271                 ;;
2272         (*)
2273
2274         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2275         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2276
2277                 ;;
2278         esac
2279         ;;
2280 (yes)
2281
2282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2284
2285         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2286
2287         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2288                 && test -z "${cf_tst_cflags}" \
2289                 && cf_fix_cppflags=no
2290         ;;
2291 esac
2292 done
2293
2294 if test -n "$cf_new_cflags" ; then
2295
2296         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2297         CFLAGS="${CFLAGS}$cf_new_cflags"
2298
2299 fi
2300
2301 if test -n "$cf_new_cppflags" ; then
2302
2303         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2304         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2305
2306 fi
2307
2308 if test -n "$cf_new_extra_cppflags" ; then
2309
2310         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2311         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2312
2313 fi
2314
2315         done
2316         ;;
2317 (*)
2318         echo "$as_me:2318: result: ok" >&5
2319 echo "${ECHO_T}ok" >&6
2320         ;;
2321 esac
2322
2323 echo "$as_me:2323: checking \$CC variable" >&5
2324 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2325 case "$CC" in
2326 (*[\ \  ]-*)
2327         echo "$as_me:2327: result: broken" >&5
2328 echo "${ECHO_T}broken" >&6
2329         { echo "$as_me:2329: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2330 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2331         # humor him...
2332         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2333         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2334         CC="$cf_prog"
2335         for cf_arg in $cf_flags
2336         do
2337                 case "x$cf_arg" in
2338                 (x-[IUDfgOW]*)
2339
2340 cf_fix_cppflags=no
2341 cf_new_cflags=
2342 cf_new_cppflags=
2343 cf_new_extra_cppflags=
2344
2345 for cf_add_cflags in $cf_arg
2346 do
2347 case $cf_fix_cppflags in
2348 (no)
2349         case $cf_add_cflags in
2350         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2351                 case $cf_add_cflags in
2352                 (-D*)
2353                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2354
2355                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2356                                 && test -z "${cf_tst_cflags}" \
2357                                 && cf_fix_cppflags=yes
2358
2359                         if test $cf_fix_cppflags = yes ; then
2360
2361         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2362         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2363
2364                                 continue
2365                         elif test "${cf_tst_cflags}" = "\"'" ; then
2366
2367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2369
2370                                 continue
2371                         fi
2372                         ;;
2373                 esac
2374                 case "$CPPFLAGS" in
2375                 (*$cf_add_cflags)
2376                         ;;
2377                 (*)
2378                         case $cf_add_cflags in
2379                         (-D*)
2380                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2381
2382 CPPFLAGS=`echo "$CPPFLAGS" | \
2383         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2384                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2385
2386                                 ;;
2387                         esac
2388
2389         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2390         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2391
2392                         ;;
2393                 esac
2394                 ;;
2395         (*)
2396
2397         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2398         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2399
2400                 ;;
2401         esac
2402         ;;
2403 (yes)
2404
2405         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2406         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2407
2408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2409
2410         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2411                 && test -z "${cf_tst_cflags}" \
2412                 && cf_fix_cppflags=no
2413         ;;
2414 esac
2415 done
2416
2417 if test -n "$cf_new_cflags" ; then
2418
2419         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2420         CFLAGS="${CFLAGS}$cf_new_cflags"
2421
2422 fi
2423
2424 if test -n "$cf_new_cppflags" ; then
2425
2426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2427         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2428
2429 fi
2430
2431 if test -n "$cf_new_extra_cppflags" ; then
2432
2433         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2434         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2435
2436 fi
2437
2438                         ;;
2439                 (*)
2440                         CC="$CC $cf_arg"
2441                         ;;
2442                 esac
2443         done
2444         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2445
2446 echo "${as_me:-configure}:2446: testing resulting CC: '$CC' ..." 1>&5
2447
2448         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2449
2450 echo "${as_me:-configure}:2450: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2451
2452         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2453
2454 echo "${as_me:-configure}:2454: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2455
2456         ;;
2457 (*)
2458         echo "$as_me:2458: result: ok" >&5
2459 echo "${ECHO_T}ok" >&6
2460         ;;
2461 esac
2462
2463 ac_ext=c
2464 ac_cpp='$CPP $CPPFLAGS'
2465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2468 ac_main_return=return
2469 echo "$as_me:2469: checking how to run the C preprocessor" >&5
2470 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2471 # On Suns, sometimes $CPP names a directory.
2472 if test -n "$CPP" && test -d "$CPP"; then
2473   CPP=
2474 fi
2475 if test -z "$CPP"; then
2476   if test "${ac_cv_prog_CPP+set}" = set; then
2477   echo $ECHO_N "(cached) $ECHO_C" >&6
2478 else
2479       # Double quotes because CPP needs to be expanded
2480     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2481     do
2482       ac_preproc_ok=false
2483 for ac_c_preproc_warn_flag in '' yes
2484 do
2485   # Use a header file that comes with gcc, so configuring glibc
2486   # with a fresh cross-compiler works.
2487   # On the NeXT, cc -E runs the code through the compiler's parser,
2488   # not just through cpp. "Syntax error" is here to catch this case.
2489   cat >conftest.$ac_ext <<_ACEOF
2490 #line 2490 "configure"
2491 #include "confdefs.h"
2492 #include <assert.h>
2493                      Syntax error
2494 _ACEOF
2495 if { (eval echo "$as_me:2495: \"$ac_cpp conftest.$ac_ext\"") >&5
2496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2497   ac_status=$?
2498   egrep -v '^ *\+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:2501: \$? = $ac_status" >&5
2502   (exit $ac_status); } >/dev/null; then
2503   if test -s conftest.err; then
2504     ac_cpp_err=$ac_c_preproc_warn_flag
2505   else
2506     ac_cpp_err=
2507   fi
2508 else
2509   ac_cpp_err=yes
2510 fi
2511 if test -z "$ac_cpp_err"; then
2512   :
2513 else
2514   echo "$as_me: failed program was:" >&5
2515   cat conftest.$ac_ext >&5
2516   # Broken: fails on valid input.
2517 continue
2518 fi
2519 rm -f conftest.err conftest.$ac_ext
2520
2521   # OK, works on sane cases.  Now check whether non-existent headers
2522   # can be detected and how.
2523   cat >conftest.$ac_ext <<_ACEOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526 #include <ac_nonexistent.h>
2527 _ACEOF
2528 if { (eval echo "$as_me:2528: \"$ac_cpp conftest.$ac_ext\"") >&5
2529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530   ac_status=$?
2531   egrep -v '^ *\+' conftest.er1 >conftest.err
2532   rm -f conftest.er1
2533   cat conftest.err >&5
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit $ac_status); } >/dev/null; then
2536   if test -s conftest.err; then
2537     ac_cpp_err=$ac_c_preproc_warn_flag
2538   else
2539     ac_cpp_err=
2540   fi
2541 else
2542   ac_cpp_err=yes
2543 fi
2544 if test -z "$ac_cpp_err"; then
2545   # Broken: success on invalid input.
2546 continue
2547 else
2548   echo "$as_me: failed program was:" >&5
2549   cat conftest.$ac_ext >&5
2550   # Passes both tests.
2551 ac_preproc_ok=:
2552 break
2553 fi
2554 rm -f conftest.err conftest.$ac_ext
2555
2556 done
2557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2558 rm -f conftest.err conftest.$ac_ext
2559 if $ac_preproc_ok; then
2560   break
2561 fi
2562
2563     done
2564     ac_cv_prog_CPP=$CPP
2565
2566 fi
2567   CPP=$ac_cv_prog_CPP
2568 else
2569   ac_cv_prog_CPP=$CPP
2570 fi
2571 echo "$as_me:2571: result: $CPP" >&5
2572 echo "${ECHO_T}$CPP" >&6
2573 ac_preproc_ok=false
2574 for ac_c_preproc_warn_flag in '' yes
2575 do
2576   # Use a header file that comes with gcc, so configuring glibc
2577   # with a fresh cross-compiler works.
2578   # On the NeXT, cc -E runs the code through the compiler's parser,
2579   # not just through cpp. "Syntax error" is here to catch this case.
2580   cat >conftest.$ac_ext <<_ACEOF
2581 #line 2581 "configure"
2582 #include "confdefs.h"
2583 #include <assert.h>
2584                      Syntax error
2585 _ACEOF
2586 if { (eval echo "$as_me:2586: \"$ac_cpp conftest.$ac_ext\"") >&5
2587   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2588   ac_status=$?
2589   egrep -v '^ *\+' conftest.er1 >conftest.err
2590   rm -f conftest.er1
2591   cat conftest.err >&5
2592   echo "$as_me:2592: \$? = $ac_status" >&5
2593   (exit $ac_status); } >/dev/null; then
2594   if test -s conftest.err; then
2595     ac_cpp_err=$ac_c_preproc_warn_flag
2596   else
2597     ac_cpp_err=
2598   fi
2599 else
2600   ac_cpp_err=yes
2601 fi
2602 if test -z "$ac_cpp_err"; then
2603   :
2604 else
2605   echo "$as_me: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   # Broken: fails on valid input.
2608 continue
2609 fi
2610 rm -f conftest.err conftest.$ac_ext
2611
2612   # OK, works on sane cases.  Now check whether non-existent headers
2613   # can be detected and how.
2614   cat >conftest.$ac_ext <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2618 _ACEOF
2619 if { (eval echo "$as_me:2619: \"$ac_cpp conftest.$ac_ext\"") >&5
2620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621   ac_status=$?
2622   egrep -v '^ *\+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit $ac_status); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   # Broken: success on invalid input.
2637 continue
2638 else
2639   echo "$as_me: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   # Passes both tests.
2642 ac_preproc_ok=:
2643 break
2644 fi
2645 rm -f conftest.err conftest.$ac_ext
2646
2647 done
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err conftest.$ac_ext
2650 if $ac_preproc_ok; then
2651   :
2652 else
2653   { { echo "$as_me:2653: error: C preprocessor \"$CPP\" fails sanity check" >&5
2654 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2655    { (exit 1); exit 1; }; }
2656 fi
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663 ac_main_return=return
2664
2665 if test $ac_cv_c_compiler_gnu = yes; then
2666     echo "$as_me:2666: checking whether $CC needs -traditional" >&5
2667 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2668 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2669   echo $ECHO_N "(cached) $ECHO_C" >&6
2670 else
2671     ac_pattern="Autoconf.*'x'"
2672   cat >conftest.$ac_ext <<_ACEOF
2673 #line 2673 "configure"
2674 #include "confdefs.h"
2675 #include <sgtty.h>
2676 int Autoconf = TIOCGETP;
2677 _ACEOF
2678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2679   egrep "$ac_pattern" >/dev/null 2>&1; then
2680   ac_cv_prog_gcc_traditional=yes
2681 else
2682   ac_cv_prog_gcc_traditional=no
2683 fi
2684 rm -rf conftest*
2685
2686   if test $ac_cv_prog_gcc_traditional = no; then
2687     cat >conftest.$ac_ext <<_ACEOF
2688 #line 2688 "configure"
2689 #include "confdefs.h"
2690 #include <termio.h>
2691 int Autoconf = TCGETA;
2692 _ACEOF
2693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2694   egrep "$ac_pattern" >/dev/null 2>&1; then
2695   ac_cv_prog_gcc_traditional=yes
2696 fi
2697 rm -rf conftest*
2698
2699   fi
2700 fi
2701 echo "$as_me:2701: result: $ac_cv_prog_gcc_traditional" >&5
2702 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2703   if test $ac_cv_prog_gcc_traditional = yes; then
2704     CC="$CC -traditional"
2705   fi
2706 fi
2707
2708 echo "$as_me:2708: checking whether $CC understands -c and -o together" >&5
2709 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2710 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2711   echo $ECHO_N "(cached) $ECHO_C" >&6
2712 else
2713
2714 cat > conftest.$ac_ext <<CF_EOF
2715 int main(void)
2716 {
2717         ${cf_cv_main_return:-return}(0);
2718 }
2719 CF_EOF
2720 # We do the test twice because some compilers refuse to overwrite an
2721 # existing .o file with -o, though they will create one.
2722 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2723 if { (eval echo "$as_me:2723: \"$ac_try\"") >&5
2724   (eval $ac_try) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); } &&
2728   test -f conftest2.$ac_objext && { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); };
2733 then
2734   eval cf_cv_prog_CC_c_o=yes
2735 else
2736   eval cf_cv_prog_CC_c_o=no
2737 fi
2738 rm -rf conftest*
2739
2740 fi
2741 if test $cf_cv_prog_CC_c_o = yes; then
2742   echo "$as_me:2742: result: yes" >&5
2743 echo "${ECHO_T}yes" >&6
2744 else
2745   echo "$as_me:2745: result: no" >&5
2746 echo "${ECHO_T}no" >&6
2747 fi
2748
2749 if test "$cross_compiling" = yes ; then
2750         LDCONFIG=:
2751 else
2752         case "$cf_cv_system_name" in
2753         (dragonfly*|mirbsd*|freebsd*)
2754                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2755                 ;;
2756         (*) LDPATH=$PATH:/sbin:/usr/sbin
2757                 # Extract the first word of "ldconfig", so it can be a program name with args.
2758 set dummy ldconfig; ac_word=$2
2759 echo "$as_me:2759: checking for $ac_word" >&5
2760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2761 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2762   echo $ECHO_N "(cached) $ECHO_C" >&6
2763 else
2764   case $LDCONFIG in
2765   [\\/]* | ?:[\\/]*)
2766   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2767   ;;
2768   *)
2769   ac_save_IFS=$IFS; IFS=$ac_path_separator
2770 ac_dummy="$LDPATH"
2771 for ac_dir in $ac_dummy; do
2772   IFS=$ac_save_IFS
2773   test -z "$ac_dir" && ac_dir=.
2774   if $as_executable_p "$ac_dir/$ac_word"; then
2775    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2776    echo "$as_me:2776: found $ac_dir/$ac_word" >&5
2777    break
2778 fi
2779 done
2780
2781   ;;
2782 esac
2783 fi
2784 LDCONFIG=$ac_cv_path_LDCONFIG
2785
2786 if test -n "$LDCONFIG"; then
2787   echo "$as_me:2787: result: $LDCONFIG" >&5
2788 echo "${ECHO_T}$LDCONFIG" >&6
2789 else
2790   echo "$as_me:2790: result: no" >&5
2791 echo "${ECHO_T}no" >&6
2792 fi
2793
2794                 ;;
2795         esac
2796 fi
2797
2798 echo "$as_me:2798: checking if you want to ensure bool is consistent with C++" >&5
2799 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2800
2801 # Check whether --with-cxx or --without-cxx was given.
2802 if test "${with_cxx+set}" = set; then
2803   withval="$with_cxx"
2804   cf_with_cxx=$withval
2805 else
2806   cf_with_cxx=yes
2807 fi;
2808 echo "$as_me:2808: result: $cf_with_cxx" >&5
2809 echo "${ECHO_T}$cf_with_cxx" >&6
2810 if test "X$cf_with_cxx" = Xno ; then
2811         CXX=""
2812         GXX=""
2813 else
2814         # with autoconf 2.13, we can change the error to a warning:
2815                 ac_ext=cc
2816 ac_cpp='$CXXCPP $CPPFLAGS'
2817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2820 ac_main_return=return
2821 if test -n "$ac_tool_prefix"; then
2822   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2823   do
2824     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2826 echo "$as_me:2826: checking for $ac_word" >&5
2827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2828 if test "${ac_cv_prog_CXX+set}" = set; then
2829   echo $ECHO_N "(cached) $ECHO_C" >&6
2830 else
2831   if test -n "$CXX"; then
2832   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2833 else
2834   ac_save_IFS=$IFS; IFS=$ac_path_separator
2835 ac_dummy="$PATH"
2836 for ac_dir in $ac_dummy; do
2837   IFS=$ac_save_IFS
2838   test -z "$ac_dir" && ac_dir=.
2839   $as_executable_p "$ac_dir/$ac_word" || continue
2840 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2841 echo "$as_me:2841: found $ac_dir/$ac_word" >&5
2842 break
2843 done
2844
2845 fi
2846 fi
2847 CXX=$ac_cv_prog_CXX
2848 if test -n "$CXX"; then
2849   echo "$as_me:2849: result: $CXX" >&5
2850 echo "${ECHO_T}$CXX" >&6
2851 else
2852   echo "$as_me:2852: result: no" >&5
2853 echo "${ECHO_T}no" >&6
2854 fi
2855
2856     test -n "$CXX" && break
2857   done
2858 fi
2859 if test -z "$CXX"; then
2860   ac_ct_CXX=$CXX
2861   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2862 do
2863   # Extract the first word of "$ac_prog", so it can be a program name with args.
2864 set dummy $ac_prog; 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_prog_ac_ct_CXX+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   if test -n "$ac_ct_CXX"; then
2871   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2872 else
2873   ac_save_IFS=$IFS; IFS=$ac_path_separator
2874 ac_dummy="$PATH"
2875 for ac_dir in $ac_dummy; do
2876   IFS=$ac_save_IFS
2877   test -z "$ac_dir" && ac_dir=.
2878   $as_executable_p "$ac_dir/$ac_word" || continue
2879 ac_cv_prog_ac_ct_CXX="$ac_prog"
2880 echo "$as_me:2880: found $ac_dir/$ac_word" >&5
2881 break
2882 done
2883
2884 fi
2885 fi
2886 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2887 if test -n "$ac_ct_CXX"; then
2888   echo "$as_me:2888: result: $ac_ct_CXX" >&5
2889 echo "${ECHO_T}$ac_ct_CXX" >&6
2890 else
2891   echo "$as_me:2891: result: no" >&5
2892 echo "${ECHO_T}no" >&6
2893 fi
2894
2895   test -n "$ac_ct_CXX" && break
2896 done
2897 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2898
2899   CXX=$ac_ct_CXX
2900 fi
2901
2902 # Provide some information about the compiler.
2903 echo "$as_me:2903:" \
2904      "checking for C++ compiler version" >&5
2905 ac_compiler=`set X $ac_compile; echo $2`
2906 { (eval echo "$as_me:2906: \"$ac_compiler --version </dev/null >&5\"") >&5
2907   (eval $ac_compiler --version </dev/null >&5) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); }
2911 { (eval echo "$as_me:2911: \"$ac_compiler -v </dev/null >&5\"") >&5
2912   (eval $ac_compiler -v </dev/null >&5) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); }
2916 { (eval echo "$as_me:2916: \"$ac_compiler -V </dev/null >&5\"") >&5
2917   (eval $ac_compiler -V </dev/null >&5) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); }
2921
2922 echo "$as_me:2922: checking whether we are using the GNU C++ compiler" >&5
2923 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2924 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2925   echo $ECHO_N "(cached) $ECHO_C" >&6
2926 else
2927   cat >conftest.$ac_ext <<_ACEOF
2928 #line 2928 "configure"
2929 #include "confdefs.h"
2930
2931 int
2932 main (void)
2933 {
2934 #ifndef __GNUC__
2935        choke me
2936 #endif
2937
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:2943: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>&5
2945   ac_status=$?
2946   echo "$as_me:2946: \$? = $ac_status" >&5
2947   (exit $ac_status); } &&
2948          { ac_try='test -s conftest.$ac_objext'
2949   { (eval echo "$as_me:2949: \"$ac_try\"") >&5
2950   (eval $ac_try) 2>&5
2951   ac_status=$?
2952   echo "$as_me:2952: \$? = $ac_status" >&5
2953   (exit $ac_status); }; }; then
2954   ac_compiler_gnu=yes
2955 else
2956   echo "$as_me: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 ac_compiler_gnu=no
2959 fi
2960 rm -f conftest.$ac_objext conftest.$ac_ext
2961 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2962
2963 fi
2964 echo "$as_me:2964: result: $ac_cv_cxx_compiler_gnu" >&5
2965 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2966 GXX=`test $ac_compiler_gnu = yes && echo yes`
2967 ac_test_CXXFLAGS=${CXXFLAGS+set}
2968 ac_save_CXXFLAGS=$CXXFLAGS
2969 CXXFLAGS="-g"
2970 echo "$as_me:2970: checking whether $CXX accepts -g" >&5
2971 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2972 if test "${ac_cv_prog_cxx_g+set}" = set; then
2973   echo $ECHO_N "(cached) $ECHO_C" >&6
2974 else
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978
2979 int
2980 main (void)
2981 {
2982
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   ac_cv_prog_cxx_g=yes
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 ac_cv_prog_cxx_g=no
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006 fi
3007 echo "$as_me:3007: result: $ac_cv_prog_cxx_g" >&5
3008 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3009 if test "$ac_test_CXXFLAGS" = set; then
3010   CXXFLAGS=$ac_save_CXXFLAGS
3011 elif test $ac_cv_prog_cxx_g = yes; then
3012   if test "$GXX" = yes; then
3013     CXXFLAGS="-g -O2"
3014   else
3015     CXXFLAGS="-g"
3016   fi
3017 else
3018   if test "$GXX" = yes; then
3019     CXXFLAGS="-O2"
3020   else
3021     CXXFLAGS=
3022   fi
3023 fi
3024 for ac_declaration in \
3025    ''\
3026    '#include <stdlib.h>' \
3027    'extern "C" void std::exit (int) throw (); using std::exit;' \
3028    'extern "C" void std::exit (int); using std::exit;' \
3029    'extern "C" void exit (int) throw ();' \
3030    'extern "C" void exit (int);' \
3031    'void exit (int);'
3032 do
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036 #include <stdlib.h>
3037 $ac_declaration
3038 int
3039 main (void)
3040 {
3041 exit (42);
3042   ;
3043   return 0;
3044 }
3045 _ACEOF
3046 rm -f conftest.$ac_objext
3047 if { (eval echo "$as_me:3047: \"$ac_compile\"") >&5
3048   (eval $ac_compile) 2>&5
3049   ac_status=$?
3050   echo "$as_me:3050: \$? = $ac_status" >&5
3051   (exit $ac_status); } &&
3052          { ac_try='test -s conftest.$ac_objext'
3053   { (eval echo "$as_me:3053: \"$ac_try\"") >&5
3054   (eval $ac_try) 2>&5
3055   ac_status=$?
3056   echo "$as_me:3056: \$? = $ac_status" >&5
3057   (exit $ac_status); }; }; then
3058   :
3059 else
3060   echo "$as_me: failed program was:" >&5
3061 cat conftest.$ac_ext >&5
3062 continue
3063 fi
3064 rm -f conftest.$ac_objext conftest.$ac_ext
3065   cat >conftest.$ac_ext <<_ACEOF
3066 #line 3066 "configure"
3067 #include "confdefs.h"
3068 $ac_declaration
3069 int
3070 main (void)
3071 {
3072 exit (42);
3073   ;
3074   return 0;
3075 }
3076 _ACEOF
3077 rm -f conftest.$ac_objext
3078 if { (eval echo "$as_me:3078: \"$ac_compile\"") >&5
3079   (eval $ac_compile) 2>&5
3080   ac_status=$?
3081   echo "$as_me:3081: \$? = $ac_status" >&5
3082   (exit $ac_status); } &&
3083          { ac_try='test -s conftest.$ac_objext'
3084   { (eval echo "$as_me:3084: \"$ac_try\"") >&5
3085   (eval $ac_try) 2>&5
3086   ac_status=$?
3087   echo "$as_me:3087: \$? = $ac_status" >&5
3088   (exit $ac_status); }; }; then
3089   break
3090 else
3091   echo "$as_me: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 fi
3094 rm -f conftest.$ac_objext conftest.$ac_ext
3095 done
3096 rm -rf conftest*
3097 if test -n "$ac_declaration"; then
3098   echo '#ifdef __cplusplus' >>confdefs.h
3099   echo $ac_declaration      >>confdefs.h
3100   echo '#endif'             >>confdefs.h
3101 fi
3102
3103 ac_ext=c
3104 ac_cpp='$CPP $CPPFLAGS'
3105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3108 ac_main_return=return
3109
3110         ac_ext=cc
3111 ac_cpp='$CXXCPP $CPPFLAGS'
3112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3115 ac_main_return=return
3116
3117         if test "x$cf_with_cxx" != xno
3118         then
3119                 # Several of the C++ configurations do not work, particularly when
3120                 # cross-compiling (20140913 -TD)
3121                 echo "$as_me:3121: checking if $CXX works" >&5
3122 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3123
3124                 save_CPPFLAGS="$CPPFLAGS"
3125                 eval cf_includedir=${includedir}
3126                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3127
3128 cat >conftest.$ac_ext <<_ACEOF
3129 #line 3129 "configure"
3130 #include "confdefs.h"
3131
3132 #include <stdlib.h>
3133 #include <stdio.h>
3134
3135 int
3136 main (void)
3137 {
3138
3139                 printf("Hello world!\n")
3140
3141   ;
3142   return 0;
3143 }
3144 _ACEOF
3145 rm -f conftest.$ac_objext
3146 if { (eval echo "$as_me:3146: \"$ac_compile\"") >&5
3147   (eval $ac_compile) 2>&5
3148   ac_status=$?
3149   echo "$as_me:3149: \$? = $ac_status" >&5
3150   (exit $ac_status); } &&
3151          { ac_try='test -s conftest.$ac_objext'
3152   { (eval echo "$as_me:3152: \"$ac_try\"") >&5
3153   (eval $ac_try) 2>&5
3154   ac_status=$?
3155   echo "$as_me:3155: \$? = $ac_status" >&5
3156   (exit $ac_status); }; }; then
3157   cf_cxx_works=yes
3158 else
3159   echo "$as_me: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 cf_cxx_works=no
3162 fi
3163 rm -f conftest.$ac_objext conftest.$ac_ext
3164                 CPPFLAGS="$save_CPPFLAGS"
3165
3166                 echo "$as_me:3166: result: $cf_cxx_works" >&5
3167 echo "${ECHO_T}$cf_cxx_works" >&6
3168                 if test "x$cf_cxx_works" = xno
3169                 then
3170                         { echo "$as_me:3170: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3171 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3172                         cf_with_cxx=no; CXX=""; GXX="";
3173                 fi
3174         fi
3175         ac_ext=c
3176 ac_cpp='$CPP $CPPFLAGS'
3177 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3178 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3179 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3180 ac_main_return=return
3181
3182         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3183         if test "$CXX" = "g++" ; then
3184                 # Extract the first word of "g++", so it can be a program name with args.
3185 set dummy g++; ac_word=$2
3186 echo "$as_me:3186: checking for $ac_word" >&5
3187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188 if test "${ac_cv_path_CXX+set}" = set; then
3189   echo $ECHO_N "(cached) $ECHO_C" >&6
3190 else
3191   case $CXX in
3192   [\\/]* | ?:[\\/]*)
3193   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3194   ;;
3195   *)
3196   ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 ac_dummy="$PATH"
3198 for ac_dir in $ac_dummy; do
3199   IFS=$ac_save_IFS
3200   test -z "$ac_dir" && ac_dir=.
3201   if $as_executable_p "$ac_dir/$ac_word"; then
3202    ac_cv_path_CXX="$ac_dir/$ac_word"
3203    echo "$as_me:3203: found $ac_dir/$ac_word" >&5
3204    break
3205 fi
3206 done
3207
3208   ;;
3209 esac
3210 fi
3211 CXX=$ac_cv_path_CXX
3212
3213 if test -n "$CXX"; then
3214   echo "$as_me:3214: result: $CXX" >&5
3215 echo "${ECHO_T}$CXX" >&6
3216 else
3217   echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3219 fi
3220
3221         fi
3222         case "x$CXX" in
3223         (x|xg++)
3224                 { echo "$as_me:3224: WARNING: You don't have any C++ compiler, too bad" >&5
3225 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3226                 cf_with_cxx=no; CXX=""; GXX="";
3227                 ;;
3228         esac
3229 fi
3230
3231 GXX_VERSION=none
3232 if test "$GXX" = yes; then
3233         echo "$as_me:3233: checking version of ${CXX:-g++}" >&5
3234 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3235         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3236         if test -z "$GXX_VERSION"
3237         then
3238                 GXX_VERSION=unknown
3239                 GXX=no
3240         fi
3241         echo "$as_me:3241: result: $GXX_VERSION" >&5
3242 echo "${ECHO_T}$GXX_VERSION" >&6
3243 fi
3244
3245 case $GXX_VERSION in
3246 (1*|2.[0-6]*)
3247         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3248         # cf_cxx_library=no
3249         { echo "$as_me:3249: WARNING: templates do not work" >&5
3250 echo "$as_me: WARNING: templates do not work" >&2;}
3251         ;;
3252 esac
3253
3254 echo "$as_me:3254: checking if you want to build C++ binding and demo" >&5
3255 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3256
3257 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3258 if test "${with_cxx_binding+set}" = set; then
3259   withval="$with_cxx_binding"
3260   cf_with_cxx_binding=$withval
3261 else
3262   cf_with_cxx_binding=$cf_with_cxx
3263 fi;
3264 echo "$as_me:3264: result: $cf_with_cxx_binding" >&5
3265 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3266
3267 echo "$as_me:3267: checking if you want to build with Ada95" >&5
3268 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3269 echo "$as_me:3269: result: $cf_with_ada" >&5
3270 echo "${ECHO_T}$cf_with_ada" >&6
3271
3272 echo "$as_me:3272: checking if you want to install terminal database" >&5
3273 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3274
3275 # Check whether --enable-db-install or --disable-db-install was given.
3276 if test "${enable_db_install+set}" = set; then
3277   enableval="$enable_db_install"
3278   cf_with_db_install=$enableval
3279 else
3280   cf_with_db_install=yes
3281 fi;
3282 echo "$as_me:3282: result: $cf_with_db_install" >&5
3283 echo "${ECHO_T}$cf_with_db_install" >&6
3284
3285 echo "$as_me:3285: checking if you want to install manpages" >&5
3286 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3287
3288 # Check whether --with-manpages or --without-manpages was given.
3289 if test "${with_manpages+set}" = set; then
3290   withval="$with_manpages"
3291   cf_with_manpages=$withval
3292 else
3293   cf_with_manpages=yes
3294 fi;
3295 echo "$as_me:3295: result: $cf_with_manpages" >&5
3296 echo "${ECHO_T}$cf_with_manpages" >&6
3297
3298 echo "$as_me:3298: checking if you want to build programs such as tic" >&5
3299 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3300
3301 # Check whether --with-progs or --without-progs was given.
3302 if test "${with_progs+set}" = set; then
3303   withval="$with_progs"
3304   cf_with_progs=$withval
3305 else
3306   cf_with_progs=yes
3307 fi;
3308 echo "$as_me:3308: result: $cf_with_progs" >&5
3309 echo "${ECHO_T}$cf_with_progs" >&6
3310
3311 if test -f $srcdir/tack/tack.h; then
3312         if test "x$cross_compiling" = xyes ; then
3313                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3314
3315 echo "${as_me:-configure}:3315: testing ignoring tack because we are cross-compiling ..." 1>&5
3316
3317                 cf_with_tack=no
3318         else
3319                 echo "$as_me:3319: checking if you want to build the tack program" >&5
3320 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3321
3322 # Check whether --with-tack or --without-tack was given.
3323 if test "${with_tack+set}" = set; then
3324   withval="$with_tack"
3325   cf_with_tack=$withval
3326 else
3327   cf_with_tack=$cf_with_progs
3328 fi;
3329                 echo "$as_me:3329: result: $cf_with_tack" >&5
3330 echo "${ECHO_T}$cf_with_tack" >&6
3331         fi
3332 else
3333         cf_with_tack=no
3334 fi
3335
3336 echo "$as_me:3336: checking if you want to build test-programs" >&5
3337 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3338
3339 # Check whether --with-tests or --without-tests was given.
3340 if test "${with_tests+set}" = set; then
3341   withval="$with_tests"
3342   cf_with_tests=$withval
3343 else
3344   cf_with_tests=yes
3345 fi;
3346 echo "$as_me:3346: result: $cf_with_tests" >&5
3347 echo "${ECHO_T}$cf_with_tests" >&6
3348
3349 echo "$as_me:3349: checking if you wish to install curses.h" >&5
3350 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3351
3352 # Check whether --with-curses-h or --without-curses-h was given.
3353 if test "${with_curses_h+set}" = set; then
3354   withval="$with_curses_h"
3355   with_curses_h=$withval
3356 else
3357   with_curses_h=yes
3358 fi;
3359 echo "$as_me:3359: result: $with_curses_h" >&5
3360 echo "${ECHO_T}$with_curses_h" >&6
3361
3362 modules_to_build="ncurses"
3363 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3364 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3365 modules_to_build="$modules_to_build panel menu form"
3366
3367 test "$program_prefix" != NONE &&
3368   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3369 # Use a double $ so make ignores it.
3370 test "$program_suffix" != NONE &&
3371   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3372 # Double any \ or $.  echo might interpret backslashes.
3373 # By default was `s,x,x', remove it if useless.
3374 cat <<\_ACEOF >conftest.sed
3375 s/[\\$]/&&/g;s/;s,x,x,$//
3376 _ACEOF
3377 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3378 rm conftest.sed
3379
3380 for ac_prog in mawk gawk nawk awk
3381 do
3382   # Extract the first word of "$ac_prog", so it can be a program name with args.
3383 set dummy $ac_prog; ac_word=$2
3384 echo "$as_me:3384: checking for $ac_word" >&5
3385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3386 if test "${ac_cv_prog_AWK+set}" = set; then
3387   echo $ECHO_N "(cached) $ECHO_C" >&6
3388 else
3389   if test -n "$AWK"; then
3390   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3391 else
3392   ac_save_IFS=$IFS; IFS=$ac_path_separator
3393 ac_dummy="$PATH"
3394 for ac_dir in $ac_dummy; do
3395   IFS=$ac_save_IFS
3396   test -z "$ac_dir" && ac_dir=.
3397   $as_executable_p "$ac_dir/$ac_word" || continue
3398 ac_cv_prog_AWK="$ac_prog"
3399 echo "$as_me:3399: found $ac_dir/$ac_word" >&5
3400 break
3401 done
3402
3403 fi
3404 fi
3405 AWK=$ac_cv_prog_AWK
3406 if test -n "$AWK"; then
3407   echo "$as_me:3407: result: $AWK" >&5
3408 echo "${ECHO_T}$AWK" >&6
3409 else
3410   echo "$as_me:3410: result: no" >&5
3411 echo "${ECHO_T}no" >&6
3412 fi
3413
3414   test -n "$AWK" && break
3415 done
3416
3417 test -z "$AWK" && { { echo "$as_me:3417: error: No awk program found" >&5
3418 echo "$as_me: error: No awk program found" >&2;}
3419    { (exit 1); exit 1; }; }
3420
3421 echo "$as_me:3421: checking for egrep" >&5
3422 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3423 if test "${ac_cv_prog_egrep+set}" = set; then
3424   echo $ECHO_N "(cached) $ECHO_C" >&6
3425 else
3426   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3427                 then ac_cv_prog_egrep='grep -E'
3428                 else ac_cv_prog_egrep='egrep'
3429         fi
3430 fi
3431 echo "$as_me:3431: result: $ac_cv_prog_egrep" >&5
3432 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3433         EGREP=$ac_cv_prog_egrep
3434
3435         test -z "$EGREP" && { { echo "$as_me:3435: error: No egrep program found" >&5
3436 echo "$as_me: error: No egrep program found" >&2;}
3437    { (exit 1); exit 1; }; }
3438
3439 # Find a good install program.  We prefer a C program (faster),
3440 # so one script is as good as another.  But avoid the broken or
3441 # incompatible versions:
3442 # SysV /etc/install, /usr/sbin/install
3443 # SunOS /usr/etc/install
3444 # IRIX /sbin/install
3445 # AIX /bin/install
3446 # AmigaOS /C/install, which installs bootblocks on floppy discs
3447 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3448 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3449 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3450 # ./install, which can be erroneously created by make from ./install.sh.
3451 echo "$as_me:3451: checking for a BSD compatible install" >&5
3452 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3453 if test -z "$INSTALL"; then
3454 if test "${ac_cv_path_install+set}" = set; then
3455   echo $ECHO_N "(cached) $ECHO_C" >&6
3456 else
3457     ac_save_IFS=$IFS; IFS=$ac_path_separator
3458   for ac_dir in $PATH; do
3459     IFS=$ac_save_IFS
3460     # Account for people who put trailing slashes in PATH elements.
3461     case $ac_dir/ in
3462     / | ./ | .// | /cC/* \
3463     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3464     | /usr/ucb/* ) ;;
3465     *)
3466       # OSF1 and SCO ODT 3.0 have their own names for install.
3467       # Don't use installbsd from OSF since it installs stuff as root
3468       # by default.
3469       for ac_prog in ginstall scoinst install; do
3470         if $as_executable_p "$ac_dir/$ac_prog"; then
3471           if test $ac_prog = install &&
3472             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3473             # AIX install.  It has an incompatible calling convention.
3474             :
3475           elif test $ac_prog = install &&
3476             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3477             # program-specific install script used by HP pwplus--don't use.
3478             :
3479           else
3480             ac_cv_path_install="$ac_dir/$ac_prog -c"
3481             break 2
3482           fi
3483         fi
3484       done
3485       ;;
3486     esac
3487   done
3488
3489 fi
3490   if test "${ac_cv_path_install+set}" = set; then
3491     INSTALL=$ac_cv_path_install
3492   else
3493     # As a last resort, use the slow shell script.  We don't cache a
3494     # path for INSTALL within a source directory, because that will
3495     # break other packages using the cache if that directory is
3496     # removed, or if the path is relative.
3497     INSTALL=$ac_install_sh
3498   fi
3499 fi
3500 echo "$as_me:3500: result: $INSTALL" >&5
3501 echo "${ECHO_T}$INSTALL" >&6
3502
3503 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3504 # It thinks the first close brace ends the variable substitution.
3505 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3506
3507 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3508
3509 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3510
3511 case $INSTALL in
3512 (/*)
3513         ;;
3514 (*)
3515         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3516         test -z "$cf_dir" && cf_dir=.
3517         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3518         ;;
3519 esac
3520
3521 for ac_prog in lint cppcheck splint
3522 do
3523   # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_LINT+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$LINT"; then
3531   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_LINT="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544 fi
3545 fi
3546 LINT=$ac_cv_prog_LINT
3547 if test -n "$LINT"; then
3548   echo "$as_me:3548: result: $LINT" >&5
3549 echo "${ECHO_T}$LINT" >&6
3550 else
3551   echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3553 fi
3554
3555   test -n "$LINT" && break
3556 done
3557
3558 echo "$as_me:3558: checking whether ln -s works" >&5
3559 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3560 LN_S=$as_ln_s
3561 if test "$LN_S" = "ln -s"; then
3562   echo "$as_me:3562: result: yes" >&5
3563 echo "${ECHO_T}yes" >&6
3564 else
3565   echo "$as_me:3565: result: no, using $LN_S" >&5
3566 echo "${ECHO_T}no, using $LN_S" >&6
3567 fi
3568
3569 echo "$as_me:3569: checking if $LN_S -f options work" >&5
3570 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3571
3572 rm -f conf$$.src conf$$dst
3573 echo >conf$$.dst
3574 echo first >conf$$.src
3575 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3576         cf_prog_ln_sf=yes
3577 else
3578         cf_prog_ln_sf=no
3579 fi
3580 rm -f conf$$.dst conf$$src
3581 echo "$as_me:3581: result: $cf_prog_ln_sf" >&5
3582 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3583
3584 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3585
3586 echo "$as_me:3586: checking for long file names" >&5
3587 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3588 if test "${ac_cv_sys_long_file_names+set}" = set; then
3589   echo $ECHO_N "(cached) $ECHO_C" >&6
3590 else
3591   ac_cv_sys_long_file_names=yes
3592 # Test for long file names in all the places we know might matter:
3593 #      .                the current directory, where building will happen
3594 #      $prefix/lib      where we will be installing things
3595 #      $exec_prefix/lib likewise
3596 # eval it to expand exec_prefix.
3597 #      $TMPDIR          if set, where it might want to write temporary files
3598 # if $TMPDIR is not set:
3599 #      /tmp             where it might want to write temporary files
3600 #      /var/tmp         likewise
3601 #      /usr/tmp         likewise
3602 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3603   ac_tmpdirs=$TMPDIR
3604 else
3605   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3606 fi
3607 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3608   test -d $ac_dir || continue
3609   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3610   ac_xdir=$ac_dir/cf$$
3611   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3612   ac_tf1=$ac_xdir/conftest9012345
3613   ac_tf2=$ac_xdir/conftest9012346
3614   (echo 1 >$ac_tf1) 2>/dev/null
3615   (echo 2 >$ac_tf2) 2>/dev/null
3616   ac_val=`cat $ac_tf1 2>/dev/null`
3617   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3618     ac_cv_sys_long_file_names=no
3619     rm -rf $ac_xdir 2>/dev/null
3620     break
3621   fi
3622   rm -rf $ac_xdir 2>/dev/null
3623 done
3624 fi
3625 echo "$as_me:3625: result: $ac_cv_sys_long_file_names" >&5
3626 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3627 if test $ac_cv_sys_long_file_names = yes; then
3628
3629 cat >>confdefs.h <<\EOF
3630 #define HAVE_LONG_FILE_NAMES 1
3631 EOF
3632
3633 fi
3634
3635 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3636 # of package conflict.
3637 cf_config_suffix=
3638
3639 # Check whether --with-config-suffix or --without-config-suffix was given.
3640 if test "${with_config_suffix+set}" = set; then
3641   withval="$with_config_suffix"
3642   case "x$withval" in
3643         (xyes|xno)
3644                 { echo "$as_me:3644: WARNING: expected a value for config-suffix option" >&5
3645 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3646                 ;;
3647         (*)     cf_config_suffix="$withval"
3648                 ;;
3649         esac
3650 fi;
3651
3652 # If we find pkg-config, check if we should install the ".pc" files.
3653
3654 echo "$as_me:3654: checking if you want to use pkg-config" >&5
3655 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3656
3657 # Check whether --with-pkg-config or --without-pkg-config was given.
3658 if test "${with_pkg_config+set}" = set; then
3659   withval="$with_pkg_config"
3660   cf_pkg_config=$withval
3661 else
3662   cf_pkg_config=yes
3663 fi;
3664 echo "$as_me:3664: result: $cf_pkg_config" >&5
3665 echo "${ECHO_T}$cf_pkg_config" >&6
3666
3667 case $cf_pkg_config in
3668 (no)
3669         PKG_CONFIG=none
3670         ;;
3671 (yes)
3672
3673 if test -n "$ac_tool_prefix"; then
3674   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3675 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3676 echo "$as_me:3676: checking for $ac_word" >&5
3677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3678 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3679   echo $ECHO_N "(cached) $ECHO_C" >&6
3680 else
3681   case $PKG_CONFIG in
3682   [\\/]* | ?:[\\/]*)
3683   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3684   ;;
3685   *)
3686   ac_save_IFS=$IFS; IFS=$ac_path_separator
3687 ac_dummy="$PATH"
3688 for ac_dir in $ac_dummy; do
3689   IFS=$ac_save_IFS
3690   test -z "$ac_dir" && ac_dir=.
3691   if $as_executable_p "$ac_dir/$ac_word"; then
3692    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3693    echo "$as_me:3693: found $ac_dir/$ac_word" >&5
3694    break
3695 fi
3696 done
3697
3698   ;;
3699 esac
3700 fi
3701 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3702
3703 if test -n "$PKG_CONFIG"; then
3704   echo "$as_me:3704: result: $PKG_CONFIG" >&5
3705 echo "${ECHO_T}$PKG_CONFIG" >&6
3706 else
3707   echo "$as_me:3707: result: no" >&5
3708 echo "${ECHO_T}no" >&6
3709 fi
3710
3711 fi
3712 if test -z "$ac_cv_path_PKG_CONFIG"; then
3713   ac_pt_PKG_CONFIG=$PKG_CONFIG
3714   # Extract the first word of "pkg-config", so it can be a program name with args.
3715 set dummy pkg-config; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721   case $ac_pt_PKG_CONFIG in
3722   [\\/]* | ?:[\\/]*)
3723   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3724   ;;
3725   *)
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   if $as_executable_p "$ac_dir/$ac_word"; then
3732    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3733    echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734    break
3735 fi
3736 done
3737
3738   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3739   ;;
3740 esac
3741 fi
3742 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3743
3744 if test -n "$ac_pt_PKG_CONFIG"; then
3745   echo "$as_me:3745: result: $ac_pt_PKG_CONFIG" >&5
3746 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   PKG_CONFIG=$ac_pt_PKG_CONFIG
3753 else
3754   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3755 fi
3756
3757         ;;
3758 (*)
3759         PKG_CONFIG=$withval
3760         ;;
3761 esac
3762
3763 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3764 if test "$PKG_CONFIG" != none ; then
3765
3766 if test "x$prefix" != xNONE; then
3767         cf_path_syntax="$prefix"
3768 else
3769         cf_path_syntax="$ac_default_prefix"
3770 fi
3771
3772 case ".$PKG_CONFIG" in
3773 (.\$\(*\)*|.\'*\'*)
3774         ;;
3775 (..|./*|.\\*)
3776         ;;
3777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3778         ;;
3779 (.\${*prefix}*|.\${*dir}*)
3780         eval PKG_CONFIG="$PKG_CONFIG"
3781         case ".$PKG_CONFIG" in
3782         (.NONE/*)
3783                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3784                 ;;
3785         esac
3786         ;;
3787 (.no|.NONE/*)
3788         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3789         ;;
3790 (*)
3791         { { echo "$as_me:3791: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3792 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3793    { (exit 1); exit 1; }; }
3794         ;;
3795 esac
3796
3797 elif test "x$cf_pkg_config" != xno ; then
3798         { echo "$as_me:3798: WARNING: pkg-config is not installed" >&5
3799 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3800 fi
3801
3802 case $PKG_CONFIG in
3803 (no|none|yes)
3804         echo "$as_me:3804: checking for pkg-config library directory" >&5
3805 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3806         ;;
3807 (*)
3808         echo "$as_me:3808: checking for $PKG_CONFIG library directory" >&5
3809 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3810         ;;
3811 esac
3812
3813 PKG_CONFIG_LIBDIR=no
3814
3815 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3816 if test "${with_pkg_config_libdir+set}" = set; then
3817   withval="$with_pkg_config_libdir"
3818   PKG_CONFIG_LIBDIR=$withval
3819 else
3820   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3821 fi;
3822
3823 case x$PKG_CONFIG_LIBDIR in
3824 (x/*)
3825         ;;
3826 (xyes)
3827         # Look for the library directory using the same prefix as the executable
3828         if test "x$PKG_CONFIG" = xnone
3829         then
3830                 cf_path=$prefix
3831         else
3832                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3833         fi
3834
3835         # If you don't like using the default architecture, you have to specify the
3836         # intended library directory and corresponding compiler/linker options.
3837         #
3838         # This case allows for Debian's 2014-flavor of multiarch, along with the
3839         # most common variations before that point.  Some other variants spell the
3840         # directory differently, e.g., "pkg-config", and put it in unusual places.
3841         # pkg-config has always been poorly standardized, which is ironic...
3842         case x`(arch) 2>/dev/null` in
3843         (*64)
3844                 cf_search_path="\
3845                         $cf_path/lib/*64-linux-gnu \
3846                         $cf_path/share \
3847                         $cf_path/lib64 \
3848                         $cf_path/lib32 \
3849                         $cf_path/lib"
3850                 ;;
3851         (*)
3852                 cf_search_path="\
3853                         $cf_path/lib/*-linux-gnu \
3854                         $cf_path/share \
3855                         $cf_path/lib32 \
3856                         $cf_path/lib \
3857                         $cf_path/libdata"
3858                 ;;
3859         esac
3860
3861         test -n "$verbose" && echo "    list..." 1>&6
3862
3863 echo "${as_me:-configure}:3863: testing list... ..." 1>&5
3864
3865         for cf_config in $cf_search_path
3866         do
3867                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3868
3869 echo "${as_me:-configure}:3869: testing checking $cf_config/pkgconfig ..." 1>&5
3870
3871                 if test -d $cf_config/pkgconfig
3872                 then
3873                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3874                         echo "$as_me:3874: checking done" >&5
3875 echo $ECHO_N "checking done... $ECHO_C" >&6
3876                         break
3877                 fi
3878         done
3879         ;;
3880 (*)
3881         ;;
3882 esac
3883
3884 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3885         echo "$as_me:3885: result: $PKG_CONFIG_LIBDIR" >&5
3886 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3887 fi
3888
3889 if test "x$PKG_CONFIG" != xnone
3890 then
3891         echo "$as_me:3891: checking if we should install .pc files for $PKG_CONFIG" >&5
3892 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3893 else
3894         echo "$as_me:3894: checking if we should install .pc files" >&5
3895 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3896 fi
3897
3898 # Check whether --enable-pc-files or --disable-pc-files was given.
3899 if test "${enable_pc_files+set}" = set; then
3900   enableval="$enable_pc_files"
3901   enable_pc_files=$enableval
3902 else
3903   enable_pc_files=no
3904 fi;
3905 echo "$as_me:3905: result: $enable_pc_files" >&5
3906 echo "${ECHO_T}$enable_pc_files" >&6
3907
3908 if test "x$enable_pc_files" != xno
3909 then
3910         MAKE_PC_FILES=
3911         case "x$PKG_CONFIG_LIBDIR" in
3912         (xno|xyes)
3913                 { echo "$as_me:3913: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3914 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3915                 ;;
3916         (*)
3917
3918 if test "x$prefix" != xNONE; then
3919         cf_path_syntax="$prefix"
3920 else
3921         cf_path_syntax="$ac_default_prefix"
3922 fi
3923
3924 case ".$PKG_CONFIG_LIBDIR" in
3925 (.\$\(*\)*|.\'*\'*)
3926         ;;
3927 (..|./*|.\\*)
3928         ;;
3929 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3930         ;;
3931 (.\${*prefix}*|.\${*dir}*)
3932         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3933         case ".$PKG_CONFIG_LIBDIR" in
3934         (.NONE/*)
3935                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3936                 ;;
3937         esac
3938         ;;
3939 (.no|.NONE/*)
3940         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3941         ;;
3942 (*)
3943         { { echo "$as_me:3943: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3944 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3945    { (exit 1); exit 1; }; }
3946         ;;
3947 esac
3948
3949                 ;;
3950         esac
3951 else
3952         MAKE_PC_FILES="#"
3953 fi
3954
3955 if test -z "$MAKE_PC_FILES"
3956 then
3957         echo "$as_me:3957: checking for suffix to add to pc-files" >&5
3958 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3959
3960 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3961 if test "${with_pc_suffix+set}" = set; then
3962   withval="$with_pc_suffix"
3963   case "x$withval" in
3964         (xyes|xno)
3965                 PC_MODULE_SUFFIX=
3966                 ;;
3967         (*)     PC_MODULE_SUFFIX="$withval"
3968                 ;;
3969         esac
3970 fi;
3971         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3972         echo "$as_me:3972: result: $PC_MODULE_SUFFIX" >&5
3973 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3974         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3975
3976 fi
3977
3978 echo "$as_me:3978: checking if we should assume mixed-case filenames" >&5
3979 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3980
3981 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3982 if test "${enable_mixed_case+set}" = set; then
3983   enableval="$enable_mixed_case"
3984   enable_mixedcase=$enableval
3985 else
3986   enable_mixedcase=auto
3987 fi;
3988 echo "$as_me:3988: result: $enable_mixedcase" >&5
3989 echo "${ECHO_T}$enable_mixedcase" >&6
3990 if test "$enable_mixedcase" = "auto" ; then
3991
3992 echo "$as_me:3992: checking if filesystem supports mixed-case filenames" >&5
3993 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3994 if test "${cf_cv_mixedcase+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997
3998 if test "$cross_compiling" = yes ; then
3999         case $target_alias in
4000         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4001                 cf_cv_mixedcase=no
4002                 ;;
4003         (*)
4004                 cf_cv_mixedcase=yes
4005                 ;;
4006         esac
4007 else
4008         rm -f conftest CONFTEST
4009         echo test >conftest
4010         if test -f CONFTEST ; then
4011                 cf_cv_mixedcase=no
4012         else
4013                 cf_cv_mixedcase=yes
4014         fi
4015         rm -f conftest CONFTEST
4016 fi
4017
4018 fi
4019 echo "$as_me:4019: result: $cf_cv_mixedcase" >&5
4020 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4021 test "$cf_cv_mixedcase" = yes &&
4022 cat >>confdefs.h <<\EOF
4023 #define MIXEDCASE_FILENAMES 1
4024 EOF
4025
4026 else
4027         cf_cv_mixedcase=$enable_mixedcase
4028         if test "x$enable_mixedcase" = "xyes" ; then
4029
4030 cat >>confdefs.h <<\EOF
4031 #define MIXEDCASE_FILENAMES 1
4032 EOF
4033
4034         fi
4035 fi
4036
4037 # do this after mixed-case option (tags/TAGS is not as important as tic).
4038 echo "$as_me:4038: checking whether ${MAKE-make} sets \${MAKE}" >&5
4039 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4040 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4041 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4042   echo $ECHO_N "(cached) $ECHO_C" >&6
4043 else
4044   cat >conftest.make <<\EOF
4045 all:
4046         @echo 'ac_maketemp="${MAKE}"'
4047 EOF
4048 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4049 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4050 if test -n "$ac_maketemp"; then
4051   eval ac_cv_prog_make_${ac_make}_set=yes
4052 else
4053   eval ac_cv_prog_make_${ac_make}_set=no
4054 fi
4055 rm -f conftest.make
4056 fi
4057 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4058   echo "$as_me:4058: result: yes" >&5
4059 echo "${ECHO_T}yes" >&6
4060   SET_MAKE=
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064   SET_MAKE="MAKE=${MAKE-make}"
4065 fi
4066
4067 for ac_prog in exctags ctags
4068 do
4069   # Extract the first word of "$ac_prog", so it can be a program name with args.
4070 set dummy $ac_prog; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_prog_CTAGS+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   if test -n "$CTAGS"; then
4077   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4078 else
4079   ac_save_IFS=$IFS; IFS=$ac_path_separator
4080 ac_dummy="$PATH"
4081 for ac_dir in $ac_dummy; do
4082   IFS=$ac_save_IFS
4083   test -z "$ac_dir" && ac_dir=.
4084   $as_executable_p "$ac_dir/$ac_word" || continue
4085 ac_cv_prog_CTAGS="$ac_prog"
4086 echo "$as_me:4086: found $ac_dir/$ac_word" >&5
4087 break
4088 done
4089
4090 fi
4091 fi
4092 CTAGS=$ac_cv_prog_CTAGS
4093 if test -n "$CTAGS"; then
4094   echo "$as_me:4094: result: $CTAGS" >&5
4095 echo "${ECHO_T}$CTAGS" >&6
4096 else
4097   echo "$as_me:4097: result: no" >&5
4098 echo "${ECHO_T}no" >&6
4099 fi
4100
4101   test -n "$CTAGS" && break
4102 done
4103
4104 for ac_prog in exetags etags
4105 do
4106   # Extract the first word of "$ac_prog", so it can be a program name with args.
4107 set dummy $ac_prog; ac_word=$2
4108 echo "$as_me:4108: checking for $ac_word" >&5
4109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4110 if test "${ac_cv_prog_ETAGS+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113   if test -n "$ETAGS"; then
4114   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4115 else
4116   ac_save_IFS=$IFS; IFS=$ac_path_separator
4117 ac_dummy="$PATH"
4118 for ac_dir in $ac_dummy; do
4119   IFS=$ac_save_IFS
4120   test -z "$ac_dir" && ac_dir=.
4121   $as_executable_p "$ac_dir/$ac_word" || continue
4122 ac_cv_prog_ETAGS="$ac_prog"
4123 echo "$as_me:4123: found $ac_dir/$ac_word" >&5
4124 break
4125 done
4126
4127 fi
4128 fi
4129 ETAGS=$ac_cv_prog_ETAGS
4130 if test -n "$ETAGS"; then
4131   echo "$as_me:4131: result: $ETAGS" >&5
4132 echo "${ECHO_T}$ETAGS" >&6
4133 else
4134   echo "$as_me:4134: result: no" >&5
4135 echo "${ECHO_T}no" >&6
4136 fi
4137
4138   test -n "$ETAGS" && break
4139 done
4140
4141 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4142 set dummy ${CTAGS:-ctags}; ac_word=$2
4143 echo "$as_me:4143: checking for $ac_word" >&5
4144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4146   echo $ECHO_N "(cached) $ECHO_C" >&6
4147 else
4148   if test -n "$MAKE_LOWER_TAGS"; then
4149   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4150 else
4151   ac_save_IFS=$IFS; IFS=$ac_path_separator
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154   IFS=$ac_save_IFS
4155   test -z "$ac_dir" && ac_dir=.
4156   $as_executable_p "$ac_dir/$ac_word" || continue
4157 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4158 echo "$as_me:4158: found $ac_dir/$ac_word" >&5
4159 break
4160 done
4161
4162   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4163 fi
4164 fi
4165 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4166 if test -n "$MAKE_LOWER_TAGS"; then
4167   echo "$as_me:4167: result: $MAKE_LOWER_TAGS" >&5
4168 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4169 else
4170   echo "$as_me:4170: result: no" >&5
4171 echo "${ECHO_T}no" >&6
4172 fi
4173
4174 if test "$cf_cv_mixedcase" = yes ; then
4175         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4176 set dummy ${ETAGS:-etags}; ac_word=$2
4177 echo "$as_me:4177: checking for $ac_word" >&5
4178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4179 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4180   echo $ECHO_N "(cached) $ECHO_C" >&6
4181 else
4182   if test -n "$MAKE_UPPER_TAGS"; then
4183   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4184 else
4185   ac_save_IFS=$IFS; IFS=$ac_path_separator
4186 ac_dummy="$PATH"
4187 for ac_dir in $ac_dummy; do
4188   IFS=$ac_save_IFS
4189   test -z "$ac_dir" && ac_dir=.
4190   $as_executable_p "$ac_dir/$ac_word" || continue
4191 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4192 echo "$as_me:4192: found $ac_dir/$ac_word" >&5
4193 break
4194 done
4195
4196   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4197 fi
4198 fi
4199 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4200 if test -n "$MAKE_UPPER_TAGS"; then
4201   echo "$as_me:4201: result: $MAKE_UPPER_TAGS" >&5
4202 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4203 else
4204   echo "$as_me:4204: result: no" >&5
4205 echo "${ECHO_T}no" >&6
4206 fi
4207
4208 else
4209         MAKE_UPPER_TAGS=no
4210 fi
4211
4212 if test "$MAKE_UPPER_TAGS" = yes ; then
4213         MAKE_UPPER_TAGS=
4214 else
4215         MAKE_UPPER_TAGS="#"
4216 fi
4217
4218 if test "$MAKE_LOWER_TAGS" = yes ; then
4219         MAKE_LOWER_TAGS=
4220 else
4221         MAKE_LOWER_TAGS="#"
4222 fi
4223
4224 echo "$as_me:4224: checking for makeflags variable" >&5
4225 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4226 if test "${cf_cv_makeflags+set}" = set; then
4227   echo $ECHO_N "(cached) $ECHO_C" >&6
4228 else
4229
4230         cf_cv_makeflags=''
4231         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4232         do
4233                 cat >cf_makeflags.tmp <<CF_EOF
4234 SHELL = $SHELL
4235 all :
4236         @ echo '.$cf_option'
4237 CF_EOF
4238                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4239                 case "$cf_result" in
4240                 (.*k|.*kw)
4241                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4242                         case "$cf_result" in
4243                         (.*CC=*)        cf_cv_makeflags=
4244                                 ;;
4245                         (*)     cf_cv_makeflags=$cf_option
4246                                 ;;
4247                         esac
4248                         break
4249                         ;;
4250                 (.-)
4251                         ;;
4252                 (*)
4253
4254 echo "${as_me:-configure}:4254: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4255
4256                         ;;
4257                 esac
4258         done
4259         rm -f cf_makeflags.tmp
4260
4261 fi
4262 echo "$as_me:4262: result: $cf_cv_makeflags" >&5
4263 echo "${ECHO_T}$cf_cv_makeflags" >&6
4264
4265 if test -n "$ac_tool_prefix"; then
4266   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4267 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4268 echo "$as_me:4268: checking for $ac_word" >&5
4269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4270 if test "${ac_cv_prog_RANLIB+set}" = set; then
4271   echo $ECHO_N "(cached) $ECHO_C" >&6
4272 else
4273   if test -n "$RANLIB"; then
4274   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4275 else
4276   ac_save_IFS=$IFS; IFS=$ac_path_separator
4277 ac_dummy="$PATH"
4278 for ac_dir in $ac_dummy; do
4279   IFS=$ac_save_IFS
4280   test -z "$ac_dir" && ac_dir=.
4281   $as_executable_p "$ac_dir/$ac_word" || continue
4282 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4283 echo "$as_me:4283: found $ac_dir/$ac_word" >&5
4284 break
4285 done
4286
4287 fi
4288 fi
4289 RANLIB=$ac_cv_prog_RANLIB
4290 if test -n "$RANLIB"; then
4291   echo "$as_me:4291: result: $RANLIB" >&5
4292 echo "${ECHO_T}$RANLIB" >&6
4293 else
4294   echo "$as_me:4294: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298 fi
4299 if test -z "$ac_cv_prog_RANLIB"; then
4300   ac_ct_RANLIB=$RANLIB
4301   # Extract the first word of "ranlib", so it can be a program name with args.
4302 set dummy ranlib; ac_word=$2
4303 echo "$as_me:4303: checking for $ac_word" >&5
4304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4305 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4306   echo $ECHO_N "(cached) $ECHO_C" >&6
4307 else
4308   if test -n "$ac_ct_RANLIB"; then
4309   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4310 else
4311   ac_save_IFS=$IFS; IFS=$ac_path_separator
4312 ac_dummy="$PATH"
4313 for ac_dir in $ac_dummy; do
4314   IFS=$ac_save_IFS
4315   test -z "$ac_dir" && ac_dir=.
4316   $as_executable_p "$ac_dir/$ac_word" || continue
4317 ac_cv_prog_ac_ct_RANLIB="ranlib"
4318 echo "$as_me:4318: found $ac_dir/$ac_word" >&5
4319 break
4320 done
4321
4322   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4323 fi
4324 fi
4325 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4326 if test -n "$ac_ct_RANLIB"; then
4327   echo "$as_me:4327: result: $ac_ct_RANLIB" >&5
4328 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4329 else
4330   echo "$as_me:4330: result: no" >&5
4331 echo "${ECHO_T}no" >&6
4332 fi
4333
4334   RANLIB=$ac_ct_RANLIB
4335 else
4336   RANLIB="$ac_cv_prog_RANLIB"
4337 fi
4338
4339 if test -n "$ac_tool_prefix"; then
4340   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4341 set dummy ${ac_tool_prefix}ld; ac_word=$2
4342 echo "$as_me:4342: checking for $ac_word" >&5
4343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4344 if test "${ac_cv_prog_LD+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347   if test -n "$LD"; then
4348   ac_cv_prog_LD="$LD" # Let the user override the test.
4349 else
4350   ac_save_IFS=$IFS; IFS=$ac_path_separator
4351 ac_dummy="$PATH"
4352 for ac_dir in $ac_dummy; do
4353   IFS=$ac_save_IFS
4354   test -z "$ac_dir" && ac_dir=.
4355   $as_executable_p "$ac_dir/$ac_word" || continue
4356 ac_cv_prog_LD="${ac_tool_prefix}ld"
4357 echo "$as_me:4357: found $ac_dir/$ac_word" >&5
4358 break
4359 done
4360
4361 fi
4362 fi
4363 LD=$ac_cv_prog_LD
4364 if test -n "$LD"; then
4365   echo "$as_me:4365: result: $LD" >&5
4366 echo "${ECHO_T}$LD" >&6
4367 else
4368   echo "$as_me:4368: result: no" >&5
4369 echo "${ECHO_T}no" >&6
4370 fi
4371
4372 fi
4373 if test -z "$ac_cv_prog_LD"; then
4374   ac_ct_LD=$LD
4375   # Extract the first word of "ld", so it can be a program name with args.
4376 set dummy ld; ac_word=$2
4377 echo "$as_me:4377: checking for $ac_word" >&5
4378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4379 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   if test -n "$ac_ct_LD"; then
4383   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4384 else
4385   ac_save_IFS=$IFS; IFS=$ac_path_separator
4386 ac_dummy="$PATH"
4387 for ac_dir in $ac_dummy; do
4388   IFS=$ac_save_IFS
4389   test -z "$ac_dir" && ac_dir=.
4390   $as_executable_p "$ac_dir/$ac_word" || continue
4391 ac_cv_prog_ac_ct_LD="ld"
4392 echo "$as_me:4392: found $ac_dir/$ac_word" >&5
4393 break
4394 done
4395
4396   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4397 fi
4398 fi
4399 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4400 if test -n "$ac_ct_LD"; then
4401   echo "$as_me:4401: result: $ac_ct_LD" >&5
4402 echo "${ECHO_T}$ac_ct_LD" >&6
4403 else
4404   echo "$as_me:4404: result: no" >&5
4405 echo "${ECHO_T}no" >&6
4406 fi
4407
4408   LD=$ac_ct_LD
4409 else
4410   LD="$ac_cv_prog_LD"
4411 fi
4412
4413 if test -n "$ac_tool_prefix"; then
4414   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4415 set dummy ${ac_tool_prefix}ar; ac_word=$2
4416 echo "$as_me:4416: checking for $ac_word" >&5
4417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4418 if test "${ac_cv_prog_AR+set}" = set; then
4419   echo $ECHO_N "(cached) $ECHO_C" >&6
4420 else
4421   if test -n "$AR"; then
4422   ac_cv_prog_AR="$AR" # Let the user override the test.
4423 else
4424   ac_save_IFS=$IFS; IFS=$ac_path_separator
4425 ac_dummy="$PATH"
4426 for ac_dir in $ac_dummy; do
4427   IFS=$ac_save_IFS
4428   test -z "$ac_dir" && ac_dir=.
4429   $as_executable_p "$ac_dir/$ac_word" || continue
4430 ac_cv_prog_AR="${ac_tool_prefix}ar"
4431 echo "$as_me:4431: found $ac_dir/$ac_word" >&5
4432 break
4433 done
4434
4435 fi
4436 fi
4437 AR=$ac_cv_prog_AR
4438 if test -n "$AR"; then
4439   echo "$as_me:4439: result: $AR" >&5
4440 echo "${ECHO_T}$AR" >&6
4441 else
4442   echo "$as_me:4442: result: no" >&5
4443 echo "${ECHO_T}no" >&6
4444 fi
4445
4446 fi
4447 if test -z "$ac_cv_prog_AR"; then
4448   ac_ct_AR=$AR
4449   # Extract the first word of "ar", so it can be a program name with args.
4450 set dummy ar; ac_word=$2
4451 echo "$as_me:4451: checking for $ac_word" >&5
4452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4453 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   if test -n "$ac_ct_AR"; then
4457   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4458 else
4459   ac_save_IFS=$IFS; IFS=$ac_path_separator
4460 ac_dummy="$PATH"
4461 for ac_dir in $ac_dummy; do
4462   IFS=$ac_save_IFS
4463   test -z "$ac_dir" && ac_dir=.
4464   $as_executable_p "$ac_dir/$ac_word" || continue
4465 ac_cv_prog_ac_ct_AR="ar"
4466 echo "$as_me:4466: found $ac_dir/$ac_word" >&5
4467 break
4468 done
4469
4470   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4471 fi
4472 fi
4473 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4474 if test -n "$ac_ct_AR"; then
4475   echo "$as_me:4475: result: $ac_ct_AR" >&5
4476 echo "${ECHO_T}$ac_ct_AR" >&6
4477 else
4478   echo "$as_me:4478: result: no" >&5
4479 echo "${ECHO_T}no" >&6
4480 fi
4481
4482   AR=$ac_ct_AR
4483 else
4484   AR="$ac_cv_prog_AR"
4485 fi
4486
4487 if test -n "$ac_tool_prefix"; then
4488   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4489 set dummy ${ac_tool_prefix}nm; ac_word=$2
4490 echo "$as_me:4490: checking for $ac_word" >&5
4491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4492 if test "${ac_cv_prog_NM+set}" = set; then
4493   echo $ECHO_N "(cached) $ECHO_C" >&6
4494 else
4495   if test -n "$NM"; then
4496   ac_cv_prog_NM="$NM" # Let the user override the test.
4497 else
4498   ac_save_IFS=$IFS; IFS=$ac_path_separator
4499 ac_dummy="$PATH"
4500 for ac_dir in $ac_dummy; do
4501   IFS=$ac_save_IFS
4502   test -z "$ac_dir" && ac_dir=.
4503   $as_executable_p "$ac_dir/$ac_word" || continue
4504 ac_cv_prog_NM="${ac_tool_prefix}nm"
4505 echo "$as_me:4505: found $ac_dir/$ac_word" >&5
4506 break
4507 done
4508
4509 fi
4510 fi
4511 NM=$ac_cv_prog_NM
4512 if test -n "$NM"; then
4513   echo "$as_me:4513: result: $NM" >&5
4514 echo "${ECHO_T}$NM" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520 fi
4521 if test -z "$ac_cv_prog_NM"; then
4522   ac_ct_NM=$NM
4523   # Extract the first word of "nm", so it can be a program name with args.
4524 set dummy nm; ac_word=$2
4525 echo "$as_me:4525: checking for $ac_word" >&5
4526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4527 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4528   echo $ECHO_N "(cached) $ECHO_C" >&6
4529 else
4530   if test -n "$ac_ct_NM"; then
4531   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4532 else
4533   ac_save_IFS=$IFS; IFS=$ac_path_separator
4534 ac_dummy="$PATH"
4535 for ac_dir in $ac_dummy; do
4536   IFS=$ac_save_IFS
4537   test -z "$ac_dir" && ac_dir=.
4538   $as_executable_p "$ac_dir/$ac_word" || continue
4539 ac_cv_prog_ac_ct_NM="nm"
4540 echo "$as_me:4540: found $ac_dir/$ac_word" >&5
4541 break
4542 done
4543
4544   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4545 fi
4546 fi
4547 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4548 if test -n "$ac_ct_NM"; then
4549   echo "$as_me:4549: result: $ac_ct_NM" >&5
4550 echo "${ECHO_T}$ac_ct_NM" >&6
4551 else
4552   echo "$as_me:4552: result: no" >&5
4553 echo "${ECHO_T}no" >&6
4554 fi
4555
4556   NM=$ac_ct_NM
4557 else
4558   NM="$ac_cv_prog_NM"
4559 fi
4560
4561 if test -n "$ac_tool_prefix"; then
4562   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4563 set dummy ${ac_tool_prefix}ar; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_AR+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$AR"; then
4570   ac_cv_prog_AR="$AR" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_AR="${ac_tool_prefix}ar"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 AR=$ac_cv_prog_AR
4586 if test -n "$AR"; then
4587   echo "$as_me:4587: result: $AR" >&5
4588 echo "${ECHO_T}$AR" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594 fi
4595 if test -z "$ac_cv_prog_AR"; then
4596   ac_ct_AR=$AR
4597   # Extract the first word of "ar", so it can be a program name with args.
4598 set dummy ar; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$ac_ct_AR"; then
4605   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_ac_ct_AR="ar"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4619 fi
4620 fi
4621 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4622 if test -n "$ac_ct_AR"; then
4623   echo "$as_me:4623: result: $ac_ct_AR" >&5
4624 echo "${ECHO_T}$ac_ct_AR" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630   AR=$ac_ct_AR
4631 else
4632   AR="$ac_cv_prog_AR"
4633 fi
4634
4635 echo "$as_me:4635: checking for options to update archives" >&5
4636 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4637 if test "${cf_cv_ar_flags+set}" = set; then
4638   echo $ECHO_N "(cached) $ECHO_C" >&6
4639 else
4640
4641         cf_cv_ar_flags=unknown
4642         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4643         do
4644
4645                 # check if $ARFLAGS already contains this choice
4646                 if test "x$ARFLAGS" != "x" ; then
4647                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4648                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4649                                 cf_cv_ar_flags=
4650                                 break
4651                         fi
4652                 fi
4653
4654                 rm -f conftest.$ac_cv_objext
4655                 rm -f conftest.a
4656
4657                 cat >conftest.$ac_ext <<EOF
4658 #line 4658 "configure"
4659 int     testdata[3] = { 123, 456, 789 };
4660 EOF
4661                 if { (eval echo "$as_me:4661: \"$ac_compile\"") >&5
4662   (eval $ac_compile) 2>&5
4663   ac_status=$?
4664   echo "$as_me:4664: \$? = $ac_status" >&5
4665   (exit $ac_status); } ; then
4666                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4667                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4668                         if test -f conftest.a ; then
4669                                 cf_cv_ar_flags=$cf_ar_flags
4670                                 break
4671                         fi
4672                 else
4673                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4674
4675 echo "${as_me:-configure}:4675: testing cannot compile test-program ..." 1>&5
4676
4677                         break
4678                 fi
4679         done
4680         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4681
4682 fi
4683 echo "$as_me:4683: result: $cf_cv_ar_flags" >&5
4684 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4685
4686 if test -n "$ARFLAGS" ; then
4687         if test -n "$cf_cv_ar_flags" ; then
4688                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4689         fi
4690 else
4691         ARFLAGS=$cf_cv_ar_flags
4692 fi
4693
4694 echo "$as_me:4694: checking if you have specified an install-prefix" >&5
4695 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4696
4697 # Check whether --with-install-prefix or --without-install-prefix was given.
4698 if test "${with_install_prefix+set}" = set; then
4699   withval="$with_install_prefix"
4700   case "x$withval" in
4701         (xyes|xno)
4702                 ;;
4703         (*)     DESTDIR="$withval"
4704                 ;;
4705         esac
4706 fi;
4707 echo "$as_me:4707: result: $DESTDIR" >&5
4708 echo "${ECHO_T}$DESTDIR" >&6
4709
4710 ###############################################################################
4711
4712 # If we're cross-compiling, allow the user to override the tools and their
4713 # options.  The configure script is oriented toward identifying the host
4714 # compiler, etc., but we need a build compiler to generate parts of the source.
4715
4716 if test "$cross_compiling" = yes ; then
4717
4718         # defaults that we might want to override
4719         : ${BUILD_CFLAGS:=''}
4720         : ${BUILD_CPPFLAGS:=''}
4721         : ${BUILD_LDFLAGS:=''}
4722         : ${BUILD_LIBS:=''}
4723         : ${BUILD_EXEEXT:='$x'}
4724         : ${BUILD_OBJEXT:='o'}
4725
4726 # Check whether --with-build-cc or --without-build-cc was given.
4727 if test "${with_build_cc+set}" = set; then
4728   withval="$with_build_cc"
4729   BUILD_CC="$withval"
4730 else
4731   for ac_prog in gcc clang c99 c89 cc cl
4732 do
4733   # Extract the first word of "$ac_prog", so it can be a program name with args.
4734 set dummy $ac_prog; ac_word=$2
4735 echo "$as_me:4735: checking for $ac_word" >&5
4736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4737 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4738   echo $ECHO_N "(cached) $ECHO_C" >&6
4739 else
4740   if test -n "$BUILD_CC"; then
4741   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4742 else
4743   ac_save_IFS=$IFS; IFS=$ac_path_separator
4744 ac_dummy="$PATH"
4745 for ac_dir in $ac_dummy; do
4746   IFS=$ac_save_IFS
4747   test -z "$ac_dir" && ac_dir=.
4748   $as_executable_p "$ac_dir/$ac_word" || continue
4749 ac_cv_prog_BUILD_CC="$ac_prog"
4750 echo "$as_me:4750: found $ac_dir/$ac_word" >&5
4751 break
4752 done
4753
4754 fi
4755 fi
4756 BUILD_CC=$ac_cv_prog_BUILD_CC
4757 if test -n "$BUILD_CC"; then
4758   echo "$as_me:4758: result: $BUILD_CC" >&5
4759 echo "${ECHO_T}$BUILD_CC" >&6
4760 else
4761   echo "$as_me:4761: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763 fi
4764
4765   test -n "$BUILD_CC" && break
4766 done
4767 test -n "$BUILD_CC" || BUILD_CC="none"
4768
4769 fi;
4770         echo "$as_me:4770: checking for native build C compiler" >&5
4771 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4772         echo "$as_me:4772: result: $BUILD_CC" >&5
4773 echo "${ECHO_T}$BUILD_CC" >&6
4774
4775         echo "$as_me:4775: checking for native build C preprocessor" >&5
4776 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4777
4778 # Check whether --with-build-cpp or --without-build-cpp was given.
4779 if test "${with_build_cpp+set}" = set; then
4780   withval="$with_build_cpp"
4781   BUILD_CPP="$withval"
4782 else
4783   BUILD_CPP='${BUILD_CC} -E'
4784 fi;
4785         echo "$as_me:4785: result: $BUILD_CPP" >&5
4786 echo "${ECHO_T}$BUILD_CPP" >&6
4787
4788         echo "$as_me:4788: checking for native build C flags" >&5
4789 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4790
4791 # Check whether --with-build-cflags or --without-build-cflags was given.
4792 if test "${with_build_cflags+set}" = set; then
4793   withval="$with_build_cflags"
4794   BUILD_CFLAGS="$withval"
4795 fi;
4796         echo "$as_me:4796: result: $BUILD_CFLAGS" >&5
4797 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4798
4799         echo "$as_me:4799: checking for native build C preprocessor-flags" >&5
4800 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4801
4802 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4803 if test "${with_build_cppflags+set}" = set; then
4804   withval="$with_build_cppflags"
4805   BUILD_CPPFLAGS="$withval"
4806 fi;
4807         echo "$as_me:4807: result: $BUILD_CPPFLAGS" >&5
4808 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4809
4810         echo "$as_me:4810: checking for native build linker-flags" >&5
4811 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4812
4813 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4814 if test "${with_build_ldflags+set}" = set; then
4815   withval="$with_build_ldflags"
4816   BUILD_LDFLAGS="$withval"
4817 fi;
4818         echo "$as_me:4818: result: $BUILD_LDFLAGS" >&5
4819 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4820
4821         echo "$as_me:4821: checking for native build linker-libraries" >&5
4822 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4823
4824 # Check whether --with-build-libs or --without-build-libs was given.
4825 if test "${with_build_libs+set}" = set; then
4826   withval="$with_build_libs"
4827   BUILD_LIBS="$withval"
4828 fi;
4829         echo "$as_me:4829: result: $BUILD_LIBS" >&5
4830 echo "${ECHO_T}$BUILD_LIBS" >&6
4831
4832         # this assumes we're on Unix.
4833         BUILD_EXEEXT=
4834         BUILD_OBJEXT=o
4835
4836         : ${BUILD_CC:='${CC}'}
4837
4838         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4839                 { { echo "$as_me:4839: error: Cross-build requires two compilers.
4840 Use --with-build-cc to specify the native compiler." >&5
4841 echo "$as_me: error: Cross-build requires two compilers.
4842 Use --with-build-cc to specify the native compiler." >&2;}
4843    { (exit 1); exit 1; }; }
4844         fi
4845
4846 else
4847         : ${BUILD_CC:='${CC}'}
4848         : ${BUILD_CPP:='${CPP}'}
4849         : ${BUILD_CFLAGS:='${CFLAGS}'}
4850         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4851         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4852         : ${BUILD_LIBS:='${LIBS}'}
4853         : ${BUILD_EXEEXT:='$x'}
4854         : ${BUILD_OBJEXT:='o'}
4855 fi
4856
4857 ###############################################################################
4858
4859 ### Options to allow the user to specify the set of libraries which are used.
4860 ### Use "--without-normal --with-shared" to allow the default model to be
4861 ### shared, for example.
4862 cf_list_models=""
4863
4864 echo "$as_me:4864: checking if libtool -version-number should be used" >&5
4865 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4866
4867 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4868 if test "${enable_libtool_version+set}" = set; then
4869   enableval="$enable_libtool_version"
4870   test "$enableval" != no && enableval=yes
4871         if test "$enableval" != "yes" ; then
4872     cf_libtool_version=no
4873         else
4874                 cf_libtool_version=yes
4875         fi
4876 else
4877   enableval=yes
4878         cf_libtool_version=yes
4879
4880 fi;
4881 echo "$as_me:4881: result: $cf_libtool_version" >&5
4882 echo "${ECHO_T}$cf_libtool_version" >&6
4883
4884 if test "$cf_libtool_version" = yes ; then
4885         LIBTOOL_VERSION="-version-number"
4886 else
4887         LIBTOOL_VERSION="-version-info"
4888         case "x$VERSION" in
4889         (x)
4890                 { echo "$as_me:4890: WARNING: VERSION was not set" >&5
4891 echo "$as_me: WARNING: VERSION was not set" >&2;}
4892                 ;;
4893         (x*.*.*)
4894                 ABI_VERSION="$VERSION"
4895                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4896
4897 echo "${as_me:-configure}:4897: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4898
4899                 ;;
4900         (x*:*:*)
4901                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4902                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4903
4904 echo "${as_me:-configure}:4904: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4905
4906                 ;;
4907         (*)
4908                 { echo "$as_me:4908: WARNING: unexpected VERSION value: $VERSION" >&5
4909 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4910                 ;;
4911         esac
4912 fi
4913
4914 LIBTOOL=
4915
4916 # common library maintenance symbols that are convenient for libtool scripts:
4917 LIB_CREATE='${AR} -cr'
4918 LIB_OBJECT='${OBJECTS}'
4919 LIB_SUFFIX=.a
4920 LIB_PREP="$RANLIB"
4921
4922 # symbols used to prop libtool up to enable it to determine what it should be
4923 # doing:
4924 LIB_CLEAN=
4925 LIB_COMPILE=
4926 LIB_LINK='${CC}'
4927 LIB_INSTALL=
4928 LIB_UNINSTALL=
4929
4930 echo "$as_me:4930: checking if you want to build libraries with libtool" >&5
4931 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4932
4933 # Check whether --with-libtool or --without-libtool was given.
4934 if test "${with_libtool+set}" = set; then
4935   withval="$with_libtool"
4936   with_libtool=$withval
4937 else
4938   with_libtool=no
4939 fi;
4940 echo "$as_me:4940: result: $with_libtool" >&5
4941 echo "${ECHO_T}$with_libtool" >&6
4942 if test "$with_libtool" != "no"; then
4943
4944         if test "$with_libtool" != "yes" ; then
4945
4946 if test "x$prefix" != xNONE; then
4947         cf_path_syntax="$prefix"
4948 else
4949         cf_path_syntax="$ac_default_prefix"
4950 fi
4951
4952 case ".$with_libtool" in
4953 (.\$\(*\)*|.\'*\'*)
4954         ;;
4955 (..|./*|.\\*)
4956         ;;
4957 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4958         ;;
4959 (.\${*prefix}*|.\${*dir}*)
4960         eval with_libtool="$with_libtool"
4961         case ".$with_libtool" in
4962         (.NONE/*)
4963                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4964                 ;;
4965         esac
4966         ;;
4967 (.no|.NONE/*)
4968         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4969         ;;
4970 (*)
4971         { { echo "$as_me:4971: error: expected a pathname, not \"$with_libtool\"" >&5
4972 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4973    { (exit 1); exit 1; }; }
4974         ;;
4975 esac
4976
4977                 LIBTOOL=$with_libtool
4978         else
4979                 if test -n "$ac_tool_prefix"; then
4980   for ac_prog in libtool glibtool
4981   do
4982     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4983 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4984 echo "$as_me:4984: checking for $ac_word" >&5
4985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4986 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4987   echo $ECHO_N "(cached) $ECHO_C" >&6
4988 else
4989   if test -n "$LIBTOOL"; then
4990   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4991 else
4992   ac_save_IFS=$IFS; IFS=$ac_path_separator
4993 ac_dummy="$PATH"
4994 for ac_dir in $ac_dummy; do
4995   IFS=$ac_save_IFS
4996   test -z "$ac_dir" && ac_dir=.
4997   $as_executable_p "$ac_dir/$ac_word" || continue
4998 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4999 echo "$as_me:4999: found $ac_dir/$ac_word" >&5
5000 break
5001 done
5002
5003 fi
5004 fi
5005 LIBTOOL=$ac_cv_prog_LIBTOOL
5006 if test -n "$LIBTOOL"; then
5007   echo "$as_me:5007: result: $LIBTOOL" >&5
5008 echo "${ECHO_T}$LIBTOOL" >&6
5009 else
5010   echo "$as_me:5010: result: no" >&5
5011 echo "${ECHO_T}no" >&6
5012 fi
5013
5014     test -n "$LIBTOOL" && break
5015   done
5016 fi
5017 if test -z "$LIBTOOL"; then
5018   ac_ct_LIBTOOL=$LIBTOOL
5019   for ac_prog in libtool glibtool
5020 do
5021   # Extract the first word of "$ac_prog", so it can be a program name with args.
5022 set dummy $ac_prog; ac_word=$2
5023 echo "$as_me:5023: checking for $ac_word" >&5
5024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5025 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5026   echo $ECHO_N "(cached) $ECHO_C" >&6
5027 else
5028   if test -n "$ac_ct_LIBTOOL"; then
5029   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5030 else
5031   ac_save_IFS=$IFS; IFS=$ac_path_separator
5032 ac_dummy="$PATH"
5033 for ac_dir in $ac_dummy; do
5034   IFS=$ac_save_IFS
5035   test -z "$ac_dir" && ac_dir=.
5036   $as_executable_p "$ac_dir/$ac_word" || continue
5037 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5038 echo "$as_me:5038: found $ac_dir/$ac_word" >&5
5039 break
5040 done
5041
5042 fi
5043 fi
5044 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5045 if test -n "$ac_ct_LIBTOOL"; then
5046   echo "$as_me:5046: result: $ac_ct_LIBTOOL" >&5
5047 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5048 else
5049   echo "$as_me:5049: result: no" >&5
5050 echo "${ECHO_T}no" >&6
5051 fi
5052
5053   test -n "$ac_ct_LIBTOOL" && break
5054 done
5055 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5056
5057   LIBTOOL=$ac_ct_LIBTOOL
5058 fi
5059
5060 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5061 then
5062         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.].*//'`
5063 else
5064         cf_cv_libtool_version=
5065 fi
5066 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5067
5068                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5069                 then
5070
5071 unset ac_cv_prog_ac_ct_LIBTOOL
5072 unset ac_ct_LIBTOOL
5073 unset LIBTOOL
5074
5075                         if test -n "$ac_tool_prefix"; then
5076   for ac_prog in glibtool
5077   do
5078     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5079 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5080 echo "$as_me:5080: checking for $ac_word" >&5
5081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5082 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5083   echo $ECHO_N "(cached) $ECHO_C" >&6
5084 else
5085   if test -n "$LIBTOOL"; then
5086   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5087 else
5088   ac_save_IFS=$IFS; IFS=$ac_path_separator
5089 ac_dummy="$PATH"
5090 for ac_dir in $ac_dummy; do
5091   IFS=$ac_save_IFS
5092   test -z "$ac_dir" && ac_dir=.
5093   $as_executable_p "$ac_dir/$ac_word" || continue
5094 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5095 echo "$as_me:5095: found $ac_dir/$ac_word" >&5
5096 break
5097 done
5098
5099 fi
5100 fi
5101 LIBTOOL=$ac_cv_prog_LIBTOOL
5102 if test -n "$LIBTOOL"; then
5103   echo "$as_me:5103: result: $LIBTOOL" >&5
5104 echo "${ECHO_T}$LIBTOOL" >&6
5105 else
5106   echo "$as_me:5106: result: no" >&5
5107 echo "${ECHO_T}no" >&6
5108 fi
5109
5110     test -n "$LIBTOOL" && break
5111   done
5112 fi
5113 if test -z "$LIBTOOL"; then
5114   ac_ct_LIBTOOL=$LIBTOOL
5115   for ac_prog in glibtool
5116 do
5117   # Extract the first word of "$ac_prog", so it can be a program name with args.
5118 set dummy $ac_prog; ac_word=$2
5119 echo "$as_me:5119: checking for $ac_word" >&5
5120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5121 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5122   echo $ECHO_N "(cached) $ECHO_C" >&6
5123 else
5124   if test -n "$ac_ct_LIBTOOL"; then
5125   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5126 else
5127   ac_save_IFS=$IFS; IFS=$ac_path_separator
5128 ac_dummy="$PATH"
5129 for ac_dir in $ac_dummy; do
5130   IFS=$ac_save_IFS
5131   test -z "$ac_dir" && ac_dir=.
5132   $as_executable_p "$ac_dir/$ac_word" || continue
5133 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5134 echo "$as_me:5134: found $ac_dir/$ac_word" >&5
5135 break
5136 done
5137
5138 fi
5139 fi
5140 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5141 if test -n "$ac_ct_LIBTOOL"; then
5142   echo "$as_me:5142: result: $ac_ct_LIBTOOL" >&5
5143 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5144 else
5145   echo "$as_me:5145: result: no" >&5
5146 echo "${ECHO_T}no" >&6
5147 fi
5148
5149   test -n "$ac_ct_LIBTOOL" && break
5150 done
5151 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5152
5153   LIBTOOL=$ac_ct_LIBTOOL
5154 fi
5155
5156 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5157 then
5158         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.].*//'`
5159 else
5160         cf_cv_libtool_version=
5161 fi
5162 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5163
5164                 fi
5165         fi
5166         if test -z "$LIBTOOL" ; then
5167                 { { echo "$as_me:5167: error: Cannot find libtool" >&5
5168 echo "$as_me: error: Cannot find libtool" >&2;}
5169    { (exit 1); exit 1; }; }
5170         fi
5171         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5172         LIB_OBJECT='${OBJECTS:.o=.lo}'
5173         LIB_SUFFIX=.la
5174         LIB_CLEAN='${LIBTOOL} --mode=clean'
5175         LIB_COMPILE='${LIBTOOL} --mode=compile'
5176         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5177         LIB_INSTALL='${LIBTOOL} --mode=install'
5178         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5179         LIB_PREP=:
5180
5181 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5182 then
5183         echo "$as_me:5183: checking version of $LIBTOOL" >&5
5184 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5185
5186 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5187 then
5188         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.].*//'`
5189 else
5190         cf_cv_libtool_version=
5191 fi
5192 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5193
5194         echo "$as_me:5194: result: $cf_cv_libtool_version" >&5
5195 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5196         if test -z "$cf_cv_libtool_version" ; then
5197                 { { echo "$as_me:5197: error: This is not GNU libtool" >&5
5198 echo "$as_me: error: This is not GNU libtool" >&2;}
5199    { (exit 1); exit 1; }; }
5200         fi
5201 else
5202         { { echo "$as_me:5202: error: GNU libtool has not been found" >&5
5203 echo "$as_me: error: GNU libtool has not been found" >&2;}
5204    { (exit 1); exit 1; }; }
5205 fi
5206
5207         # special hack to add -no-undefined (which libtool should do for itself)
5208         LT_UNDEF=
5209         case "$cf_cv_system_name" in
5210         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5211                 LT_UNDEF=-no-undefined
5212                 ;;
5213         esac
5214
5215         # special hack to add --tag option for C++ compiler
5216         case $cf_cv_libtool_version in
5217         (1.[5-9]*|[2-9].[0-9.a-z]*)
5218                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5219                 LIBTOOL="$LIBTOOL --tag=CC"
5220                 ;;
5221         (*)
5222                 LIBTOOL_CXX="$LIBTOOL"
5223                 ;;
5224         esac
5225 else
5226         LIBTOOL=""
5227         LIBTOOL_CXX=""
5228 fi
5229
5230 test -z "$LIBTOOL" && ECHO_LT=
5231
5232 if test "$with_libtool" != "no" ; then
5233
5234 cf_list_models="$cf_list_models libtool"
5235
5236 else
5237
5238 echo "$as_me:5238: checking if you want to build shared libraries" >&5
5239 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5240
5241 # Check whether --with-shared or --without-shared was given.
5242 if test "${with_shared+set}" = set; then
5243   withval="$with_shared"
5244   with_shared=$withval
5245 else
5246   with_shared=no
5247 fi;
5248 echo "$as_me:5248: result: $with_shared" >&5
5249 echo "${ECHO_T}$with_shared" >&6
5250 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5251
5252 echo "$as_me:5252: checking if you want to build static libraries" >&5
5253 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5254
5255 # Check whether --with-normal or --without-normal was given.
5256 if test "${with_normal+set}" = set; then
5257   withval="$with_normal"
5258   with_normal=$withval
5259 else
5260   with_normal=yes
5261 fi;
5262 echo "$as_me:5262: result: $with_normal" >&5
5263 echo "${ECHO_T}$with_normal" >&6
5264 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5265
5266 echo "$as_me:5266: checking if you want to build debug libraries" >&5
5267 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5268
5269 # Check whether --with-debug or --without-debug was given.
5270 if test "${with_debug+set}" = set; then
5271   withval="$with_debug"
5272   with_debug=$withval
5273 else
5274   with_debug=yes
5275 fi;
5276 echo "$as_me:5276: result: $with_debug" >&5
5277 echo "${ECHO_T}$with_debug" >&6
5278 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5279
5280 echo "$as_me:5280: checking if you want to build profiling libraries" >&5
5281 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5282
5283 # Check whether --with-profile or --without-profile was given.
5284 if test "${with_profile+set}" = set; then
5285   withval="$with_profile"
5286   with_profile=$withval
5287 else
5288   with_profile=no
5289 fi;
5290 echo "$as_me:5290: result: $with_profile" >&5
5291 echo "${ECHO_T}$with_profile" >&6
5292 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5293
5294 fi
5295
5296 if test "X$cf_with_cxx_binding" != Xno; then
5297 if test "x$with_shared" = "xyes"; then
5298 echo "$as_me:5298: checking if you want to build C++ shared libraries" >&5
5299 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5300
5301 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5302 if test "${with_cxx_shared+set}" = set; then
5303   withval="$with_cxx_shared"
5304   with_shared_cxx=$withval
5305 else
5306   with_shared_cxx=no
5307 fi;
5308 echo "$as_me:5308: result: $with_shared_cxx" >&5
5309 echo "${ECHO_T}$with_shared_cxx" >&6
5310 fi
5311 fi
5312
5313 ###############################################################################
5314
5315 echo "$as_me:5315: checking for specified models" >&5
5316 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5317 test -z "$cf_list_models" && cf_list_models=normal
5318 test "$with_libtool" != "no" && cf_list_models=libtool
5319 echo "$as_me:5319: result: $cf_list_models" >&5
5320 echo "${ECHO_T}$cf_list_models" >&6
5321
5322 ### Use the first model as the default, and save its suffix for use in building
5323 ### up test-applications.
5324 echo "$as_me:5324: checking for default model" >&5
5325 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5326 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5327 echo "$as_me:5327: result: $DFT_LWR_MODEL" >&5
5328 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5329
5330 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5331
5332 TICS_NAME=tic
5333
5334 TINFO_NAME=tinfo
5335
5336 LIB_NAME=ncurses
5337
5338 LIB_DIR=../lib
5339 LIB_2ND=../../lib
5340
5341 echo "$as_me:5341: checking if you want to have a library-prefix" >&5
5342 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5343
5344 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5345 if test "${with_lib_prefix+set}" = set; then
5346   withval="$with_lib_prefix"
5347   with_lib_prefix=$withval
5348 else
5349   with_lib_prefix=auto
5350 fi;
5351 echo "$as_me:5351: result: $with_lib_prefix" >&5
5352 echo "${ECHO_T}$with_lib_prefix" >&6
5353
5354 if test $with_lib_prefix = auto
5355 then
5356
5357         case $cf_cv_system_name in
5358         (OS/2*|os2*)
5359                 if test "$DFT_LWR_MODEL" = libtool; then
5360                         LIB_PREFIX='lib'
5361                 else
5362                         LIB_PREFIX=''
5363                 fi
5364                 ;;
5365         (*)     LIB_PREFIX='lib'
5366                 ;;
5367         esac
5368 cf_prefix=$LIB_PREFIX
5369
5370 elif test $with_lib_prefix = no
5371 then
5372         LIB_PREFIX=
5373 else
5374         LIB_PREFIX=$with_lib_prefix
5375 fi
5376
5377 LIB_SUFFIX=
5378
5379         echo "$as_me:5379: checking for PATH separator" >&5
5380 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5381         case $cf_cv_system_name in
5382         (os2*)  PATH_SEPARATOR=';'  ;;
5383         (*)     ${PATH_SEPARATOR:=':'}  ;;
5384         esac
5385
5386         echo "$as_me:5386: result: $PATH_SEPARATOR" >&5
5387 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5388
5389 ###############################################################################
5390
5391 echo "$as_me:5391: checking if you want to build a separate terminfo library" >&5
5392 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5393
5394 # Check whether --with-termlib or --without-termlib was given.
5395 if test "${with_termlib+set}" = set; then
5396   withval="$with_termlib"
5397   with_termlib=$withval
5398 else
5399   with_termlib=no
5400 fi;
5401 echo "$as_me:5401: result: $with_termlib" >&5
5402 echo "${ECHO_T}$with_termlib" >&6
5403
5404 echo "$as_me:5404: checking if you want to build a separate tic library" >&5
5405 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5406
5407 # Check whether --with-ticlib or --without-ticlib was given.
5408 if test "${with_ticlib+set}" = set; then
5409   withval="$with_ticlib"
5410   with_ticlib=$withval
5411 else
5412   with_ticlib=no
5413 fi;
5414 echo "$as_me:5414: result: $with_ticlib" >&5
5415 echo "${ECHO_T}$with_ticlib" >&6
5416
5417 if test X"$CC_G_OPT" = X"" ; then
5418         CC_G_OPT='-g'
5419         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5420 fi
5421
5422 if test X"$CXX_G_OPT" = X"" ; then
5423         CXX_G_OPT='-g'
5424         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5425 fi
5426
5427 echo "$as_me:5427: checking for default loader flags" >&5
5428 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5429 case $DFT_LWR_MODEL in
5430 (libtool) LD_MODEL=''   ;;
5431 (normal)  LD_MODEL=''   ;;
5432 (debug)   LD_MODEL=$CC_G_OPT ;;
5433 (profile) LD_MODEL='-pg';;
5434 (shared)  LD_MODEL=''   ;;
5435 esac
5436 echo "$as_me:5436: result: $LD_MODEL" >&5
5437 echo "${ECHO_T}$LD_MODEL" >&6
5438
5439 case $DFT_LWR_MODEL in
5440 (shared)
5441
5442 echo "$as_me:5442: checking if rpath option should be used" >&5
5443 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5444
5445 # Check whether --enable-rpath or --disable-rpath was given.
5446 if test "${enable_rpath+set}" = set; then
5447   enableval="$enable_rpath"
5448   cf_cv_enable_rpath=$enableval
5449 else
5450   cf_cv_enable_rpath=no
5451 fi;
5452 echo "$as_me:5452: result: $cf_cv_enable_rpath" >&5
5453 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5454
5455 echo "$as_me:5455: checking if shared libraries should be relinked during install" >&5
5456 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5457
5458 # Check whether --enable-relink or --disable-relink was given.
5459 if test "${enable_relink+set}" = set; then
5460   enableval="$enable_relink"
5461   cf_cv_do_relink=$enableval
5462 else
5463   cf_cv_do_relink=yes
5464 fi;
5465 echo "$as_me:5465: result: $cf_cv_do_relink" >&5
5466 echo "${ECHO_T}$cf_cv_do_relink" >&6
5467         ;;
5468 esac
5469
5470 # we will build libraries one-level down.
5471 rel_builddir=..
5472
5473 LD_RPATH_OPT=
5474 if test "x$cf_cv_enable_rpath" != xno
5475 then
5476         echo "$as_me:5476: checking for an rpath option" >&5
5477 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5478         case $cf_cv_system_name in
5479         (irix*)
5480                 if test "$GCC" = yes; then
5481                         LD_RPATH_OPT="-Wl,-rpath,"
5482                 else
5483                         LD_RPATH_OPT="-rpath "
5484                 fi
5485                 ;;
5486         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5487                 LD_RPATH_OPT="-Wl,-rpath,"
5488                 ;;
5489         (openbsd[2-9].*|mirbsd*)
5490                 LD_RPATH_OPT="-Wl,-rpath,"
5491                 ;;
5492         (dragonfly*)
5493                 LD_RPATH_OPT="-rpath "
5494                 ;;
5495         (netbsd*)
5496                 LD_RPATH_OPT="-Wl,-rpath,"
5497                 ;;
5498         (osf*|mls+*)
5499                 LD_RPATH_OPT="-rpath "
5500                 ;;
5501         (solaris2*)
5502                 LD_RPATH_OPT="-R"
5503                 ;;
5504         (*)
5505                 ;;
5506         esac
5507         echo "$as_me:5507: result: $LD_RPATH_OPT" >&5
5508 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5509
5510         case "x$LD_RPATH_OPT" in
5511         (x-R*)
5512                 echo "$as_me:5512: checking if we need a space after rpath option" >&5
5513 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5514                 cf_save_LIBS="$LIBS"
5515
5516 cf_add_libs="${LD_RPATH_OPT}$libdir"
5517 # Filter out duplicates - this happens with badly-designed ".pc" files...
5518 for cf_add_1lib in $LIBS
5519 do
5520         for cf_add_2lib in $cf_add_libs
5521         do
5522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5523                 then
5524                         cf_add_1lib=
5525                         break
5526                 fi
5527         done
5528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5529 done
5530 LIBS="$cf_add_libs"
5531
5532                 cat >conftest.$ac_ext <<_ACEOF
5533 #line 5533 "configure"
5534 #include "confdefs.h"
5535
5536 int
5537 main (void)
5538 {
5539
5540   ;
5541   return 0;
5542 }
5543 _ACEOF
5544 rm -f conftest.$ac_objext conftest$ac_exeext
5545 if { (eval echo "$as_me:5545: \"$ac_link\"") >&5
5546   (eval $ac_link) 2>&5
5547   ac_status=$?
5548   echo "$as_me:5548: \$? = $ac_status" >&5
5549   (exit $ac_status); } &&
5550          { ac_try='test -s conftest$ac_exeext'
5551   { (eval echo "$as_me:5551: \"$ac_try\"") >&5
5552   (eval $ac_try) 2>&5
5553   ac_status=$?
5554   echo "$as_me:5554: \$? = $ac_status" >&5
5555   (exit $ac_status); }; }; then
5556   cf_rpath_space=no
5557 else
5558   echo "$as_me: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
5560 cf_rpath_space=yes
5561 fi
5562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5563                 LIBS="$cf_save_LIBS"
5564                 echo "$as_me:5564: result: $cf_rpath_space" >&5
5565 echo "${ECHO_T}$cf_rpath_space" >&6
5566                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5567                 ;;
5568         esac
5569 fi
5570
5571         RM_SHARED_OPTS=
5572         LOCAL_LDFLAGS=
5573         LOCAL_LDFLAGS2=
5574         LD_SHARED_OPTS=
5575         INSTALL_LIB="-m 644"
5576         : ${rel_builddir:=.}
5577
5578         shlibdir=$libdir
5579
5580         MAKE_DLLS="#"
5581
5582         cf_cv_do_symlinks=no
5583         cf_ld_rpath_opt=
5584         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5585
5586         echo "$as_me:5586: checking if release/abi version should be used for shared libs" >&5
5587 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5588
5589 # Check whether --with-shlib-version or --without-shlib-version was given.
5590 if test "${with_shlib_version+set}" = set; then
5591   withval="$with_shlib_version"
5592   test -z "$withval" && withval=auto
5593         case $withval in
5594         (yes)
5595                 cf_cv_shlib_version=auto
5596                 ;;
5597         (rel|abi|auto)
5598                 cf_cv_shlib_version=$withval
5599                 ;;
5600         (*)
5601                 echo "$as_me:5601: result: $withval" >&5
5602 echo "${ECHO_T}$withval" >&6
5603                 { { echo "$as_me:5603: error: option value must be one of: rel, abi, or auto" >&5
5604 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5605    { (exit 1); exit 1; }; }
5606                 ;;
5607         esac
5608
5609 else
5610   cf_cv_shlib_version=auto
5611 fi;
5612         echo "$as_me:5612: result: $cf_cv_shlib_version" >&5
5613 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5614
5615         cf_cv_rm_so_locs=no
5616         cf_try_cflags=
5617
5618         # Some less-capable ports of gcc support only -fpic
5619         CC_SHARED_OPTS=
5620
5621         cf_try_fPIC=no
5622         if test "$GCC" = yes
5623         then
5624                 cf_try_fPIC=yes
5625         else
5626                 case $cf_cv_system_name in
5627                 (*linux*)       # e.g., PGI compiler
5628                         cf_try_fPIC=yes
5629                         ;;
5630                 esac
5631         fi
5632
5633         if test "$cf_try_fPIC" = yes
5634         then
5635                 echo "$as_me:5635: checking which $CC option to use" >&5
5636 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5637                 cf_save_CFLAGS="$CFLAGS"
5638                 for CC_SHARED_OPTS in -fPIC -fpic ''
5639                 do
5640                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5641                         cat >conftest.$ac_ext <<_ACEOF
5642 #line 5642 "configure"
5643 #include "confdefs.h"
5644 #include <stdio.h>
5645 int
5646 main (void)
5647 {
5648 int x = 1
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 rm -f conftest.$ac_objext
5654 if { (eval echo "$as_me:5654: \"$ac_compile\"") >&5
5655   (eval $ac_compile) 2>&5
5656   ac_status=$?
5657   echo "$as_me:5657: \$? = $ac_status" >&5
5658   (exit $ac_status); } &&
5659          { ac_try='test -s conftest.$ac_objext'
5660   { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5661   (eval $ac_try) 2>&5
5662   ac_status=$?
5663   echo "$as_me:5663: \$? = $ac_status" >&5
5664   (exit $ac_status); }; }; then
5665   break
5666 else
5667   echo "$as_me: failed program was:" >&5
5668 cat conftest.$ac_ext >&5
5669 fi
5670 rm -f conftest.$ac_objext conftest.$ac_ext
5671                 done
5672                 echo "$as_me:5672: result: $CC_SHARED_OPTS" >&5
5673 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5674                 CFLAGS="$cf_save_CFLAGS"
5675         fi
5676
5677         cf_cv_shlib_version_infix=no
5678
5679         case $cf_cv_system_name in
5680         (aix4.3-9*|aix[5-7]*)
5681                 if test "$GCC" = yes; then
5682                         CC_SHARED_OPTS='-Wl,-brtl'
5683                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5684                 else
5685                         CC_SHARED_OPTS='-brtl'
5686                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5687                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5688                 fi
5689                 ;;
5690         (beos*)
5691                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5692                 ;;
5693         (cygwin*)
5694                 CC_SHARED_OPTS=
5695                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5696                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5697                 cf_cv_shlib_version=cygdll
5698                 cf_cv_shlib_version_infix=cygdll
5699                 shlibdir=$bindir
5700                 MAKE_DLLS=
5701                 cat >mk_shared_lib.sh <<-CF_EOF
5702                 #!$SHELL
5703                 SHARED_LIB=\$1
5704                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5705                 shift
5706                 cat <<-EOF
5707                 Linking shared library
5708                 ** SHARED_LIB \$SHARED_LIB
5709                 ** IMPORT_LIB \$IMPORT_LIB
5710 EOF
5711                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5712 CF_EOF
5713                 chmod +x mk_shared_lib.sh
5714                 ;;
5715         (msys*)
5716                 CC_SHARED_OPTS=
5717                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5718                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5719                 cf_cv_shlib_version=msysdll
5720                 cf_cv_shlib_version_infix=msysdll
5721                 shlibdir=$bindir
5722                 MAKE_DLLS=
5723                 cat >mk_shared_lib.sh <<-CF_EOF
5724                 #!$SHELL
5725                 SHARED_LIB=\$1
5726                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5727                 shift
5728                 cat <<-EOF
5729                 Linking shared library
5730                 ** SHARED_LIB \$SHARED_LIB
5731                 ** IMPORT_LIB \$IMPORT_LIB
5732 EOF
5733                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5734 CF_EOF
5735                 chmod +x mk_shared_lib.sh
5736                 ;;
5737         (darwin*)
5738                 cf_try_cflags="no-cpp-precomp"
5739                 CC_SHARED_OPTS="-dynamic"
5740                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5741                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5742                 cf_cv_shlib_version_infix=yes
5743                 echo "$as_me:5743: checking if ld -search_paths_first works" >&5
5744 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5745 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5746   echo $ECHO_N "(cached) $ECHO_C" >&6
5747 else
5748
5749                         cf_save_LDFLAGS=$LDFLAGS
5750                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5751                         cat >conftest.$ac_ext <<_ACEOF
5752 #line 5752 "configure"
5753 #include "confdefs.h"
5754
5755 int
5756 main (void)
5757 {
5758 int i;
5759   ;
5760   return 0;
5761 }
5762 _ACEOF
5763 rm -f conftest.$ac_objext conftest$ac_exeext
5764 if { (eval echo "$as_me:5764: \"$ac_link\"") >&5
5765   (eval $ac_link) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); } &&
5769          { ac_try='test -s conftest$ac_exeext'
5770   { (eval echo "$as_me:5770: \"$ac_try\"") >&5
5771   (eval $ac_try) 2>&5
5772   ac_status=$?
5773   echo "$as_me:5773: \$? = $ac_status" >&5
5774   (exit $ac_status); }; }; then
5775   cf_cv_ldflags_search_paths_first=yes
5776 else
5777   echo "$as_me: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 cf_cv_ldflags_search_paths_first=no
5780 fi
5781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5782                                 LDFLAGS=$cf_save_LDFLAGS
5783 fi
5784 echo "$as_me:5784: result: $cf_cv_ldflags_search_paths_first" >&5
5785 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5786                 if test $cf_cv_ldflags_search_paths_first = yes; then
5787                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5788                 fi
5789                 ;;
5790         (hpux[7-8]*)
5791                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5792                 if test "$GCC" != yes; then
5793                         CC_SHARED_OPTS='+Z'
5794                 fi
5795                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5796                 INSTALL_LIB="-m 555"
5797                 ;;
5798         (hpux*)
5799                 # (tested with gcc 2.7.2 -- I don't have c89)
5800                 if test "$GCC" = yes; then
5801                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5802                 else
5803                         CC_SHARED_OPTS='+Z'
5804                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5805                 fi
5806                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5807                 # HP-UX shared libraries must be executable, and should be
5808                 # readonly to exploit a quirk in the memory manager.
5809                 INSTALL_LIB="-m 555"
5810                 ;;
5811         (interix*)
5812                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5813                 if test "$cf_cv_shlib_version" = rel; then
5814                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5815                 else
5816                         cf_shared_soname='`basename $@`'
5817                 fi
5818                 CC_SHARED_OPTS=
5819                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5820                 ;;
5821         (irix*)
5822                 if test "$cf_cv_enable_rpath" = yes ; then
5823                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5824                 fi
5825                 # tested with IRIX 5.2 and 'cc'.
5826                 if test "$GCC" != yes; then
5827                         CC_SHARED_OPTS='-KPIC'
5828                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5829                 else
5830                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5831                 fi
5832                 cf_cv_rm_so_locs=yes
5833                 ;;
5834         (linux*|gnu*|k*bsd*-gnu)
5835                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5836                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5837                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5838                 fi
5839                 if test "$cf_cv_enable_rpath" = yes ; then
5840                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5841                 fi
5842
5843         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5844         if test "$cf_cv_shlib_version" = rel; then
5845                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5846         else
5847                 cf_cv_shared_soname='`basename $@`'
5848         fi
5849
5850                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5851                 ;;
5852         (mingw*)
5853                 cf_cv_shlib_version=mingw
5854                 cf_cv_shlib_version_infix=mingw
5855                 shlibdir=$bindir
5856                 MAKE_DLLS=
5857                 if test "$DFT_LWR_MODEL" = "shared" ; then
5858                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5859                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5860                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5861                 fi
5862                 CC_SHARED_OPTS=
5863                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5864                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5865                 cat >mk_shared_lib.sh <<-CF_EOF
5866                 #!$SHELL
5867                 SHARED_LIB=\$1
5868                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5869                 shift
5870                 cat <<-EOF
5871                 Linking shared library
5872                 ** SHARED_LIB \$SHARED_LIB
5873                 ** IMPORT_LIB \$IMPORT_LIB
5874 EOF
5875                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5876 CF_EOF
5877                 chmod +x mk_shared_lib.sh
5878                 ;;
5879         (openbsd[2-9].*|mirbsd*)
5880                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5881                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5882                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5883                 fi
5884                 if test "$cf_cv_enable_rpath" = yes ; then
5885                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5886                 fi
5887                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5888
5889         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5890         if test "$cf_cv_shlib_version" = rel; then
5891                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5892         else
5893                 cf_cv_shared_soname='`basename $@`'
5894         fi
5895
5896                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5897                 ;;
5898         (nto-qnx*|openbsd*|freebsd[12].*)
5899                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5900                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5901                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5902                 ;;
5903         (dragonfly*|freebsd*)
5904                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5905                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5906                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5907                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5908                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5909                 fi
5910
5911         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5912         if test "$cf_cv_shlib_version" = rel; then
5913                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5914         else
5915                 cf_cv_shared_soname='`basename $@`'
5916         fi
5917
5918                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5919                 ;;
5920         (netbsd*)
5921                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5922                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5923                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5924                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5925                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5926                         if test "$cf_cv_shlib_version" = auto; then
5927                         if test -f /usr/libexec/ld.elf_so; then
5928                                 cf_cv_shlib_version=abi
5929                         else
5930                                 cf_cv_shlib_version=rel
5931                         fi
5932                         fi
5933
5934         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5935         if test "$cf_cv_shlib_version" = rel; then
5936                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5937         else
5938                 cf_cv_shared_soname='`basename $@`'
5939         fi
5940
5941                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5942                 else
5943                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5944                 fi
5945                 ;;
5946         (osf*|mls+*)
5947                 # tested with OSF/1 V3.2 and 'cc'
5948                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5949                 # link with shared libs).
5950                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5951                 case $host_os in
5952                 (osf4*)
5953                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5954                         ;;
5955                 esac
5956                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5957                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5958                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5959                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5960                 fi
5961                 cf_cv_rm_so_locs=yes
5962                 ;;
5963         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5964                 # tested with osr5.0.5
5965                 if test "$GCC" != yes; then
5966                         CC_SHARED_OPTS='-belf -KPIC'
5967                 fi
5968                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5969                 if test "$cf_cv_enable_rpath" = yes ; then
5970                         # only way is to set LD_RUN_PATH but no switch for it
5971                         RUN_PATH=$libdir
5972                 fi
5973                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5975                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5976                 ;;
5977         (sunos4*)
5978                 # tested with SunOS 4.1.1 and gcc 2.7.0
5979                 if test "$GCC" != yes; then
5980                         CC_SHARED_OPTS='-KPIC'
5981                 fi
5982                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5983                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5984                 ;;
5985         (solaris2*)
5986                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5987                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5988                 if test "$DFT_LWR_MODEL" = "shared" ; then
5989                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5990                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5991                 fi
5992                 if test "$cf_cv_enable_rpath" = yes ; then
5993                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5994                 fi
5995
5996         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5997         if test "$cf_cv_shlib_version" = rel; then
5998                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5999         else
6000                 cf_cv_shared_soname='`basename $@`'
6001         fi
6002
6003                 if test "$GCC" != yes; then
6004                         cf_save_CFLAGS="$CFLAGS"
6005                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6006                         do
6007                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6008                                 cat >conftest.$ac_ext <<_ACEOF
6009 #line 6009 "configure"
6010 #include "confdefs.h"
6011 #include <stdio.h>
6012 int
6013 main (void)
6014 {
6015 printf("Hello\n");
6016   ;
6017   return 0;
6018 }
6019 _ACEOF
6020 rm -f conftest.$ac_objext
6021 if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
6022   (eval $ac_compile) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); } &&
6026          { ac_try='test -s conftest.$ac_objext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   break
6033 else
6034   echo "$as_me: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6036 fi
6037 rm -f conftest.$ac_objext conftest.$ac_ext
6038                         done
6039                         CFLAGS="$cf_save_CFLAGS"
6040                         CC_SHARED_OPTS=$cf_shared_opts
6041                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6042                 else
6043                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6044                 fi
6045                 ;;
6046         (sysv5uw7*|unix_sv*)
6047                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6048                 if test "$GCC" != yes; then
6049                         CC_SHARED_OPTS='-KPIC'
6050                 fi
6051                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6052                 ;;
6053         (*)
6054                 CC_SHARED_OPTS='unknown'
6055                 MK_SHARED_LIB='echo unknown'
6056                 ;;
6057         esac
6058
6059         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6060         case "$cf_cv_shlib_version" in
6061         (rel|abi)
6062                 case "$MK_SHARED_LIB" in
6063                 (*'-o $@')
6064                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6065                         ;;
6066                 (*)
6067                         { echo "$as_me:6067: WARNING: ignored --with-shlib-version" >&5
6068 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6069                         ;;
6070                 esac
6071                 ;;
6072         esac
6073
6074         if test -n "$cf_try_cflags"
6075         then
6076 cat > conftest.$ac_ext <<EOF
6077 #line 6077 "${as_me:-configure}"
6078 #include <stdio.h>
6079 int main(int argc, char *argv[])
6080 {
6081         printf("hello\n");
6082         return (argv[argc-1] == 0) ;
6083 }
6084 EOF
6085                 cf_save_CFLAGS="$CFLAGS"
6086                 for cf_opt in $cf_try_cflags
6087                 do
6088                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6089                         echo "$as_me:6089: checking if CFLAGS option -$cf_opt works" >&5
6090 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6091                         if { (eval echo "$as_me:6091: \"$ac_compile\"") >&5
6092   (eval $ac_compile) 2>&5
6093   ac_status=$?
6094   echo "$as_me:6094: \$? = $ac_status" >&5
6095   (exit $ac_status); }; then
6096                                 echo "$as_me:6096: result: yes" >&5
6097 echo "${ECHO_T}yes" >&6
6098                                 cf_save_CFLAGS="$CFLAGS"
6099                         else
6100                                 echo "$as_me:6100: result: no" >&5
6101 echo "${ECHO_T}no" >&6
6102                         fi
6103                 done
6104                 CFLAGS="$cf_save_CFLAGS"
6105         fi
6106
6107         # RPATH_LIST is a colon-separated list of directories
6108         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6109         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6110
6111         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6112
6113         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6114
6115 echo "${as_me:-configure}:6115: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6116
6117         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6118
6119 echo "${as_me:-configure}:6119: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6120
6121 for model in $cf_list_models; do
6122         case $model in
6123         (libtool)
6124
6125 echo "$as_me:6125: checking for additional libtool options" >&5
6126 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6127
6128 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6129 if test "${with_libtool_opts+set}" = set; then
6130   withval="$with_libtool_opts"
6131   with_libtool_opts=$withval
6132 else
6133   with_libtool_opts=no
6134 fi;
6135 echo "$as_me:6135: result: $with_libtool_opts" >&5
6136 echo "${ECHO_T}$with_libtool_opts" >&6
6137
6138 case .$with_libtool_opts in
6139 (.yes|.no|.)
6140         ;;
6141 (*)
6142         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6143         ;;
6144 esac
6145
6146 echo "$as_me:6146: checking if exported-symbols file should be used" >&5
6147 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6148
6149 # Check whether --with-export-syms or --without-export-syms was given.
6150 if test "${with_export_syms+set}" = set; then
6151   withval="$with_export_syms"
6152   with_export_syms=$withval
6153 else
6154   with_export_syms=no
6155 fi;
6156 if test "x$with_export_syms" = xyes
6157 then
6158         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6159
6160 fi
6161 echo "$as_me:6161: result: $with_export_syms" >&5
6162 echo "${ECHO_T}$with_export_syms" >&6
6163 if test "x$with_export_syms" != xno
6164 then
6165         EXPORT_SYMS="-export-symbols $with_export_syms"
6166
6167 fi
6168
6169                 ;;
6170         (shared)
6171                 if test "$CC_SHARED_OPTS" = "unknown"; then
6172                         { { echo "$as_me:6172: error: Shared libraries are not supported in this version" >&5
6173 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6174    { (exit 1); exit 1; }; }
6175                 fi
6176                 # workaround for inept transition to PIE vs PIC...
6177                 echo "$as_me:6177: checking if current CFLAGS link properly" >&5
6178 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6179                 cat >conftest.$ac_ext <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182 #include <stdio.h>
6183 int
6184 main (void)
6185 {
6186 printf("Hello work\n");
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f conftest.$ac_objext conftest$ac_exeext
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit $ac_status); } &&
6197          { ac_try='test -s conftest$ac_exeext'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit $ac_status); }; }; then
6203   cf_cflags_work=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 cf_cflags_work=no
6208 fi
6209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6210                 echo "$as_me:6210: result: $cf_cflags_work" >&5
6211 echo "${ECHO_T}$cf_cflags_work" >&6
6212                 if test "$cf_cflags_work" = no
6213                 then
6214                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6215
6216 echo "${as_me:-configure}:6216: testing try to work around by appending shared-options ..." 1>&5
6217
6218                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6219                 fi
6220
6221 echo "$as_me:6221: checking if versioned-symbols file should be used" >&5
6222 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6223
6224 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6225 if test "${with_versioned_syms+set}" = set; then
6226   withval="$with_versioned_syms"
6227   with_versioned_syms=$withval
6228 else
6229   with_versioned_syms=no
6230 fi;
6231 case "x$with_versioned_syms" in
6232 (xyes)
6233         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6234
6235         ;;
6236 (xno)
6237         ;;
6238 (x/*)
6239         test -f "$with_versioned_syms" || { { echo "$as_me:6239: error: expected a filename: $with_versioned_syms" >&5
6240 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6241    { (exit 1); exit 1; }; }
6242         ;;
6243 (*)
6244         test -f "$with_versioned_syms" || { { echo "$as_me:6244: error: expected a filename: $with_versioned_syms" >&5
6245 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6246    { (exit 1); exit 1; }; }
6247         with_versioned_syms=`pwd`/"$with_versioned_syms"
6248         ;;
6249 esac
6250 echo "$as_me:6250: result: $with_versioned_syms" >&5
6251 echo "${ECHO_T}$with_versioned_syms" >&6
6252
6253 RESULTING_SYMS=
6254 VERSIONED_SYMS=
6255 WILDCARD_SYMS=
6256
6257 if test "x$with_versioned_syms" != xno
6258 then
6259         RESULTING_SYMS=$with_versioned_syms
6260         case "x$MK_SHARED_LIB" in
6261         (*-Wl,*)
6262                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6263                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6264                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6265
6266 echo "${as_me:-configure}:6266: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6267
6268                 ;;
6269         (*-dy\ *)
6270                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6271                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6272                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6273
6274 echo "${as_me:-configure}:6274: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6275
6276                 ;;
6277         (*)
6278                 { echo "$as_me:6278: WARNING: this system does not support versioned-symbols" >&5
6279 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6280                 ;;
6281         esac
6282
6283         # Linux ld can selectively override scope, e.g., of symbols beginning with
6284         # "_" by first declaring some as global, and then using a wildcard to
6285         # declare the others as local.  Some other loaders cannot do this.  Check
6286         # by constructing a (very) simple shared library and inspecting its
6287         # symbols.
6288         if test "x$VERSIONED_SYMS" != "x"
6289         then
6290                 echo "$as_me:6290: checking if wildcards can be used to selectively omit symbols" >&5
6291 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6292                 WILDCARD_SYMS=no
6293
6294                 # make sources
6295                 rm -f conftest.*
6296
6297                 cat >conftest.ver <<EOF
6298 module_1.0 {
6299 global:
6300         globalf1;
6301 local:
6302         localf1;
6303 };
6304 module_2.0 {
6305 global:
6306         globalf2;
6307 local:
6308         localf2;
6309         _*;
6310 } module_1.0;
6311 submodule_1.0 {
6312 global:
6313         subglobalf1;
6314         _ismissing;
6315 local:
6316         sublocalf1;
6317 };
6318 submodule_2.0 {
6319 global:
6320         subglobalf2;
6321 local:
6322         sublocalf2;
6323         _*;
6324 } submodule_1.0;
6325 EOF
6326                 cat >conftest.$ac_ext <<EOF
6327 #line 6327 "configure"
6328 int     _ismissing(void) { return 1; }
6329 int     _localf1(void) { return 1; }
6330 int     _localf2(void) { return 2; }
6331 int     globalf1(void) { return 1; }
6332 int     globalf2(void) { return 2; }
6333 int     _sublocalf1(void) { return 1; }
6334 int     _sublocalf2(void) { return 2; }
6335 int     subglobalf1(void) { return 1; }
6336 int     subglobalf2(void) { return 2; }
6337 EOF
6338                 cat >conftest.mk <<EOF
6339 CC=${CC}
6340 CFLAGS=${CFLAGS}
6341 CPPFLAGS=${CPPFLAGS}
6342 LDFLAGS=${LDFLAGS}
6343 LIBS=${LIBS}
6344 VERSIONED_SYMS=${VERSIONED_SYMS}
6345 RESULTING_SYMS=conftest.ver
6346 MK_SHARED_LIB=${MK_SHARED_LIB}
6347 conftest.so: conftest.$ac_cv_objext
6348                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6349 EOF
6350
6351                 # compile source, make library
6352                 if make -f conftest.mk 2>&5 >/dev/null
6353                 then
6354                         # test for missing symbol in either Data or Text section
6355                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6356                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6357                 fi
6358                 echo "$as_me:6358: result: $WILDCARD_SYMS" >&5
6359 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6360                 rm -f conftest.*
6361         fi
6362 fi
6363
6364                 ;;
6365         esac
6366 done
6367
6368 ### Checks for special libraries, must be done up-front.
6369 SHLIB_LIST=""
6370
6371 echo "$as_me:6371: checking if you want to link with the GPM mouse library" >&5
6372 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6373
6374 # Check whether --with-gpm or --without-gpm was given.
6375 if test "${with_gpm+set}" = set; then
6376   withval="$with_gpm"
6377   with_gpm=$withval
6378 else
6379   with_gpm=maybe
6380 fi;
6381 echo "$as_me:6381: result: $with_gpm" >&5
6382 echo "${ECHO_T}$with_gpm" >&6
6383
6384 if test "$with_gpm" != no ; then
6385         echo "$as_me:6385: checking for gpm.h" >&5
6386 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6387 if test "${ac_cv_header_gpm_h+set}" = set; then
6388   echo $ECHO_N "(cached) $ECHO_C" >&6
6389 else
6390   cat >conftest.$ac_ext <<_ACEOF
6391 #line 6391 "configure"
6392 #include "confdefs.h"
6393 #include <gpm.h>
6394 _ACEOF
6395 if { (eval echo "$as_me:6395: \"$ac_cpp conftest.$ac_ext\"") >&5
6396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6397   ac_status=$?
6398   egrep -v '^ *\+' conftest.er1 >conftest.err
6399   rm -f conftest.er1
6400   cat conftest.err >&5
6401   echo "$as_me:6401: \$? = $ac_status" >&5
6402   (exit $ac_status); } >/dev/null; then
6403   if test -s conftest.err; then
6404     ac_cpp_err=$ac_c_preproc_warn_flag
6405   else
6406     ac_cpp_err=
6407   fi
6408 else
6409   ac_cpp_err=yes
6410 fi
6411 if test -z "$ac_cpp_err"; then
6412   ac_cv_header_gpm_h=yes
6413 else
6414   echo "$as_me: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416   ac_cv_header_gpm_h=no
6417 fi
6418 rm -f conftest.err conftest.$ac_ext
6419 fi
6420 echo "$as_me:6420: result: $ac_cv_header_gpm_h" >&5
6421 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6422 if test $ac_cv_header_gpm_h = yes; then
6423
6424 cat >>confdefs.h <<\EOF
6425 #define HAVE_GPM_H 1
6426 EOF
6427
6428                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6429                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6430
6431 echo "${as_me:-configure}:6431: testing assuming we really have GPM library ..." 1>&5
6432
6433 cat >>confdefs.h <<\EOF
6434 #define HAVE_LIBGPM 1
6435 EOF
6436
6437                         with_gpm=yes
6438                 else
6439                         echo "$as_me:6439: checking for Gpm_Open in -lgpm" >&5
6440 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6441 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6442   echo $ECHO_N "(cached) $ECHO_C" >&6
6443 else
6444   ac_check_lib_save_LIBS=$LIBS
6445 LIBS="-lgpm  $LIBS"
6446 cat >conftest.$ac_ext <<_ACEOF
6447 #line 6447 "configure"
6448 #include "confdefs.h"
6449
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 #ifdef __cplusplus
6452 extern "C"
6453 #endif
6454 /* We use char because int might match the return type of a gcc2
6455    builtin and then its argument prototype would still apply.  */
6456 char Gpm_Open ();
6457 int
6458 main (void)
6459 {
6460 Gpm_Open ();
6461   ;
6462   return 0;
6463 }
6464 _ACEOF
6465 rm -f conftest.$ac_objext conftest$ac_exeext
6466 if { (eval echo "$as_me:6466: \"$ac_link\"") >&5
6467   (eval $ac_link) 2>&5
6468   ac_status=$?
6469   echo "$as_me:6469: \$? = $ac_status" >&5
6470   (exit $ac_status); } &&
6471          { ac_try='test -s conftest$ac_exeext'
6472   { (eval echo "$as_me:6472: \"$ac_try\"") >&5
6473   (eval $ac_try) 2>&5
6474   ac_status=$?
6475   echo "$as_me:6475: \$? = $ac_status" >&5
6476   (exit $ac_status); }; }; then
6477   ac_cv_lib_gpm_Gpm_Open=yes
6478 else
6479   echo "$as_me: failed program was:" >&5
6480 cat conftest.$ac_ext >&5
6481 ac_cv_lib_gpm_Gpm_Open=no
6482 fi
6483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6484 LIBS=$ac_check_lib_save_LIBS
6485 fi
6486 echo "$as_me:6486: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6487 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6488 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6489   with_gpm=yes
6490 else
6491
6492                                 if test "$with_gpm" = maybe; then
6493                                         { echo "$as_me:6493: WARNING: Cannot link with GPM library" >&5
6494 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6495                                         with_gpm=no
6496                                 else
6497                                         { { echo "$as_me:6497: error: Cannot link with GPM library" >&5
6498 echo "$as_me: error: Cannot link with GPM library" >&2;}
6499    { (exit 1); exit 1; }; }
6500                                 fi
6501
6502 fi
6503
6504                 fi
6505
6506 else
6507
6508                 test "$with_gpm" != maybe && { echo "$as_me:6508: WARNING: Cannot find GPM header" >&5
6509 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6510                 with_gpm=no
6511
6512 fi
6513
6514 fi
6515
6516 if test "$with_gpm" != no ; then
6517         echo "$as_me:6517: checking if you want to load GPM dynamically" >&5
6518 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6519
6520 # Check whether --with-dlsym or --without-dlsym was given.
6521 if test "${with_dlsym+set}" = set; then
6522   withval="$with_dlsym"
6523   with_dlsym=$withval
6524 else
6525   with_dlsym=yes
6526 fi;
6527         echo "$as_me:6527: result: $with_dlsym" >&5
6528 echo "${ECHO_T}$with_dlsym" >&6
6529         if test "x$with_dlsym" = xyes ; then
6530
6531 cf_have_dlsym=no
6532 echo "$as_me:6532: checking for dlsym" >&5
6533 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6534 if test "${ac_cv_func_dlsym+set}" = set; then
6535   echo $ECHO_N "(cached) $ECHO_C" >&6
6536 else
6537   cat >conftest.$ac_ext <<_ACEOF
6538 #line 6538 "configure"
6539 #include "confdefs.h"
6540 #define dlsym autoconf_temporary
6541 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6542 #undef dlsym
6543
6544 #ifdef __cplusplus
6545 extern "C"
6546 #endif
6547
6548 /* We use char because int might match the return type of a gcc2
6549    builtin and then its argument prototype would still apply.  */
6550 char dlsym (void);
6551
6552 int
6553 main (void)
6554 {
6555
6556 /* The GNU C library defines stubs for functions which it implements
6557     to always fail with ENOSYS.  Some functions are actually named
6558     something starting with __ and the normal name is an alias.  */
6559 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6560 #error found stub for dlsym
6561 #endif
6562
6563         return dlsym ();
6564   ;
6565   return 0;
6566 }
6567 _ACEOF
6568 rm -f conftest.$ac_objext conftest$ac_exeext
6569 if { (eval echo "$as_me:6569: \"$ac_link\"") >&5
6570   (eval $ac_link) 2>&5
6571   ac_status=$?
6572   echo "$as_me:6572: \$? = $ac_status" >&5
6573   (exit $ac_status); } &&
6574          { ac_try='test -s conftest$ac_exeext'
6575   { (eval echo "$as_me:6575: \"$ac_try\"") >&5
6576   (eval $ac_try) 2>&5
6577   ac_status=$?
6578   echo "$as_me:6578: \$? = $ac_status" >&5
6579   (exit $ac_status); }; }; then
6580   ac_cv_func_dlsym=yes
6581 else
6582   echo "$as_me: failed program was:" >&5
6583 cat conftest.$ac_ext >&5
6584 ac_cv_func_dlsym=no
6585 fi
6586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6587 fi
6588 echo "$as_me:6588: result: $ac_cv_func_dlsym" >&5
6589 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6590 if test $ac_cv_func_dlsym = yes; then
6591   cf_have_dlsym=yes
6592 else
6593
6594 cf_have_libdl=no
6595 echo "$as_me:6595: checking for dlsym in -ldl" >&5
6596 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6597 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6598   echo $ECHO_N "(cached) $ECHO_C" >&6
6599 else
6600   ac_check_lib_save_LIBS=$LIBS
6601 LIBS="-ldl  $LIBS"
6602 cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605
6606 /* Override any gcc2 internal prototype to avoid an error.  */
6607 #ifdef __cplusplus
6608 extern "C"
6609 #endif
6610 /* We use char because int might match the return type of a gcc2
6611    builtin and then its argument prototype would still apply.  */
6612 char dlsym ();
6613 int
6614 main (void)
6615 {
6616 dlsym ();
6617   ;
6618   return 0;
6619 }
6620 _ACEOF
6621 rm -f conftest.$ac_objext conftest$ac_exeext
6622 if { (eval echo "$as_me:6622: \"$ac_link\"") >&5
6623   (eval $ac_link) 2>&5
6624   ac_status=$?
6625   echo "$as_me:6625: \$? = $ac_status" >&5
6626   (exit $ac_status); } &&
6627          { ac_try='test -s conftest$ac_exeext'
6628   { (eval echo "$as_me:6628: \"$ac_try\"") >&5
6629   (eval $ac_try) 2>&5
6630   ac_status=$?
6631   echo "$as_me:6631: \$? = $ac_status" >&5
6632   (exit $ac_status); }; }; then
6633   ac_cv_lib_dl_dlsym=yes
6634 else
6635   echo "$as_me: failed program was:" >&5
6636 cat conftest.$ac_ext >&5
6637 ac_cv_lib_dl_dlsym=no
6638 fi
6639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6640 LIBS=$ac_check_lib_save_LIBS
6641 fi
6642 echo "$as_me:6642: result: $ac_cv_lib_dl_dlsym" >&5
6643 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6644 if test $ac_cv_lib_dl_dlsym = yes; then
6645
6646         cf_have_dlsym=yes
6647         cf_have_libdl=yes
6648 fi
6649
6650 fi
6651
6652 if test "$cf_have_dlsym" = yes ; then
6653         test "$cf_have_libdl" = yes && {
6654 cf_add_libs="-ldl"
6655 # Filter out duplicates - this happens with badly-designed ".pc" files...
6656 for cf_add_1lib in $LIBS
6657 do
6658         for cf_add_2lib in $cf_add_libs
6659         do
6660                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6661                 then
6662                         cf_add_1lib=
6663                         break
6664                 fi
6665         done
6666         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6667 done
6668 LIBS="$cf_add_libs"
6669  }
6670
6671         echo "$as_me:6671: checking whether able to link to dl*() functions" >&5
6672 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6673         cat >conftest.$ac_ext <<_ACEOF
6674 #line 6674 "configure"
6675 #include "confdefs.h"
6676 #include <dlfcn.h>
6677 int
6678 main (void)
6679 {
6680
6681                 void *obj;
6682                 if ((obj = dlopen("filename", 0)) != 0) {
6683                         if (dlsym(obj, "symbolname") == 0) {
6684                         dlclose(obj);
6685                         }
6686                 }
6687   ;
6688   return 0;
6689 }
6690 _ACEOF
6691 rm -f conftest.$ac_objext conftest$ac_exeext
6692 if { (eval echo "$as_me:6692: \"$ac_link\"") >&5
6693   (eval $ac_link) 2>&5
6694   ac_status=$?
6695   echo "$as_me:6695: \$? = $ac_status" >&5
6696   (exit $ac_status); } &&
6697          { ac_try='test -s conftest$ac_exeext'
6698   { (eval echo "$as_me:6698: \"$ac_try\"") >&5
6699   (eval $ac_try) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); }; }; then
6703
6704 cat >>confdefs.h <<\EOF
6705 #define HAVE_LIBDL 1
6706 EOF
6707
6708 else
6709   echo "$as_me: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6711
6712                 { { echo "$as_me:6712: error: Cannot link test program for libdl" >&5
6713 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6714    { (exit 1); exit 1; }; }
6715 fi
6716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6717         echo "$as_me:6717: result: ok" >&5
6718 echo "${ECHO_T}ok" >&6
6719 else
6720         { { echo "$as_me:6720: error: Cannot find dlsym function" >&5
6721 echo "$as_me: error: Cannot find dlsym function" >&2;}
6722    { (exit 1); exit 1; }; }
6723 fi
6724
6725                 if test "x$with_gpm" != xyes ; then
6726                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6727
6728 echo "${as_me:-configure}:6728: testing assuming soname for gpm is $with_gpm ..." 1>&5
6729
6730                         cf_cv_gpm_soname="$with_gpm"
6731                 else
6732
6733 echo "$as_me:6733: checking for soname of gpm library" >&5
6734 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6735 if test "${cf_cv_gpm_soname+set}" = set; then
6736   echo $ECHO_N "(cached) $ECHO_C" >&6
6737 else
6738
6739 cf_cv_gpm_soname=unknown
6740 if test "$cross_compiling" != yes ; then
6741 cat >conftest.$ac_ext <<CF_EOF
6742 #include <gpm.h>
6743 int main(void)
6744 {
6745 if (Gpm_Open(0,0)) Gpm_Close();
6746         ${cf_cv_main_return:-return}(0);
6747 }
6748 CF_EOF
6749 cf_save_LIBS="$LIBS"
6750
6751 cf_add_libs="-lgpm"
6752 # Filter out duplicates - this happens with badly-designed ".pc" files...
6753 for cf_add_1lib in $LIBS
6754 do
6755         for cf_add_2lib in $cf_add_libs
6756         do
6757                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6758                 then
6759                         cf_add_1lib=
6760                         break
6761                 fi
6762         done
6763         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6764 done
6765 LIBS="$cf_add_libs"
6766
6767         if { (eval echo "$as_me:6767: \"$ac_compile\"") >&5
6768   (eval $ac_compile) 2>&5
6769   ac_status=$?
6770   echo "$as_me:6770: \$? = $ac_status" >&5
6771   (exit $ac_status); } ; then
6772                 if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
6773   (eval $ac_link) 2>&5
6774   ac_status=$?
6775   echo "$as_me:6775: \$? = $ac_status" >&5
6776   (exit $ac_status); } ; then
6777                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6778                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6779                 fi
6780         fi
6781 rm -rf conftest*
6782 LIBS="$cf_save_LIBS"
6783 fi
6784
6785 fi
6786 echo "$as_me:6786: result: $cf_cv_gpm_soname" >&5
6787 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6788
6789                 fi
6790                 test "$cf_cv_gpm_soname" != "unknown" &&
6791 cat >>confdefs.h <<EOF
6792 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6793 EOF
6794
6795                 SHLIB_LIST="-ldl $SHLIB_LIST"
6796
6797 cf_add_libs="-ldl"
6798 # Filter out duplicates - this happens with badly-designed ".pc" files...
6799 for cf_add_1lib in $PRIVATE_LIBS
6800 do
6801         for cf_add_2lib in $cf_add_libs
6802         do
6803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6804                 then
6805                         cf_add_1lib=
6806                         break
6807                 fi
6808         done
6809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6810 done
6811 PRIVATE_LIBS="$cf_add_libs"
6812
6813         else
6814                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6815
6816 cf_add_libs="-lgpm"
6817 # Filter out duplicates - this happens with badly-designed ".pc" files...
6818 for cf_add_1lib in $TEST_LIBS
6819 do
6820         for cf_add_2lib in $cf_add_libs
6821         do
6822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6823                 then
6824                         cf_add_1lib=
6825                         break
6826                 fi
6827         done
6828         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6829 done
6830 TEST_LIBS="$cf_add_libs"
6831
6832 cf_add_libs="-lgpm"
6833 # Filter out duplicates - this happens with badly-designed ".pc" files...
6834 for cf_add_1lib in $PRIVATE_LIBS
6835 do
6836         for cf_add_2lib in $cf_add_libs
6837         do
6838                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6839                 then
6840                         cf_add_1lib=
6841                         break
6842                 fi
6843         done
6844         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6845 done
6846 PRIVATE_LIBS="$cf_add_libs"
6847
6848         fi
6849
6850 cat >>confdefs.h <<\EOF
6851 #define HAVE_LIBGPM 1
6852 EOF
6853
6854 echo "$as_me:6854: checking for Gpm_Wgetch in -lgpm" >&5
6855 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6856 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6857   echo $ECHO_N "(cached) $ECHO_C" >&6
6858 else
6859   ac_check_lib_save_LIBS=$LIBS
6860 LIBS="-lgpm  $LIBS"
6861 cat >conftest.$ac_ext <<_ACEOF
6862 #line 6862 "configure"
6863 #include "confdefs.h"
6864
6865 /* Override any gcc2 internal prototype to avoid an error.  */
6866 #ifdef __cplusplus
6867 extern "C"
6868 #endif
6869 /* We use char because int might match the return type of a gcc2
6870    builtin and then its argument prototype would still apply.  */
6871 char Gpm_Wgetch ();
6872 int
6873 main (void)
6874 {
6875 Gpm_Wgetch ();
6876   ;
6877   return 0;
6878 }
6879 _ACEOF
6880 rm -f conftest.$ac_objext conftest$ac_exeext
6881 if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882   (eval $ac_link) 2>&5
6883   ac_status=$?
6884   echo "$as_me:6884: \$? = $ac_status" >&5
6885   (exit $ac_status); } &&
6886          { ac_try='test -s conftest$ac_exeext'
6887   { (eval echo "$as_me:6887: \"$ac_try\"") >&5
6888   (eval $ac_try) 2>&5
6889   ac_status=$?
6890   echo "$as_me:6890: \$? = $ac_status" >&5
6891   (exit $ac_status); }; }; then
6892   ac_cv_lib_gpm_Gpm_Wgetch=yes
6893 else
6894   echo "$as_me: failed program was:" >&5
6895 cat conftest.$ac_ext >&5
6896 ac_cv_lib_gpm_Gpm_Wgetch=no
6897 fi
6898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6899 LIBS=$ac_check_lib_save_LIBS
6900 fi
6901 echo "$as_me:6901: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6902 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6903 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6904
6905 echo "$as_me:6905: checking if GPM is weakly bound to curses library" >&5
6906 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6907 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6908   echo $ECHO_N "(cached) $ECHO_C" >&6
6909 else
6910
6911 cf_cv_check_gpm_wgetch=unknown
6912 if test "$cross_compiling" != yes ; then
6913
6914 cat >conftest.$ac_ext <<CF_EOF
6915 #include <gpm.h>
6916 int main(void)
6917 {
6918         Gpm_Wgetch();
6919         ${cf_cv_main_return:-return}(0);
6920 }
6921 CF_EOF
6922
6923         cf_save_LIBS="$LIBS"
6924         # This only works if we can look at the symbol table.  If a shared
6925         # library is stripped for install, we cannot use that.  So we're forced
6926         # to rely on the static library, noting that some packagers may not
6927         # include it.
6928         LIBS="-static -lgpm -dynamic $LIBS"
6929         if { (eval echo "$as_me:6929: \"$ac_compile\"") >&5
6930   (eval $ac_compile) 2>&5
6931   ac_status=$?
6932   echo "$as_me:6932: \$? = $ac_status" >&5
6933   (exit $ac_status); } ; then
6934                 if { (eval echo "$as_me:6934: \"$ac_link\"") >&5
6935   (eval $ac_link) 2>&5
6936   ac_status=$?
6937   echo "$as_me:6937: \$? = $ac_status" >&5
6938   (exit $ac_status); } ; then
6939                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6940                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6941                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6942                 fi
6943         fi
6944         rm -rf conftest*
6945         LIBS="$cf_save_LIBS"
6946 fi
6947
6948 fi
6949 echo "$as_me:6949: result: $cf_cv_check_gpm_wgetch" >&5
6950 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6951
6952 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6953         { echo "$as_me:6953: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6954 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6955 fi
6956
6957 fi
6958
6959 fi
6960
6961 echo "$as_me:6961: checking if you want to use PCRE2 for regular-expressions" >&5
6962 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6963
6964 # Check whether --with-pcre2 or --without-pcre2 was given.
6965 if test "${with_pcre2+set}" = set; then
6966   withval="$with_pcre2"
6967
6968 fi;
6969 test -z "$with_pcre2" && with_pcre2=no
6970 echo "$as_me:6970: result: $with_pcre2" >&5
6971 echo "${ECHO_T}$with_pcre2" >&6
6972
6973 if test "x$with_pcre2" != xno ; then
6974
6975 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6976         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6977
6978 echo "${as_me:-configure}:6978: testing found package libpcre2 ..." 1>&5
6979
6980         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6981         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6982         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6983
6984 echo "${as_me:-configure}:6984: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6985
6986         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6987
6988 echo "${as_me:-configure}:6988: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6989
6990 cf_fix_cppflags=no
6991 cf_new_cflags=
6992 cf_new_cppflags=
6993 cf_new_extra_cppflags=
6994
6995 for cf_add_cflags in $cf_pkgconfig_incs
6996 do
6997 case $cf_fix_cppflags in
6998 (no)
6999         case $cf_add_cflags in
7000         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7001                 case $cf_add_cflags in
7002                 (-D*)
7003                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7004
7005                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7006                                 && test -z "${cf_tst_cflags}" \
7007                                 && cf_fix_cppflags=yes
7008
7009                         if test $cf_fix_cppflags = yes ; then
7010
7011         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7012         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7013
7014                                 continue
7015                         elif test "${cf_tst_cflags}" = "\"'" ; then
7016
7017         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7018         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7019
7020                                 continue
7021                         fi
7022                         ;;
7023                 esac
7024                 case "$CPPFLAGS" in
7025                 (*$cf_add_cflags)
7026                         ;;
7027                 (*)
7028                         case $cf_add_cflags in
7029                         (-D*)
7030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7031
7032 CPPFLAGS=`echo "$CPPFLAGS" | \
7033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7035
7036                                 ;;
7037                         esac
7038
7039         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7040         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7041
7042                         ;;
7043                 esac
7044                 ;;
7045         (*)
7046
7047         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7048         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7049
7050                 ;;
7051         esac
7052         ;;
7053 (yes)
7054
7055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7057
7058         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7059
7060         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7061                 && test -z "${cf_tst_cflags}" \
7062                 && cf_fix_cppflags=no
7063         ;;
7064 esac
7065 done
7066
7067 if test -n "$cf_new_cflags" ; then
7068
7069         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7070         CFLAGS="${CFLAGS}$cf_new_cflags"
7071
7072 fi
7073
7074 if test -n "$cf_new_cppflags" ; then
7075
7076         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7077         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7078
7079 fi
7080
7081 if test -n "$cf_new_extra_cppflags" ; then
7082
7083         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7084         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7085
7086 fi
7087
7088 cf_add_libs="$cf_pkgconfig_libs"
7089 # Filter out duplicates - this happens with badly-designed ".pc" files...
7090 for cf_add_1lib in $LIBS
7091 do
7092         for cf_add_2lib in $cf_add_libs
7093         do
7094                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7095                 then
7096                         cf_add_1lib=
7097                         break
7098                 fi
7099         done
7100         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7101 done
7102 LIBS="$cf_add_libs"
7103
7104         :
7105 else
7106         cf_pkgconfig_incs=
7107         cf_pkgconfig_libs=
7108
7109 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7110         test -n "$verbose" && echo "    found package libpcre" 1>&6
7111
7112 echo "${as_me:-configure}:7112: testing found package libpcre ..." 1>&5
7113
7114         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7115         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7116         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7117
7118 echo "${as_me:-configure}:7118: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7119
7120         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7121
7122 echo "${as_me:-configure}:7122: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7123
7124 cf_fix_cppflags=no
7125 cf_new_cflags=
7126 cf_new_cppflags=
7127 cf_new_extra_cppflags=
7128
7129 for cf_add_cflags in $cf_pkgconfig_incs
7130 do
7131 case $cf_fix_cppflags in
7132 (no)
7133         case $cf_add_cflags in
7134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7135                 case $cf_add_cflags in
7136                 (-D*)
7137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7138
7139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7140                                 && test -z "${cf_tst_cflags}" \
7141                                 && cf_fix_cppflags=yes
7142
7143                         if test $cf_fix_cppflags = yes ; then
7144
7145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7147
7148                                 continue
7149                         elif test "${cf_tst_cflags}" = "\"'" ; then
7150
7151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7153
7154                                 continue
7155                         fi
7156                         ;;
7157                 esac
7158                 case "$CPPFLAGS" in
7159                 (*$cf_add_cflags)
7160                         ;;
7161                 (*)
7162                         case $cf_add_cflags in
7163                         (-D*)
7164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7165
7166 CPPFLAGS=`echo "$CPPFLAGS" | \
7167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7169
7170                                 ;;
7171                         esac
7172
7173         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7174         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7175
7176                         ;;
7177                 esac
7178                 ;;
7179         (*)
7180
7181         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7182         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7183
7184                 ;;
7185         esac
7186         ;;
7187 (yes)
7188
7189         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7190         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7191
7192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7193
7194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7195                 && test -z "${cf_tst_cflags}" \
7196                 && cf_fix_cppflags=no
7197         ;;
7198 esac
7199 done
7200
7201 if test -n "$cf_new_cflags" ; then
7202
7203         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7204         CFLAGS="${CFLAGS}$cf_new_cflags"
7205
7206 fi
7207
7208 if test -n "$cf_new_cppflags" ; then
7209
7210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7211         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7212
7213 fi
7214
7215 if test -n "$cf_new_extra_cppflags" ; then
7216
7217         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7218         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7219
7220 fi
7221
7222 cf_add_libs="$cf_pkgconfig_libs"
7223 # Filter out duplicates - this happens with badly-designed ".pc" files...
7224 for cf_add_1lib in $LIBS
7225 do
7226         for cf_add_2lib in $cf_add_libs
7227         do
7228                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7229                 then
7230                         cf_add_1lib=
7231                         break
7232                 fi
7233         done
7234         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7235 done
7236 LIBS="$cf_add_libs"
7237
7238         :
7239 else
7240         cf_pkgconfig_incs=
7241         cf_pkgconfig_libs=
7242
7243                         { { echo "$as_me:7243: error: Cannot find PCRE2 library" >&5
7244 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7245    { (exit 1); exit 1; }; }
7246 fi
7247
7248 fi
7249
7250 cat >>confdefs.h <<\EOF
7251 #define HAVE_LIB_PCRE2 1
7252 EOF
7253
7254         # if pkgconfig gave no results, look for the libraries directly
7255         case $LIBS in
7256         (*pcre2-posix*|*pcreposix*)
7257                 ;;
7258         (*)
7259                 echo "$as_me:7259: checking for regcomp in -lpcre2-posix" >&5
7260 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7261 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7262   echo $ECHO_N "(cached) $ECHO_C" >&6
7263 else
7264   ac_check_lib_save_LIBS=$LIBS
7265 LIBS="-lpcre2-posix  $LIBS"
7266 cat >conftest.$ac_ext <<_ACEOF
7267 #line 7267 "configure"
7268 #include "confdefs.h"
7269
7270 /* Override any gcc2 internal prototype to avoid an error.  */
7271 #ifdef __cplusplus
7272 extern "C"
7273 #endif
7274 /* We use char because int might match the return type of a gcc2
7275    builtin and then its argument prototype would still apply.  */
7276 char regcomp ();
7277 int
7278 main (void)
7279 {
7280 regcomp ();
7281   ;
7282   return 0;
7283 }
7284 _ACEOF
7285 rm -f conftest.$ac_objext conftest$ac_exeext
7286 if { (eval echo "$as_me:7286: \"$ac_link\"") >&5
7287   (eval $ac_link) 2>&5
7288   ac_status=$?
7289   echo "$as_me:7289: \$? = $ac_status" >&5
7290   (exit $ac_status); } &&
7291          { ac_try='test -s conftest$ac_exeext'
7292   { (eval echo "$as_me:7292: \"$ac_try\"") >&5
7293   (eval $ac_try) 2>&5
7294   ac_status=$?
7295   echo "$as_me:7295: \$? = $ac_status" >&5
7296   (exit $ac_status); }; }; then
7297   ac_cv_lib_pcre2_posix_regcomp=yes
7298 else
7299   echo "$as_me: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7301 ac_cv_lib_pcre2_posix_regcomp=no
7302 fi
7303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7304 LIBS=$ac_check_lib_save_LIBS
7305 fi
7306 echo "$as_me:7306: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7307 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7308 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7309
7310 cf_add_libs="-lpcre2-posix"
7311 # Filter out duplicates - this happens with badly-designed ".pc" files...
7312 for cf_add_1lib in $LIBS
7313 do
7314         for cf_add_2lib in $cf_add_libs
7315         do
7316                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7317                 then
7318                         cf_add_1lib=
7319                         break
7320                 fi
7321         done
7322         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7323 done
7324 LIBS="$cf_add_libs"
7325
7326 else
7327   echo "$as_me:7327: checking for regcomp in -lpcreposix" >&5
7328 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7329 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7330   echo $ECHO_N "(cached) $ECHO_C" >&6
7331 else
7332   ac_check_lib_save_LIBS=$LIBS
7333 LIBS="-lpcreposix  $LIBS"
7334 cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7337
7338 /* Override any gcc2 internal prototype to avoid an error.  */
7339 #ifdef __cplusplus
7340 extern "C"
7341 #endif
7342 /* We use char because int might match the return type of a gcc2
7343    builtin and then its argument prototype would still apply.  */
7344 char regcomp ();
7345 int
7346 main (void)
7347 {
7348 regcomp ();
7349   ;
7350   return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext conftest$ac_exeext
7354 if { (eval echo "$as_me:7354: \"$ac_link\"") >&5
7355   (eval $ac_link) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); } &&
7359          { ac_try='test -s conftest$ac_exeext'
7360   { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7361   (eval $ac_try) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit $ac_status); }; }; then
7365   ac_cv_lib_pcreposix_regcomp=yes
7366 else
7367   echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369 ac_cv_lib_pcreposix_regcomp=no
7370 fi
7371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7372 LIBS=$ac_check_lib_save_LIBS
7373 fi
7374 echo "$as_me:7374: result: $ac_cv_lib_pcreposix_regcomp" >&5
7375 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7376 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7377
7378 cf_add_libs="-lpcreposix"
7379 # Filter out duplicates - this happens with badly-designed ".pc" files...
7380 for cf_add_1lib in $LIBS
7381 do
7382         for cf_add_2lib in $cf_add_libs
7383         do
7384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7385                 then
7386                         cf_add_1lib=
7387                         break
7388                 fi
7389         done
7390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7391 done
7392 LIBS="$cf_add_libs"
7393
7394 else
7395   { { echo "$as_me:7395: error: Cannot find PCRE2 POSIX library" >&5
7396 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7397    { (exit 1); exit 1; }; }
7398 fi
7399
7400 fi
7401
7402                 ;;
7403         esac
7404
7405         # either way, check for the library header files
7406
7407 for ac_header in pcre2-posix.h pcreposix.h
7408 do
7409 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7410 echo "$as_me:7410: checking for $ac_header" >&5
7411 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7413   echo $ECHO_N "(cached) $ECHO_C" >&6
7414 else
7415   cat >conftest.$ac_ext <<_ACEOF
7416 #line 7416 "configure"
7417 #include "confdefs.h"
7418 #include <$ac_header>
7419 _ACEOF
7420 if { (eval echo "$as_me:7420: \"$ac_cpp conftest.$ac_ext\"") >&5
7421   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7422   ac_status=$?
7423   egrep -v '^ *\+' conftest.er1 >conftest.err
7424   rm -f conftest.er1
7425   cat conftest.err >&5
7426   echo "$as_me:7426: \$? = $ac_status" >&5
7427   (exit $ac_status); } >/dev/null; then
7428   if test -s conftest.err; then
7429     ac_cpp_err=$ac_c_preproc_warn_flag
7430   else
7431     ac_cpp_err=
7432   fi
7433 else
7434   ac_cpp_err=yes
7435 fi
7436 if test -z "$ac_cpp_err"; then
7437   eval "$as_ac_Header=yes"
7438 else
7439   echo "$as_me: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   eval "$as_ac_Header=no"
7442 fi
7443 rm -f conftest.err conftest.$ac_ext
7444 fi
7445 echo "$as_me:7445: result: `eval echo '${'$as_ac_Header'}'`" >&5
7446 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7447 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7448   cat >>confdefs.h <<EOF
7449 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7450 EOF
7451
7452 fi
7453 done
7454
7455 fi
7456
7457 # not everyone has "test -c"
7458 if test -c /dev/sysmouse 2>/dev/null ; then
7459 echo "$as_me:7459: checking if you want to use sysmouse" >&5
7460 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7461
7462 # Check whether --with-sysmouse or --without-sysmouse was given.
7463 if test "${with_sysmouse+set}" = set; then
7464   withval="$with_sysmouse"
7465   cf_with_sysmouse=$withval
7466 else
7467   cf_with_sysmouse=maybe
7468 fi;
7469         if test "$cf_with_sysmouse" != no ; then
7470         cat >conftest.$ac_ext <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473
7474 #include <osreldate.h>
7475 #if (__FreeBSD_version >= 400017)
7476 #include <sys/consio.h>
7477 #include <sys/fbio.h>
7478 #else
7479 #include <machine/console.h>
7480 #endif
7481
7482 int
7483 main (void)
7484 {
7485
7486         struct mouse_info the_mouse;
7487         ioctl(0, CONS_MOUSECTL, &the_mouse);
7488
7489   ;
7490   return 0;
7491 }
7492 _ACEOF
7493 rm -f conftest.$ac_objext
7494 if { (eval echo "$as_me:7494: \"$ac_compile\"") >&5
7495   (eval $ac_compile) 2>&5
7496   ac_status=$?
7497   echo "$as_me:7497: \$? = $ac_status" >&5
7498   (exit $ac_status); } &&
7499          { ac_try='test -s conftest.$ac_objext'
7500   { (eval echo "$as_me:7500: \"$ac_try\"") >&5
7501   (eval $ac_try) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit $ac_status); }; }; then
7505   cf_with_sysmouse=yes
7506 else
7507   echo "$as_me: failed program was:" >&5
7508 cat conftest.$ac_ext >&5
7509 cf_with_sysmouse=no
7510 fi
7511 rm -f conftest.$ac_objext conftest.$ac_ext
7512         fi
7513 echo "$as_me:7513: result: $cf_with_sysmouse" >&5
7514 echo "${ECHO_T}$cf_with_sysmouse" >&6
7515 test "$cf_with_sysmouse" = yes &&
7516 cat >>confdefs.h <<\EOF
7517 #define USE_SYSMOUSE 1
7518 EOF
7519
7520 fi
7521
7522 # pretend that ncurses==ncursesw==ncursest
7523 echo "$as_me:7523: checking if you want to disable library suffixes" >&5
7524 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7525
7526 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7527 if test "${enable_lib_suffixes+set}" = set; then
7528   enableval="$enable_lib_suffixes"
7529   test "$enableval" != no && enableval=yes
7530         if test "$enableval" != "yes" ; then
7531     disable_lib_suffixes=yes
7532         else
7533                 disable_lib_suffixes=no
7534         fi
7535 else
7536   enableval=yes
7537         disable_lib_suffixes=no
7538
7539 fi;
7540 echo "$as_me:7540: result: $disable_lib_suffixes" >&5
7541 echo "${ECHO_T}$disable_lib_suffixes" >&6
7542
7543 ### If we're building with rpath, try to link non-standard libs that way too.
7544 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7545
7546 echo "$as_me:7546: checking if rpath-hack should be disabled" >&5
7547 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7548
7549 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7550 if test "${enable_rpath_hack+set}" = set; then
7551   enableval="$enable_rpath_hack"
7552   test "$enableval" != no && enableval=yes
7553         if test "$enableval" != "yes" ; then
7554     cf_disable_rpath_hack=yes
7555         else
7556                 cf_disable_rpath_hack=no
7557         fi
7558 else
7559   enableval=yes
7560         cf_disable_rpath_hack=no
7561
7562 fi;
7563 echo "$as_me:7563: result: $cf_disable_rpath_hack" >&5
7564 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7565 if test "$cf_disable_rpath_hack" = no ; then
7566
7567 echo "$as_me:7567: checking for updated LDFLAGS" >&5
7568 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7569 if test -n "$LD_RPATH_OPT" ; then
7570         echo "$as_me:7570: result: maybe" >&5
7571 echo "${ECHO_T}maybe" >&6
7572
7573         for ac_prog in ldd
7574 do
7575   # Extract the first word of "$ac_prog", so it can be a program name with args.
7576 set dummy $ac_prog; ac_word=$2
7577 echo "$as_me:7577: checking for $ac_word" >&5
7578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7579 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7580   echo $ECHO_N "(cached) $ECHO_C" >&6
7581 else
7582   if test -n "$cf_ldd_prog"; then
7583   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7584 else
7585   ac_save_IFS=$IFS; IFS=$ac_path_separator
7586 ac_dummy="$PATH"
7587 for ac_dir in $ac_dummy; do
7588   IFS=$ac_save_IFS
7589   test -z "$ac_dir" && ac_dir=.
7590   $as_executable_p "$ac_dir/$ac_word" || continue
7591 ac_cv_prog_cf_ldd_prog="$ac_prog"
7592 echo "$as_me:7592: found $ac_dir/$ac_word" >&5
7593 break
7594 done
7595
7596 fi
7597 fi
7598 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7599 if test -n "$cf_ldd_prog"; then
7600   echo "$as_me:7600: result: $cf_ldd_prog" >&5
7601 echo "${ECHO_T}$cf_ldd_prog" >&6
7602 else
7603   echo "$as_me:7603: result: no" >&5
7604 echo "${ECHO_T}no" >&6
7605 fi
7606
7607   test -n "$cf_ldd_prog" && break
7608 done
7609 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7610
7611         cf_rpath_list="/usr/lib /lib"
7612         if test "$cf_ldd_prog" != no
7613         then
7614                 cf_rpath_oops=
7615
7616 cat >conftest.$ac_ext <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619 #include <stdio.h>
7620 int
7621 main (void)
7622 {
7623 printf("Hello");
7624   ;
7625   return 0;
7626 }
7627 _ACEOF
7628 rm -f conftest.$ac_objext conftest$ac_exeext
7629 if { (eval echo "$as_me:7629: \"$ac_link\"") >&5
7630   (eval $ac_link) 2>&5
7631   ac_status=$?
7632   echo "$as_me:7632: \$? = $ac_status" >&5
7633   (exit $ac_status); } &&
7634          { ac_try='test -s conftest$ac_exeext'
7635   { (eval echo "$as_me:7635: \"$ac_try\"") >&5
7636   (eval $ac_try) 2>&5
7637   ac_status=$?
7638   echo "$as_me:7638: \$? = $ac_status" >&5
7639   (exit $ac_status); }; }; then
7640   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7641                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7642 else
7643   echo "$as_me: failed program was:" >&5
7644 cat conftest.$ac_ext >&5
7645 fi
7646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7647
7648                 # If we passed the link-test, but get a "not found" on a given library,
7649                 # this could be due to inept reconfiguration of gcc to make it only
7650                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7651                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7652                 # /usr/local libraries.
7653                 if test -n "$cf_rpath_oops"
7654                 then
7655                         for cf_rpath_src in $cf_rpath_oops
7656                         do
7657                                 for cf_rpath_dir in \
7658                                         /usr/local \
7659                                         /usr/pkg \
7660                                         /opt/sfw
7661                                 do
7662                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7663                                         then
7664                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7665
7666 echo "${as_me:-configure}:7666: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7667
7668                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7669                                                 break
7670                                         fi
7671                                 done
7672                         done
7673                 fi
7674         fi
7675
7676         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7677
7678 echo "${as_me:-configure}:7678: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7679
7680 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7681
7682 echo "${as_me:-configure}:7682: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7683
7684 cf_rpath_dst=
7685 for cf_rpath_src in $LDFLAGS
7686 do
7687         case $cf_rpath_src in
7688         (-L*)
7689
7690                 # check if this refers to a directory which we will ignore
7691                 cf_rpath_skip=no
7692                 if test -n "$cf_rpath_list"
7693                 then
7694                         for cf_rpath_item in $cf_rpath_list
7695                         do
7696                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7697                                 then
7698                                         cf_rpath_skip=yes
7699                                         break
7700                                 fi
7701                         done
7702                 fi
7703
7704                 if test "$cf_rpath_skip" = no
7705                 then
7706                         # transform the option
7707                         if test "$LD_RPATH_OPT" = "-R " ; then
7708                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7709                         else
7710                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7711                         fi
7712
7713                         # if we have not already added this, add it now
7714                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7715                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7716                         then
7717                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7718
7719 echo "${as_me:-configure}:7719: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7720
7721                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7722                         fi
7723                 fi
7724                 ;;
7725         esac
7726         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7727 done
7728 LDFLAGS=$cf_rpath_dst
7729
7730 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7731
7732 echo "${as_me:-configure}:7732: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7733
7734 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7735
7736 echo "${as_me:-configure}:7736: testing ...checking LIBS $LIBS ..." 1>&5
7737
7738 cf_rpath_dst=
7739 for cf_rpath_src in $LIBS
7740 do
7741         case $cf_rpath_src in
7742         (-L*)
7743
7744                 # check if this refers to a directory which we will ignore
7745                 cf_rpath_skip=no
7746                 if test -n "$cf_rpath_list"
7747                 then
7748                         for cf_rpath_item in $cf_rpath_list
7749                         do
7750                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7751                                 then
7752                                         cf_rpath_skip=yes
7753                                         break
7754                                 fi
7755                         done
7756                 fi
7757
7758                 if test "$cf_rpath_skip" = no
7759                 then
7760                         # transform the option
7761                         if test "$LD_RPATH_OPT" = "-R " ; then
7762                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7763                         else
7764                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7765                         fi
7766
7767                         # if we have not already added this, add it now
7768                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7769                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7770                         then
7771                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7772
7773 echo "${as_me:-configure}:7773: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7774
7775                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7776                         fi
7777                 fi
7778                 ;;
7779         esac
7780         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7781 done
7782 LIBS=$cf_rpath_dst
7783
7784 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7785
7786 echo "${as_me:-configure}:7786: testing ...checked LIBS $LIBS ..." 1>&5
7787
7788         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7789
7790 echo "${as_me:-configure}:7790: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7791
7792 else
7793         echo "$as_me:7793: result: no" >&5
7794 echo "${ECHO_T}no" >&6
7795 fi
7796
7797 fi
7798
7799 fi
7800
7801 ###############################################################################
7802
7803 ###     use option --with-extra-suffix to append suffix to headers and libraries
7804 echo "$as_me:7804: checking if you wish to append extra suffix to header/library paths" >&5
7805 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7806 EXTRA_SUFFIX=
7807
7808 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7809 if test "${with_extra_suffix+set}" = set; then
7810   withval="$with_extra_suffix"
7811   case x$withval in
7812         (no)
7813                 ;;
7814         (xyes|x)
7815                 EXTRA_SUFFIX=$cf_cv_abi_version
7816                 ;;
7817         (*)
7818                 EXTRA_SUFFIX=$withval
7819                 ;;
7820         esac
7821
7822 fi;
7823 echo "$as_me:7823: result: $EXTRA_SUFFIX" >&5
7824 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7825
7826 ###     use option --disable-overwrite to leave out the link to -lcurses
7827 echo "$as_me:7827: checking if you wish to install ncurses overwriting curses" >&5
7828 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7829
7830 # Check whether --enable-overwrite or --disable-overwrite was given.
7831 if test "${enable_overwrite+set}" = set; then
7832   enableval="$enable_overwrite"
7833   with_overwrite=$enableval
7834 else
7835   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7836 fi;
7837 echo "$as_me:7837: result: $with_overwrite" >&5
7838 echo "${ECHO_T}$with_overwrite" >&6
7839
7840 echo "$as_me:7840: checking if external terminfo-database is used" >&5
7841 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7842
7843 # Check whether --enable-database or --disable-database was given.
7844 if test "${enable_database+set}" = set; then
7845   enableval="$enable_database"
7846   use_database=$enableval
7847 else
7848   use_database=yes
7849 fi;
7850 echo "$as_me:7850: result: $use_database" >&5
7851 echo "${ECHO_T}$use_database" >&6
7852
7853 case $host_os in
7854 (os2*)
7855         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7856         ;;
7857 (*)
7858         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7859         ;;
7860 esac
7861
7862 NCURSES_USE_DATABASE=0
7863 if test "$use_database" != no ; then
7864         NCURSES_USE_DATABASE=1
7865
7866         echo "$as_me:7866: checking which terminfo source-file will be installed" >&5
7867 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7868
7869 # Check whether --with-database or --without-database was given.
7870 if test "${with_database+set}" = set; then
7871   withval="$with_database"
7872   TERMINFO_SRC=$withval
7873 fi;
7874         echo "$as_me:7874: result: $TERMINFO_SRC" >&5
7875 echo "${ECHO_T}$TERMINFO_SRC" >&6
7876
7877         echo "$as_me:7877: checking whether to use hashed database instead of directory/tree" >&5
7878 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7879
7880 # Check whether --with-hashed-db or --without-hashed-db was given.
7881 if test "${with_hashed_db+set}" = set; then
7882   withval="$with_hashed_db"
7883
7884 else
7885   with_hashed_db=no
7886 fi;
7887         echo "$as_me:7887: result: $with_hashed_db" >&5
7888 echo "${ECHO_T}$with_hashed_db" >&6
7889 else
7890         with_hashed_db=no
7891 fi
7892
7893 echo "$as_me:7893: checking for list of fallback descriptions" >&5
7894 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7895
7896 # Check whether --with-fallbacks or --without-fallbacks was given.
7897 if test "${with_fallbacks+set}" = set; then
7898   withval="$with_fallbacks"
7899   with_fallback=$withval
7900 else
7901   with_fallback=
7902 fi;
7903 echo "$as_me:7903: result: $with_fallback" >&5
7904 echo "${ECHO_T}$with_fallback" >&6
7905 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7906
7907 echo "$as_me:7907: checking if you want modern xterm or antique" >&5
7908 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7909
7910 # Check whether --with-xterm-new or --without-xterm-new was given.
7911 if test "${with_xterm_new+set}" = set; then
7912   withval="$with_xterm_new"
7913   with_xterm_new=$withval
7914 else
7915   with_xterm_new=yes
7916 fi;
7917 case $with_xterm_new in
7918 (no) with_xterm_new=xterm-old;;
7919 (*)      with_xterm_new=xterm-new;;
7920 esac
7921 echo "$as_me:7921: result: $with_xterm_new" >&5
7922 echo "${ECHO_T}$with_xterm_new" >&6
7923 WHICH_XTERM=$with_xterm_new
7924
7925 echo "$as_me:7925: checking if xterm backspace sends BS or DEL" >&5
7926 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7927
7928 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7929 if test "${with_xterm_kbs+set}" = set; then
7930   withval="$with_xterm_kbs"
7931   with_xterm_kbs=$withval
7932 else
7933   with_xterm_kbs=BS
7934 fi;
7935 case x$with_xterm_kbs in
7936 (xyes|xno|xBS|xbs|x8)
7937         with_xterm_kbs=BS
7938         ;;
7939 (xDEL|xdel|x127)
7940         with_xterm_kbs=DEL
7941         ;;
7942 (*)
7943         with_xterm_kbs=$withval
7944         ;;
7945 esac
7946 echo "$as_me:7946: result: $with_xterm_kbs" >&5
7947 echo "${ECHO_T}$with_xterm_kbs" >&6
7948 XTERM_KBS=$with_xterm_kbs
7949
7950 MAKE_TERMINFO=
7951 if test "$use_database" = no ; then
7952         TERMINFO="${datadir}/terminfo"
7953         MAKE_TERMINFO="#"
7954 else
7955
7956 echo "$as_me:7956: checking for list of terminfo directories" >&5
7957 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7958
7959 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7960 if test "${with_terminfo_dirs+set}" = set; then
7961   withval="$with_terminfo_dirs"
7962
7963 else
7964   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7965 fi;
7966 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7967 cf_dst_path=
7968 for cf_src_path in $withval
7969 do
7970
7971 if test "x$prefix" != xNONE; then
7972         cf_path_syntax="$prefix"
7973 else
7974         cf_path_syntax="$ac_default_prefix"
7975 fi
7976
7977 case ".$cf_src_path" in
7978 (.\$\(*\)*|.\'*\'*)
7979         ;;
7980 (..|./*|.\\*)
7981         ;;
7982 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7983         ;;
7984 (.\${*prefix}*|.\${*dir}*)
7985         eval cf_src_path="$cf_src_path"
7986         case ".$cf_src_path" in
7987         (.NONE/*)
7988                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7989                 ;;
7990         esac
7991         ;;
7992 (.no|.NONE/*)
7993         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7994         ;;
7995 (*)
7996         { { echo "$as_me:7996: error: expected a pathname, not \"$cf_src_path\"" >&5
7997 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7998    { (exit 1); exit 1; }; }
7999         ;;
8000 esac
8001
8002   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8003   cf_dst_path="${cf_dst_path}${cf_src_path}"
8004 done
8005 IFS="$ac_save_ifs"
8006
8007 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8008 # so we have to check/work around.  We do prefer the result of "eval"...
8009 eval cf_dst_eval="$cf_dst_path"
8010 case "x$cf_dst_eval" in
8011 (xNONE*)
8012         TERMINFO_DIRS=$cf_dst_path
8013         ;;
8014 (*)
8015         TERMINFO_DIRS="$cf_dst_eval"
8016         ;;
8017 esac
8018
8019 echo "$as_me:8019: result: $TERMINFO_DIRS" >&5
8020 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8021 test -n "$TERMINFO_DIRS" &&
8022 cat >>confdefs.h <<EOF
8023 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8024 EOF
8025
8026 case "x$TERMINFO" in
8027 x???:*)
8028         { echo "$as_me:8028: WARNING: ignoring non-directory/file TERMINFO value" >&5
8029 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8030         unset TERMINFO
8031         ;;
8032 esac
8033
8034 echo "$as_me:8034: checking for default terminfo directory" >&5
8035 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8036
8037 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8038 if test "${with_default_terminfo_dir+set}" = set; then
8039   withval="$with_default_terminfo_dir"
8040
8041 else
8042   withval="${TERMINFO:-${datadir}/terminfo}"
8043 fi; if test -n "${datadir}/terminfo" ; then
8044
8045 if test "x$prefix" != xNONE; then
8046         cf_path_syntax="$prefix"
8047 else
8048         cf_path_syntax="$ac_default_prefix"
8049 fi
8050
8051 case ".$withval" in
8052 (.\$\(*\)*|.\'*\'*)
8053         ;;
8054 (..|./*|.\\*)
8055         ;;
8056 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8057         ;;
8058 (.\${*prefix}*|.\${*dir}*)
8059         eval withval="$withval"
8060         case ".$withval" in
8061         (.NONE/*)
8062                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8063                 ;;
8064         esac
8065         ;;
8066 (.no|.NONE/*)
8067         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8068         ;;
8069 (*)
8070         { { echo "$as_me:8070: error: expected a pathname, not \"$withval\"" >&5
8071 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8072    { (exit 1); exit 1; }; }
8073         ;;
8074 esac
8075
8076 fi
8077 eval TERMINFO="$withval"
8078
8079 echo "$as_me:8079: result: $TERMINFO" >&5
8080 echo "${ECHO_T}$TERMINFO" >&6
8081
8082 cat >>confdefs.h <<EOF
8083 #define TERMINFO "$TERMINFO"
8084 EOF
8085
8086 fi
8087
8088 ###     use option --disable-big-core to make tic run on small machines
8089 ###     We need 4Mb, check if we can allocate 50% more than that.
8090 echo "$as_me:8090: checking if big-core option selected" >&5
8091 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8092
8093 # Check whether --enable-big-core or --disable-big-core was given.
8094 if test "${enable_big_core+set}" = set; then
8095   enableval="$enable_big_core"
8096   with_big_core=$enableval
8097 else
8098   if test "$cross_compiling" = yes; then
8099   with_big_core=no
8100 else
8101   cat >conftest.$ac_ext <<_ACEOF
8102 #line 8102 "configure"
8103 #include "confdefs.h"
8104
8105 #include <stdlib.h>
8106 #include <string.h>
8107 int main() {
8108         unsigned long n = 6000000L;
8109         char *s = malloc(n);
8110         if (s != 0)
8111                 s[0] = s[n-1] = 0;
8112         ${cf_cv_main_return:-return}(s == 0);
8113 }
8114 _ACEOF
8115 rm -f conftest$ac_exeext
8116 if { (eval echo "$as_me:8116: \"$ac_link\"") >&5
8117   (eval $ac_link) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8121   { (eval echo "$as_me:8121: \"$ac_try\"") >&5
8122   (eval $ac_try) 2>&5
8123   ac_status=$?
8124   echo "$as_me:8124: \$? = $ac_status" >&5
8125   (exit $ac_status); }; }; then
8126   with_big_core=yes
8127 else
8128   echo "$as_me: program exited with status $ac_status" >&5
8129 echo "$as_me: failed program was:" >&5
8130 cat conftest.$ac_ext >&5
8131 with_big_core=no
8132 fi
8133 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8134 fi
8135 fi;
8136 echo "$as_me:8136: result: $with_big_core" >&5
8137 echo "${ECHO_T}$with_big_core" >&6
8138 test "x$with_big_core" = "xyes" &&
8139 cat >>confdefs.h <<\EOF
8140 #define HAVE_BIG_CORE 1
8141 EOF
8142
8143 ### ISO C only guarantees 512-char strings, we have tables which load faster
8144 ### when constructed using "big" strings.  More than the C compiler, the awk
8145 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8146 echo "$as_me:8146: checking if big-strings option selected" >&5
8147 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8148
8149 # Check whether --enable-big-strings or --disable-big-strings was given.
8150 if test "${enable_big_strings+set}" = set; then
8151   enableval="$enable_big_strings"
8152   with_big_strings=$enableval
8153 else
8154
8155         case x$AWK in
8156         (x)
8157                 eval with_big_strings=no
8158                 ;;
8159         (*)
8160                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8161                         | $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
8162                         eval with_big_strings=yes
8163                 else
8164                         eval with_big_strings=no
8165                 fi
8166                 ;;
8167         esac
8168
8169 fi;
8170 echo "$as_me:8170: result: $with_big_strings" >&5
8171 echo "${ECHO_T}$with_big_strings" >&6
8172
8173 USE_BIG_STRINGS=0
8174 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8175
8176 ###     use option --enable-termcap to compile in the termcap fallback support
8177 echo "$as_me:8177: checking if you want termcap-fallback support" >&5
8178 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8179
8180 # Check whether --enable-termcap or --disable-termcap was given.
8181 if test "${enable_termcap+set}" = set; then
8182   enableval="$enable_termcap"
8183   with_termcap=$enableval
8184 else
8185   with_termcap=no
8186 fi;
8187 echo "$as_me:8187: result: $with_termcap" >&5
8188 echo "${ECHO_T}$with_termcap" >&6
8189
8190 NCURSES_USE_TERMCAP=0
8191 if test "x$with_termcap" != "xyes" ; then
8192         if test "$use_database" = no ; then
8193                 if test -z "$with_fallback" ; then
8194                         { { echo "$as_me:8194: error: You have disabled the database w/o specifying fallbacks" >&5
8195 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8196    { (exit 1); exit 1; }; }
8197                 fi
8198         fi
8199
8200 cat >>confdefs.h <<\EOF
8201 #define PURE_TERMINFO 1
8202 EOF
8203
8204 else
8205
8206         if test "$with_ticlib" != no ; then
8207                 { { echo "$as_me:8207: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8208 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8209    { (exit 1); exit 1; }; }
8210         fi
8211
8212         NCURSES_USE_TERMCAP=1
8213         echo "$as_me:8213: checking for list of termcap files" >&5
8214 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8215
8216 # Check whether --with-termpath or --without-termpath was given.
8217 if test "${with_termpath+set}" = set; then
8218   withval="$with_termpath"
8219
8220 else
8221   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8222 fi;
8223 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8224 cf_dst_path=
8225 for cf_src_path in $withval
8226 do
8227
8228 if test "x$prefix" != xNONE; then
8229         cf_path_syntax="$prefix"
8230 else
8231         cf_path_syntax="$ac_default_prefix"
8232 fi
8233
8234 case ".$cf_src_path" in
8235 (.\$\(*\)*|.\'*\'*)
8236         ;;
8237 (..|./*|.\\*)
8238         ;;
8239 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8240         ;;
8241 (.\${*prefix}*|.\${*dir}*)
8242         eval cf_src_path="$cf_src_path"
8243         case ".$cf_src_path" in
8244         (.NONE/*)
8245                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8246                 ;;
8247         esac
8248         ;;
8249 (.no|.NONE/*)
8250         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8251         ;;
8252 (*)
8253         { { echo "$as_me:8253: error: expected a pathname, not \"$cf_src_path\"" >&5
8254 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8255    { (exit 1); exit 1; }; }
8256         ;;
8257 esac
8258
8259   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8260   cf_dst_path="${cf_dst_path}${cf_src_path}"
8261 done
8262 IFS="$ac_save_ifs"
8263
8264 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8265 # so we have to check/work around.  We do prefer the result of "eval"...
8266 eval cf_dst_eval="$cf_dst_path"
8267 case "x$cf_dst_eval" in
8268 (xNONE*)
8269         TERMPATH=$cf_dst_path
8270         ;;
8271 (*)
8272         TERMPATH="$cf_dst_eval"
8273         ;;
8274 esac
8275
8276         echo "$as_me:8276: result: $TERMPATH" >&5
8277 echo "${ECHO_T}$TERMPATH" >&6
8278         test -n "$TERMPATH" &&
8279 cat >>confdefs.h <<EOF
8280 #define TERMPATH "$TERMPATH"
8281 EOF
8282
8283         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8284         echo "$as_me:8284: checking if fast termcap-loader is needed" >&5
8285 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8286
8287 # Check whether --enable-getcap or --disable-getcap was given.
8288 if test "${enable_getcap+set}" = set; then
8289   enableval="$enable_getcap"
8290   with_getcap=$enableval
8291 else
8292   with_getcap=no
8293 fi;
8294         echo "$as_me:8294: result: $with_getcap" >&5
8295 echo "${ECHO_T}$with_getcap" >&6
8296         test "x$with_getcap" = "xyes" &&
8297 cat >>confdefs.h <<\EOF
8298 #define USE_GETCAP 1
8299 EOF
8300
8301         echo "$as_me:8301: checking if translated termcaps will be cached in ~/.terminfo" >&5
8302 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8303
8304 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8305 if test "${enable_getcap_cache+set}" = set; then
8306   enableval="$enable_getcap_cache"
8307   with_getcap_cache=$enableval
8308 else
8309   with_getcap_cache=no
8310 fi;
8311         echo "$as_me:8311: result: $with_getcap_cache" >&5
8312 echo "${ECHO_T}$with_getcap_cache" >&6
8313         test "x$with_getcap_cache" = "xyes" &&
8314 cat >>confdefs.h <<\EOF
8315 #define USE_GETCAP_CACHE 1
8316 EOF
8317
8318 fi
8319
8320 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8321 echo "$as_me:8321: checking if ~/.terminfo is wanted" >&5
8322 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8323
8324 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8325 if test "${enable_home_terminfo+set}" = set; then
8326   enableval="$enable_home_terminfo"
8327   with_home_terminfo=$enableval
8328 else
8329   with_home_terminfo=yes
8330 fi;
8331 echo "$as_me:8331: result: $with_home_terminfo" >&5
8332 echo "${ECHO_T}$with_home_terminfo" >&6
8333 test "x$with_home_terminfo" = "xyes" &&
8334 cat >>confdefs.h <<\EOF
8335 #define USE_HOME_TERMINFO 1
8336 EOF
8337
8338 echo "$as_me:8338: checking if you want to use restricted environment when running as root" >&5
8339 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8340
8341 # Check whether --enable-root-environ or --disable-root-environ was given.
8342 if test "${enable_root_environ+set}" = set; then
8343   enableval="$enable_root_environ"
8344   with_root_environ=$enableval
8345 else
8346   with_root_environ=yes
8347 fi;
8348 echo "$as_me:8348: result: $with_root_environ" >&5
8349 echo "${ECHO_T}$with_root_environ" >&6
8350 test "x$with_root_environ" = xyes &&
8351 cat >>confdefs.h <<\EOF
8352 #define USE_ROOT_ENVIRON 1
8353 EOF
8354
8355 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8356 ###   to reduce storage requirements for the terminfo database.
8357
8358 for ac_header in \
8359 unistd.h \
8360
8361 do
8362 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8363 echo "$as_me:8363: checking for $ac_header" >&5
8364 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8365 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8366   echo $ECHO_N "(cached) $ECHO_C" >&6
8367 else
8368   cat >conftest.$ac_ext <<_ACEOF
8369 #line 8369 "configure"
8370 #include "confdefs.h"
8371 #include <$ac_header>
8372 _ACEOF
8373 if { (eval echo "$as_me:8373: \"$ac_cpp conftest.$ac_ext\"") >&5
8374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8375   ac_status=$?
8376   egrep -v '^ *\+' conftest.er1 >conftest.err
8377   rm -f conftest.er1
8378   cat conftest.err >&5
8379   echo "$as_me:8379: \$? = $ac_status" >&5
8380   (exit $ac_status); } >/dev/null; then
8381   if test -s conftest.err; then
8382     ac_cpp_err=$ac_c_preproc_warn_flag
8383   else
8384     ac_cpp_err=
8385   fi
8386 else
8387   ac_cpp_err=yes
8388 fi
8389 if test -z "$ac_cpp_err"; then
8390   eval "$as_ac_Header=yes"
8391 else
8392   echo "$as_me: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   eval "$as_ac_Header=no"
8395 fi
8396 rm -f conftest.err conftest.$ac_ext
8397 fi
8398 echo "$as_me:8398: result: `eval echo '${'$as_ac_Header'}'`" >&5
8399 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8400 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8401   cat >>confdefs.h <<EOF
8402 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8403 EOF
8404
8405 fi
8406 done
8407
8408 for ac_func in \
8409         remove \
8410         unlink
8411 do
8412 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8413 echo "$as_me:8413: checking for $ac_func" >&5
8414 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8415 if eval "test \"\${$as_ac_var+set}\" = set"; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418   cat >conftest.$ac_ext <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421 #define $ac_func autoconf_temporary
8422 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8423 #undef $ac_func
8424
8425 #ifdef __cplusplus
8426 extern "C"
8427 #endif
8428
8429 /* We use char because int might match the return type of a gcc2
8430    builtin and then its argument prototype would still apply.  */
8431 char $ac_func (void);
8432
8433 int
8434 main (void)
8435 {
8436
8437 /* The GNU C library defines stubs for functions which it implements
8438     to always fail with ENOSYS.  Some functions are actually named
8439     something starting with __ and the normal name is an alias.  */
8440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8441 #error found stub for $ac_func
8442 #endif
8443
8444         return $ac_func ();
8445   ;
8446   return 0;
8447 }
8448 _ACEOF
8449 rm -f conftest.$ac_objext conftest$ac_exeext
8450 if { (eval echo "$as_me:8450: \"$ac_link\"") >&5
8451   (eval $ac_link) 2>&5
8452   ac_status=$?
8453   echo "$as_me:8453: \$? = $ac_status" >&5
8454   (exit $ac_status); } &&
8455          { ac_try='test -s conftest$ac_exeext'
8456   { (eval echo "$as_me:8456: \"$ac_try\"") >&5
8457   (eval $ac_try) 2>&5
8458   ac_status=$?
8459   echo "$as_me:8459: \$? = $ac_status" >&5
8460   (exit $ac_status); }; }; then
8461   eval "$as_ac_var=yes"
8462 else
8463   echo "$as_me: failed program was:" >&5
8464 cat conftest.$ac_ext >&5
8465 eval "$as_ac_var=no"
8466 fi
8467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8468 fi
8469 echo "$as_me:8469: result: `eval echo '${'$as_ac_var'}'`" >&5
8470 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8471 if test `eval echo '${'$as_ac_var'}'` = yes; then
8472   cat >>confdefs.h <<EOF
8473 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8474 EOF
8475
8476 fi
8477 done
8478
8479 if test "$cross_compiling" = yes ; then
8480
8481 for ac_func in \
8482                 link \
8483                 symlink
8484 do
8485 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8486 echo "$as_me:8486: checking for $ac_func" >&5
8487 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8488 if eval "test \"\${$as_ac_var+set}\" = set"; then
8489   echo $ECHO_N "(cached) $ECHO_C" >&6
8490 else
8491   cat >conftest.$ac_ext <<_ACEOF
8492 #line 8492 "configure"
8493 #include "confdefs.h"
8494 #define $ac_func autoconf_temporary
8495 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8496 #undef $ac_func
8497
8498 #ifdef __cplusplus
8499 extern "C"
8500 #endif
8501
8502 /* We use char because int might match the return type of a gcc2
8503    builtin and then its argument prototype would still apply.  */
8504 char $ac_func (void);
8505
8506 int
8507 main (void)
8508 {
8509
8510 /* The GNU C library defines stubs for functions which it implements
8511     to always fail with ENOSYS.  Some functions are actually named
8512     something starting with __ and the normal name is an alias.  */
8513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8514 #error found stub for $ac_func
8515 #endif
8516
8517         return $ac_func ();
8518   ;
8519   return 0;
8520 }
8521 _ACEOF
8522 rm -f conftest.$ac_objext conftest$ac_exeext
8523 if { (eval echo "$as_me:8523: \"$ac_link\"") >&5
8524   (eval $ac_link) 2>&5
8525   ac_status=$?
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit $ac_status); } &&
8528          { ac_try='test -s conftest$ac_exeext'
8529   { (eval echo "$as_me:8529: \"$ac_try\"") >&5
8530   (eval $ac_try) 2>&5
8531   ac_status=$?
8532   echo "$as_me:8532: \$? = $ac_status" >&5
8533   (exit $ac_status); }; }; then
8534   eval "$as_ac_var=yes"
8535 else
8536   echo "$as_me: failed program was:" >&5
8537 cat conftest.$ac_ext >&5
8538 eval "$as_ac_var=no"
8539 fi
8540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8541 fi
8542 echo "$as_me:8542: result: `eval echo '${'$as_ac_var'}'`" >&5
8543 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8544 if test `eval echo '${'$as_ac_var'}'` = yes; then
8545   cat >>confdefs.h <<EOF
8546 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8547 EOF
8548
8549 fi
8550 done
8551
8552 else
8553         echo "$as_me:8553: checking if link/symlink functions work" >&5
8554 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8555 if test "${cf_cv_link_funcs+set}" = set; then
8556   echo $ECHO_N "(cached) $ECHO_C" >&6
8557 else
8558
8559                 cf_cv_link_funcs=
8560                 for cf_func in link symlink ; do
8561                         if test "$cross_compiling" = yes; then
8562
8563                         eval 'ac_cv_func_'$cf_func'=error'
8564 else
8565   cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 #include <sys/types.h>
8570 #include <sys/stat.h>
8571 #ifdef HAVE_UNISTD_H
8572 #include <unistd.h>
8573 #endif
8574 int main(void)
8575 {
8576         int fail = 0;
8577         char *src = "config.log";
8578         char *dst = "conftest.chk";
8579         struct stat src_sb;
8580         struct stat dst_sb;
8581
8582         stat(src, &src_sb);
8583         fail = ($cf_func("config.log", "conftest.chk") < 0)
8584             || (stat(dst, &dst_sb) < 0)
8585             || (dst_sb.st_mtime != src_sb.st_mtime);
8586 #ifdef HAVE_UNLINK
8587         unlink(dst);
8588 #else
8589         remove(dst);
8590 #endif
8591         ${cf_cv_main_return:-return} (fail);
8592 }
8593
8594 _ACEOF
8595 rm -f conftest$ac_exeext
8596 if { (eval echo "$as_me:8596: \"$ac_link\"") >&5
8597   (eval $ac_link) 2>&5
8598   ac_status=$?
8599   echo "$as_me:8599: \$? = $ac_status" >&5
8600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8601   { (eval echo "$as_me:8601: \"$ac_try\"") >&5
8602   (eval $ac_try) 2>&5
8603   ac_status=$?
8604   echo "$as_me:8604: \$? = $ac_status" >&5
8605   (exit $ac_status); }; }; then
8606
8607                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8608                         eval 'ac_cv_func_'$cf_func'=yes'
8609 else
8610   echo "$as_me: program exited with status $ac_status" >&5
8611 echo "$as_me: failed program was:" >&5
8612 cat conftest.$ac_ext >&5
8613
8614                         eval 'ac_cv_func_'$cf_func'=no'
8615 fi
8616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8617 fi
8618                 done
8619                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8620
8621 fi
8622 echo "$as_me:8622: result: $cf_cv_link_funcs" >&5
8623 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8624         test "$ac_cv_func_link"    = yes &&
8625 cat >>confdefs.h <<\EOF
8626 #define HAVE_LINK 1
8627 EOF
8628
8629         test "$ac_cv_func_symlink" = yes &&
8630 cat >>confdefs.h <<\EOF
8631 #define HAVE_SYMLINK 1
8632 EOF
8633
8634 fi
8635
8636 with_links=no
8637 with_symlinks=no
8638
8639 # soft links (symbolic links) are useful for some systems where hard links do
8640 # not work, or to make it simpler to copy terminfo trees around.
8641 if test "x$ac_cv_func_symlink" = xyes ; then
8642         echo "$as_me:8642: checking if tic should use symbolic links" >&5
8643 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8644
8645 # Check whether --enable-symlinks or --disable-symlinks was given.
8646 if test "${enable_symlinks+set}" = set; then
8647   enableval="$enable_symlinks"
8648   with_symlinks=$enableval
8649 else
8650   with_symlinks=no
8651 fi;
8652         echo "$as_me:8652: result: $with_symlinks" >&5
8653 echo "${ECHO_T}$with_symlinks" >&6
8654 fi
8655
8656 # If we have hard links and did not choose to use soft links instead, there is
8657 # no reason to make this choice optional - use the hard links.
8658 if test "$with_symlinks" = no ; then
8659         echo "$as_me:8659: checking if tic should use hard links" >&5
8660 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8661         if test "x$ac_cv_func_link" = xyes ; then
8662                 with_links=yes
8663         else
8664                 with_links=no
8665         fi
8666         echo "$as_me:8666: result: $with_links" >&5
8667 echo "${ECHO_T}$with_links" >&6
8668 fi
8669
8670 test "x$with_links" = xyes &&
8671 cat >>confdefs.h <<\EOF
8672 #define USE_LINKS 1
8673 EOF
8674
8675 test "x$with_symlinks" = xyes &&
8676 cat >>confdefs.h <<\EOF
8677 #define USE_SYMLINKS 1
8678 EOF
8679
8680 ###   use option --enable-broken-linker to force on use of broken-linker support
8681 echo "$as_me:8681: checking if you want broken-linker support code" >&5
8682 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8683
8684 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8685 if test "${enable_broken_linker+set}" = set; then
8686   enableval="$enable_broken_linker"
8687   with_broken_linker=$enableval
8688 else
8689   with_broken_linker=${BROKEN_LINKER:-no}
8690 fi;
8691 echo "$as_me:8691: result: $with_broken_linker" >&5
8692 echo "${ECHO_T}$with_broken_linker" >&6
8693
8694 BROKEN_LINKER=0
8695 if test "x$with_broken_linker" = xyes ; then
8696
8697 cat >>confdefs.h <<\EOF
8698 #define BROKEN_LINKER 1
8699 EOF
8700
8701         BROKEN_LINKER=1
8702 elif test "$DFT_LWR_MODEL" = shared ; then
8703         case $cf_cv_system_name in
8704         (cygwin*)
8705
8706 cat >>confdefs.h <<\EOF
8707 #define BROKEN_LINKER 1
8708 EOF
8709
8710                 BROKEN_LINKER=1
8711                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8712
8713 echo "${as_me:-configure}:8713: testing cygwin linker is broken anyway ..." 1>&5
8714
8715                 ;;
8716         esac
8717 fi
8718
8719 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8720 echo "$as_me:8720: checking if tputs should process BSD-style prefix padding" >&5
8721 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8722
8723 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8724 if test "${enable_bsdpad+set}" = set; then
8725   enableval="$enable_bsdpad"
8726   with_bsdpad=$enableval
8727 else
8728   with_bsdpad=no
8729 fi;
8730 echo "$as_me:8730: result: $with_bsdpad" >&5
8731 echo "${ECHO_T}$with_bsdpad" >&6
8732 test "x$with_bsdpad" = xyes &&
8733 cat >>confdefs.h <<\EOF
8734 #define BSD_TPUTS 1
8735 EOF
8736
8737 ###   use option --enable-widec to turn on use of wide-character support
8738 NCURSES_CH_T=chtype
8739 NCURSES_LIBUTF8=0
8740
8741 NEED_WCHAR_H=0
8742 NCURSES_MBSTATE_T=0
8743 NCURSES_WCHAR_T=0
8744 NCURSES_WINT_T=0
8745
8746 # Check to define _XOPEN_SOURCE "automatically"
8747 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8748
8749 cf_XOPEN_SOURCE=600
8750 cf_POSIX_C_SOURCE=199506L
8751 cf_xopen_source=
8752
8753 case $host_os in
8754 (aix[4-7]*)
8755         cf_xopen_source="-D_ALL_SOURCE"
8756         ;;
8757 (msys)
8758         cf_XOPEN_SOURCE=600
8759         ;;
8760 (darwin[0-8].*)
8761         cf_xopen_source="-D_APPLE_C_SOURCE"
8762         ;;
8763 (darwin*)
8764         cf_xopen_source="-D_DARWIN_C_SOURCE"
8765         cf_XOPEN_SOURCE=
8766         ;;
8767 (freebsd*|dragonfly*)
8768         # 5.x headers associate
8769         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8770         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8771         cf_POSIX_C_SOURCE=200112L
8772         cf_XOPEN_SOURCE=600
8773         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8774         ;;
8775 (hpux11*)
8776         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8777         ;;
8778 (hpux*)
8779         cf_xopen_source="-D_HPUX_SOURCE"
8780         ;;
8781 (irix[56].*)
8782         cf_xopen_source="-D_SGI_SOURCE"
8783         cf_XOPEN_SOURCE=
8784         ;;
8785 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8786
8787 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8788
8789 echo "$as_me:8789: checking if this is the GNU C library" >&5
8790 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8791 if test "${cf_cv_gnu_library+set}" = set; then
8792   echo $ECHO_N "(cached) $ECHO_C" >&6
8793 else
8794
8795 cat >conftest.$ac_ext <<_ACEOF
8796 #line 8796 "configure"
8797 #include "confdefs.h"
8798 #include <sys/types.h>
8799 int
8800 main (void)
8801 {
8802
8803         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8804                 return 0;
8805         #else
8806         #       error not GNU C library
8807         #endif
8808   ;
8809   return 0;
8810 }
8811 _ACEOF
8812 rm -f conftest.$ac_objext
8813 if { (eval echo "$as_me:8813: \"$ac_compile\"") >&5
8814   (eval $ac_compile) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); } &&
8818          { ac_try='test -s conftest.$ac_objext'
8819   { (eval echo "$as_me:8819: \"$ac_try\"") >&5
8820   (eval $ac_try) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); }; }; then
8824   cf_cv_gnu_library=yes
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 cf_cv_gnu_library=no
8829 fi
8830 rm -f conftest.$ac_objext conftest.$ac_ext
8831
8832 fi
8833 echo "$as_me:8833: result: $cf_cv_gnu_library" >&5
8834 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8835
8836 if test x$cf_cv_gnu_library = xyes; then
8837
8838         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8839         # was changed to help a little...
8840         echo "$as_me:8840: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8841 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8842 if test "${cf_cv_gnu_library_219+set}" = set; then
8843   echo $ECHO_N "(cached) $ECHO_C" >&6
8844 else
8845
8846                 cf_save="$CPPFLAGS"
8847
8848         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8849         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8850
8851                 cat >conftest.$ac_ext <<_ACEOF
8852 #line 8852 "configure"
8853 #include "confdefs.h"
8854 #include <sys/types.h>
8855 int
8856 main (void)
8857 {
8858
8859                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8860                                 return 0;
8861                         #else
8862                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8863                         #endif
8864   ;
8865   return 0;
8866 }
8867 _ACEOF
8868 rm -f conftest.$ac_objext
8869 if { (eval echo "$as_me:8869: \"$ac_compile\"") >&5
8870   (eval $ac_compile) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); } &&
8874          { ac_try='test -s conftest.$ac_objext'
8875   { (eval echo "$as_me:8875: \"$ac_try\"") >&5
8876   (eval $ac_try) 2>&5
8877   ac_status=$?
8878   echo "$as_me:8878: \$? = $ac_status" >&5
8879   (exit $ac_status); }; }; then
8880   cf_cv_gnu_library_219=yes
8881 else
8882   echo "$as_me: failed program was:" >&5
8883 cat conftest.$ac_ext >&5
8884 cf_cv_gnu_library_219=no
8885 fi
8886 rm -f conftest.$ac_objext conftest.$ac_ext
8887                 CPPFLAGS="$cf_save"
8888
8889 fi
8890 echo "$as_me:8890: result: $cf_cv_gnu_library_219" >&5
8891 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8892
8893         if test "x$cf_cv_gnu_library_219" = xyes; then
8894                 cf_save="$CPPFLAGS"
8895                 echo "$as_me:8895: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8896 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8897 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8898   echo $ECHO_N "(cached) $ECHO_C" >&6
8899 else
8900
8901 cf_fix_cppflags=no
8902 cf_new_cflags=
8903 cf_new_cppflags=
8904 cf_new_extra_cppflags=
8905
8906 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8907 do
8908 case $cf_fix_cppflags in
8909 (no)
8910         case $cf_add_cflags in
8911         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8912                 case $cf_add_cflags in
8913                 (-D*)
8914                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8915
8916                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8917                                 && test -z "${cf_tst_cflags}" \
8918                                 && cf_fix_cppflags=yes
8919
8920                         if test $cf_fix_cppflags = yes ; then
8921
8922         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8923         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8924
8925                                 continue
8926                         elif test "${cf_tst_cflags}" = "\"'" ; then
8927
8928         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8929         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8930
8931                                 continue
8932                         fi
8933                         ;;
8934                 esac
8935                 case "$CPPFLAGS" in
8936                 (*$cf_add_cflags)
8937                         ;;
8938                 (*)
8939                         case $cf_add_cflags in
8940                         (-D*)
8941                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8942
8943 CPPFLAGS=`echo "$CPPFLAGS" | \
8944         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8945                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8946
8947                                 ;;
8948                         esac
8949
8950         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8951         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8952
8953                         ;;
8954                 esac
8955                 ;;
8956         (*)
8957
8958         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8959         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8960
8961                 ;;
8962         esac
8963         ;;
8964 (yes)
8965
8966         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8967         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8968
8969         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8970
8971         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8972                 && test -z "${cf_tst_cflags}" \
8973                 && cf_fix_cppflags=no
8974         ;;
8975 esac
8976 done
8977
8978 if test -n "$cf_new_cflags" ; then
8979
8980         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8981         CFLAGS="${CFLAGS}$cf_new_cflags"
8982
8983 fi
8984
8985 if test -n "$cf_new_cppflags" ; then
8986
8987         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8988         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8989
8990 fi
8991
8992 if test -n "$cf_new_extra_cppflags" ; then
8993
8994         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8995         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8996
8997 fi
8998
8999                         cat >conftest.$ac_ext <<_ACEOF
9000 #line 9000 "configure"
9001 #include "confdefs.h"
9002
9003                                 #include <limits.h>
9004                                 #include <sys/types.h>
9005
9006 int
9007 main (void)
9008 {
9009
9010                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9011                                         return 0;
9012                                 #else
9013                                 #       error GNU C library is too old
9014                                 #endif
9015   ;
9016   return 0;
9017 }
9018 _ACEOF
9019 rm -f conftest.$ac_objext
9020 if { (eval echo "$as_me:9020: \"$ac_compile\"") >&5
9021   (eval $ac_compile) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); } &&
9025          { ac_try='test -s conftest.$ac_objext'
9026   { (eval echo "$as_me:9026: \"$ac_try\"") >&5
9027   (eval $ac_try) 2>&5
9028   ac_status=$?
9029   echo "$as_me:9029: \$? = $ac_status" >&5
9030   (exit $ac_status); }; }; then
9031   cf_cv_gnu_dftsrc_219=yes
9032 else
9033   echo "$as_me: failed program was:" >&5
9034 cat conftest.$ac_ext >&5
9035 cf_cv_gnu_dftsrc_219=no
9036 fi
9037 rm -f conftest.$ac_objext conftest.$ac_ext
9038
9039 fi
9040 echo "$as_me:9040: result: $cf_cv_gnu_dftsrc_219" >&5
9041 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9042                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9043         else
9044                 cf_cv_gnu_dftsrc_219=maybe
9045         fi
9046
9047         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9048
9049                 echo "$as_me:9049: checking if we must define _GNU_SOURCE" >&5
9050 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9051 if test "${cf_cv_gnu_source+set}" = set; then
9052   echo $ECHO_N "(cached) $ECHO_C" >&6
9053 else
9054
9055                 cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058 #include <sys/types.h>
9059 int
9060 main (void)
9061 {
9062
9063                         #ifndef _XOPEN_SOURCE
9064                         #error  expected _XOPEN_SOURCE to be defined
9065                         #endif
9066   ;
9067   return 0;
9068 }
9069 _ACEOF
9070 rm -f conftest.$ac_objext
9071 if { (eval echo "$as_me:9071: \"$ac_compile\"") >&5
9072   (eval $ac_compile) 2>&5
9073   ac_status=$?
9074   echo "$as_me:9074: \$? = $ac_status" >&5
9075   (exit $ac_status); } &&
9076          { ac_try='test -s conftest.$ac_objext'
9077   { (eval echo "$as_me:9077: \"$ac_try\"") >&5
9078   (eval $ac_try) 2>&5
9079   ac_status=$?
9080   echo "$as_me:9080: \$? = $ac_status" >&5
9081   (exit $ac_status); }; }; then
9082   cf_cv_gnu_source=no
9083 else
9084   echo "$as_me: failed program was:" >&5
9085 cat conftest.$ac_ext >&5
9086 cf_save="$CPPFLAGS"
9087
9088 cf_fix_cppflags=no
9089 cf_new_cflags=
9090 cf_new_cppflags=
9091 cf_new_extra_cppflags=
9092
9093 for cf_add_cflags in -D_GNU_SOURCE
9094 do
9095 case $cf_fix_cppflags in
9096 (no)
9097         case $cf_add_cflags in
9098         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9099                 case $cf_add_cflags in
9100                 (-D*)
9101                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9102
9103                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9104                                 && test -z "${cf_tst_cflags}" \
9105                                 && cf_fix_cppflags=yes
9106
9107                         if test $cf_fix_cppflags = yes ; then
9108
9109         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9110         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9111
9112                                 continue
9113                         elif test "${cf_tst_cflags}" = "\"'" ; then
9114
9115         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9116         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9117
9118                                 continue
9119                         fi
9120                         ;;
9121                 esac
9122                 case "$CPPFLAGS" in
9123                 (*$cf_add_cflags)
9124                         ;;
9125                 (*)
9126                         case $cf_add_cflags in
9127                         (-D*)
9128                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9129
9130 CPPFLAGS=`echo "$CPPFLAGS" | \
9131         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9132                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9133
9134                                 ;;
9135                         esac
9136
9137         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9138         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9139
9140                         ;;
9141                 esac
9142                 ;;
9143         (*)
9144
9145         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9146         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9147
9148                 ;;
9149         esac
9150         ;;
9151 (yes)
9152
9153         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9154         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9155
9156         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9157
9158         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9159                 && test -z "${cf_tst_cflags}" \
9160                 && cf_fix_cppflags=no
9161         ;;
9162 esac
9163 done
9164
9165 if test -n "$cf_new_cflags" ; then
9166
9167         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9168         CFLAGS="${CFLAGS}$cf_new_cflags"
9169
9170 fi
9171
9172 if test -n "$cf_new_cppflags" ; then
9173
9174         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9175         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9176
9177 fi
9178
9179 if test -n "$cf_new_extra_cppflags" ; then
9180
9181         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9182         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9183
9184 fi
9185
9186                          cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189 #include <sys/types.h>
9190 int
9191 main (void)
9192 {
9193
9194                                 #ifdef _XOPEN_SOURCE
9195                                 #error  expected _XOPEN_SOURCE to be undefined
9196                                 #endif
9197   ;
9198   return 0;
9199 }
9200 _ACEOF
9201 rm -f conftest.$ac_objext
9202 if { (eval echo "$as_me:9202: \"$ac_compile\"") >&5
9203   (eval $ac_compile) 2>&5
9204   ac_status=$?
9205   echo "$as_me:9205: \$? = $ac_status" >&5
9206   (exit $ac_status); } &&
9207          { ac_try='test -s conftest.$ac_objext'
9208   { (eval echo "$as_me:9208: \"$ac_try\"") >&5
9209   (eval $ac_try) 2>&5
9210   ac_status=$?
9211   echo "$as_me:9211: \$? = $ac_status" >&5
9212   (exit $ac_status); }; }; then
9213   cf_cv_gnu_source=no
9214 else
9215   echo "$as_me: failed program was:" >&5
9216 cat conftest.$ac_ext >&5
9217 cf_cv_gnu_source=yes
9218 fi
9219 rm -f conftest.$ac_objext conftest.$ac_ext
9220                         CPPFLAGS="$cf_save"
9221
9222 fi
9223 rm -f conftest.$ac_objext conftest.$ac_ext
9224
9225 fi
9226 echo "$as_me:9226: result: $cf_cv_gnu_source" >&5
9227 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9228
9229                 if test "$cf_cv_gnu_source" = yes
9230                 then
9231                 echo "$as_me:9231: checking if we should also define _DEFAULT_SOURCE" >&5
9232 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9233 if test "${cf_cv_default_source+set}" = set; then
9234   echo $ECHO_N "(cached) $ECHO_C" >&6
9235 else
9236
9237         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9238         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9239
9240                         cat >conftest.$ac_ext <<_ACEOF
9241 #line 9241 "configure"
9242 #include "confdefs.h"
9243 #include <sys/types.h>
9244 int
9245 main (void)
9246 {
9247
9248                                 #ifdef _DEFAULT_SOURCE
9249                                 #error  expected _DEFAULT_SOURCE to be undefined
9250                                 #endif
9251   ;
9252   return 0;
9253 }
9254 _ACEOF
9255 rm -f conftest.$ac_objext
9256 if { (eval echo "$as_me:9256: \"$ac_compile\"") >&5
9257   (eval $ac_compile) 2>&5
9258   ac_status=$?
9259   echo "$as_me:9259: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -s conftest.$ac_objext'
9262   { (eval echo "$as_me:9262: \"$ac_try\"") >&5
9263   (eval $ac_try) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit $ac_status); }; }; then
9267   cf_cv_default_source=no
9268 else
9269   echo "$as_me: failed program was:" >&5
9270 cat conftest.$ac_ext >&5
9271 cf_cv_default_source=yes
9272 fi
9273 rm -f conftest.$ac_objext conftest.$ac_ext
9274
9275 fi
9276 echo "$as_me:9276: result: $cf_cv_default_source" >&5
9277 echo "${ECHO_T}$cf_cv_default_source" >&6
9278                         if test "$cf_cv_default_source" = yes
9279                         then
9280
9281         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9282         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9283
9284                         fi
9285                 fi
9286         fi
9287
9288 fi
9289
9290         ;;
9291 (minix*)
9292         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9293         ;;
9294 (mirbsd*)
9295         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9296         cf_XOPEN_SOURCE=
9297
9298 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9299
9300 cf_save_CFLAGS="$CFLAGS"
9301 cf_save_CPPFLAGS="$CPPFLAGS"
9302
9303 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9304         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9305                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9306
9307 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9308         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9309                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9310
9311 echo "$as_me:9311: checking if we should define _POSIX_C_SOURCE" >&5
9312 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9313 if test "${cf_cv_posix_c_source+set}" = set; then
9314   echo $ECHO_N "(cached) $ECHO_C" >&6
9315 else
9316
9317 echo "${as_me:-configure}:9317: testing if the symbol is already defined go no further ..." 1>&5
9318
9319         cat >conftest.$ac_ext <<_ACEOF
9320 #line 9320 "configure"
9321 #include "confdefs.h"
9322 #include <sys/types.h>
9323 int
9324 main (void)
9325 {
9326
9327 #ifndef _POSIX_C_SOURCE
9328 make an error
9329 #endif
9330   ;
9331   return 0;
9332 }
9333 _ACEOF
9334 rm -f conftest.$ac_objext
9335 if { (eval echo "$as_me:9335: \"$ac_compile\"") >&5
9336   (eval $ac_compile) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); } &&
9340          { ac_try='test -s conftest.$ac_objext'
9341   { (eval echo "$as_me:9341: \"$ac_try\"") >&5
9342   (eval $ac_try) 2>&5
9343   ac_status=$?
9344   echo "$as_me:9344: \$? = $ac_status" >&5
9345   (exit $ac_status); }; }; then
9346   cf_cv_posix_c_source=no
9347 else
9348   echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350 cf_want_posix_source=no
9351          case .$cf_POSIX_C_SOURCE in
9352          (.[12]??*)
9353                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9354                 ;;
9355          (.2)
9356                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9357                 cf_want_posix_source=yes
9358                 ;;
9359          (.*)
9360                 cf_want_posix_source=yes
9361                 ;;
9362          esac
9363          if test "$cf_want_posix_source" = yes ; then
9364                 cat >conftest.$ac_ext <<_ACEOF
9365 #line 9365 "configure"
9366 #include "confdefs.h"
9367 #include <sys/types.h>
9368 int
9369 main (void)
9370 {
9371
9372 #ifdef _POSIX_SOURCE
9373 make an error
9374 #endif
9375   ;
9376   return 0;
9377 }
9378 _ACEOF
9379 rm -f conftest.$ac_objext
9380 if { (eval echo "$as_me:9380: \"$ac_compile\"") >&5
9381   (eval $ac_compile) 2>&5
9382   ac_status=$?
9383   echo "$as_me:9383: \$? = $ac_status" >&5
9384   (exit $ac_status); } &&
9385          { ac_try='test -s conftest.$ac_objext'
9386   { (eval echo "$as_me:9386: \"$ac_try\"") >&5
9387   (eval $ac_try) 2>&5
9388   ac_status=$?
9389   echo "$as_me:9389: \$? = $ac_status" >&5
9390   (exit $ac_status); }; }; then
9391   :
9392 else
9393   echo "$as_me: failed program was:" >&5
9394 cat conftest.$ac_ext >&5
9395 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9396 fi
9397 rm -f conftest.$ac_objext conftest.$ac_ext
9398          fi
9399
9400 echo "${as_me:-configure}:9400: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9401
9402          CFLAGS="$cf_trim_CFLAGS"
9403          CPPFLAGS="$cf_trim_CPPFLAGS"
9404
9405         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9406         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9407
9408 echo "${as_me:-configure}:9408: testing if the second compile does not leave our definition intact error ..." 1>&5
9409
9410          cat >conftest.$ac_ext <<_ACEOF
9411 #line 9411 "configure"
9412 #include "confdefs.h"
9413 #include <sys/types.h>
9414 int
9415 main (void)
9416 {
9417
9418 #ifndef _POSIX_C_SOURCE
9419 make an error
9420 #endif
9421   ;
9422   return 0;
9423 }
9424 _ACEOF
9425 rm -f conftest.$ac_objext
9426 if { (eval echo "$as_me:9426: \"$ac_compile\"") >&5
9427   (eval $ac_compile) 2>&5
9428   ac_status=$?
9429   echo "$as_me:9429: \$? = $ac_status" >&5
9430   (exit $ac_status); } &&
9431          { ac_try='test -s conftest.$ac_objext'
9432   { (eval echo "$as_me:9432: \"$ac_try\"") >&5
9433   (eval $ac_try) 2>&5
9434   ac_status=$?
9435   echo "$as_me:9435: \$? = $ac_status" >&5
9436   (exit $ac_status); }; }; then
9437   :
9438 else
9439   echo "$as_me: failed program was:" >&5
9440 cat conftest.$ac_ext >&5
9441 cf_cv_posix_c_source=no
9442 fi
9443 rm -f conftest.$ac_objext conftest.$ac_ext
9444          CFLAGS="$cf_save_CFLAGS"
9445          CPPFLAGS="$cf_save_CPPFLAGS"
9446
9447 fi
9448 rm -f conftest.$ac_objext conftest.$ac_ext
9449
9450 fi
9451 echo "$as_me:9451: result: $cf_cv_posix_c_source" >&5
9452 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9453
9454 if test "$cf_cv_posix_c_source" != no ; then
9455         CFLAGS="$cf_trim_CFLAGS"
9456         CPPFLAGS="$cf_trim_CPPFLAGS"
9457
9458 cf_fix_cppflags=no
9459 cf_new_cflags=
9460 cf_new_cppflags=
9461 cf_new_extra_cppflags=
9462
9463 for cf_add_cflags in $cf_cv_posix_c_source
9464 do
9465 case $cf_fix_cppflags in
9466 (no)
9467         case $cf_add_cflags in
9468         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9469                 case $cf_add_cflags in
9470                 (-D*)
9471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9472
9473                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9474                                 && test -z "${cf_tst_cflags}" \
9475                                 && cf_fix_cppflags=yes
9476
9477                         if test $cf_fix_cppflags = yes ; then
9478
9479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9481
9482                                 continue
9483                         elif test "${cf_tst_cflags}" = "\"'" ; then
9484
9485         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9486         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9487
9488                                 continue
9489                         fi
9490                         ;;
9491                 esac
9492                 case "$CPPFLAGS" in
9493                 (*$cf_add_cflags)
9494                         ;;
9495                 (*)
9496                         case $cf_add_cflags in
9497                         (-D*)
9498                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9499
9500 CPPFLAGS=`echo "$CPPFLAGS" | \
9501         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9502                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9503
9504                                 ;;
9505                         esac
9506
9507         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9508         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9509
9510                         ;;
9511                 esac
9512                 ;;
9513         (*)
9514
9515         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9516         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9517
9518                 ;;
9519         esac
9520         ;;
9521 (yes)
9522
9523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9525
9526         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9527
9528         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9529                 && test -z "${cf_tst_cflags}" \
9530                 && cf_fix_cppflags=no
9531         ;;
9532 esac
9533 done
9534
9535 if test -n "$cf_new_cflags" ; then
9536
9537         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9538         CFLAGS="${CFLAGS}$cf_new_cflags"
9539
9540 fi
9541
9542 if test -n "$cf_new_cppflags" ; then
9543
9544         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9545         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9546
9547 fi
9548
9549 if test -n "$cf_new_extra_cppflags" ; then
9550
9551         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9552         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9553
9554 fi
9555
9556 fi
9557
9558         ;;
9559 (netbsd*)
9560         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9561         ;;
9562 (openbsd[4-9]*)
9563         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9564         cf_xopen_source="-D_BSD_SOURCE"
9565         cf_XOPEN_SOURCE=600
9566         ;;
9567 (openbsd*)
9568         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9569         ;;
9570 (osf[45]*)
9571         cf_xopen_source="-D_OSF_SOURCE"
9572         ;;
9573 (nto-qnx*)
9574         cf_xopen_source="-D_QNX_SOURCE"
9575         ;;
9576 (sco*)
9577         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9578         ;;
9579 (solaris2.*)
9580         cf_xopen_source="-D__EXTENSIONS__"
9581         cf_cv_xopen_source=broken
9582         ;;
9583 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9584         cf_XOPEN_SOURCE=
9585         cf_POSIX_C_SOURCE=
9586         ;;
9587 (*)
9588
9589 echo "$as_me:9589: checking if we should define _XOPEN_SOURCE" >&5
9590 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9591 if test "${cf_cv_xopen_source+set}" = set; then
9592   echo $ECHO_N "(cached) $ECHO_C" >&6
9593 else
9594
9595         cat >conftest.$ac_ext <<_ACEOF
9596 #line 9596 "configure"
9597 #include "confdefs.h"
9598
9599 #include <stdlib.h>
9600 #include <string.h>
9601 #include <sys/types.h>
9602
9603 int
9604 main (void)
9605 {
9606
9607 #ifndef _XOPEN_SOURCE
9608 make an error
9609 #endif
9610   ;
9611   return 0;
9612 }
9613 _ACEOF
9614 rm -f conftest.$ac_objext
9615 if { (eval echo "$as_me:9615: \"$ac_compile\"") >&5
9616   (eval $ac_compile) 2>&5
9617   ac_status=$?
9618   echo "$as_me:9618: \$? = $ac_status" >&5
9619   (exit $ac_status); } &&
9620          { ac_try='test -s conftest.$ac_objext'
9621   { (eval echo "$as_me:9621: \"$ac_try\"") >&5
9622   (eval $ac_try) 2>&5
9623   ac_status=$?
9624   echo "$as_me:9624: \$? = $ac_status" >&5
9625   (exit $ac_status); }; }; then
9626   cf_cv_xopen_source=no
9627 else
9628   echo "$as_me: failed program was:" >&5
9629 cat conftest.$ac_ext >&5
9630 cf_save="$CPPFLAGS"
9631
9632         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9633         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9634
9635          cat >conftest.$ac_ext <<_ACEOF
9636 #line 9636 "configure"
9637 #include "confdefs.h"
9638
9639 #include <stdlib.h>
9640 #include <string.h>
9641 #include <sys/types.h>
9642
9643 int
9644 main (void)
9645 {
9646
9647 #ifdef _XOPEN_SOURCE
9648 make an error
9649 #endif
9650   ;
9651   return 0;
9652 }
9653 _ACEOF
9654 rm -f conftest.$ac_objext
9655 if { (eval echo "$as_me:9655: \"$ac_compile\"") >&5
9656   (eval $ac_compile) 2>&5
9657   ac_status=$?
9658   echo "$as_me:9658: \$? = $ac_status" >&5
9659   (exit $ac_status); } &&
9660          { ac_try='test -s conftest.$ac_objext'
9661   { (eval echo "$as_me:9661: \"$ac_try\"") >&5
9662   (eval $ac_try) 2>&5
9663   ac_status=$?
9664   echo "$as_me:9664: \$? = $ac_status" >&5
9665   (exit $ac_status); }; }; then
9666   cf_cv_xopen_source=no
9667 else
9668   echo "$as_me: failed program was:" >&5
9669 cat conftest.$ac_ext >&5
9670 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9671 fi
9672 rm -f conftest.$ac_objext conftest.$ac_ext
9673         CPPFLAGS="$cf_save"
9674
9675 fi
9676 rm -f conftest.$ac_objext conftest.$ac_ext
9677
9678 fi
9679 echo "$as_me:9679: result: $cf_cv_xopen_source" >&5
9680 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9681
9682 if test "$cf_cv_xopen_source" != no ; then
9683
9684 CFLAGS=`echo "$CFLAGS" | \
9685         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9686                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9687
9688 CPPFLAGS=`echo "$CPPFLAGS" | \
9689         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9690                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9691
9692         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9693
9694 cf_fix_cppflags=no
9695 cf_new_cflags=
9696 cf_new_cppflags=
9697 cf_new_extra_cppflags=
9698
9699 for cf_add_cflags in $cf_temp_xopen_source
9700 do
9701 case $cf_fix_cppflags in
9702 (no)
9703         case $cf_add_cflags in
9704         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9705                 case $cf_add_cflags in
9706                 (-D*)
9707                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9708
9709                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9710                                 && test -z "${cf_tst_cflags}" \
9711                                 && cf_fix_cppflags=yes
9712
9713                         if test $cf_fix_cppflags = yes ; then
9714
9715         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9716         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9717
9718                                 continue
9719                         elif test "${cf_tst_cflags}" = "\"'" ; then
9720
9721         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9722         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9723
9724                                 continue
9725                         fi
9726                         ;;
9727                 esac
9728                 case "$CPPFLAGS" in
9729                 (*$cf_add_cflags)
9730                         ;;
9731                 (*)
9732                         case $cf_add_cflags in
9733                         (-D*)
9734                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9735
9736 CPPFLAGS=`echo "$CPPFLAGS" | \
9737         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9738                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9739
9740                                 ;;
9741                         esac
9742
9743         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9744         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9745
9746                         ;;
9747                 esac
9748                 ;;
9749         (*)
9750
9751         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9752         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9753
9754                 ;;
9755         esac
9756         ;;
9757 (yes)
9758
9759         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9760         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9761
9762         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9763
9764         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9765                 && test -z "${cf_tst_cflags}" \
9766                 && cf_fix_cppflags=no
9767         ;;
9768 esac
9769 done
9770
9771 if test -n "$cf_new_cflags" ; then
9772
9773         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9774         CFLAGS="${CFLAGS}$cf_new_cflags"
9775
9776 fi
9777
9778 if test -n "$cf_new_cppflags" ; then
9779
9780         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9781         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9782
9783 fi
9784
9785 if test -n "$cf_new_extra_cppflags" ; then
9786
9787         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9788         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9789
9790 fi
9791
9792 fi
9793
9794 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9795
9796 cf_save_CFLAGS="$CFLAGS"
9797 cf_save_CPPFLAGS="$CPPFLAGS"
9798
9799 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9800         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9801                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9802
9803 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9804         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9805                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9806
9807 echo "$as_me:9807: checking if we should define _POSIX_C_SOURCE" >&5
9808 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9809 if test "${cf_cv_posix_c_source+set}" = set; then
9810   echo $ECHO_N "(cached) $ECHO_C" >&6
9811 else
9812
9813 echo "${as_me:-configure}:9813: testing if the symbol is already defined go no further ..." 1>&5
9814
9815         cat >conftest.$ac_ext <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9818 #include <sys/types.h>
9819 int
9820 main (void)
9821 {
9822
9823 #ifndef _POSIX_C_SOURCE
9824 make an error
9825 #endif
9826   ;
9827   return 0;
9828 }
9829 _ACEOF
9830 rm -f conftest.$ac_objext
9831 if { (eval echo "$as_me:9831: \"$ac_compile\"") >&5
9832   (eval $ac_compile) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); } &&
9836          { ac_try='test -s conftest.$ac_objext'
9837   { (eval echo "$as_me:9837: \"$ac_try\"") >&5
9838   (eval $ac_try) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); }; }; then
9842   cf_cv_posix_c_source=no
9843 else
9844   echo "$as_me: failed program was:" >&5
9845 cat conftest.$ac_ext >&5
9846 cf_want_posix_source=no
9847          case .$cf_POSIX_C_SOURCE in
9848          (.[12]??*)
9849                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9850                 ;;
9851          (.2)
9852                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9853                 cf_want_posix_source=yes
9854                 ;;
9855          (.*)
9856                 cf_want_posix_source=yes
9857                 ;;
9858          esac
9859          if test "$cf_want_posix_source" = yes ; then
9860                 cat >conftest.$ac_ext <<_ACEOF
9861 #line 9861 "configure"
9862 #include "confdefs.h"
9863 #include <sys/types.h>
9864 int
9865 main (void)
9866 {
9867
9868 #ifdef _POSIX_SOURCE
9869 make an error
9870 #endif
9871   ;
9872   return 0;
9873 }
9874 _ACEOF
9875 rm -f conftest.$ac_objext
9876 if { (eval echo "$as_me:9876: \"$ac_compile\"") >&5
9877   (eval $ac_compile) 2>&5
9878   ac_status=$?
9879   echo "$as_me:9879: \$? = $ac_status" >&5
9880   (exit $ac_status); } &&
9881          { ac_try='test -s conftest.$ac_objext'
9882   { (eval echo "$as_me:9882: \"$ac_try\"") >&5
9883   (eval $ac_try) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit $ac_status); }; }; then
9887   :
9888 else
9889   echo "$as_me: failed program was:" >&5
9890 cat conftest.$ac_ext >&5
9891 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9892 fi
9893 rm -f conftest.$ac_objext conftest.$ac_ext
9894          fi
9895
9896 echo "${as_me:-configure}:9896: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9897
9898          CFLAGS="$cf_trim_CFLAGS"
9899          CPPFLAGS="$cf_trim_CPPFLAGS"
9900
9901         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9902         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9903
9904 echo "${as_me:-configure}:9904: testing if the second compile does not leave our definition intact error ..." 1>&5
9905
9906          cat >conftest.$ac_ext <<_ACEOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909 #include <sys/types.h>
9910 int
9911 main (void)
9912 {
9913
9914 #ifndef _POSIX_C_SOURCE
9915 make an error
9916 #endif
9917   ;
9918   return 0;
9919 }
9920 _ACEOF
9921 rm -f conftest.$ac_objext
9922 if { (eval echo "$as_me:9922: \"$ac_compile\"") >&5
9923   (eval $ac_compile) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit $ac_status); } &&
9927          { ac_try='test -s conftest.$ac_objext'
9928   { (eval echo "$as_me:9928: \"$ac_try\"") >&5
9929   (eval $ac_try) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit $ac_status); }; }; then
9933   :
9934 else
9935   echo "$as_me: failed program was:" >&5
9936 cat conftest.$ac_ext >&5
9937 cf_cv_posix_c_source=no
9938 fi
9939 rm -f conftest.$ac_objext conftest.$ac_ext
9940          CFLAGS="$cf_save_CFLAGS"
9941          CPPFLAGS="$cf_save_CPPFLAGS"
9942
9943 fi
9944 rm -f conftest.$ac_objext conftest.$ac_ext
9945
9946 fi
9947 echo "$as_me:9947: result: $cf_cv_posix_c_source" >&5
9948 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9949
9950 if test "$cf_cv_posix_c_source" != no ; then
9951         CFLAGS="$cf_trim_CFLAGS"
9952         CPPFLAGS="$cf_trim_CPPFLAGS"
9953
9954 cf_fix_cppflags=no
9955 cf_new_cflags=
9956 cf_new_cppflags=
9957 cf_new_extra_cppflags=
9958
9959 for cf_add_cflags in $cf_cv_posix_c_source
9960 do
9961 case $cf_fix_cppflags in
9962 (no)
9963         case $cf_add_cflags in
9964         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9965                 case $cf_add_cflags in
9966                 (-D*)
9967                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9968
9969                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9970                                 && test -z "${cf_tst_cflags}" \
9971                                 && cf_fix_cppflags=yes
9972
9973                         if test $cf_fix_cppflags = yes ; then
9974
9975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9977
9978                                 continue
9979                         elif test "${cf_tst_cflags}" = "\"'" ; then
9980
9981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9983
9984                                 continue
9985                         fi
9986                         ;;
9987                 esac
9988                 case "$CPPFLAGS" in
9989                 (*$cf_add_cflags)
9990                         ;;
9991                 (*)
9992                         case $cf_add_cflags in
9993                         (-D*)
9994                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9995
9996 CPPFLAGS=`echo "$CPPFLAGS" | \
9997         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9998                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9999
10000                                 ;;
10001                         esac
10002
10003         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10004         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10005
10006                         ;;
10007                 esac
10008                 ;;
10009         (*)
10010
10011         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10012         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10013
10014                 ;;
10015         esac
10016         ;;
10017 (yes)
10018
10019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10021
10022         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10023
10024         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10025                 && test -z "${cf_tst_cflags}" \
10026                 && cf_fix_cppflags=no
10027         ;;
10028 esac
10029 done
10030
10031 if test -n "$cf_new_cflags" ; then
10032
10033         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10034         CFLAGS="${CFLAGS}$cf_new_cflags"
10035
10036 fi
10037
10038 if test -n "$cf_new_cppflags" ; then
10039
10040         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10041         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10042
10043 fi
10044
10045 if test -n "$cf_new_extra_cppflags" ; then
10046
10047         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10048         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10049
10050 fi
10051
10052 fi
10053
10054         ;;
10055 esac
10056
10057 if test -n "$cf_xopen_source" ; then
10058
10059 cf_fix_cppflags=no
10060 cf_new_cflags=
10061 cf_new_cppflags=
10062 cf_new_extra_cppflags=
10063
10064 for cf_add_cflags in $cf_xopen_source
10065 do
10066 case $cf_fix_cppflags in
10067 (no)
10068         case $cf_add_cflags in
10069         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10070                 case $cf_add_cflags in
10071                 (-D*)
10072                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10073
10074                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10075                                 && test -z "${cf_tst_cflags}" \
10076                                 && cf_fix_cppflags=yes
10077
10078                         if test $cf_fix_cppflags = yes ; then
10079
10080         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10081         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10082
10083                                 continue
10084                         elif test "${cf_tst_cflags}" = "\"'" ; then
10085
10086         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10087         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10088
10089                                 continue
10090                         fi
10091                         ;;
10092                 esac
10093                 case "$CPPFLAGS" in
10094                 (*$cf_add_cflags)
10095                         ;;
10096                 (*)
10097                         case $cf_add_cflags in
10098                         (-D*)
10099                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10100
10101 CPPFLAGS=`echo "$CPPFLAGS" | \
10102         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10103                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10104
10105                                 ;;
10106                         esac
10107
10108         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10109         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10110
10111                         ;;
10112                 esac
10113                 ;;
10114         (*)
10115
10116         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10117         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10118
10119                 ;;
10120         esac
10121         ;;
10122 (yes)
10123
10124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10126
10127         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10128
10129         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10130                 && test -z "${cf_tst_cflags}" \
10131                 && cf_fix_cppflags=no
10132         ;;
10133 esac
10134 done
10135
10136 if test -n "$cf_new_cflags" ; then
10137         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10138
10139 echo "${as_me:-configure}:10139: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10140
10141         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10142         CFLAGS="${CFLAGS}$cf_new_cflags"
10143
10144 fi
10145
10146 if test -n "$cf_new_cppflags" ; then
10147         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10148
10149 echo "${as_me:-configure}:10149: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10150
10151         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10152         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10153
10154 fi
10155
10156 if test -n "$cf_new_extra_cppflags" ; then
10157         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10158
10159 echo "${as_me:-configure}:10159: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10160
10161         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10162         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10163
10164 fi
10165
10166 fi
10167
10168 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10169         echo "$as_me:10169: checking if _XOPEN_SOURCE really is set" >&5
10170 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10171         cat >conftest.$ac_ext <<_ACEOF
10172 #line 10172 "configure"
10173 #include "confdefs.h"
10174 #include <stdlib.h>
10175 int
10176 main (void)
10177 {
10178
10179 #ifndef _XOPEN_SOURCE
10180 make an error
10181 #endif
10182   ;
10183   return 0;
10184 }
10185 _ACEOF
10186 rm -f conftest.$ac_objext
10187 if { (eval echo "$as_me:10187: \"$ac_compile\"") >&5
10188   (eval $ac_compile) 2>&5
10189   ac_status=$?
10190   echo "$as_me:10190: \$? = $ac_status" >&5
10191   (exit $ac_status); } &&
10192          { ac_try='test -s conftest.$ac_objext'
10193   { (eval echo "$as_me:10193: \"$ac_try\"") >&5
10194   (eval $ac_try) 2>&5
10195   ac_status=$?
10196   echo "$as_me:10196: \$? = $ac_status" >&5
10197   (exit $ac_status); }; }; then
10198   cf_XOPEN_SOURCE_set=yes
10199 else
10200   echo "$as_me: failed program was:" >&5
10201 cat conftest.$ac_ext >&5
10202 cf_XOPEN_SOURCE_set=no
10203 fi
10204 rm -f conftest.$ac_objext conftest.$ac_ext
10205         echo "$as_me:10205: result: $cf_XOPEN_SOURCE_set" >&5
10206 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10207         if test $cf_XOPEN_SOURCE_set = yes
10208         then
10209                 cat >conftest.$ac_ext <<_ACEOF
10210 #line 10210 "configure"
10211 #include "confdefs.h"
10212 #include <stdlib.h>
10213 int
10214 main (void)
10215 {
10216
10217 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10218 make an error
10219 #endif
10220   ;
10221   return 0;
10222 }
10223 _ACEOF
10224 rm -f conftest.$ac_objext
10225 if { (eval echo "$as_me:10225: \"$ac_compile\"") >&5
10226   (eval $ac_compile) 2>&5
10227   ac_status=$?
10228   echo "$as_me:10228: \$? = $ac_status" >&5
10229   (exit $ac_status); } &&
10230          { ac_try='test -s conftest.$ac_objext'
10231   { (eval echo "$as_me:10231: \"$ac_try\"") >&5
10232   (eval $ac_try) 2>&5
10233   ac_status=$?
10234   echo "$as_me:10234: \$? = $ac_status" >&5
10235   (exit $ac_status); }; }; then
10236   cf_XOPEN_SOURCE_set_ok=yes
10237 else
10238   echo "$as_me: failed program was:" >&5
10239 cat conftest.$ac_ext >&5
10240 cf_XOPEN_SOURCE_set_ok=no
10241 fi
10242 rm -f conftest.$ac_objext conftest.$ac_ext
10243                 if test $cf_XOPEN_SOURCE_set_ok = no
10244                 then
10245                         { echo "$as_me:10245: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10246 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10247                 fi
10248         else
10249
10250 echo "$as_me:10250: checking if we should define _XOPEN_SOURCE" >&5
10251 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10252 if test "${cf_cv_xopen_source+set}" = set; then
10253   echo $ECHO_N "(cached) $ECHO_C" >&6
10254 else
10255
10256         cat >conftest.$ac_ext <<_ACEOF
10257 #line 10257 "configure"
10258 #include "confdefs.h"
10259
10260 #include <stdlib.h>
10261 #include <string.h>
10262 #include <sys/types.h>
10263
10264 int
10265 main (void)
10266 {
10267
10268 #ifndef _XOPEN_SOURCE
10269 make an error
10270 #endif
10271   ;
10272   return 0;
10273 }
10274 _ACEOF
10275 rm -f conftest.$ac_objext
10276 if { (eval echo "$as_me:10276: \"$ac_compile\"") >&5
10277   (eval $ac_compile) 2>&5
10278   ac_status=$?
10279   echo "$as_me:10279: \$? = $ac_status" >&5
10280   (exit $ac_status); } &&
10281          { ac_try='test -s conftest.$ac_objext'
10282   { (eval echo "$as_me:10282: \"$ac_try\"") >&5
10283   (eval $ac_try) 2>&5
10284   ac_status=$?
10285   echo "$as_me:10285: \$? = $ac_status" >&5
10286   (exit $ac_status); }; }; then
10287   cf_cv_xopen_source=no
10288 else
10289   echo "$as_me: failed program was:" >&5
10290 cat conftest.$ac_ext >&5
10291 cf_save="$CPPFLAGS"
10292
10293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10294         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10295
10296          cat >conftest.$ac_ext <<_ACEOF
10297 #line 10297 "configure"
10298 #include "confdefs.h"
10299
10300 #include <stdlib.h>
10301 #include <string.h>
10302 #include <sys/types.h>
10303
10304 int
10305 main (void)
10306 {
10307
10308 #ifdef _XOPEN_SOURCE
10309 make an error
10310 #endif
10311   ;
10312   return 0;
10313 }
10314 _ACEOF
10315 rm -f conftest.$ac_objext
10316 if { (eval echo "$as_me:10316: \"$ac_compile\"") >&5
10317   (eval $ac_compile) 2>&5
10318   ac_status=$?
10319   echo "$as_me:10319: \$? = $ac_status" >&5
10320   (exit $ac_status); } &&
10321          { ac_try='test -s conftest.$ac_objext'
10322   { (eval echo "$as_me:10322: \"$ac_try\"") >&5
10323   (eval $ac_try) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); }; }; then
10327   cf_cv_xopen_source=no
10328 else
10329   echo "$as_me: failed program was:" >&5
10330 cat conftest.$ac_ext >&5
10331 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10332 fi
10333 rm -f conftest.$ac_objext conftest.$ac_ext
10334         CPPFLAGS="$cf_save"
10335
10336 fi
10337 rm -f conftest.$ac_objext conftest.$ac_ext
10338
10339 fi
10340 echo "$as_me:10340: result: $cf_cv_xopen_source" >&5
10341 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10342
10343 if test "$cf_cv_xopen_source" != no ; then
10344
10345 CFLAGS=`echo "$CFLAGS" | \
10346         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10347                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10348
10349 CPPFLAGS=`echo "$CPPFLAGS" | \
10350         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10351                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10352
10353         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10354
10355 cf_fix_cppflags=no
10356 cf_new_cflags=
10357 cf_new_cppflags=
10358 cf_new_extra_cppflags=
10359
10360 for cf_add_cflags in $cf_temp_xopen_source
10361 do
10362 case $cf_fix_cppflags in
10363 (no)
10364         case $cf_add_cflags in
10365         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10366                 case $cf_add_cflags in
10367                 (-D*)
10368                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10369
10370                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10371                                 && test -z "${cf_tst_cflags}" \
10372                                 && cf_fix_cppflags=yes
10373
10374                         if test $cf_fix_cppflags = yes ; then
10375
10376         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10377         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10378
10379                                 continue
10380                         elif test "${cf_tst_cflags}" = "\"'" ; then
10381
10382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10384
10385                                 continue
10386                         fi
10387                         ;;
10388                 esac
10389                 case "$CPPFLAGS" in
10390                 (*$cf_add_cflags)
10391                         ;;
10392                 (*)
10393                         case $cf_add_cflags in
10394                         (-D*)
10395                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10396
10397 CPPFLAGS=`echo "$CPPFLAGS" | \
10398         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10399                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10400
10401                                 ;;
10402                         esac
10403
10404         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10405         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10406
10407                         ;;
10408                 esac
10409                 ;;
10410         (*)
10411
10412         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10413         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10414
10415                 ;;
10416         esac
10417         ;;
10418 (yes)
10419
10420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10422
10423         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10424
10425         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10426                 && test -z "${cf_tst_cflags}" \
10427                 && cf_fix_cppflags=no
10428         ;;
10429 esac
10430 done
10431
10432 if test -n "$cf_new_cflags" ; then
10433
10434         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10435         CFLAGS="${CFLAGS}$cf_new_cflags"
10436
10437 fi
10438
10439 if test -n "$cf_new_cppflags" ; then
10440
10441         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10442         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10443
10444 fi
10445
10446 if test -n "$cf_new_extra_cppflags" ; then
10447
10448         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10449         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10450
10451 fi
10452
10453 fi
10454
10455         fi
10456 fi
10457
10458 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10459
10460 # Work around breakage on OS X
10461
10462 echo "$as_me:10462: checking if SIGWINCH is defined" >&5
10463 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10464 if test "${cf_cv_define_sigwinch+set}" = set; then
10465   echo $ECHO_N "(cached) $ECHO_C" >&6
10466 else
10467
10468         cat >conftest.$ac_ext <<_ACEOF
10469 #line 10469 "configure"
10470 #include "confdefs.h"
10471
10472 #include <sys/types.h>
10473 #include <sys/signal.h>
10474
10475 int
10476 main (void)
10477 {
10478 int x = SIGWINCH
10479   ;
10480   return 0;
10481 }
10482 _ACEOF
10483 rm -f conftest.$ac_objext
10484 if { (eval echo "$as_me:10484: \"$ac_compile\"") >&5
10485   (eval $ac_compile) 2>&5
10486   ac_status=$?
10487   echo "$as_me:10487: \$? = $ac_status" >&5
10488   (exit $ac_status); } &&
10489          { ac_try='test -s conftest.$ac_objext'
10490   { (eval echo "$as_me:10490: \"$ac_try\"") >&5
10491   (eval $ac_try) 2>&5
10492   ac_status=$?
10493   echo "$as_me:10493: \$? = $ac_status" >&5
10494   (exit $ac_status); }; }; then
10495   cf_cv_define_sigwinch=yes
10496 else
10497   echo "$as_me: failed program was:" >&5
10498 cat conftest.$ac_ext >&5
10499 cat >conftest.$ac_ext <<_ACEOF
10500 #line 10500 "configure"
10501 #include "confdefs.h"
10502
10503 #undef _XOPEN_SOURCE
10504 #undef _POSIX_SOURCE
10505 #undef _POSIX_C_SOURCE
10506 #include <sys/types.h>
10507 #include <sys/signal.h>
10508
10509 int
10510 main (void)
10511 {
10512 int x = SIGWINCH
10513   ;
10514   return 0;
10515 }
10516 _ACEOF
10517 rm -f conftest.$ac_objext
10518 if { (eval echo "$as_me:10518: \"$ac_compile\"") >&5
10519   (eval $ac_compile) 2>&5
10520   ac_status=$?
10521   echo "$as_me:10521: \$? = $ac_status" >&5
10522   (exit $ac_status); } &&
10523          { ac_try='test -s conftest.$ac_objext'
10524   { (eval echo "$as_me:10524: \"$ac_try\"") >&5
10525   (eval $ac_try) 2>&5
10526   ac_status=$?
10527   echo "$as_me:10527: \$? = $ac_status" >&5
10528   (exit $ac_status); }; }; then
10529   cf_cv_define_sigwinch=maybe
10530 else
10531   echo "$as_me: failed program was:" >&5
10532 cat conftest.$ac_ext >&5
10533 cf_cv_define_sigwinch=no
10534 fi
10535 rm -f conftest.$ac_objext conftest.$ac_ext
10536
10537 fi
10538 rm -f conftest.$ac_objext conftest.$ac_ext
10539
10540 fi
10541 echo "$as_me:10541: result: $cf_cv_define_sigwinch" >&5
10542 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10543
10544 if test "$cf_cv_define_sigwinch" = maybe ; then
10545 echo "$as_me:10545: checking for actual SIGWINCH definition" >&5
10546 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10547 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10548   echo $ECHO_N "(cached) $ECHO_C" >&6
10549 else
10550
10551 cf_cv_fixup_sigwinch=unknown
10552 cf_sigwinch=32
10553 while test $cf_sigwinch != 1
10554 do
10555         cat >conftest.$ac_ext <<_ACEOF
10556 #line 10556 "configure"
10557 #include "confdefs.h"
10558
10559 #undef _XOPEN_SOURCE
10560 #undef _POSIX_SOURCE
10561 #undef _POSIX_C_SOURCE
10562 #include <sys/types.h>
10563 #include <sys/signal.h>
10564
10565 int
10566 main (void)
10567 {
10568
10569 #if SIGWINCH != $cf_sigwinch
10570 make an error
10571 #endif
10572 int x = SIGWINCH
10573   ;
10574   return 0;
10575 }
10576 _ACEOF
10577 rm -f conftest.$ac_objext
10578 if { (eval echo "$as_me:10578: \"$ac_compile\"") >&5
10579   (eval $ac_compile) 2>&5
10580   ac_status=$?
10581   echo "$as_me:10581: \$? = $ac_status" >&5
10582   (exit $ac_status); } &&
10583          { ac_try='test -s conftest.$ac_objext'
10584   { (eval echo "$as_me:10584: \"$ac_try\"") >&5
10585   (eval $ac_try) 2>&5
10586   ac_status=$?
10587   echo "$as_me:10587: \$? = $ac_status" >&5
10588   (exit $ac_status); }; }; then
10589   cf_cv_fixup_sigwinch=$cf_sigwinch
10590          break
10591 else
10592   echo "$as_me: failed program was:" >&5
10593 cat conftest.$ac_ext >&5
10594 fi
10595 rm -f conftest.$ac_objext conftest.$ac_ext
10596
10597 cf_sigwinch=`expr $cf_sigwinch - 1`
10598 done
10599
10600 fi
10601 echo "$as_me:10601: result: $cf_cv_fixup_sigwinch" >&5
10602 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10603
10604         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10605                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10606         fi
10607 fi
10608
10609 # Checks for CODESET support.
10610
10611 echo "$as_me:10611: checking for nl_langinfo and CODESET" >&5
10612 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10613 if test "${am_cv_langinfo_codeset+set}" = set; then
10614   echo $ECHO_N "(cached) $ECHO_C" >&6
10615 else
10616   cat >conftest.$ac_ext <<_ACEOF
10617 #line 10617 "configure"
10618 #include "confdefs.h"
10619 #include <langinfo.h>
10620 int
10621 main (void)
10622 {
10623 char* cs = nl_langinfo(CODESET);
10624   ;
10625   return 0;
10626 }
10627 _ACEOF
10628 rm -f conftest.$ac_objext conftest$ac_exeext
10629 if { (eval echo "$as_me:10629: \"$ac_link\"") >&5
10630   (eval $ac_link) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); } &&
10634          { ac_try='test -s conftest$ac_exeext'
10635   { (eval echo "$as_me:10635: \"$ac_try\"") >&5
10636   (eval $ac_try) 2>&5
10637   ac_status=$?
10638   echo "$as_me:10638: \$? = $ac_status" >&5
10639   (exit $ac_status); }; }; then
10640   am_cv_langinfo_codeset=yes
10641 else
10642   echo "$as_me: failed program was:" >&5
10643 cat conftest.$ac_ext >&5
10644 am_cv_langinfo_codeset=no
10645 fi
10646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10647
10648 fi
10649 echo "$as_me:10649: result: $am_cv_langinfo_codeset" >&5
10650 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10651         if test $am_cv_langinfo_codeset = yes; then
10652
10653 cat >>confdefs.h <<\EOF
10654 #define HAVE_LANGINFO_CODESET 1
10655 EOF
10656
10657         fi
10658
10659 # use these variables to work around a defect in gcc's fixincludes.
10660 NCURSES_OK_WCHAR_T=
10661 NCURSES_OK_WINT_T=
10662
10663 echo "$as_me:10663: checking if you want wide-character code" >&5
10664 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10665
10666 # Check whether --enable-widec or --disable-widec was given.
10667 if test "${enable_widec+set}" = set; then
10668   enableval="$enable_widec"
10669   with_widec=$enableval
10670 else
10671   with_widec=no
10672 fi;
10673 echo "$as_me:10673: result: $with_widec" >&5
10674 echo "${ECHO_T}$with_widec" >&6
10675
10676 NCURSES_WCWIDTH_GRAPHICS=1
10677
10678 if test "x$with_widec" = xyes ; then
10679         if test "x$disable_lib_suffixes" = xno ; then
10680                 LIB_SUFFIX="w${LIB_SUFFIX}"
10681         fi
10682
10683 cat >>confdefs.h <<\EOF
10684 #define USE_WIDEC_SUPPORT 1
10685 EOF
10686
10687 cat >>confdefs.h <<\EOF
10688 #define NCURSES_WIDECHAR 1
10689 EOF
10690
10691 for ac_header in \
10692 wchar.h \
10693 wctype.h \
10694
10695 do
10696 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10697 echo "$as_me:10697: checking for $ac_header" >&5
10698 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10699 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10700   echo $ECHO_N "(cached) $ECHO_C" >&6
10701 else
10702   cat >conftest.$ac_ext <<_ACEOF
10703 #line 10703 "configure"
10704 #include "confdefs.h"
10705 #include <$ac_header>
10706 _ACEOF
10707 if { (eval echo "$as_me:10707: \"$ac_cpp conftest.$ac_ext\"") >&5
10708   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10709   ac_status=$?
10710   egrep -v '^ *\+' conftest.er1 >conftest.err
10711   rm -f conftest.er1
10712   cat conftest.err >&5
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); } >/dev/null; then
10715   if test -s conftest.err; then
10716     ac_cpp_err=$ac_c_preproc_warn_flag
10717   else
10718     ac_cpp_err=
10719   fi
10720 else
10721   ac_cpp_err=yes
10722 fi
10723 if test -z "$ac_cpp_err"; then
10724   eval "$as_ac_Header=yes"
10725 else
10726   echo "$as_me: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   eval "$as_ac_Header=no"
10729 fi
10730 rm -f conftest.err conftest.$ac_ext
10731 fi
10732 echo "$as_me:10732: result: `eval echo '${'$as_ac_Header'}'`" >&5
10733 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10735   cat >>confdefs.h <<EOF
10736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10737 EOF
10738
10739 fi
10740 done
10741
10742 echo "$as_me:10742: checking if wchar.h can be used as is" >&5
10743 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10744 if test "${cf_cv_wchar_h_okay+set}" = set; then
10745   echo $ECHO_N "(cached) $ECHO_C" >&6
10746 else
10747
10748 cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10751
10752 #include <stdlib.h>
10753 #ifdef HAVE_WCHAR_H
10754 #include <wchar.h>
10755 #endif
10756 #ifdef HAVE_WCTYPE_H
10757 #include <wctype.h>
10758 #endif
10759
10760 int
10761 main (void)
10762 {
10763
10764         wint_t foo = 0;
10765         int bar = iswpunct(foo)
10766   ;
10767   return 0;
10768 }
10769 _ACEOF
10770 rm -f conftest.$ac_objext
10771 if { (eval echo "$as_me:10771: \"$ac_compile\"") >&5
10772   (eval $ac_compile) 2>&5
10773   ac_status=$?
10774   echo "$as_me:10774: \$? = $ac_status" >&5
10775   (exit $ac_status); } &&
10776          { ac_try='test -s conftest.$ac_objext'
10777   { (eval echo "$as_me:10777: \"$ac_try\"") >&5
10778   (eval $ac_try) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit $ac_status); }; }; then
10782   cf_cv_wchar_h_okay=yes
10783 else
10784   echo "$as_me: failed program was:" >&5
10785 cat conftest.$ac_ext >&5
10786 cf_cv_wchar_h_okay=no
10787 fi
10788 rm -f conftest.$ac_objext conftest.$ac_ext
10789 fi
10790 echo "$as_me:10790: result: $cf_cv_wchar_h_okay" >&5
10791 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10792
10793 if test $cf_cv_wchar_h_okay = no
10794 then
10795
10796 echo "$as_me:10796: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10797 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10798 cat >conftest.$ac_ext <<_ACEOF
10799 #line 10799 "configure"
10800 #include "confdefs.h"
10801 #include <sys/types.h>
10802
10803 int
10804 main (void)
10805 {
10806
10807 #ifndef _XOPEN_SOURCE_EXTENDED
10808 make an error
10809 #endif
10810   ;
10811   return 0;
10812 }
10813 _ACEOF
10814 rm -f conftest.$ac_objext
10815 if { (eval echo "$as_me:10815: \"$ac_compile\"") >&5
10816   (eval $ac_compile) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); } &&
10820          { ac_try='test -s conftest.$ac_objext'
10821   { (eval echo "$as_me:10821: \"$ac_try\"") >&5
10822   (eval $ac_try) 2>&5
10823   ac_status=$?
10824   echo "$as_me:10824: \$? = $ac_status" >&5
10825   (exit $ac_status); }; }; then
10826   cf_result=no
10827 else
10828   echo "$as_me: failed program was:" >&5
10829 cat conftest.$ac_ext >&5
10830 cf_result=yes
10831 fi
10832 rm -f conftest.$ac_objext conftest.$ac_ext
10833 echo "$as_me:10833: result: $cf_result" >&5
10834 echo "${ECHO_T}$cf_result" >&6
10835
10836 if test "$cf_result" = yes ; then
10837         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10838 elif test "x" != "x" ; then
10839         echo "$as_me:10839: checking checking for compatible value versus " >&5
10840 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10841         cat >conftest.$ac_ext <<_ACEOF
10842 #line 10842 "configure"
10843 #include "confdefs.h"
10844 #include <sys/types.h>
10845
10846 int
10847 main (void)
10848 {
10849
10850 #if _XOPEN_SOURCE_EXTENDED- < 0
10851 make an error
10852 #endif
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 rm -f conftest.$ac_objext
10858 if { (eval echo "$as_me:10858: \"$ac_compile\"") >&5
10859   (eval $ac_compile) 2>&5
10860   ac_status=$?
10861   echo "$as_me:10861: \$? = $ac_status" >&5
10862   (exit $ac_status); } &&
10863          { ac_try='test -s conftest.$ac_objext'
10864   { (eval echo "$as_me:10864: \"$ac_try\"") >&5
10865   (eval $ac_try) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); }; }; then
10869   cf_result=yes
10870 else
10871   echo "$as_me: failed program was:" >&5
10872 cat conftest.$ac_ext >&5
10873 cf_result=no
10874 fi
10875 rm -f conftest.$ac_objext conftest.$ac_ext
10876         echo "$as_me:10876: result: $cf_result" >&5
10877 echo "${ECHO_T}$cf_result" >&6
10878         if test "$cf_result" = no ; then
10879                 # perhaps we can override it - try...
10880                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10881         fi
10882 fi
10883
10884 fi
10885
10886 echo "$as_me:10886: checking if wcwidth agrees graphics are single-width" >&5
10887 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10888 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10889   echo $ECHO_N "(cached) $ECHO_C" >&6
10890 else
10891
10892 cat >conftest.in <<CF_EOF
10893 -       VT100 symbols
10894 0x250c  upper left corner
10895 0x2514  lower left corner
10896 0x2510  upper right corner
10897 0x2518  lower right corner
10898 0x251c  tee pointing left
10899 0x2524  tee pointing right
10900 0x2534  tee pointing up
10901 0x252c  tee pointing down
10902 0x2500  horizontal line
10903 0x2502  vertical line
10904 0x253c  large plus or crossover
10905 0x23ba  scan line 1
10906 0x23bd  scan line 9
10907 0x25c6  diamond
10908 0x2592  checker board (stipple)
10909 0x00b0  degree symbol
10910 0x00b1  plus/minus
10911 0x00b7  bullet
10912 -       Teletype 5410v1 symbols
10913 0x2190  arrow pointing left
10914 0x2192  arrow pointing right
10915 0x2193  arrow pointing down
10916 0x2191  arrow pointing up
10917 0x2592  board of squares
10918 0x2603  lantern symbol
10919 0x25ae  solid square block
10920 -       these defaults were invented for ncurses
10921 0x23bb  scan line 3
10922 0x23bc  scan line 7
10923 0x2264  less-than-or-equal-to
10924 0x2265  greater-than-or-equal-to
10925 0x03c0  greek pi
10926 0x2260  not-equal
10927 0x00a3  pound-sterling symbol
10928 -       thick-line-drawing
10929 0x250f  upper left corner
10930 0x2517  lower left corner
10931 0x2513  upper right corner
10932 0x251b  lower right corner
10933 0x2523  tee pointing left
10934 0x252b  tee pointing right
10935 0x253b  tee pointing up
10936 0x2533  tee pointing down
10937 0x2501  horizontal line
10938 0x2503  vertical line
10939 0x254b  large plus or crossover
10940 -       double-line-drawing
10941 0x2554  upper left corner
10942 0x255a  lower left corner
10943 0x2557  upper right corner
10944 0x255d  lower right corner
10945 0x2563  tee pointing left
10946 0x2560  tee pointing right
10947 0x2569  tee pointing up
10948 0x2566  tee pointing down
10949 0x2550  horizontal line
10950 0x2551  vertical line
10951 0x256c  large plus or crossover
10952 CF_EOF
10953 if test "$cross_compiling" = yes; then
10954   cf_cv_wcwidth_graphics=unknown
10955 else
10956   cat >conftest.$ac_ext <<_ACEOF
10957 #line 10957 "configure"
10958 #include "confdefs.h"
10959
10960 #include <locale.h>
10961 #include <stdio.h>
10962 #include <wchar.h>
10963
10964 #define MY_LEN 80
10965
10966 int
10967 main(void)
10968 {
10969         FILE *fp;
10970         int value;
10971         char buffer[MY_LEN + 1];
10972         char notes[MY_LEN + 1];
10973         int totals = 0;
10974         int passed = 0;
10975
10976         if (setlocale(LC_ALL, "en_US.UTF8") ||
10977                 setlocale(LC_ALL, "en_US.UTF-8") ||
10978                 setlocale(LC_ALL, "en_US.utf8") ||
10979                 setlocale(LC_ALL, "en_US.utf-8")) {
10980                 if ((fp = fopen("conftest.in", "r")) != 0) {
10981                         while (fgets(buffer, MY_LEN, fp) != 0) {
10982                                 if (*buffer == '-') {
10983                                         fprintf(stderr, "\t%s", buffer);
10984                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10985                                         ++totals;
10986                                         if (wcwidth(value) == 1)
10987                                                 ++passed;
10988                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10989                                 } else {
10990                                         fprintf(stderr, "?\t%s", buffer);
10991                                 }
10992                         }
10993                 }
10994         }
10995         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10996         return (totals == passed) ? 0 : 1;
10997 }
10998
10999 _ACEOF
11000 rm -f conftest$ac_exeext
11001 if { (eval echo "$as_me:11001: \"$ac_link\"") >&5
11002   (eval $ac_link) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11006   { (eval echo "$as_me:11006: \"$ac_try\"") >&5
11007   (eval $ac_try) 2>&5
11008   ac_status=$?
11009   echo "$as_me:11009: \$? = $ac_status" >&5
11010   (exit $ac_status); }; }; then
11011   cf_cv_wcwidth_graphics=yes
11012 else
11013   echo "$as_me: program exited with status $ac_status" >&5
11014 echo "$as_me: failed program was:" >&5
11015 cat conftest.$ac_ext >&5
11016 cf_cv_wcwidth_graphics=no
11017 fi
11018 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11019 fi
11020
11021 fi
11022 echo "$as_me:11022: result: $cf_cv_wcwidth_graphics" >&5
11023 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11024
11025         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11026
11027         # with_overwrite=no
11028         NCURSES_CH_T=cchar_t
11029
11030 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11031 do
11032 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11033 echo "$as_me:11033: checking for $ac_func" >&5
11034 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11035 if eval "test \"\${$as_ac_var+set}\" = set"; then
11036   echo $ECHO_N "(cached) $ECHO_C" >&6
11037 else
11038   cat >conftest.$ac_ext <<_ACEOF
11039 #line 11039 "configure"
11040 #include "confdefs.h"
11041 #define $ac_func autoconf_temporary
11042 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11043 #undef $ac_func
11044
11045 #ifdef __cplusplus
11046 extern "C"
11047 #endif
11048
11049 /* We use char because int might match the return type of a gcc2
11050    builtin and then its argument prototype would still apply.  */
11051 char $ac_func (void);
11052
11053 int
11054 main (void)
11055 {
11056
11057 /* The GNU C library defines stubs for functions which it implements
11058     to always fail with ENOSYS.  Some functions are actually named
11059     something starting with __ and the normal name is an alias.  */
11060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11061 #error found stub for $ac_func
11062 #endif
11063
11064         return $ac_func ();
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 rm -f conftest.$ac_objext conftest$ac_exeext
11070 if { (eval echo "$as_me:11070: \"$ac_link\"") >&5
11071   (eval $ac_link) 2>&5
11072   ac_status=$?
11073   echo "$as_me:11073: \$? = $ac_status" >&5
11074   (exit $ac_status); } &&
11075          { ac_try='test -s conftest$ac_exeext'
11076   { (eval echo "$as_me:11076: \"$ac_try\"") >&5
11077   (eval $ac_try) 2>&5
11078   ac_status=$?
11079   echo "$as_me:11079: \$? = $ac_status" >&5
11080   (exit $ac_status); }; }; then
11081   eval "$as_ac_var=yes"
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 cat conftest.$ac_ext >&5
11085 eval "$as_ac_var=no"
11086 fi
11087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11088 fi
11089 echo "$as_me:11089: result: `eval echo '${'$as_ac_var'}'`" >&5
11090 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11091 if test `eval echo '${'$as_ac_var'}'` = yes; then
11092   cat >>confdefs.h <<EOF
11093 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11094 EOF
11095
11096 fi
11097 done
11098
11099         if test "x$ac_cv_func_putwc" != xyes ; then
11100
11101 echo "$as_me:11101: checking for multibyte character support" >&5
11102 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11103 if test "${cf_cv_utf8_lib+set}" = set; then
11104   echo $ECHO_N "(cached) $ECHO_C" >&6
11105 else
11106
11107         cf_save_LIBS="$LIBS"
11108         cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111
11112 #include <stdlib.h>
11113 int
11114 main (void)
11115 {
11116 putwc(0,0);
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 rm -f conftest.$ac_objext conftest$ac_exeext
11122 if { (eval echo "$as_me:11122: \"$ac_link\"") >&5
11123   (eval $ac_link) 2>&5
11124   ac_status=$?
11125   echo "$as_me:11125: \$? = $ac_status" >&5
11126   (exit $ac_status); } &&
11127          { ac_try='test -s conftest$ac_exeext'
11128   { (eval echo "$as_me:11128: \"$ac_try\"") >&5
11129   (eval $ac_try) 2>&5
11130   ac_status=$?
11131   echo "$as_me:11131: \$? = $ac_status" >&5
11132   (exit $ac_status); }; }; then
11133   cf_cv_utf8_lib=yes
11134 else
11135   echo "$as_me: failed program was:" >&5
11136 cat conftest.$ac_ext >&5
11137
11138 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11139 # will be set on completion of the AC_TRY_LINK below.
11140 cf_cv_header_path_utf8=
11141 cf_cv_library_path_utf8=
11142
11143 echo "${as_me:-configure}:11143: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11144
11145 cf_save_LIBS="$LIBS"
11146
11147 cat >conftest.$ac_ext <<_ACEOF
11148 #line 11148 "configure"
11149 #include "confdefs.h"
11150
11151 #include <libutf8.h>
11152 int
11153 main (void)
11154 {
11155 putwc(0,0);
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 rm -f conftest.$ac_objext conftest$ac_exeext
11161 if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
11162   (eval $ac_link) 2>&5
11163   ac_status=$?
11164   echo "$as_me:11164: \$? = $ac_status" >&5
11165   (exit $ac_status); } &&
11166          { ac_try='test -s conftest$ac_exeext'
11167   { (eval echo "$as_me:11167: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172
11173         cf_cv_find_linkage_utf8=yes
11174         cf_cv_header_path_utf8=/usr/include
11175         cf_cv_library_path_utf8=/usr/lib
11176
11177 else
11178   echo "$as_me: failed program was:" >&5
11179 cat conftest.$ac_ext >&5
11180
11181 LIBS="-lutf8  $cf_save_LIBS"
11182
11183 cat >conftest.$ac_ext <<_ACEOF
11184 #line 11184 "configure"
11185 #include "confdefs.h"
11186
11187 #include <libutf8.h>
11188 int
11189 main (void)
11190 {
11191 putwc(0,0);
11192   ;
11193   return 0;
11194 }
11195 _ACEOF
11196 rm -f conftest.$ac_objext conftest$ac_exeext
11197 if { (eval echo "$as_me:11197: \"$ac_link\"") >&5
11198   (eval $ac_link) 2>&5
11199   ac_status=$?
11200   echo "$as_me:11200: \$? = $ac_status" >&5
11201   (exit $ac_status); } &&
11202          { ac_try='test -s conftest$ac_exeext'
11203   { (eval echo "$as_me:11203: \"$ac_try\"") >&5
11204   (eval $ac_try) 2>&5
11205   ac_status=$?
11206   echo "$as_me:11206: \$? = $ac_status" >&5
11207   (exit $ac_status); }; }; then
11208
11209         cf_cv_find_linkage_utf8=yes
11210         cf_cv_header_path_utf8=/usr/include
11211         cf_cv_library_path_utf8=/usr/lib
11212         cf_cv_library_file_utf8="-lutf8"
11213
11214 else
11215   echo "$as_me: failed program was:" >&5
11216 cat conftest.$ac_ext >&5
11217
11218         cf_cv_find_linkage_utf8=no
11219         LIBS="$cf_save_LIBS"
11220
11221         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11222
11223 echo "${as_me:-configure}:11223: testing find linkage for utf8 library ..." 1>&5
11224
11225 echo "${as_me:-configure}:11225: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11226
11227         cf_save_CPPFLAGS="$CPPFLAGS"
11228         cf_test_CPPFLAGS="$CPPFLAGS"
11229
11230 cf_search=
11231
11232 # collect the current set of include-directories from compiler flags
11233 cf_header_path_list=""
11234 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11235         for cf_header_path in $CPPFLAGS $CFLAGS
11236         do
11237                 case $cf_header_path in
11238                 (-I*)
11239                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11240
11241 test "x$cf_header_path" != "xNONE" && \
11242 test -d "$cf_header_path" && \
11243  {
11244         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11245         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11246         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11247         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11248         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11249         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11250 }
11251
11252                         cf_header_path_list="$cf_header_path_list $cf_search"
11253                         ;;
11254                 esac
11255         done
11256 fi
11257
11258 # add the variations for the package we are looking for
11259
11260 cf_search=
11261
11262 test "x$prefix" != "xNONE" && \
11263 test -d "$prefix" && \
11264  {
11265         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11266         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11267         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11268         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11269         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11270         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11271 }
11272
11273 for cf_subdir_prefix in \
11274         /usr \
11275         /usr/local \
11276         /usr/pkg \
11277         /opt \
11278         /opt/local \
11279         $HOME
11280 do
11281
11282 test "x$cf_subdir_prefix" != "x$prefix" && \
11283 test -d "$cf_subdir_prefix" && \
11284 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11285         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11286         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11287         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11288         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11289         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11290         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11291 }
11292
11293 done
11294
11295 test "$includedir" != NONE && \
11296 test "$includedir" != "/usr/include" && \
11297 test -d "$includedir" && {
11298         test -d $includedir &&    cf_search="$cf_search $includedir"
11299         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11300 }
11301
11302 test "$oldincludedir" != NONE && \
11303 test "$oldincludedir" != "/usr/include" && \
11304 test -d "$oldincludedir" && {
11305         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11306         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11307 }
11308
11309 cf_search="$cf_search $cf_header_path_list"
11310
11311         for cf_cv_header_path_utf8 in $cf_search
11312         do
11313                 if test -d $cf_cv_header_path_utf8 ; then
11314                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11315
11316 echo "${as_me:-configure}:11316: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11317
11318                         CPPFLAGS="$cf_save_CPPFLAGS"
11319
11320         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11321         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11322
11323                         cat >conftest.$ac_ext <<_ACEOF
11324 #line 11324 "configure"
11325 #include "confdefs.h"
11326
11327 #include <libutf8.h>
11328 int
11329 main (void)
11330 {
11331 putwc(0,0);
11332   ;
11333   return 0;
11334 }
11335 _ACEOF
11336 rm -f conftest.$ac_objext
11337 if { (eval echo "$as_me:11337: \"$ac_compile\"") >&5
11338   (eval $ac_compile) 2>&5
11339   ac_status=$?
11340   echo "$as_me:11340: \$? = $ac_status" >&5
11341   (exit $ac_status); } &&
11342          { ac_try='test -s conftest.$ac_objext'
11343   { (eval echo "$as_me:11343: \"$ac_try\"") >&5
11344   (eval $ac_try) 2>&5
11345   ac_status=$?
11346   echo "$as_me:11346: \$? = $ac_status" >&5
11347   (exit $ac_status); }; }; then
11348
11349                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11350
11351 echo "${as_me:-configure}:11351: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11352
11353                                 cf_cv_find_linkage_utf8=maybe
11354                                 cf_test_CPPFLAGS="$CPPFLAGS"
11355                                 break
11356 else
11357   echo "$as_me: failed program was:" >&5
11358 cat conftest.$ac_ext >&5
11359
11360                                 CPPFLAGS="$cf_save_CPPFLAGS"
11361
11362 fi
11363 rm -f conftest.$ac_objext conftest.$ac_ext
11364                 fi
11365         done
11366
11367         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11368
11369 echo "${as_me:-configure}:11369: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11370
11371                 cf_save_LIBS="$LIBS"
11372                 cf_save_LDFLAGS="$LDFLAGS"
11373
11374                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11375
11376 cf_search=
11377 cf_library_path_list=""
11378 if test -n "${LDFLAGS}${LIBS}" ; then
11379         for cf_library_path in $LDFLAGS $LIBS
11380         do
11381                 case $cf_library_path in
11382                 (-L*)
11383                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11384
11385 test "x$cf_library_path" != "xNONE" && \
11386 test -d "$cf_library_path" && \
11387  {
11388         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11389         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11390         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11391         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11392         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11393         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11394 }
11395
11396                         cf_library_path_list="$cf_library_path_list $cf_search"
11397                         ;;
11398                 esac
11399         done
11400 fi
11401
11402 cf_search=
11403
11404 test "x$prefix" != "xNONE" && \
11405 test -d "$prefix" && \
11406  {
11407         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11408         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11409         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11410         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11411         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11412         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11413 }
11414
11415 for cf_subdir_prefix in \
11416         /usr \
11417         /usr/local \
11418         /usr/pkg \
11419         /opt \
11420         /opt/local \
11421         $HOME
11422 do
11423
11424 test "x$cf_subdir_prefix" != "x$prefix" && \
11425 test -d "$cf_subdir_prefix" && \
11426 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11427         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11428         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11429         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11430         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11431         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11432         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11433 }
11434
11435 done
11436
11437 cf_search="$cf_library_path_list $cf_search"
11438
11439                         for cf_cv_library_path_utf8 in $cf_search
11440                         do
11441                                 if test -d $cf_cv_library_path_utf8 ; then
11442                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11443
11444 echo "${as_me:-configure}:11444: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11445
11446                                         CPPFLAGS="$cf_test_CPPFLAGS"
11447                                         LIBS="-lutf8  $cf_save_LIBS"
11448                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11449                                         cat >conftest.$ac_ext <<_ACEOF
11450 #line 11450 "configure"
11451 #include "confdefs.h"
11452
11453 #include <libutf8.h>
11454 int
11455 main (void)
11456 {
11457 putwc(0,0);
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 rm -f conftest.$ac_objext conftest$ac_exeext
11463 if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
11464   (eval $ac_link) 2>&5
11465   ac_status=$?
11466   echo "$as_me:11466: \$? = $ac_status" >&5
11467   (exit $ac_status); } &&
11468          { ac_try='test -s conftest$ac_exeext'
11469   { (eval echo "$as_me:11469: \"$ac_try\"") >&5
11470   (eval $ac_try) 2>&5
11471   ac_status=$?
11472   echo "$as_me:11472: \$? = $ac_status" >&5
11473   (exit $ac_status); }; }; then
11474
11475                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11476
11477 echo "${as_me:-configure}:11477: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11478
11479                                         cf_cv_find_linkage_utf8=yes
11480                                         cf_cv_library_file_utf8="-lutf8"
11481                                         break
11482 else
11483   echo "$as_me: failed program was:" >&5
11484 cat conftest.$ac_ext >&5
11485
11486                                         CPPFLAGS="$cf_save_CPPFLAGS"
11487                                         LIBS="$cf_save_LIBS"
11488                                         LDFLAGS="$cf_save_LDFLAGS"
11489
11490 fi
11491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11492                                 fi
11493                         done
11494                         CPPFLAGS="$cf_save_CPPFLAGS"
11495                         LDFLAGS="$cf_save_LDFLAGS"
11496                 fi
11497
11498         else
11499                 cf_cv_find_linkage_utf8=no
11500         fi
11501
11502 fi
11503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11504
11505 fi
11506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11507
11508 LIBS="$cf_save_LIBS"
11509
11510 if test "$cf_cv_find_linkage_utf8" = yes ; then
11511 cf_cv_utf8_lib=add-on
11512 else
11513 cf_cv_utf8_lib=no
11514 fi
11515
11516 fi
11517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11518 fi
11519 echo "$as_me:11519: result: $cf_cv_utf8_lib" >&5
11520 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11521
11522 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11523 # ncurses/ncursesw:
11524 if test "$cf_cv_utf8_lib" = "add-on" ; then
11525
11526 cat >>confdefs.h <<\EOF
11527 #define HAVE_LIBUTF8_H 1
11528 EOF
11529
11530 if test -n "$cf_cv_header_path_utf8" ; then
11531   for cf_add_incdir in $cf_cv_header_path_utf8
11532   do
11533         while test $cf_add_incdir != /usr/include
11534         do
11535           if test -d $cf_add_incdir
11536           then
11537                 cf_have_incdir=no
11538                 if test -n "$CFLAGS$CPPFLAGS" ; then
11539                   # a loop is needed to ensure we can add subdirs of existing dirs
11540                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11541                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11542                           cf_have_incdir=yes; break
11543                         fi
11544                   done
11545                 fi
11546
11547                 if test "$cf_have_incdir" = no ; then
11548                   if test "$cf_add_incdir" = /usr/local/include ; then
11549                         if test "$GCC" = yes
11550                         then
11551                           cf_save_CPPFLAGS=$CPPFLAGS
11552
11553         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11554         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11555
11556                           cat >conftest.$ac_ext <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11559 #include <stdio.h>
11560 int
11561 main (void)
11562 {
11563 printf("Hello")
11564   ;
11565   return 0;
11566 }
11567 _ACEOF
11568 rm -f conftest.$ac_objext
11569 if { (eval echo "$as_me:11569: \"$ac_compile\"") >&5
11570   (eval $ac_compile) 2>&5
11571   ac_status=$?
11572   echo "$as_me:11572: \$? = $ac_status" >&5
11573   (exit $ac_status); } &&
11574          { ac_try='test -s conftest.$ac_objext'
11575   { (eval echo "$as_me:11575: \"$ac_try\"") >&5
11576   (eval $ac_try) 2>&5
11577   ac_status=$?
11578   echo "$as_me:11578: \$? = $ac_status" >&5
11579   (exit $ac_status); }; }; then
11580   :
11581 else
11582   echo "$as_me: failed program was:" >&5
11583 cat conftest.$ac_ext >&5
11584 cf_have_incdir=yes
11585 fi
11586 rm -f conftest.$ac_objext conftest.$ac_ext
11587                           CPPFLAGS=$cf_save_CPPFLAGS
11588                         fi
11589                   fi
11590                 fi
11591
11592                 if test "$cf_have_incdir" = no ; then
11593                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11594
11595 echo "${as_me:-configure}:11595: testing adding $cf_add_incdir to include-path ..." 1>&5
11596
11597                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11598
11599                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11600                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11601                   cf_add_incdir="$cf_top_incdir"
11602                 else
11603                   break
11604                 fi
11605           else
11606                 break
11607           fi
11608         done
11609   done
11610 fi
11611
11612 if test -n "$cf_cv_library_path_utf8" ; then
11613         for cf_add_libdir in $cf_cv_library_path_utf8
11614         do
11615                 if test $cf_add_libdir = /usr/lib ; then
11616                         :
11617                 elif test -d $cf_add_libdir
11618                 then
11619                         cf_have_libdir=no
11620                         if test -n "$LDFLAGS$LIBS" ; then
11621                                 # a loop is needed to ensure we can add subdirs of existing dirs
11622                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11623                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11624                                                 cf_have_libdir=yes; break
11625                                         fi
11626                                 done
11627                         fi
11628                         if test "$cf_have_libdir" = no ; then
11629                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11630
11631 echo "${as_me:-configure}:11631: testing adding $cf_add_libdir to library-path ..." 1>&5
11632
11633                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11634                         fi
11635                 fi
11636         done
11637 fi
11638
11639 cf_add_libs="$cf_cv_library_file_utf8"
11640 # Filter out duplicates - this happens with badly-designed ".pc" files...
11641 for cf_add_1lib in $LIBS
11642 do
11643         for cf_add_2lib in $cf_add_libs
11644         do
11645                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11646                 then
11647                         cf_add_1lib=
11648                         break
11649                 fi
11650         done
11651         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11652 done
11653 LIBS="$cf_add_libs"
11654
11655 fi
11656
11657                 if test "$cf_cv_utf8_lib" != no ; then
11658                         NCURSES_LIBUTF8=1
11659                 fi
11660         fi
11661
11662 # This is needed on Tru64 5.0 to declare mbstate_t
11663 echo "$as_me:11663: checking if we must include wchar.h to declare mbstate_t" >&5
11664 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11665 if test "${cf_cv_mbstate_t+set}" = set; then
11666   echo $ECHO_N "(cached) $ECHO_C" >&6
11667 else
11668
11669 cat >conftest.$ac_ext <<_ACEOF
11670 #line 11670 "configure"
11671 #include "confdefs.h"
11672
11673 #include <stdlib.h>
11674 #include <stdarg.h>
11675 #include <stdio.h>
11676 #ifdef HAVE_LIBUTF8_H
11677 #include <libutf8.h>
11678 #endif
11679 int
11680 main (void)
11681 {
11682 mbstate_t state
11683   ;
11684   return 0;
11685 }
11686 _ACEOF
11687 rm -f conftest.$ac_objext
11688 if { (eval echo "$as_me:11688: \"$ac_compile\"") >&5
11689   (eval $ac_compile) 2>&5
11690   ac_status=$?
11691   echo "$as_me:11691: \$? = $ac_status" >&5
11692   (exit $ac_status); } &&
11693          { ac_try='test -s conftest.$ac_objext'
11694   { (eval echo "$as_me:11694: \"$ac_try\"") >&5
11695   (eval $ac_try) 2>&5
11696   ac_status=$?
11697   echo "$as_me:11697: \$? = $ac_status" >&5
11698   (exit $ac_status); }; }; then
11699   cf_cv_mbstate_t=no
11700 else
11701   echo "$as_me: failed program was:" >&5
11702 cat conftest.$ac_ext >&5
11703 cat >conftest.$ac_ext <<_ACEOF
11704 #line 11704 "configure"
11705 #include "confdefs.h"
11706
11707 #include <stdlib.h>
11708 #include <stdarg.h>
11709 #include <stdio.h>
11710 #include <wchar.h>
11711 #ifdef HAVE_LIBUTF8_H
11712 #include <libutf8.h>
11713 #endif
11714 int
11715 main (void)
11716 {
11717 mbstate_t value
11718   ;
11719   return 0;
11720 }
11721 _ACEOF
11722 rm -f conftest.$ac_objext
11723 if { (eval echo "$as_me:11723: \"$ac_compile\"") >&5
11724   (eval $ac_compile) 2>&5
11725   ac_status=$?
11726   echo "$as_me:11726: \$? = $ac_status" >&5
11727   (exit $ac_status); } &&
11728          { ac_try='test -s conftest.$ac_objext'
11729   { (eval echo "$as_me:11729: \"$ac_try\"") >&5
11730   (eval $ac_try) 2>&5
11731   ac_status=$?
11732   echo "$as_me:11732: \$? = $ac_status" >&5
11733   (exit $ac_status); }; }; then
11734   cf_cv_mbstate_t=yes
11735 else
11736   echo "$as_me: failed program was:" >&5
11737 cat conftest.$ac_ext >&5
11738 cf_cv_mbstate_t=unknown
11739 fi
11740 rm -f conftest.$ac_objext conftest.$ac_ext
11741 fi
11742 rm -f conftest.$ac_objext conftest.$ac_ext
11743 fi
11744 echo "$as_me:11744: result: $cf_cv_mbstate_t" >&5
11745 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11746
11747 if test "$cf_cv_mbstate_t" = yes ; then
11748
11749 cat >>confdefs.h <<\EOF
11750 #define NEED_WCHAR_H 1
11751 EOF
11752
11753         NEED_WCHAR_H=1
11754 fi
11755
11756 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11757 if test "$cf_cv_mbstate_t" = unknown ; then
11758         NCURSES_MBSTATE_T=1
11759 fi
11760
11761 # This is needed on Tru64 5.0 to declare wchar_t
11762 echo "$as_me:11762: checking if we must include wchar.h to declare wchar_t" >&5
11763 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11764 if test "${cf_cv_wchar_t+set}" = set; then
11765   echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767
11768 cat >conftest.$ac_ext <<_ACEOF
11769 #line 11769 "configure"
11770 #include "confdefs.h"
11771
11772 #include <stdlib.h>
11773 #include <stdarg.h>
11774 #include <stdio.h>
11775 #ifdef HAVE_LIBUTF8_H
11776 #include <libutf8.h>
11777 #endif
11778 int
11779 main (void)
11780 {
11781 wchar_t state
11782   ;
11783   return 0;
11784 }
11785 _ACEOF
11786 rm -f conftest.$ac_objext
11787 if { (eval echo "$as_me:11787: \"$ac_compile\"") >&5
11788   (eval $ac_compile) 2>&5
11789   ac_status=$?
11790   echo "$as_me:11790: \$? = $ac_status" >&5
11791   (exit $ac_status); } &&
11792          { ac_try='test -s conftest.$ac_objext'
11793   { (eval echo "$as_me:11793: \"$ac_try\"") >&5
11794   (eval $ac_try) 2>&5
11795   ac_status=$?
11796   echo "$as_me:11796: \$? = $ac_status" >&5
11797   (exit $ac_status); }; }; then
11798   cf_cv_wchar_t=no
11799 else
11800   echo "$as_me: failed program was:" >&5
11801 cat conftest.$ac_ext >&5
11802 cat >conftest.$ac_ext <<_ACEOF
11803 #line 11803 "configure"
11804 #include "confdefs.h"
11805
11806 #include <stdlib.h>
11807 #include <stdarg.h>
11808 #include <stdio.h>
11809 #include <wchar.h>
11810 #ifdef HAVE_LIBUTF8_H
11811 #include <libutf8.h>
11812 #endif
11813 int
11814 main (void)
11815 {
11816 wchar_t value
11817   ;
11818   return 0;
11819 }
11820 _ACEOF
11821 rm -f conftest.$ac_objext
11822 if { (eval echo "$as_me:11822: \"$ac_compile\"") >&5
11823   (eval $ac_compile) 2>&5
11824   ac_status=$?
11825   echo "$as_me:11825: \$? = $ac_status" >&5
11826   (exit $ac_status); } &&
11827          { ac_try='test -s conftest.$ac_objext'
11828   { (eval echo "$as_me:11828: \"$ac_try\"") >&5
11829   (eval $ac_try) 2>&5
11830   ac_status=$?
11831   echo "$as_me:11831: \$? = $ac_status" >&5
11832   (exit $ac_status); }; }; then
11833   cf_cv_wchar_t=yes
11834 else
11835   echo "$as_me: failed program was:" >&5
11836 cat conftest.$ac_ext >&5
11837 cf_cv_wchar_t=unknown
11838 fi
11839 rm -f conftest.$ac_objext conftest.$ac_ext
11840 fi
11841 rm -f conftest.$ac_objext conftest.$ac_ext
11842 fi
11843 echo "$as_me:11843: result: $cf_cv_wchar_t" >&5
11844 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11845
11846 if test "$cf_cv_wchar_t" = yes ; then
11847
11848 cat >>confdefs.h <<\EOF
11849 #define NEED_WCHAR_H 1
11850 EOF
11851
11852         NEED_WCHAR_H=1
11853 fi
11854
11855 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11856 if test "$cf_cv_wchar_t" = unknown ; then
11857         NCURSES_WCHAR_T=1
11858 fi
11859
11860 # if we find wchar_t in either place, use substitution to provide a fallback.
11861 if test "$cf_cv_wchar_t" != unknown ; then
11862         NCURSES_OK_WCHAR_T=1
11863 fi
11864
11865 # This is needed on Tru64 5.0 to declare wint_t
11866 echo "$as_me:11866: checking if we must include wchar.h to declare wint_t" >&5
11867 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11868 if test "${cf_cv_wint_t+set}" = set; then
11869   echo $ECHO_N "(cached) $ECHO_C" >&6
11870 else
11871
11872 cat >conftest.$ac_ext <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875
11876 #include <stdlib.h>
11877 #include <stdarg.h>
11878 #include <stdio.h>
11879 #ifdef HAVE_LIBUTF8_H
11880 #include <libutf8.h>
11881 #endif
11882 int
11883 main (void)
11884 {
11885 wint_t state
11886   ;
11887   return 0;
11888 }
11889 _ACEOF
11890 rm -f conftest.$ac_objext
11891 if { (eval echo "$as_me:11891: \"$ac_compile\"") >&5
11892   (eval $ac_compile) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit $ac_status); } &&
11896          { ac_try='test -s conftest.$ac_objext'
11897   { (eval echo "$as_me:11897: \"$ac_try\"") >&5
11898   (eval $ac_try) 2>&5
11899   ac_status=$?
11900   echo "$as_me:11900: \$? = $ac_status" >&5
11901   (exit $ac_status); }; }; then
11902   cf_cv_wint_t=no
11903 else
11904   echo "$as_me: failed program was:" >&5
11905 cat conftest.$ac_ext >&5
11906 cat >conftest.$ac_ext <<_ACEOF
11907 #line 11907 "configure"
11908 #include "confdefs.h"
11909
11910 #include <stdlib.h>
11911 #include <stdarg.h>
11912 #include <stdio.h>
11913 #include <wchar.h>
11914 #ifdef HAVE_LIBUTF8_H
11915 #include <libutf8.h>
11916 #endif
11917 int
11918 main (void)
11919 {
11920 wint_t value
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest.$ac_objext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   cf_cv_wint_t=yes
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 cat conftest.$ac_ext >&5
11941 cf_cv_wint_t=unknown
11942 fi
11943 rm -f conftest.$ac_objext conftest.$ac_ext
11944 fi
11945 rm -f conftest.$ac_objext conftest.$ac_ext
11946 fi
11947 echo "$as_me:11947: result: $cf_cv_wint_t" >&5
11948 echo "${ECHO_T}$cf_cv_wint_t" >&6
11949
11950 if test "$cf_cv_wint_t" = yes ; then
11951
11952 cat >>confdefs.h <<\EOF
11953 #define NEED_WCHAR_H 1
11954 EOF
11955
11956         NEED_WCHAR_H=1
11957 fi
11958
11959 # if we do not find wint_t in either place, use substitution to provide a fallback.
11960 if test "$cf_cv_wint_t" = unknown ; then
11961         NCURSES_WINT_T=1
11962 fi
11963
11964 # if we find wint_t in either place, use substitution to provide a fallback.
11965 if test "$cf_cv_wint_t" != unknown ; then
11966         NCURSES_OK_WINT_T=1
11967 fi
11968
11969         if test "$NCURSES_MBSTATE_T" != 0; then
11970
11971 cat >>confdefs.h <<\EOF
11972 #define NEED_MBSTATE_T_DEF 1
11973 EOF
11974
11975         fi
11976 fi
11977
11978 ###   use option --disable-lp64 to allow long chtype
11979 echo "$as_me:11979: checking whether to enable _LP64 definition in curses.h" >&5
11980 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11981
11982 # Check whether --enable-lp64 or --disable-lp64 was given.
11983 if test "${enable_lp64+set}" = set; then
11984   enableval="$enable_lp64"
11985   with_lp64=$enableval
11986 else
11987   with_lp64=$cf_dft_with_lp64
11988 fi;
11989 echo "$as_me:11989: result: $with_lp64" >&5
11990 echo "${ECHO_T}$with_lp64" >&6
11991
11992 if test "x$with_lp64" = xyes ; then
11993         cf_cv_enable_lp64=1
11994 else
11995         cf_cv_enable_lp64=0
11996 fi
11997
11998 # Check whether --enable-largefile or --disable-largefile was given.
11999 if test "${enable_largefile+set}" = set; then
12000   enableval="$enable_largefile"
12001
12002 fi;
12003 if test "$enable_largefile" != no; then
12004
12005   echo "$as_me:12005: checking for special C compiler options needed for large files" >&5
12006 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12007 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12008   echo $ECHO_N "(cached) $ECHO_C" >&6
12009 else
12010   ac_cv_sys_largefile_CC=no
12011      if test "$GCC" != yes; then
12012        ac_save_CC=$CC
12013        while :; do
12014          # IRIX 6.2 and later do not support large files by default,
12015          # so use the C compiler's -n32 option if that helps.
12016          cat >conftest.$ac_ext <<_ACEOF
12017 #line 12017 "configure"
12018 #include "confdefs.h"
12019 #include <sys/types.h>
12020  /* Check that off_t can represent 2**63 - 1 correctly.
12021     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12022     since some C++ compilers masquerading as C compilers
12023     incorrectly reject 9223372036854775807.  */
12024 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12025   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12026                        && LARGE_OFF_T % 2147483647 == 1)
12027                       ? 1 : -1];
12028 int
12029 main (void)
12030 {
12031
12032   ;
12033   return 0;
12034 }
12035 _ACEOF
12036          rm -f conftest.$ac_objext
12037 if { (eval echo "$as_me:12037: \"$ac_compile\"") >&5
12038   (eval $ac_compile) 2>&5
12039   ac_status=$?
12040   echo "$as_me:12040: \$? = $ac_status" >&5
12041   (exit $ac_status); } &&
12042          { ac_try='test -s conftest.$ac_objext'
12043   { (eval echo "$as_me:12043: \"$ac_try\"") >&5
12044   (eval $ac_try) 2>&5
12045   ac_status=$?
12046   echo "$as_me:12046: \$? = $ac_status" >&5
12047   (exit $ac_status); }; }; then
12048   break
12049 else
12050   echo "$as_me: failed program was:" >&5
12051 cat conftest.$ac_ext >&5
12052 fi
12053 rm -f conftest.$ac_objext
12054          CC="$CC -n32"
12055          rm -f conftest.$ac_objext
12056 if { (eval echo "$as_me:12056: \"$ac_compile\"") >&5
12057   (eval $ac_compile) 2>&5
12058   ac_status=$?
12059   echo "$as_me:12059: \$? = $ac_status" >&5
12060   (exit $ac_status); } &&
12061          { ac_try='test -s conftest.$ac_objext'
12062   { (eval echo "$as_me:12062: \"$ac_try\"") >&5
12063   (eval $ac_try) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit $ac_status); }; }; then
12067   ac_cv_sys_largefile_CC=' -n32'; break
12068 else
12069   echo "$as_me: failed program was:" >&5
12070 cat conftest.$ac_ext >&5
12071 fi
12072 rm -f conftest.$ac_objext
12073          break
12074        done
12075        CC=$ac_save_CC
12076        rm -f conftest.$ac_ext
12077     fi
12078 fi
12079 echo "$as_me:12079: result: $ac_cv_sys_largefile_CC" >&5
12080 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12081   if test "$ac_cv_sys_largefile_CC" != no; then
12082     CC=$CC$ac_cv_sys_largefile_CC
12083   fi
12084
12085   echo "$as_me:12085: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12086 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12087 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12088   echo $ECHO_N "(cached) $ECHO_C" >&6
12089 else
12090   while :; do
12091   ac_cv_sys_file_offset_bits=no
12092   cat >conftest.$ac_ext <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095 #include <sys/types.h>
12096  /* Check that off_t can represent 2**63 - 1 correctly.
12097     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12098     since some C++ compilers masquerading as C compilers
12099     incorrectly reject 9223372036854775807.  */
12100 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12101   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12102                        && LARGE_OFF_T % 2147483647 == 1)
12103                       ? 1 : -1];
12104 int
12105 main (void)
12106 {
12107
12108   ;
12109   return 0;
12110 }
12111 _ACEOF
12112 rm -f conftest.$ac_objext
12113 if { (eval echo "$as_me:12113: \"$ac_compile\"") >&5
12114   (eval $ac_compile) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit $ac_status); } &&
12118          { ac_try='test -s conftest.$ac_objext'
12119   { (eval echo "$as_me:12119: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); }; }; then
12124   break
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 cat conftest.$ac_ext >&5
12128 fi
12129 rm -f conftest.$ac_objext conftest.$ac_ext
12130   cat >conftest.$ac_ext <<_ACEOF
12131 #line 12131 "configure"
12132 #include "confdefs.h"
12133 #define _FILE_OFFSET_BITS 64
12134 #include <sys/types.h>
12135  /* Check that off_t can represent 2**63 - 1 correctly.
12136     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12137     since some C++ compilers masquerading as C compilers
12138     incorrectly reject 9223372036854775807.  */
12139 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12140   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12141                        && LARGE_OFF_T % 2147483647 == 1)
12142                       ? 1 : -1];
12143 int
12144 main (void)
12145 {
12146
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext
12152 if { (eval echo "$as_me:12152: \"$ac_compile\"") >&5
12153   (eval $ac_compile) 2>&5
12154   ac_status=$?
12155   echo "$as_me:12155: \$? = $ac_status" >&5
12156   (exit $ac_status); } &&
12157          { ac_try='test -s conftest.$ac_objext'
12158   { (eval echo "$as_me:12158: \"$ac_try\"") >&5
12159   (eval $ac_try) 2>&5
12160   ac_status=$?
12161   echo "$as_me:12161: \$? = $ac_status" >&5
12162   (exit $ac_status); }; }; then
12163   ac_cv_sys_file_offset_bits=64; break
12164 else
12165   echo "$as_me: failed program was:" >&5
12166 cat conftest.$ac_ext >&5
12167 fi
12168 rm -f conftest.$ac_objext conftest.$ac_ext
12169   break
12170 done
12171 fi
12172 echo "$as_me:12172: result: $ac_cv_sys_file_offset_bits" >&5
12173 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12174 if test "$ac_cv_sys_file_offset_bits" != no; then
12175
12176 cat >>confdefs.h <<EOF
12177 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12178 EOF
12179
12180 fi
12181 rm -rf conftest*
12182   echo "$as_me:12182: checking for _LARGE_FILES value needed for large files" >&5
12183 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12184 if test "${ac_cv_sys_large_files+set}" = set; then
12185   echo $ECHO_N "(cached) $ECHO_C" >&6
12186 else
12187   while :; do
12188   ac_cv_sys_large_files=no
12189   cat >conftest.$ac_ext <<_ACEOF
12190 #line 12190 "configure"
12191 #include "confdefs.h"
12192 #include <sys/types.h>
12193  /* Check that off_t can represent 2**63 - 1 correctly.
12194     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12195     since some C++ compilers masquerading as C compilers
12196     incorrectly reject 9223372036854775807.  */
12197 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12198   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12199                        && LARGE_OFF_T % 2147483647 == 1)
12200                       ? 1 : -1];
12201 int
12202 main (void)
12203 {
12204
12205   ;
12206   return 0;
12207 }
12208 _ACEOF
12209 rm -f conftest.$ac_objext
12210 if { (eval echo "$as_me:12210: \"$ac_compile\"") >&5
12211   (eval $ac_compile) 2>&5
12212   ac_status=$?
12213   echo "$as_me:12213: \$? = $ac_status" >&5
12214   (exit $ac_status); } &&
12215          { ac_try='test -s conftest.$ac_objext'
12216   { (eval echo "$as_me:12216: \"$ac_try\"") >&5
12217   (eval $ac_try) 2>&5
12218   ac_status=$?
12219   echo "$as_me:12219: \$? = $ac_status" >&5
12220   (exit $ac_status); }; }; then
12221   break
12222 else
12223   echo "$as_me: failed program was:" >&5
12224 cat conftest.$ac_ext >&5
12225 fi
12226 rm -f conftest.$ac_objext conftest.$ac_ext
12227   cat >conftest.$ac_ext <<_ACEOF
12228 #line 12228 "configure"
12229 #include "confdefs.h"
12230 #define _LARGE_FILES 1
12231 #include <sys/types.h>
12232  /* Check that off_t can represent 2**63 - 1 correctly.
12233     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12234     since some C++ compilers masquerading as C compilers
12235     incorrectly reject 9223372036854775807.  */
12236 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12237   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12238                        && LARGE_OFF_T % 2147483647 == 1)
12239                       ? 1 : -1];
12240 int
12241 main (void)
12242 {
12243
12244   ;
12245   return 0;
12246 }
12247 _ACEOF
12248 rm -f conftest.$ac_objext
12249 if { (eval echo "$as_me:12249: \"$ac_compile\"") >&5
12250   (eval $ac_compile) 2>&5
12251   ac_status=$?
12252   echo "$as_me:12252: \$? = $ac_status" >&5
12253   (exit $ac_status); } &&
12254          { ac_try='test -s conftest.$ac_objext'
12255   { (eval echo "$as_me:12255: \"$ac_try\"") >&5
12256   (eval $ac_try) 2>&5
12257   ac_status=$?
12258   echo "$as_me:12258: \$? = $ac_status" >&5
12259   (exit $ac_status); }; }; then
12260   ac_cv_sys_large_files=1; break
12261 else
12262   echo "$as_me: failed program was:" >&5
12263 cat conftest.$ac_ext >&5
12264 fi
12265 rm -f conftest.$ac_objext conftest.$ac_ext
12266   break
12267 done
12268 fi
12269 echo "$as_me:12269: result: $ac_cv_sys_large_files" >&5
12270 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12271 if test "$ac_cv_sys_large_files" != no; then
12272
12273 cat >>confdefs.h <<EOF
12274 #define _LARGE_FILES $ac_cv_sys_large_files
12275 EOF
12276
12277 fi
12278 rm -rf conftest*
12279 fi
12280
12281         if test "$enable_largefile" != no ; then
12282         echo "$as_me:12282: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12283 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12284 if test "${ac_cv_sys_largefile_source+set}" = set; then
12285   echo $ECHO_N "(cached) $ECHO_C" >&6
12286 else
12287   while :; do
12288   ac_cv_sys_largefile_source=no
12289   cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292 #include <stdio.h>
12293 int
12294 main (void)
12295 {
12296 return !fseeko;
12297   ;
12298   return 0;
12299 }
12300 _ACEOF
12301 rm -f conftest.$ac_objext
12302 if { (eval echo "$as_me:12302: \"$ac_compile\"") >&5
12303   (eval $ac_compile) 2>&5
12304   ac_status=$?
12305   echo "$as_me:12305: \$? = $ac_status" >&5
12306   (exit $ac_status); } &&
12307          { ac_try='test -s conftest.$ac_objext'
12308   { (eval echo "$as_me:12308: \"$ac_try\"") >&5
12309   (eval $ac_try) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); }; }; then
12313   break
12314 else
12315   echo "$as_me: failed program was:" >&5
12316 cat conftest.$ac_ext >&5
12317 fi
12318 rm -f conftest.$ac_objext conftest.$ac_ext
12319   cat >conftest.$ac_ext <<_ACEOF
12320 #line 12320 "configure"
12321 #include "confdefs.h"
12322 #define _LARGEFILE_SOURCE 1
12323 #include <stdio.h>
12324 int
12325 main (void)
12326 {
12327 return !fseeko;
12328   ;
12329   return 0;
12330 }
12331 _ACEOF
12332 rm -f conftest.$ac_objext
12333 if { (eval echo "$as_me:12333: \"$ac_compile\"") >&5
12334   (eval $ac_compile) 2>&5
12335   ac_status=$?
12336   echo "$as_me:12336: \$? = $ac_status" >&5
12337   (exit $ac_status); } &&
12338          { ac_try='test -s conftest.$ac_objext'
12339   { (eval echo "$as_me:12339: \"$ac_try\"") >&5
12340   (eval $ac_try) 2>&5
12341   ac_status=$?
12342   echo "$as_me:12342: \$? = $ac_status" >&5
12343   (exit $ac_status); }; }; then
12344   ac_cv_sys_largefile_source=1; break
12345 else
12346   echo "$as_me: failed program was:" >&5
12347 cat conftest.$ac_ext >&5
12348 fi
12349 rm -f conftest.$ac_objext conftest.$ac_ext
12350   break
12351 done
12352 fi
12353 echo "$as_me:12353: result: $ac_cv_sys_largefile_source" >&5
12354 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12355 if test "$ac_cv_sys_largefile_source" != no; then
12356
12357 cat >>confdefs.h <<EOF
12358 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12359 EOF
12360
12361 fi
12362 rm -rf conftest*
12363
12364 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12365 # in glibc 2.1.3, but that breaks too many other things.
12366 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12367 echo "$as_me:12367: checking for fseeko" >&5
12368 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12369 if test "${ac_cv_func_fseeko+set}" = set; then
12370   echo $ECHO_N "(cached) $ECHO_C" >&6
12371 else
12372   cat >conftest.$ac_ext <<_ACEOF
12373 #line 12373 "configure"
12374 #include "confdefs.h"
12375 #include <stdio.h>
12376 int
12377 main (void)
12378 {
12379 return fseeko && fseeko (stdin, 0, 0);
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext conftest$ac_exeext
12385 if { (eval echo "$as_me:12385: \"$ac_link\"") >&5
12386   (eval $ac_link) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest$ac_exeext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   ac_cv_func_fseeko=yes
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 ac_cv_func_fseeko=no
12401 fi
12402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12403 fi
12404 echo "$as_me:12404: result: $ac_cv_func_fseeko" >&5
12405 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12406 if test $ac_cv_func_fseeko = yes; then
12407
12408 cat >>confdefs.h <<\EOF
12409 #define HAVE_FSEEKO 1
12410 EOF
12411
12412 fi
12413
12414         # Normally we would collect these definitions in the config.h,
12415         # but (like _XOPEN_SOURCE), some environments rely on having these
12416         # defined before any of the system headers are included.  Another
12417         # case comes up with C++, e.g., on AIX the compiler compiles the
12418         # header files by themselves before looking at the body files it is
12419         # told to compile.  For ncurses, those header files do not include
12420         # the config.h
12421         if test "$ac_cv_sys_large_files" != no
12422         then
12423
12424         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12425         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12426
12427         fi
12428         if test "$ac_cv_sys_largefile_source" != no
12429         then
12430
12431         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12432         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12433
12434         fi
12435         if test "$ac_cv_sys_file_offset_bits" != no
12436         then
12437
12438         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12439         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12440
12441         fi
12442
12443         echo "$as_me:12443: checking whether to use struct dirent64" >&5
12444 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12445 if test "${cf_cv_struct_dirent64+set}" = set; then
12446   echo $ECHO_N "(cached) $ECHO_C" >&6
12447 else
12448
12449                 cat >conftest.$ac_ext <<_ACEOF
12450 #line 12450 "configure"
12451 #include "confdefs.h"
12452
12453 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12454 #include <sys/types.h>
12455 #include <dirent.h>
12456
12457 int
12458 main (void)
12459 {
12460
12461                 /* if transitional largefile support is setup, this is true */
12462                 extern struct dirent64 * readdir(DIR *);
12463                 struct dirent64 *x = readdir((DIR *)0);
12464                 struct dirent *y = readdir((DIR *)0);
12465                 int z = x - y;
12466
12467   ;
12468   return 0;
12469 }
12470 _ACEOF
12471 rm -f conftest.$ac_objext
12472 if { (eval echo "$as_me:12472: \"$ac_compile\"") >&5
12473   (eval $ac_compile) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); } &&
12477          { ac_try='test -s conftest.$ac_objext'
12478   { (eval echo "$as_me:12478: \"$ac_try\"") >&5
12479   (eval $ac_try) 2>&5
12480   ac_status=$?
12481   echo "$as_me:12481: \$? = $ac_status" >&5
12482   (exit $ac_status); }; }; then
12483   cf_cv_struct_dirent64=yes
12484 else
12485   echo "$as_me: failed program was:" >&5
12486 cat conftest.$ac_ext >&5
12487 cf_cv_struct_dirent64=no
12488 fi
12489 rm -f conftest.$ac_objext conftest.$ac_ext
12490
12491 fi
12492 echo "$as_me:12492: result: $cf_cv_struct_dirent64" >&5
12493 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12494         test "$cf_cv_struct_dirent64" = yes &&
12495 cat >>confdefs.h <<\EOF
12496 #define HAVE_STRUCT_DIRENT64 1
12497 EOF
12498
12499         fi
12500
12501 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12502 echo "$as_me:12502: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12503 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12504
12505 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12506 if test "${enable_tparm_varargs+set}" = set; then
12507   enableval="$enable_tparm_varargs"
12508   with_tparm_varargs=$enableval
12509 else
12510   with_tparm_varargs=yes
12511 fi;
12512 echo "$as_me:12512: result: $with_tparm_varargs" >&5
12513 echo "${ECHO_T}$with_tparm_varargs" >&6
12514 NCURSES_TPARM_VARARGS=0
12515 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12516
12517 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12518 if test "$with_ticlib" != no ; then
12519 echo "$as_me:12519: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12520 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12521
12522 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12523 if test "${enable_tic_depends+set}" = set; then
12524   enableval="$enable_tic_depends"
12525   with_tic_depends=$enableval
12526 else
12527   with_tic_depends=yes
12528 fi;
12529 echo "$as_me:12529: result: $with_tic_depends" >&5
12530 echo "${ECHO_T}$with_tic_depends" >&6
12531 else
12532         with_tic_depends=no
12533 fi
12534
12535 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12536 echo "$as_me:12536: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12537 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12538
12539 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12540 if test "${enable_wattr_macros+set}" = set; then
12541   enableval="$enable_wattr_macros"
12542   with_wattr_macros=$enableval
12543 else
12544   with_wattr_macros=yes
12545 fi;
12546 if [ "x$with_wattr_macros" != xyes ]; then
12547         NCURSES_WATTR_MACROS=0
12548         echo "$as_me:12548: result: yes" >&5
12549 echo "${ECHO_T}yes" >&6
12550 else
12551         NCURSES_WATTR_MACROS=1
12552         echo "$as_me:12552: result: no" >&5
12553 echo "${ECHO_T}no" >&6
12554 fi
12555
12556 echo "$as_me:12556: checking for X11 rgb file" >&5
12557 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12558
12559 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12560 if test "${with_x11_rgb+set}" = set; then
12561   withval="$with_x11_rgb"
12562   RGB_PATH=$withval
12563 else
12564   RGB_PATH=auto
12565 fi;
12566
12567 if test "x$RGB_PATH" = xauto
12568 then
12569         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12570         for cf_path in \
12571                 /opt/local/share/X11/rgb.txt \
12572                 /opt/X11/share/X11/rgb.txt \
12573                 /usr/share/X11/rgb.txt \
12574                 /usr/X11/share/X11/rgb.txt \
12575                 /usr/X11/lib/X11/rgb.txt \
12576                 /usr/lib/X11/rgb.txt \
12577                 /etc/X11/rgb.txt \
12578                 /usr/pkg/lib/X11/rgb.txt \
12579                 /usr/X11R7/lib/X11/rgb.txt \
12580                 /usr/X11R6/lib/X11/rgb.txt \
12581                 /usr/X11R5/lib/X11/rgb.txt \
12582                 /usr/X11R4/lib/X11/rgb.txt \
12583                 /usr/local/lib/X11/rgb.txt \
12584                 /usr/local/share/X11/rgb.txt \
12585                 /usr/lib64/X11/rgb.txt
12586         do
12587                 if test -f "$cf_path" ; then
12588                         RGB_PATH="$cf_path"
12589                         break
12590                 fi
12591         done
12592 else
12593         cf_path=$RGB_PATH
12594
12595 if test "x$prefix" != xNONE; then
12596         cf_path_syntax="$prefix"
12597 else
12598         cf_path_syntax="$ac_default_prefix"
12599 fi
12600
12601 case ".$cf_path" in
12602 (.\$\(*\)*|.\'*\'*)
12603         ;;
12604 (..|./*|.\\*)
12605         ;;
12606 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12607         ;;
12608 (.\${*prefix}*|.\${*dir}*)
12609         eval cf_path="$cf_path"
12610         case ".$cf_path" in
12611         (.NONE/*)
12612                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12613                 ;;
12614         esac
12615         ;;
12616 (.no|.NONE/*)
12617         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12618         ;;
12619 (*)
12620         { { echo "$as_me:12620: error: expected a pathname, not \"$cf_path\"" >&5
12621 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12622    { (exit 1); exit 1; }; }
12623         ;;
12624 esac
12625
12626 fi
12627
12628 echo "$as_me:12628: result: $RGB_PATH" >&5
12629 echo "${ECHO_T}$RGB_PATH" >&6
12630
12631 cat >>confdefs.h <<EOF
12632 #define RGB_PATH "$cf_path"
12633 EOF
12634
12635 no_x11_rgb=
12636 if test "$RGB_PATH" = no
12637 then
12638         no_x11_rgb="#"
12639 fi
12640
12641 ###   use option --with-bool to override bool's type
12642 echo "$as_me:12642: checking for type of bool" >&5
12643 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12644
12645 # Check whether --with-bool or --without-bool was given.
12646 if test "${with_bool+set}" = set; then
12647   withval="$with_bool"
12648   NCURSES_BOOL="$withval"
12649 else
12650   NCURSES_BOOL=auto
12651 fi;
12652 echo "$as_me:12652: result: $NCURSES_BOOL" >&5
12653 echo "${ECHO_T}$NCURSES_BOOL" >&6
12654
12655 echo "$as_me:12655: checking for alternate terminal capabilities file" >&5
12656 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12657
12658 # Check whether --with-caps or --without-caps was given.
12659 if test "${with_caps+set}" = set; then
12660   withval="$with_caps"
12661   TERMINFO_CAPS=Caps.$withval
12662 else
12663   TERMINFO_CAPS=Caps
12664 fi;
12665 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12666 echo "$as_me:12666: result: $TERMINFO_CAPS" >&5
12667 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12668
12669 ###   use option --with-chtype to override chtype's type
12670 echo "$as_me:12670: checking for type of chtype" >&5
12671 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12672
12673 # Check whether --with-chtype or --without-chtype was given.
12674 if test "${with_chtype+set}" = set; then
12675   withval="$with_chtype"
12676   NCURSES_CHTYPE="$withval"
12677 else
12678   NCURSES_CHTYPE=$cf_dft_chtype
12679 fi;
12680 echo "$as_me:12680: result: $NCURSES_CHTYPE" >&5
12681 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12682
12683 ###   use option --with-ospeed to override ospeed's type
12684 echo "$as_me:12684: checking for type of ospeed" >&5
12685 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12686
12687 # Check whether --with-ospeed or --without-ospeed was given.
12688 if test "${with_ospeed+set}" = set; then
12689   withval="$with_ospeed"
12690   NCURSES_OSPEED="$withval"
12691 else
12692   NCURSES_OSPEED=short
12693 fi;
12694 echo "$as_me:12694: result: $NCURSES_OSPEED" >&5
12695 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12696
12697 ###   use option --with-mmask-t to override mmask_t's type
12698 echo "$as_me:12698: checking for type of mmask_t" >&5
12699 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12700
12701 # Check whether --with-mmask-t or --without-mmask-t was given.
12702 if test "${with_mmask_t+set}" = set; then
12703   withval="$with_mmask_t"
12704   NCURSES_MMASK_T="$withval"
12705 else
12706   NCURSES_MMASK_T=$cf_dft_mmask_t
12707 fi;
12708 echo "$as_me:12708: result: $NCURSES_MMASK_T" >&5
12709 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12710
12711 ###   use option --with-ccharw-max to override CCHARW_MAX size
12712 echo "$as_me:12712: checking for size CCHARW_MAX" >&5
12713 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12714
12715 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12716 if test "${with_ccharw_max+set}" = set; then
12717   withval="$with_ccharw_max"
12718   NCURSES_CCHARW_MAX="$withval"
12719 else
12720   NCURSES_CCHARW_MAX=5
12721 fi;
12722 echo "$as_me:12722: result: $NCURSES_CCHARW_MAX" >&5
12723 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12724
12725 echo "$as_me:12725: checking for ANSI C header files" >&5
12726 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12727 if test "${ac_cv_header_stdc+set}" = set; then
12728   echo $ECHO_N "(cached) $ECHO_C" >&6
12729 else
12730   cat >conftest.$ac_ext <<_ACEOF
12731 #line 12731 "configure"
12732 #include "confdefs.h"
12733 #include <stdlib.h>
12734 #include <stdarg.h>
12735 #include <string.h>
12736 #include <float.h>
12737
12738 _ACEOF
12739 if { (eval echo "$as_me:12739: \"$ac_cpp conftest.$ac_ext\"") >&5
12740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12741   ac_status=$?
12742   egrep -v '^ *\+' conftest.er1 >conftest.err
12743   rm -f conftest.er1
12744   cat conftest.err >&5
12745   echo "$as_me:12745: \$? = $ac_status" >&5
12746   (exit $ac_status); } >/dev/null; then
12747   if test -s conftest.err; then
12748     ac_cpp_err=$ac_c_preproc_warn_flag
12749   else
12750     ac_cpp_err=
12751   fi
12752 else
12753   ac_cpp_err=yes
12754 fi
12755 if test -z "$ac_cpp_err"; then
12756   ac_cv_header_stdc=yes
12757 else
12758   echo "$as_me: failed program was:" >&5
12759   cat conftest.$ac_ext >&5
12760   ac_cv_header_stdc=no
12761 fi
12762 rm -f conftest.err conftest.$ac_ext
12763
12764 if test $ac_cv_header_stdc = yes; then
12765   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12766   cat >conftest.$ac_ext <<_ACEOF
12767 #line 12767 "configure"
12768 #include "confdefs.h"
12769 #include <string.h>
12770
12771 _ACEOF
12772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12773   egrep "memchr" >/dev/null 2>&1; then
12774   :
12775 else
12776   ac_cv_header_stdc=no
12777 fi
12778 rm -rf conftest*
12779
12780 fi
12781
12782 if test $ac_cv_header_stdc = yes; then
12783   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12784   cat >conftest.$ac_ext <<_ACEOF
12785 #line 12785 "configure"
12786 #include "confdefs.h"
12787 #include <stdlib.h>
12788
12789 _ACEOF
12790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12791   egrep "free" >/dev/null 2>&1; then
12792   :
12793 else
12794   ac_cv_header_stdc=no
12795 fi
12796 rm -rf conftest*
12797
12798 fi
12799
12800 if test $ac_cv_header_stdc = yes; then
12801   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12802   if test "$cross_compiling" = yes; then
12803   :
12804 else
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808 #include <ctype.h>
12809 #if ((' ' & 0x0FF) == 0x020)
12810 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12811 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12812 #else
12813 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12814                      || ('j' <= (c) && (c) <= 'r') \
12815                      || ('s' <= (c) && (c) <= 'z'))
12816 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12817 #endif
12818
12819 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12820 int
12821 main (void)
12822 {
12823   int i;
12824   for (i = 0; i < 256; i++)
12825     if (XOR (islower (i), ISLOWER (i))
12826         || toupper (i) != TOUPPER (i))
12827       $ac_main_return(2);
12828   $ac_main_return (0);
12829 }
12830 _ACEOF
12831 rm -f conftest$ac_exeext
12832 if { (eval echo "$as_me:12832: \"$ac_link\"") >&5
12833   (eval $ac_link) 2>&5
12834   ac_status=$?
12835   echo "$as_me:12835: \$? = $ac_status" >&5
12836   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12837   { (eval echo "$as_me:12837: \"$ac_try\"") >&5
12838   (eval $ac_try) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit $ac_status); }; }; then
12842   :
12843 else
12844   echo "$as_me: program exited with status $ac_status" >&5
12845 echo "$as_me: failed program was:" >&5
12846 cat conftest.$ac_ext >&5
12847 ac_cv_header_stdc=no
12848 fi
12849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12850 fi
12851 fi
12852 fi
12853 echo "$as_me:12853: result: $ac_cv_header_stdc" >&5
12854 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12855 if test $ac_cv_header_stdc = yes; then
12856
12857 cat >>confdefs.h <<\EOF
12858 #define STDC_HEADERS 1
12859 EOF
12860
12861 fi
12862
12863 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12864
12865 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12866                   inttypes.h stdint.h unistd.h
12867 do
12868 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12869 echo "$as_me:12869: checking for $ac_header" >&5
12870 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12871 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12872   echo $ECHO_N "(cached) $ECHO_C" >&6
12873 else
12874   cat >conftest.$ac_ext <<_ACEOF
12875 #line 12875 "configure"
12876 #include "confdefs.h"
12877 $ac_includes_default
12878 #include <$ac_header>
12879 _ACEOF
12880 rm -f conftest.$ac_objext
12881 if { (eval echo "$as_me:12881: \"$ac_compile\"") >&5
12882   (eval $ac_compile) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit $ac_status); } &&
12886          { ac_try='test -s conftest.$ac_objext'
12887   { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   eval "$as_ac_Header=yes"
12893 else
12894   echo "$as_me: failed program was:" >&5
12895 cat conftest.$ac_ext >&5
12896 eval "$as_ac_Header=no"
12897 fi
12898 rm -f conftest.$ac_objext conftest.$ac_ext
12899 fi
12900 echo "$as_me:12900: result: `eval echo '${'$as_ac_Header'}'`" >&5
12901 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12902 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12903   cat >>confdefs.h <<EOF
12904 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12905 EOF
12906
12907 fi
12908 done
12909
12910 echo "$as_me:12910: checking for signed char" >&5
12911 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12912 if test "${ac_cv_type_signed_char+set}" = set; then
12913   echo $ECHO_N "(cached) $ECHO_C" >&6
12914 else
12915   cat >conftest.$ac_ext <<_ACEOF
12916 #line 12916 "configure"
12917 #include "confdefs.h"
12918 $ac_includes_default
12919 int
12920 main (void)
12921 {
12922 if ((signed char *) 0)
12923   return 0;
12924 if (sizeof (signed char))
12925   return 0;
12926   ;
12927   return 0;
12928 }
12929 _ACEOF
12930 rm -f conftest.$ac_objext
12931 if { (eval echo "$as_me:12931: \"$ac_compile\"") >&5
12932   (eval $ac_compile) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); } &&
12936          { ac_try='test -s conftest.$ac_objext'
12937   { (eval echo "$as_me:12937: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit $ac_status); }; }; then
12942   ac_cv_type_signed_char=yes
12943 else
12944   echo "$as_me: failed program was:" >&5
12945 cat conftest.$ac_ext >&5
12946 ac_cv_type_signed_char=no
12947 fi
12948 rm -f conftest.$ac_objext conftest.$ac_ext
12949 fi
12950 echo "$as_me:12950: result: $ac_cv_type_signed_char" >&5
12951 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12952
12953 echo "$as_me:12953: checking size of signed char" >&5
12954 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12955 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958   if test "$ac_cv_type_signed_char" = yes; then
12959   if test "$cross_compiling" = yes; then
12960   # Depending upon the size, compute the lo and hi bounds.
12961 cat >conftest.$ac_ext <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964 $ac_includes_default
12965 int
12966 main (void)
12967 {
12968 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12969   ;
12970   return 0;
12971 }
12972 _ACEOF
12973 rm -f conftest.$ac_objext
12974 if { (eval echo "$as_me:12974: \"$ac_compile\"") >&5
12975   (eval $ac_compile) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); } &&
12979          { ac_try='test -s conftest.$ac_objext'
12980   { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); }; }; then
12985   ac_lo=0 ac_mid=0
12986   while :; do
12987     cat >conftest.$ac_ext <<_ACEOF
12988 #line 12988 "configure"
12989 #include "confdefs.h"
12990 $ac_includes_default
12991 int
12992 main (void)
12993 {
12994 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12995   ;
12996   return 0;
12997 }
12998 _ACEOF
12999 rm -f conftest.$ac_objext
13000 if { (eval echo "$as_me:13000: \"$ac_compile\"") >&5
13001   (eval $ac_compile) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); } &&
13005          { ac_try='test -s conftest.$ac_objext'
13006   { (eval echo "$as_me:13006: \"$ac_try\"") >&5
13007   (eval $ac_try) 2>&5
13008   ac_status=$?
13009   echo "$as_me:13009: \$? = $ac_status" >&5
13010   (exit $ac_status); }; }; then
13011   ac_hi=$ac_mid; break
13012 else
13013   echo "$as_me: failed program was:" >&5
13014 cat conftest.$ac_ext >&5
13015 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13016 fi
13017 rm -f conftest.$ac_objext conftest.$ac_ext
13018   done
13019 else
13020   echo "$as_me: failed program was:" >&5
13021 cat conftest.$ac_ext >&5
13022 ac_hi=-1 ac_mid=-1
13023   while :; do
13024     cat >conftest.$ac_ext <<_ACEOF
13025 #line 13025 "configure"
13026 #include "confdefs.h"
13027 $ac_includes_default
13028 int
13029 main (void)
13030 {
13031 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13032   ;
13033   return 0;
13034 }
13035 _ACEOF
13036 rm -f conftest.$ac_objext
13037 if { (eval echo "$as_me:13037: \"$ac_compile\"") >&5
13038   (eval $ac_compile) 2>&5
13039   ac_status=$?
13040   echo "$as_me:13040: \$? = $ac_status" >&5
13041   (exit $ac_status); } &&
13042          { ac_try='test -s conftest.$ac_objext'
13043   { (eval echo "$as_me:13043: \"$ac_try\"") >&5
13044   (eval $ac_try) 2>&5
13045   ac_status=$?
13046   echo "$as_me:13046: \$? = $ac_status" >&5
13047   (exit $ac_status); }; }; then
13048   ac_lo=$ac_mid; break
13049 else
13050   echo "$as_me: failed program was:" >&5
13051 cat conftest.$ac_ext >&5
13052 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13053 fi
13054 rm -f conftest.$ac_objext conftest.$ac_ext
13055   done
13056 fi
13057 rm -f conftest.$ac_objext conftest.$ac_ext
13058 # Binary search between lo and hi bounds.
13059 while test "x$ac_lo" != "x$ac_hi"; do
13060   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13061   cat >conftest.$ac_ext <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13064 $ac_includes_default
13065 int
13066 main (void)
13067 {
13068 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13069   ;
13070   return 0;
13071 }
13072 _ACEOF
13073 rm -f conftest.$ac_objext
13074 if { (eval echo "$as_me:13074: \"$ac_compile\"") >&5
13075   (eval $ac_compile) 2>&5
13076   ac_status=$?
13077   echo "$as_me:13077: \$? = $ac_status" >&5
13078   (exit $ac_status); } &&
13079          { ac_try='test -s conftest.$ac_objext'
13080   { (eval echo "$as_me:13080: \"$ac_try\"") >&5
13081   (eval $ac_try) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); }; }; then
13085   ac_hi=$ac_mid
13086 else
13087   echo "$as_me: failed program was:" >&5
13088 cat conftest.$ac_ext >&5
13089 ac_lo=`expr $ac_mid + 1`
13090 fi
13091 rm -f conftest.$ac_objext conftest.$ac_ext
13092 done
13093 ac_cv_sizeof_signed_char=$ac_lo
13094 else
13095   if test "$cross_compiling" = yes; then
13096   { { echo "$as_me:13096: error: cannot run test program while cross compiling" >&5
13097 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13098    { (exit 1); exit 1; }; }
13099 else
13100   cat >conftest.$ac_ext <<_ACEOF
13101 #line 13101 "configure"
13102 #include "confdefs.h"
13103 $ac_includes_default
13104 int
13105 main (void)
13106 {
13107 FILE *f = fopen ("conftest.val", "w");
13108 if (!f)
13109   $ac_main_return (1);
13110 fprintf (f, "%d", (sizeof (signed char)));
13111 fclose (f);
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest$ac_exeext
13117 if { (eval echo "$as_me:13117: \"$ac_link\"") >&5
13118   (eval $ac_link) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13122   { (eval echo "$as_me:13122: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   ac_cv_sizeof_signed_char=`cat conftest.val`
13128 else
13129   echo "$as_me: program exited with status $ac_status" >&5
13130 echo "$as_me: failed program was:" >&5
13131 cat conftest.$ac_ext >&5
13132 fi
13133 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13134 fi
13135 fi
13136 rm -f conftest.val
13137 else
13138   ac_cv_sizeof_signed_char=0
13139 fi
13140 fi
13141 echo "$as_me:13141: result: $ac_cv_sizeof_signed_char" >&5
13142 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13143 cat >>confdefs.h <<EOF
13144 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13145 EOF
13146
13147 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13148         NCURSES_SBOOL="signed char"
13149 else
13150         NCURSES_SBOOL="char"
13151 fi
13152 echo "$as_me:13152: checking if you want to use signed Boolean array in term.h" >&5
13153 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13154
13155 # Check whether --enable-signed-char or --disable-signed-char was given.
13156 if test "${enable_signed_char+set}" = set; then
13157   enableval="$enable_signed_char"
13158   with_signed_char=$enableval
13159 else
13160   with_signed_char=no
13161 fi;
13162 echo "$as_me:13162: result: $with_signed_char" >&5
13163 echo "${ECHO_T}$with_signed_char" >&6
13164 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13165
13166 ###   use option --with-tparm-arg to override tparm's argument type
13167 echo "$as_me:13167: checking for type of tparm args" >&5
13168 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13169
13170 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13171 if test "${with_tparm_arg+set}" = set; then
13172   withval="$with_tparm_arg"
13173   NCURSES_TPARM_ARG="$withval"
13174 else
13175   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13176 fi;
13177 echo "$as_me:13177: result: $NCURSES_TPARM_ARG" >&5
13178 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13179
13180 ### Enable compiling-in rcs id's
13181 echo "$as_me:13181: checking if RCS identifiers should be compiled-in" >&5
13182 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13183
13184 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13185 if test "${with_rcs_ids+set}" = set; then
13186   withval="$with_rcs_ids"
13187   with_rcs_ids=$withval
13188 else
13189   with_rcs_ids=no
13190 fi;
13191 echo "$as_me:13191: result: $with_rcs_ids" >&5
13192 echo "${ECHO_T}$with_rcs_ids" >&6
13193 test "x$with_rcs_ids" = xyes &&
13194 cat >>confdefs.h <<\EOF
13195 #define USE_RCS_IDS 1
13196 EOF
13197
13198 ###############################################################################
13199
13200 echo "$as_me:13200: checking format of man-pages" >&5
13201 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13202
13203 # Check whether --with-manpage-format or --without-manpage-format was given.
13204 if test "${with_manpage_format+set}" = set; then
13205   withval="$with_manpage_format"
13206   MANPAGE_FORMAT=$withval
13207 else
13208   MANPAGE_FORMAT=unknown
13209 fi;
13210
13211 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13212 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13213
13214 cf_unknown=
13215
13216 case $MANPAGE_FORMAT in
13217 (unknown)
13218         if test -z "$MANPATH" ; then
13219                 MANPATH="/usr/man:/usr/share/man"
13220         fi
13221
13222         # look for the 'date' man-page (it's most likely to be installed!)
13223         MANPAGE_FORMAT=
13224         cf_preform=no
13225         cf_catonly=yes
13226         cf_example=date
13227
13228         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13229         for cf_dir in $MANPATH; do
13230                 test -z "$cf_dir" && cf_dir=/usr/man
13231                 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
13232                 do
13233                         cf_test=`echo $cf_name | sed -e 's/*//'`
13234                         if test "x$cf_test" = "x$cf_name" ; then
13235
13236                                 case "$cf_name" in
13237                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13238                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13239                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13240                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13241                                 esac
13242
13243                                 case "$cf_name" in
13244                                 ($cf_dir/man*)
13245                                         cf_catonly=no
13246                                         ;;
13247                                 ($cf_dir/cat*)
13248                                         cf_preform=yes
13249                                         ;;
13250                                 esac
13251                                 break
13252                         fi
13253
13254                         # if we found a match in either man* or cat*, stop looking
13255                         if test -n "$MANPAGE_FORMAT" ; then
13256                                 cf_found=no
13257                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13258                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13259                                 case "$cf_name" in
13260                                 ($cf_dir/cat*)
13261                                         cf_found=yes
13262                                         ;;
13263                                 esac
13264                                 test $cf_found=yes && break
13265                         fi
13266                 done
13267                 # only check the first directory in $MANPATH where we find manpages
13268                 if test -n "$MANPAGE_FORMAT" ; then
13269                         break
13270                 fi
13271         done
13272         # if we did not find the example, just assume it is normal
13273         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13274         IFS="$ac_save_ifs"
13275         ;;
13276 (*)
13277         for cf_option in $MANPAGE_FORMAT; do
13278         case $cf_option in
13279         (gzip|compress|BSDI|normal|formatted|catonly)
13280                 ;;
13281         (*)
13282                 cf_unknown="$cf_unknown $cf_option"
13283                 ;;
13284         esac
13285         done
13286         ;;
13287 esac
13288
13289 echo "$as_me:13289: result: $MANPAGE_FORMAT" >&5
13290 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13291 if test -n "$cf_unknown" ; then
13292         { echo "$as_me:13292: WARNING: Unexpected manpage-format $cf_unknown" >&5
13293 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13294 fi
13295
13296 echo "$as_me:13296: checking for manpage renaming" >&5
13297 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13298
13299 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13300 if test "${with_manpage_renames+set}" = set; then
13301   withval="$with_manpage_renames"
13302   MANPAGE_RENAMES=$withval
13303 else
13304   MANPAGE_RENAMES=yes
13305 fi;
13306
13307 case ".$MANPAGE_RENAMES" in
13308 (.no)
13309         ;;
13310 (.|.yes)
13311         # Debian 'man' program?
13312         if test -f /etc/debian_version ; then
13313                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13314         else
13315                 MANPAGE_RENAMES=no
13316         fi
13317         ;;
13318 esac
13319
13320 if test "$MANPAGE_RENAMES" != no ; then
13321         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13322                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13323         elif test ! -f $MANPAGE_RENAMES ; then
13324                 { { echo "$as_me:13324: error: not a filename: $MANPAGE_RENAMES" >&5
13325 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13326    { (exit 1); exit 1; }; }
13327         fi
13328
13329         test ! -d man && mkdir man
13330
13331         # Construct a sed-script to perform renaming within man-pages
13332         if test -n "$MANPAGE_RENAMES" ; then
13333                 test ! -d man && mkdir man
13334                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13335         fi
13336 fi
13337
13338 echo "$as_me:13338: result: $MANPAGE_RENAMES" >&5
13339 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13340
13341 echo "$as_me:13341: checking if manpage aliases will be installed" >&5
13342 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13343
13344 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13345 if test "${with_manpage_aliases+set}" = set; then
13346   withval="$with_manpage_aliases"
13347   MANPAGE_ALIASES=$withval
13348 else
13349   MANPAGE_ALIASES=yes
13350 fi;
13351
13352 echo "$as_me:13352: result: $MANPAGE_ALIASES" >&5
13353 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13354
13355 case "x$LN_S" in
13356 (xln*)
13357         cf_use_symlinks=yes
13358         ;;
13359 (*)
13360         cf_use_symlinks=no
13361         ;;
13362 esac
13363
13364 MANPAGE_SYMLINKS=no
13365 if test "$MANPAGE_ALIASES" = yes ; then
13366 echo "$as_me:13366: checking if manpage symlinks should be used" >&5
13367 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13368
13369 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13370 if test "${with_manpage_symlinks+set}" = set; then
13371   withval="$with_manpage_symlinks"
13372   MANPAGE_SYMLINKS=$withval
13373 else
13374   MANPAGE_SYMLINKS=$cf_use_symlinks
13375 fi;
13376
13377 if test "$$cf_use_symlinks" = no; then
13378 if test "$MANPAGE_SYMLINKS" = yes ; then
13379         { echo "$as_me:13379: WARNING: cannot make symlinks" >&5
13380 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13381         MANPAGE_SYMLINKS=no
13382 fi
13383 fi
13384
13385 echo "$as_me:13385: result: $MANPAGE_SYMLINKS" >&5
13386 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13387 fi
13388
13389 echo "$as_me:13389: checking for manpage tbl" >&5
13390 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13391
13392 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13393 if test "${with_manpage_tbl+set}" = set; then
13394   withval="$with_manpage_tbl"
13395   MANPAGE_TBL=$withval
13396 else
13397   MANPAGE_TBL=no
13398 fi;
13399
13400 echo "$as_me:13400: result: $MANPAGE_TBL" >&5
13401 echo "${ECHO_T}$MANPAGE_TBL" >&6
13402
13403 if test "$prefix" = "NONE" ; then
13404         cf_prefix="$ac_default_prefix"
13405 else
13406         cf_prefix="$prefix"
13407 fi
13408
13409 case "$MANPAGE_FORMAT" in
13410 (*catonly*)
13411         cf_format=yes
13412         cf_inboth=no
13413         ;;
13414 (*formatted*)
13415         cf_format=yes
13416         cf_inboth=yes
13417         ;;
13418 (*)
13419         cf_format=no
13420         cf_inboth=no
13421         ;;
13422 esac
13423
13424 test ! -d man && mkdir man
13425
13426 cf_so_strip=
13427 cf_compress=
13428 case "$MANPAGE_FORMAT" in
13429 (*compress*)
13430         cf_so_strip="Z"
13431         cf_compress=compress
13432         ;;
13433 (*gzip*)
13434         cf_so_strip="gz"
13435         cf_compress=gzip
13436         ;;
13437 esac
13438
13439 cf_edit_man=./edit_man.sh
13440 cf_man_alias=`pwd`/man_alias.sed
13441
13442 cat >$cf_edit_man <<CF_EOF
13443 #! $SHELL
13444 # this script is generated by the configure-script CF_MAN_PAGES macro.
13445
13446 prefix="$cf_prefix"
13447 datarootdir="$datarootdir"
13448 datadir="$datadir"
13449
13450 NCURSES_MAJOR="$NCURSES_MAJOR"
13451 NCURSES_MINOR="$NCURSES_MINOR"
13452 NCURSES_PATCH="$NCURSES_PATCH"
13453
13454 NCURSES_OSPEED="$NCURSES_OSPEED"
13455 TERMINFO="$TERMINFO"
13456
13457 INSTALL="$INSTALL"
13458 INSTALL_DATA="$INSTALL_DATA"
13459
13460 transform="$program_transform_name"
13461
13462 TMP=\${TMPDIR:=/tmp}/man\$\$
13463 trap "rm -f \$TMP" 0 1 2 3 15
13464
13465 form=\$1
13466 shift || exit 1
13467
13468 verb=\$1
13469 shift || exit 1
13470
13471 mandir=\$1
13472 shift || exit 1
13473
13474 srcdir=\$1
13475 top_srcdir=\$srcdir/..
13476 shift || exit 1
13477
13478 if test "\$form" = normal ; then
13479         if test "$cf_format" = yes ; then
13480         if test "$cf_inboth" = no ; then
13481                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13482                 exit $?
13483         fi
13484         fi
13485         cf_subdir=\$mandir/man
13486         cf_tables=$MANPAGE_TBL
13487 else
13488         cf_subdir=\$mandir/cat
13489         cf_tables=yes
13490 fi
13491
13492 # process the list of source-files
13493 for i in \$* ; do
13494 case \$i in
13495 (*.orig|*.rej) ;;
13496 (*.[0-9]*)
13497         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13498         if test \$verb = installing ; then
13499         if test ! -d \$cf_subdir\${section} ; then
13500                 mkdir -p \$cf_subdir\$section
13501         fi
13502         fi
13503
13504         # replace variables in man page
13505         if test ! -f $cf_man_alias ; then
13506 cat >>$cf_man_alias <<-CF_EOF2
13507                 s,@DATADIR@,\$datadir,g
13508                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13509                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13510                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13511                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13512                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13513                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13514 CF_EOF
13515
13516         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13517         do
13518                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13519                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13520 cat >>$cf_edit_man <<-CF_EOF
13521                 s,@$cf_NAME@,$cf_name,g
13522 CF_EOF
13523         done
13524
13525 cat >>$cf_edit_man <<CF_EOF
13526 CF_EOF2
13527                 echo "...made $cf_man_alias"
13528         fi
13529
13530         aliases=
13531         cf_source=\`basename \$i\`
13532         inalias=\$cf_source
13533         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13534         if test ! -f \$inalias ; then
13535                 echo .. skipped \$cf_source
13536                 continue
13537         fi
13538 CF_EOF
13539
13540 if test "$MANPAGE_ALIASES" != no ; then
13541 cat >>$cf_edit_man <<CF_EOF
13542         nCurses=ignore.3x
13543         test $with_curses_h = yes && nCurses=ncurses.3x
13544         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13545 CF_EOF
13546 fi
13547
13548 if test "$MANPAGE_RENAMES" = no ; then
13549 cat >>$cf_edit_man <<CF_EOF
13550         # perform program transformations for section 1 man pages
13551         if test \$section = 1 ; then
13552                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13553         else
13554                 cf_target=\$cf_subdir\${section}/\$cf_source
13555         fi
13556 CF_EOF
13557 else
13558 cat >>$cf_edit_man <<CF_EOF
13559         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13560         if test -z "\$cf_target" ; then
13561                 echo '? missing rename for '\$cf_source
13562                 cf_target="\$cf_source"
13563         fi
13564         cf_target="\$cf_subdir\${section}/\${cf_target}"
13565
13566 CF_EOF
13567 fi
13568
13569 cat >>$cf_edit_man <<CF_EOF
13570         sed     -f $cf_man_alias \\
13571 CF_EOF
13572
13573 if test -f $MANPAGE_RENAMES ; then
13574 cat >>$cf_edit_man <<CF_EOF
13575                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13576 CF_EOF
13577 else
13578 cat >>$cf_edit_man <<CF_EOF
13579                 < \$i >\$TMP
13580 CF_EOF
13581 fi
13582
13583 cat >>$cf_edit_man <<CF_EOF
13584 if test \$cf_tables = yes ; then
13585         tbl \$TMP >\$TMP.out
13586         mv \$TMP.out \$TMP
13587 fi
13588 CF_EOF
13589
13590 if test $with_overwrite != yes ; then
13591 cat >>$cf_edit_man <<CF_EOF
13592         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13593         mv \$TMP.out \$TMP
13594 CF_EOF
13595 fi
13596
13597 if test $with_curses_h != yes ; then
13598 cat >>$cf_edit_man <<CF_EOF
13599         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13600         mv \$TMP.out \$TMP
13601 CF_EOF
13602 fi
13603
13604 cat >>$cf_edit_man <<CF_EOF
13605         if test \$form = format ; then
13606                 nroff -man \$TMP >\$TMP.out
13607                 mv \$TMP.out \$TMP
13608         fi
13609 CF_EOF
13610
13611 if test -n "$cf_compress" ; then
13612 cat >>$cf_edit_man <<CF_EOF
13613         if test \$verb = installing ; then
13614         if ( $cf_compress -f \$TMP )
13615         then
13616                 mv \$TMP.$cf_so_strip \$TMP
13617         fi
13618         fi
13619         cf_target="\$cf_target.$cf_so_strip"
13620 CF_EOF
13621 fi
13622
13623 case "$MANPAGE_FORMAT" in
13624 (*BSDI*)
13625 cat >>$cf_edit_man <<CF_EOF
13626         if test \$form = format ; then
13627                 # BSDI installs only .0 suffixes in the cat directories
13628                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13629         fi
13630 CF_EOF
13631   ;;
13632 esac
13633
13634 cat >>$cf_edit_man <<CF_EOF
13635         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13636         if test \$verb = installing ; then
13637                 echo \$verb \$cf_target
13638                 \$INSTALL_DATA \$TMP \$cf_target
13639                 test -d \$cf_subdir\${section} &&
13640                 test -n "\$aliases" && (
13641                         cd \$cf_subdir\${section} && (
13642                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13643                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13644                                 cf_target=\`basename \$cf_target\`
13645                                 for cf_alias in \$aliases
13646                                 do
13647                                         if test \$section = 1 ; then
13648                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13649                                         fi
13650
13651                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13652                                                 if test -f \$cf_alias\${suffix} ; then
13653                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13654                                                         then
13655                                                                 continue
13656                                                         fi
13657                                                 fi
13658                                                 echo .. \$verb alias \$cf_alias\${suffix}
13659 CF_EOF
13660 case "x$LN_S" in
13661 (*-f)
13662 cat >>$cf_edit_man <<CF_EOF
13663                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13664 CF_EOF
13665         ;;
13666 (*)
13667 cat >>$cf_edit_man <<CF_EOF
13668                                                 rm -f \$cf_alias\${suffix}
13669                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13670 CF_EOF
13671         ;;
13672 esac
13673 cat >>$cf_edit_man <<CF_EOF
13674                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13675                                                 echo ".so \$cf_source" >\$TMP
13676 CF_EOF
13677 if test -n "$cf_compress" ; then
13678 cat >>$cf_edit_man <<CF_EOF
13679                                                 if test -n "$cf_so_strip" ; then
13680                                                         $cf_compress -f \$TMP
13681                                                         mv \$TMP.$cf_so_strip \$TMP
13682                                                 fi
13683 CF_EOF
13684 fi
13685 cat >>$cf_edit_man <<CF_EOF
13686                                                 echo .. \$verb alias \$cf_alias\${suffix}
13687                                                 rm -f \$cf_alias\${suffix}
13688                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13689                                         fi
13690                                 done
13691                         )
13692                 )
13693         elif test \$verb = removing ; then
13694                 test -f \$cf_target && (
13695                         echo \$verb \$cf_target
13696                         rm -f \$cf_target
13697                 )
13698                 test -d \$cf_subdir\${section} &&
13699                 test -n "\$aliases" && (
13700                         cd \$cf_subdir\${section} && (
13701                                 for cf_alias in \$aliases
13702                                 do
13703                                         if test \$section = 1 ; then
13704                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13705                                         fi
13706
13707                                         echo .. \$verb alias \$cf_alias\${suffix}
13708                                         rm -f \$cf_alias\${suffix}
13709                                 done
13710                         )
13711                 )
13712         else
13713 #               echo ".hy 0"
13714                 cat \$TMP
13715         fi
13716         ;;
13717 esac
13718 done
13719
13720 if test $cf_inboth = yes ; then
13721 if test \$form != format ; then
13722         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13723 fi
13724 fi
13725
13726 exit 0
13727 CF_EOF
13728 chmod 755 $cf_edit_man
13729
13730 ###############################################################################
13731
13732 ### Note that some functions (such as const) are normally disabled anyway.
13733 echo "$as_me:13733: checking if you want to build with function extensions" >&5
13734 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13735
13736 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13737 if test "${enable_ext_funcs+set}" = set; then
13738   enableval="$enable_ext_funcs"
13739   with_ext_funcs=$enableval
13740 else
13741   with_ext_funcs=yes
13742 fi;
13743 echo "$as_me:13743: result: $with_ext_funcs" >&5
13744 echo "${ECHO_T}$with_ext_funcs" >&6
13745 if test "x$with_ext_funcs" = xyes ; then
13746         NCURSES_EXT_FUNCS=1
13747
13748 cat >>confdefs.h <<\EOF
13749 #define NCURSES_EXT_FUNCS 1
13750 EOF
13751
13752 cat >>confdefs.h <<\EOF
13753 #define HAVE_ASSUME_DEFAULT_COLORS 1
13754 EOF
13755
13756 cat >>confdefs.h <<\EOF
13757 #define HAVE_CURSES_VERSION 1
13758 EOF
13759
13760 cat >>confdefs.h <<\EOF
13761 #define HAVE_HAS_KEY 1
13762 EOF
13763
13764 cat >>confdefs.h <<\EOF
13765 #define HAVE_RESIZETERM 1
13766 EOF
13767
13768 cat >>confdefs.h <<\EOF
13769 #define HAVE_RESIZE_TERM 1
13770 EOF
13771
13772 cat >>confdefs.h <<\EOF
13773 #define HAVE_TERM_ENTRY_H 1
13774 EOF
13775
13776 cat >>confdefs.h <<\EOF
13777 #define HAVE_USE_DEFAULT_COLORS 1
13778 EOF
13779
13780 cat >>confdefs.h <<\EOF
13781 #define HAVE_USE_EXTENDED_NAMES 1
13782 EOF
13783
13784 cat >>confdefs.h <<\EOF
13785 #define HAVE_USE_SCREEN 1
13786 EOF
13787
13788 cat >>confdefs.h <<\EOF
13789 #define HAVE_USE_WINDOW 1
13790 EOF
13791
13792 cat >>confdefs.h <<\EOF
13793 #define HAVE_WRESIZE 1
13794 EOF
13795
13796         GENERATED_EXT_FUNCS=generated
13797         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13798 else
13799         NCURSES_EXT_FUNCS=0
13800         GENERATED_EXT_FUNCS=
13801 fi
13802
13803 echo "$as_me:13803: checking if you want to build with SCREEN extensions" >&5
13804 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13805
13806 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13807 if test "${enable_sp_funcs+set}" = set; then
13808   enableval="$enable_sp_funcs"
13809   with_sp_funcs=$enableval
13810 else
13811   with_sp_funcs=$cf_dft_ext_spfuncs
13812 fi;
13813 echo "$as_me:13813: result: $with_sp_funcs" >&5
13814 echo "${ECHO_T}$with_sp_funcs" >&6
13815 if test "x$with_sp_funcs" = xyes ; then
13816         NCURSES_SP_FUNCS=1
13817
13818 cat >>confdefs.h <<\EOF
13819 #define NCURSES_SP_FUNCS 1
13820 EOF
13821
13822 cat >>confdefs.h <<\EOF
13823 #define HAVE_TPUTS_SP 1
13824 EOF
13825
13826         GENERATED_SP_FUNCS=generated
13827 else
13828         NCURSES_SP_FUNCS=0
13829         GENERATED_SP_FUNCS=
13830 fi
13831
13832 echo "$as_me:13832: checking if you want to build with terminal-driver" >&5
13833 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13834
13835 # Check whether --enable-term-driver or --disable-term-driver was given.
13836 if test "${enable_term_driver+set}" = set; then
13837   enableval="$enable_term_driver"
13838   with_term_driver=$enableval
13839 else
13840   with_term_driver=no
13841 fi;
13842 echo "$as_me:13842: result: $with_term_driver" >&5
13843 echo "${ECHO_T}$with_term_driver" >&6
13844 if test "x$with_term_driver" = xyes ; then
13845
13846 cat >>confdefs.h <<\EOF
13847 #define USE_TERM_DRIVER 1
13848 EOF
13849
13850         if test "x$with_termlib" != xno ; then
13851                 { { echo "$as_me:13851: error: The term-driver option conflicts with the termlib option" >&5
13852 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13853    { (exit 1); exit 1; }; }
13854         fi
13855         if test "x$with_sp_funcs" != xyes ; then
13856                 { { echo "$as_me:13856: error: The term-driver option relies upon sp-funcs" >&5
13857 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13858    { (exit 1); exit 1; }; }
13859         fi
13860 fi
13861
13862 ###   use option --enable-const to turn on use of const beyond that in XSI.
13863 echo "$as_me:13863: checking for extended use of const keyword" >&5
13864 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13865
13866 # Check whether --enable-const or --disable-const was given.
13867 if test "${enable_const+set}" = set; then
13868   enableval="$enable_const"
13869   with_ext_const=$enableval
13870 else
13871   with_ext_const=$cf_dft_ext_const
13872 fi;
13873 echo "$as_me:13873: result: $with_ext_const" >&5
13874 echo "${ECHO_T}$with_ext_const" >&6
13875 NCURSES_CONST='/*nothing*/'
13876 if test "x$with_ext_const" = xyes ; then
13877         NCURSES_CONST=const
13878 fi
13879
13880 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13881 echo "$as_me:13881: checking if you want to use extended colors" >&5
13882 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13883
13884 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13885 if test "${enable_ext_colors+set}" = set; then
13886   enableval="$enable_ext_colors"
13887   with_ext_colors=$enableval
13888 else
13889   with_ext_colors=$cf_dft_ext_colors
13890 fi;
13891 echo "$as_me:13891: result: $with_ext_colors" >&5
13892 echo "${ECHO_T}$with_ext_colors" >&6
13893 NCURSES_EXT_COLORS=0
13894 if test "x$with_ext_colors" = xyes ; then
13895         if test "x$with_widec" != xyes ; then
13896                 { echo "$as_me:13896: WARNING: This option applies only to wide-character library" >&5
13897 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13898         else
13899                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13900
13901 if test "${with_abi_version+set}" != set; then
13902         case $cf_cv_rel_version in
13903         (5.*)
13904                 cf_cv_rel_version=6.0
13905                 cf_cv_abi_version=6
13906                 { echo "$as_me:13906: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13907 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13908                 ;;
13909         esac
13910 fi
13911
13912                 NCURSES_EXT_COLORS=1
13913
13914 cat >>confdefs.h <<\EOF
13915 #define NCURSES_EXT_COLORS 1
13916 EOF
13917
13918 cat >>confdefs.h <<\EOF
13919 #define HAVE_ALLOC_PAIR 1
13920 EOF
13921
13922 cat >>confdefs.h <<\EOF
13923 #define HAVE_INIT_EXTENDED_COLOR 1
13924 EOF
13925
13926 cat >>confdefs.h <<\EOF
13927 #define HAVE_RESET_COLOR_PAIRS 1
13928 EOF
13929
13930         fi
13931 fi
13932
13933 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13934 echo "$as_me:13934: checking if you want to use extended mouse encoding" >&5
13935 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13936
13937 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13938 if test "${enable_ext_mouse+set}" = set; then
13939   enableval="$enable_ext_mouse"
13940   with_ext_mouse=$enableval
13941 else
13942   with_ext_mouse=$cf_dft_ext_mouse
13943 fi;
13944 echo "$as_me:13944: result: $with_ext_mouse" >&5
13945 echo "${ECHO_T}$with_ext_mouse" >&6
13946 NCURSES_MOUSE_VERSION=1
13947 if test "x$with_ext_mouse" = xyes ; then
13948         NCURSES_MOUSE_VERSION=2
13949
13950 if test "${with_abi_version+set}" != set; then
13951         case $cf_cv_rel_version in
13952         (5.*)
13953                 cf_cv_rel_version=6.0
13954                 cf_cv_abi_version=6
13955                 { echo "$as_me:13955: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13956 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13957                 ;;
13958         esac
13959 fi
13960
13961 fi
13962
13963 ###   use option --enable-ext-putwin to turn on extended screendumps
13964 echo "$as_me:13964: checking if you want to use extended putwin/screendump" >&5
13965 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13966
13967 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13968 if test "${enable_ext_putwin+set}" = set; then
13969   enableval="$enable_ext_putwin"
13970   with_ext_putwin=$enableval
13971 else
13972   with_ext_putwin=$cf_dft_ext_putwin
13973 fi;
13974 echo "$as_me:13974: result: $with_ext_putwin" >&5
13975 echo "${ECHO_T}$with_ext_putwin" >&6
13976 if test "x$with_ext_putwin" = xyes ; then
13977
13978 cat >>confdefs.h <<\EOF
13979 #define NCURSES_EXT_PUTWIN 1
13980 EOF
13981
13982 fi
13983
13984 echo "$as_me:13984: checking if you want \$NCURSES_NO_PADDING code" >&5
13985 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13986
13987 # Check whether --enable-no-padding or --disable-no-padding was given.
13988 if test "${enable_no_padding+set}" = set; then
13989   enableval="$enable_no_padding"
13990   with_no_padding=$enableval
13991 else
13992   with_no_padding=$with_ext_funcs
13993 fi;
13994 echo "$as_me:13994: result: $with_no_padding" >&5
13995 echo "${ECHO_T}$with_no_padding" >&6
13996 test "x$with_no_padding" = xyes &&
13997 cat >>confdefs.h <<\EOF
13998 #define NCURSES_NO_PADDING 1
13999 EOF
14000
14001 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14002 echo "$as_me:14002: checking if you want SIGWINCH handler" >&5
14003 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14004
14005 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14006 if test "${enable_sigwinch+set}" = set; then
14007   enableval="$enable_sigwinch"
14008   with_sigwinch=$enableval
14009 else
14010   with_sigwinch=$with_ext_funcs
14011 fi;
14012 echo "$as_me:14012: result: $with_sigwinch" >&5
14013 echo "${ECHO_T}$with_sigwinch" >&6
14014 test "x$with_sigwinch" = xyes &&
14015 cat >>confdefs.h <<\EOF
14016 #define USE_SIGWINCH 1
14017 EOF
14018
14019 ###   use option --enable-tcap-names to allow user to define new capabilities
14020 echo "$as_me:14020: checking if you want user-definable terminal capabilities like termcap" >&5
14021 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14022
14023 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14024 if test "${enable_tcap_names+set}" = set; then
14025   enableval="$enable_tcap_names"
14026   with_tcap_names=$enableval
14027 else
14028   with_tcap_names=$with_ext_funcs
14029 fi;
14030 echo "$as_me:14030: result: $with_tcap_names" >&5
14031 echo "${ECHO_T}$with_tcap_names" >&6
14032 NCURSES_XNAMES=0
14033 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14034
14035 ##############################################################################
14036
14037 echo "$as_me:14037: checking if you want to link with the pthread library" >&5
14038 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14039
14040 # Check whether --with-pthread or --without-pthread was given.
14041 if test "${with_pthread+set}" = set; then
14042   withval="$with_pthread"
14043   with_pthread=$withval
14044 else
14045   with_pthread=no
14046 fi;
14047 echo "$as_me:14047: result: $with_pthread" >&5
14048 echo "${ECHO_T}$with_pthread" >&6
14049
14050 if test "$with_pthread" != no ; then
14051         echo "$as_me:14051: checking for pthread.h" >&5
14052 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14053 if test "${ac_cv_header_pthread_h+set}" = set; then
14054   echo $ECHO_N "(cached) $ECHO_C" >&6
14055 else
14056   cat >conftest.$ac_ext <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059 #include <pthread.h>
14060 _ACEOF
14061 if { (eval echo "$as_me:14061: \"$ac_cpp conftest.$ac_ext\"") >&5
14062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14063   ac_status=$?
14064   egrep -v '^ *\+' conftest.er1 >conftest.err
14065   rm -f conftest.er1
14066   cat conftest.err >&5
14067   echo "$as_me:14067: \$? = $ac_status" >&5
14068   (exit $ac_status); } >/dev/null; then
14069   if test -s conftest.err; then
14070     ac_cpp_err=$ac_c_preproc_warn_flag
14071   else
14072     ac_cpp_err=
14073   fi
14074 else
14075   ac_cpp_err=yes
14076 fi
14077 if test -z "$ac_cpp_err"; then
14078   ac_cv_header_pthread_h=yes
14079 else
14080   echo "$as_me: failed program was:" >&5
14081   cat conftest.$ac_ext >&5
14082   ac_cv_header_pthread_h=no
14083 fi
14084 rm -f conftest.err conftest.$ac_ext
14085 fi
14086 echo "$as_me:14086: result: $ac_cv_header_pthread_h" >&5
14087 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14088 if test $ac_cv_header_pthread_h = yes; then
14089
14090 cat >>confdefs.h <<\EOF
14091 #define HAVE_PTHREADS_H 1
14092 EOF
14093
14094         for cf_lib_pthread in pthread c_r
14095         do
14096             echo "$as_me:14096: checking if we can link with the $cf_lib_pthread library" >&5
14097 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14098             cf_save_LIBS="$LIBS"
14099
14100 cf_add_libs="-l$cf_lib_pthread"
14101 # Filter out duplicates - this happens with badly-designed ".pc" files...
14102 for cf_add_1lib in $LIBS
14103 do
14104         for cf_add_2lib in $cf_add_libs
14105         do
14106                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14107                 then
14108                         cf_add_1lib=
14109                         break
14110                 fi
14111         done
14112         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14113 done
14114 LIBS="$cf_add_libs"
14115
14116             cat >conftest.$ac_ext <<_ACEOF
14117 #line 14117 "configure"
14118 #include "confdefs.h"
14119
14120 #include <pthread.h>
14121
14122 int
14123 main (void)
14124 {
14125
14126                 int rc = pthread_create(0,0,0,0);
14127                 int r2 = pthread_mutexattr_settype(0, 0);
14128
14129   ;
14130   return 0;
14131 }
14132 _ACEOF
14133 rm -f conftest.$ac_objext conftest$ac_exeext
14134 if { (eval echo "$as_me:14134: \"$ac_link\"") >&5
14135   (eval $ac_link) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); } &&
14139          { ac_try='test -s conftest$ac_exeext'
14140   { (eval echo "$as_me:14140: \"$ac_try\"") >&5
14141   (eval $ac_try) 2>&5
14142   ac_status=$?
14143   echo "$as_me:14143: \$? = $ac_status" >&5
14144   (exit $ac_status); }; }; then
14145   with_pthread=yes
14146 else
14147   echo "$as_me: failed program was:" >&5
14148 cat conftest.$ac_ext >&5
14149 with_pthread=no
14150 fi
14151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14152             LIBS="$cf_save_LIBS"
14153             echo "$as_me:14153: result: $with_pthread" >&5
14154 echo "${ECHO_T}$with_pthread" >&6
14155             test "$with_pthread" = yes && break
14156         done
14157
14158         if test "$with_pthread" = yes ; then
14159
14160 cf_add_libs="-l$cf_lib_pthread"
14161 # Filter out duplicates - this happens with badly-designed ".pc" files...
14162 for cf_add_1lib in $LIBS
14163 do
14164         for cf_add_2lib in $cf_add_libs
14165         do
14166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14167                 then
14168                         cf_add_1lib=
14169                         break
14170                 fi
14171         done
14172         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14173 done
14174 LIBS="$cf_add_libs"
14175
14176 cat >>confdefs.h <<\EOF
14177 #define HAVE_LIBPTHREADS 1
14178 EOF
14179
14180         else
14181             { { echo "$as_me:14181: error: Cannot link with pthread library" >&5
14182 echo "$as_me: error: Cannot link with pthread library" >&2;}
14183    { (exit 1); exit 1; }; }
14184         fi
14185
14186 fi
14187
14188 fi
14189
14190 if test "x$with_pthread" != xno; then
14191         echo "$as_me:14191: checking for pthread_kill" >&5
14192 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14193 if test "${ac_cv_func_pthread_kill+set}" = set; then
14194   echo $ECHO_N "(cached) $ECHO_C" >&6
14195 else
14196   cat >conftest.$ac_ext <<_ACEOF
14197 #line 14197 "configure"
14198 #include "confdefs.h"
14199 #define pthread_kill autoconf_temporary
14200 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14201 #undef pthread_kill
14202
14203 #ifdef __cplusplus
14204 extern "C"
14205 #endif
14206
14207 /* We use char because int might match the return type of a gcc2
14208    builtin and then its argument prototype would still apply.  */
14209 char pthread_kill (void);
14210
14211 int
14212 main (void)
14213 {
14214
14215 /* The GNU C library defines stubs for functions which it implements
14216     to always fail with ENOSYS.  Some functions are actually named
14217     something starting with __ and the normal name is an alias.  */
14218 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14219 #error found stub for pthread_kill
14220 #endif
14221
14222         return pthread_kill ();
14223   ;
14224   return 0;
14225 }
14226 _ACEOF
14227 rm -f conftest.$ac_objext conftest$ac_exeext
14228 if { (eval echo "$as_me:14228: \"$ac_link\"") >&5
14229   (eval $ac_link) 2>&5
14230   ac_status=$?
14231   echo "$as_me:14231: \$? = $ac_status" >&5
14232   (exit $ac_status); } &&
14233          { ac_try='test -s conftest$ac_exeext'
14234   { (eval echo "$as_me:14234: \"$ac_try\"") >&5
14235   (eval $ac_try) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); }; }; then
14239   ac_cv_func_pthread_kill=yes
14240 else
14241   echo "$as_me: failed program was:" >&5
14242 cat conftest.$ac_ext >&5
14243 ac_cv_func_pthread_kill=no
14244 fi
14245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246 fi
14247 echo "$as_me:14247: result: $ac_cv_func_pthread_kill" >&5
14248 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14249 if test $ac_cv_func_pthread_kill = yes; then
14250
14251                 echo "$as_me:14251: checking if you want to allow EINTR in wgetch with pthreads" >&5
14252 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14253
14254 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14255 if test "${enable_pthreads_eintr+set}" = set; then
14256   enableval="$enable_pthreads_eintr"
14257   use_pthreads_eintr=$enableval
14258 else
14259   use_pthreads_eintr=no
14260 fi;
14261                 echo "$as_me:14261: result: $use_pthreads_eintr" >&5
14262 echo "${ECHO_T}$use_pthreads_eintr" >&6
14263                 if test "x$use_pthreads_eintr" = xyes ; then
14264
14265 cat >>confdefs.h <<\EOF
14266 #define USE_PTHREADS_EINTR 1
14267 EOF
14268
14269                 fi
14270 fi
14271
14272         echo "$as_me:14272: checking if you want to use weak-symbols for pthreads" >&5
14273 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14274
14275 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14276 if test "${enable_weak_symbols+set}" = set; then
14277   enableval="$enable_weak_symbols"
14278   use_weak_symbols=$enableval
14279 else
14280   use_weak_symbols=no
14281 fi;
14282         echo "$as_me:14282: result: $use_weak_symbols" >&5
14283 echo "${ECHO_T}$use_weak_symbols" >&6
14284         if test "x$use_weak_symbols" = xyes ; then
14285
14286 echo "$as_me:14286: checking if $CC supports weak symbols" >&5
14287 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14288 if test "${cf_cv_weak_symbols+set}" = set; then
14289   echo $ECHO_N "(cached) $ECHO_C" >&6
14290 else
14291
14292 cat >conftest.$ac_ext <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295
14296 #include <stdio.h>
14297 int
14298 main (void)
14299 {
14300
14301 #if defined(__GNUC__)
14302 #  if defined __USE_ISOC99
14303 #    define _cat_pragma(exp)    _Pragma(#exp)
14304 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14305 #  else
14306 #    define _weak_pragma(exp)
14307 #  endif
14308 #  define _declare(name)        __extension__ extern __typeof__(name) name
14309 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14310 #endif
14311
14312 weak_symbol(fopen);
14313
14314   ;
14315   return 0;
14316 }
14317 _ACEOF
14318 rm -f conftest.$ac_objext
14319 if { (eval echo "$as_me:14319: \"$ac_compile\"") >&5
14320   (eval $ac_compile) 2>&5
14321   ac_status=$?
14322   echo "$as_me:14322: \$? = $ac_status" >&5
14323   (exit $ac_status); } &&
14324          { ac_try='test -s conftest.$ac_objext'
14325   { (eval echo "$as_me:14325: \"$ac_try\"") >&5
14326   (eval $ac_try) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit $ac_status); }; }; then
14330   cf_cv_weak_symbols=yes
14331 else
14332   echo "$as_me: failed program was:" >&5
14333 cat conftest.$ac_ext >&5
14334 cf_cv_weak_symbols=no
14335 fi
14336 rm -f conftest.$ac_objext conftest.$ac_ext
14337
14338 fi
14339 echo "$as_me:14339: result: $cf_cv_weak_symbols" >&5
14340 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14341
14342         else
14343                 cf_cv_weak_symbols=no
14344         fi
14345
14346         if test "x$cf_cv_weak_symbols" = xyes ; then
14347
14348 cat >>confdefs.h <<\EOF
14349 #define USE_WEAK_SYMBOLS 1
14350 EOF
14351
14352         fi
14353 fi
14354
14355 PTHREAD=
14356 if test "x$with_pthread" = "xyes" ; then
14357
14358 cat >>confdefs.h <<\EOF
14359 #define USE_PTHREADS 1
14360 EOF
14361
14362         enable_reentrant=yes
14363         if test "x$cf_cv_weak_symbols" = xyes ; then
14364                 PTHREAD=-lpthread
14365
14366 cf_add_libs="-lpthread"
14367 # Filter out duplicates - this happens with badly-designed ".pc" files...
14368 for cf_add_1lib in $PRIVATE_LIBS
14369 do
14370         for cf_add_2lib in $cf_add_libs
14371         do
14372                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14373                 then
14374                         cf_add_1lib=
14375                         break
14376                 fi
14377         done
14378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14379 done
14380 PRIVATE_LIBS="$cf_add_libs"
14381
14382         fi
14383 fi
14384
14385 # Reentrant code has to be opaque; there's little advantage to making ncurses
14386 # opaque outside of that, so there is no --enable-opaque option.  We can use
14387 # this option without --with-pthreads, but this will be always set for
14388 # pthreads.
14389 echo "$as_me:14389: checking if you want reentrant code" >&5
14390 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14391
14392 # Check whether --enable-reentrant or --disable-reentrant was given.
14393 if test "${enable_reentrant+set}" = set; then
14394   enableval="$enable_reentrant"
14395   with_reentrant=$enableval
14396 else
14397   with_reentrant=no
14398 fi;
14399 echo "$as_me:14399: result: $with_reentrant" >&5
14400 echo "${ECHO_T}$with_reentrant" >&6
14401 if test "x$with_reentrant" = xyes ; then
14402         cf_cv_enable_reentrant=1
14403         cf_cv_enable_opaque="NCURSES_INTERNALS"
14404         NCURSES_SIZE_T=int
14405         if test "x$cf_cv_weak_symbols" = xyes ; then
14406
14407 # remove pthread library from $LIBS
14408 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14409
14410 cf_add_libs="-lpthread"
14411 # Filter out duplicates - this happens with badly-designed ".pc" files...
14412 for cf_add_1lib in $TEST_LIBS
14413 do
14414         for cf_add_2lib in $cf_add_libs
14415         do
14416                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14417                 then
14418                         cf_add_1lib=
14419                         break
14420                 fi
14421         done
14422         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14423 done
14424 TEST_LIBS="$cf_add_libs"
14425
14426 cf_add_libs="-lpthread"
14427 # Filter out duplicates - this happens with badly-designed ".pc" files...
14428 for cf_add_1lib in $TEST_LIBS2
14429 do
14430         for cf_add_2lib in $cf_add_libs
14431         do
14432                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14433                 then
14434                         cf_add_1lib=
14435                         break
14436                 fi
14437         done
14438         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14439 done
14440 TEST_LIBS2="$cf_add_libs"
14441
14442 cf_add_libs="-lpthread"
14443 # Filter out duplicates - this happens with badly-designed ".pc" files...
14444 for cf_add_1lib in $PRIVATE_LIBS
14445 do
14446         for cf_add_2lib in $cf_add_libs
14447         do
14448                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14449                 then
14450                         cf_add_1lib=
14451                         break
14452                 fi
14453         done
14454         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14455 done
14456 PRIVATE_LIBS="$cf_add_libs"
14457
14458         else
14459                 # when not using weak symbols but with_reentrant,
14460                 # add 't' to the library suffix on all platforms
14461                 # except cygwin, where we only do that if ALSO
14462                 # compiling with full thread support.
14463                 case "$host" in
14464                 (*cygwin* | *msys*)
14465                         if test "$with_pthread" = "yes" ; then
14466                                 if test "x$disable_lib_suffixes" = "xno" ; then
14467                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14468                                 fi
14469                         fi ;;
14470                 (*)
14471                         if test "x$disable_lib_suffixes" = "xno" ; then
14472                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14473                         fi
14474                         ;;
14475                 esac
14476         fi
14477
14478 cat >>confdefs.h <<\EOF
14479 #define USE_REENTRANT 1
14480 EOF
14481
14482 if test "${with_abi_version+set}" != set; then
14483         case $cf_cv_rel_version in
14484         (5.*)
14485                 cf_cv_rel_version=6.0
14486                 cf_cv_abi_version=6
14487                 { echo "$as_me:14487: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14488 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14489                 ;;
14490         esac
14491 fi
14492
14493 else
14494         cf_cv_enable_reentrant=0
14495         cf_cv_enable_opaque="NCURSES_OPAQUE"
14496         NCURSES_SIZE_T=short
14497 fi
14498
14499 echo "$as_me:14499: checking if you want opaque curses-library structures" >&5
14500 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14501
14502 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14503 if test "${enable_opaque_curses+set}" = set; then
14504   enableval="$enable_opaque_curses"
14505   test "$enableval" != yes && enableval=no
14506         if test "$enableval" != "no" ; then
14507     enable_opaque_curses=yes
14508         else
14509
14510          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14511          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14512
14513         fi
14514 else
14515   enableval=no
14516
14517          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14518          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14519
14520 fi;
14521 echo "$as_me:14521: result: $enable_opaque_curses" >&5
14522 echo "${ECHO_T}$enable_opaque_curses" >&6
14523
14524 test "$cf_cv_enable_reentrant" = 1 && \
14525 test "$enable_opaque_curses" = no && \
14526 { { echo "$as_me:14526: error: reentrant configuration requires opaque library" >&5
14527 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14528    { (exit 1); exit 1; }; }
14529
14530 echo "$as_me:14530: checking if you want opaque form-library structures" >&5
14531 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14532
14533 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14534 if test "${enable_opaque_form+set}" = set; then
14535   enableval="$enable_opaque_form"
14536   enable_opaque_form=yes
14537 else
14538   enable_opaque_form=no
14539 fi;
14540 echo "$as_me:14540: result: $enable_opaque_form" >&5
14541 echo "${ECHO_T}$enable_opaque_form" >&6
14542
14543 echo "$as_me:14543: checking if you want opaque menu-library structures" >&5
14544 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14545
14546 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14547 if test "${enable_opaque_menu+set}" = set; then
14548   enableval="$enable_opaque_menu"
14549   enable_opaque_menu=yes
14550 else
14551   enable_opaque_menu=no
14552 fi;
14553 echo "$as_me:14553: result: $enable_opaque_menu" >&5
14554 echo "${ECHO_T}$enable_opaque_menu" >&6
14555
14556 echo "$as_me:14556: checking if you want opaque panel-library structures" >&5
14557 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14558
14559 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14560 if test "${enable_opaque_panel+set}" = set; then
14561   enableval="$enable_opaque_panel"
14562   enable_opaque_panel=yes
14563 else
14564   enable_opaque_panel=no
14565 fi;
14566 echo "$as_me:14566: result: $enable_opaque_panel" >&5
14567 echo "${ECHO_T}$enable_opaque_panel" >&6
14568
14569 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14570 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14571 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14572 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14573
14574 ### Allow using a different wrap-prefix
14575 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14576         echo "$as_me:14576: checking for prefix used to wrap public variables" >&5
14577 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14578
14579 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14580 if test "${with_wrap_prefix+set}" = set; then
14581   withval="$with_wrap_prefix"
14582   NCURSES_WRAP_PREFIX=$withval
14583 else
14584   NCURSES_WRAP_PREFIX=_nc_
14585 fi;
14586         echo "$as_me:14586: result: $NCURSES_WRAP_PREFIX" >&5
14587 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14588 else
14589         NCURSES_WRAP_PREFIX=_nc_
14590 fi
14591
14592 cat >>confdefs.h <<EOF
14593 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14594 EOF
14595
14596 ###############################################################################
14597 # These options are relatively safe to experiment with.
14598
14599 echo "$as_me:14599: checking if you want all development code" >&5
14600 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14601
14602 # Check whether --with-develop or --without-develop was given.
14603 if test "${with_develop+set}" = set; then
14604   withval="$with_develop"
14605   with_develop=$withval
14606 else
14607   with_develop=no
14608 fi;
14609 echo "$as_me:14609: result: $with_develop" >&5
14610 echo "${ECHO_T}$with_develop" >&6
14611
14612 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14613 echo "$as_me:14613: checking if you want hard-tabs code" >&5
14614 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14615
14616 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14617 if test "${enable_hard_tabs+set}" = set; then
14618   enableval="$enable_hard_tabs"
14619
14620 else
14621   enable_hard_tabs=$with_develop
14622 fi;
14623 echo "$as_me:14623: result: $enable_hard_tabs" >&5
14624 echo "${ECHO_T}$enable_hard_tabs" >&6
14625 test "x$enable_hard_tabs" = xyes &&
14626 cat >>confdefs.h <<\EOF
14627 #define USE_HARD_TABS 1
14628 EOF
14629
14630 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14631 echo "$as_me:14631: checking if you want limited support for xmc" >&5
14632 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14633
14634 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14635 if test "${enable_xmc_glitch+set}" = set; then
14636   enableval="$enable_xmc_glitch"
14637
14638 else
14639   enable_xmc_glitch=$with_develop
14640 fi;
14641 echo "$as_me:14641: result: $enable_xmc_glitch" >&5
14642 echo "${ECHO_T}$enable_xmc_glitch" >&6
14643 test "x$enable_xmc_glitch" = xyes &&
14644 cat >>confdefs.h <<\EOF
14645 #define USE_XMC_SUPPORT 1
14646 EOF
14647
14648 ###############################################################################
14649 # These are just experimental, probably should not be in a package:
14650
14651 echo "$as_me:14651: checking if you do not want to assume colors are white-on-black" >&5
14652 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14653
14654 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14655 if test "${enable_assumed_color+set}" = set; then
14656   enableval="$enable_assumed_color"
14657   with_assumed_color=$enableval
14658 else
14659   with_assumed_color=yes
14660 fi;
14661 echo "$as_me:14661: result: $with_assumed_color" >&5
14662 echo "${ECHO_T}$with_assumed_color" >&6
14663 test "x$with_assumed_color" = xyes &&
14664 cat >>confdefs.h <<\EOF
14665 #define USE_ASSUMED_COLOR 1
14666 EOF
14667
14668 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14669 echo "$as_me:14669: checking if you want hashmap scrolling-optimization code" >&5
14670 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14671
14672 # Check whether --enable-hashmap or --disable-hashmap was given.
14673 if test "${enable_hashmap+set}" = set; then
14674   enableval="$enable_hashmap"
14675   with_hashmap=$enableval
14676 else
14677   with_hashmap=yes
14678 fi;
14679 echo "$as_me:14679: result: $with_hashmap" >&5
14680 echo "${ECHO_T}$with_hashmap" >&6
14681 test "x$with_hashmap" = xyes &&
14682 cat >>confdefs.h <<\EOF
14683 #define USE_HASHMAP 1
14684 EOF
14685
14686 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14687 echo "$as_me:14687: checking if you want colorfgbg code" >&5
14688 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14689
14690 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14691 if test "${enable_colorfgbg+set}" = set; then
14692   enableval="$enable_colorfgbg"
14693   with_colorfgbg=$enableval
14694 else
14695   with_colorfgbg=no
14696 fi;
14697 echo "$as_me:14697: result: $with_colorfgbg" >&5
14698 echo "${ECHO_T}$with_colorfgbg" >&6
14699 test "x$with_colorfgbg" = xyes &&
14700 cat >>confdefs.h <<\EOF
14701 #define USE_COLORFGBG 1
14702 EOF
14703
14704 ###   use option --enable-interop to turn on use of bindings used for interop
14705 echo "$as_me:14705: checking if you want interop bindings" >&5
14706 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14707
14708 # Check whether --enable-interop or --disable-interop was given.
14709 if test "${enable_interop+set}" = set; then
14710   enableval="$enable_interop"
14711   with_exp_interop=$enableval
14712 else
14713   with_exp_interop=$cf_dft_interop
14714 fi;
14715 echo "$as_me:14715: result: $with_exp_interop" >&5
14716 echo "${ECHO_T}$with_exp_interop" >&6
14717
14718 NCURSES_INTEROP_FUNCS=0
14719 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14720
14721 echo "$as_me:14721: checking if you want experimental safe-sprintf code" >&5
14722 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14723
14724 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14725 if test "${enable_safe_sprintf+set}" = set; then
14726   enableval="$enable_safe_sprintf"
14727   with_safe_sprintf=$enableval
14728 else
14729   with_safe_sprintf=no
14730 fi;
14731 echo "$as_me:14731: result: $with_safe_sprintf" >&5
14732 echo "${ECHO_T}$with_safe_sprintf" >&6
14733
14734 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14735 # when hashmap is used scroll hints are useless
14736 if test "$with_hashmap" = no ; then
14737 echo "$as_me:14737: checking if you want to experiment without scrolling-hints code" >&5
14738 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14739
14740 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14741 if test "${enable_scroll_hints+set}" = set; then
14742   enableval="$enable_scroll_hints"
14743   with_scroll_hints=$enableval
14744 else
14745   with_scroll_hints=yes
14746 fi;
14747 echo "$as_me:14747: result: $with_scroll_hints" >&5
14748 echo "${ECHO_T}$with_scroll_hints" >&6
14749 test "x$with_scroll_hints" = xyes &&
14750 cat >>confdefs.h <<\EOF
14751 #define USE_SCROLL_HINTS 1
14752 EOF
14753
14754 fi
14755
14756 echo "$as_me:14756: checking if you want wgetch-events code" >&5
14757 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14758
14759 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14760 if test "${enable_wgetch_events+set}" = set; then
14761   enableval="$enable_wgetch_events"
14762   with_wgetch_events=$enableval
14763 else
14764   with_wgetch_events=no
14765 fi;
14766 echo "$as_me:14766: result: $with_wgetch_events" >&5
14767 echo "${ECHO_T}$with_wgetch_events" >&6
14768 test "x$with_wgetch_events" = xyes &&
14769 cat >>confdefs.h <<\EOF
14770 #define NCURSES_WGETCH_EVENTS 1
14771 EOF
14772
14773 ###############################################################################
14774
14775 ###     use option --disable-echo to suppress full display compiling commands
14776
14777 echo "$as_me:14777: checking if you want to see long compiling messages" >&5
14778 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14779
14780 # Check whether --enable-echo or --disable-echo was given.
14781 if test "${enable_echo+set}" = set; then
14782   enableval="$enable_echo"
14783   test "$enableval" != no && enableval=yes
14784         if test "$enableval" != "yes" ; then
14785
14786         ECHO_LT='--silent'
14787         ECHO_LD='@echo linking $@;'
14788         RULE_CC='@echo compiling $<'
14789         SHOW_CC='@echo compiling $@'
14790         ECHO_CC='@'
14791
14792         else
14793
14794         ECHO_LT=''
14795         ECHO_LD=''
14796         RULE_CC=''
14797         SHOW_CC=''
14798         ECHO_CC=''
14799
14800         fi
14801 else
14802   enableval=yes
14803
14804         ECHO_LT=''
14805         ECHO_LD=''
14806         RULE_CC=''
14807         SHOW_CC=''
14808         ECHO_CC=''
14809
14810 fi;
14811 echo "$as_me:14811: result: $enableval" >&5
14812 echo "${ECHO_T}$enableval" >&6
14813
14814 if test "x$enable_echo" = xyes; then
14815         ECHO_LINK=
14816 else
14817         ECHO_LINK='@ echo linking $@ ... ;'
14818         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14819         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14820 fi
14821
14822 # --disable-stripping is used for debugging
14823
14824 echo "$as_me:14824: checking if you want to install stripped executables" >&5
14825 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14826
14827 # Check whether --enable-stripping or --disable-stripping was given.
14828 if test "${enable_stripping+set}" = set; then
14829   enableval="$enable_stripping"
14830   test "$enableval" != no && enableval=yes
14831         if test "$enableval" != "yes" ; then
14832     with_stripping=no
14833         else
14834                 with_stripping=yes
14835         fi
14836 else
14837   enableval=yes
14838         with_stripping=yes
14839
14840 fi;
14841 echo "$as_me:14841: result: $with_stripping" >&5
14842 echo "${ECHO_T}$with_stripping" >&6
14843
14844 if test "$with_stripping" = yes
14845 then
14846         INSTALL_OPT_S="-s"
14847 else
14848         INSTALL_OPT_S=
14849 fi
14850
14851 : ${INSTALL:=install}
14852 echo "$as_me:14852: checking if install accepts -p option" >&5
14853 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14854 if test "${cf_cv_install_p+set}" = set; then
14855   echo $ECHO_N "(cached) $ECHO_C" >&6
14856 else
14857
14858         rm -rf conftest*
14859         date >conftest.in
14860         mkdir conftest.out
14861         sleep 3
14862         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14863         then
14864                 if test -f conftest.out/conftest.in
14865                 then
14866                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14867                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14868                         if test -s conftest.err
14869                         then
14870                                 cf_cv_install_p=no
14871                         else
14872                                 cf_cv_install_p=yes
14873                         fi
14874                 else
14875                         cf_cv_install_p=no
14876                 fi
14877         else
14878                 cf_cv_install_p=no
14879         fi
14880         rm -rf conftest*
14881
14882 fi
14883 echo "$as_me:14883: result: $cf_cv_install_p" >&5
14884 echo "${ECHO_T}$cf_cv_install_p" >&6
14885
14886 echo "$as_me:14886: checking if install needs to be told about ownership" >&5
14887 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14888 case `$ac_config_guess` in
14889 (*minix)
14890         with_install_o=yes
14891         ;;
14892 (*)
14893         with_install_o=no
14894         ;;
14895 esac
14896
14897 echo "$as_me:14897: result: $with_install_o" >&5
14898 echo "${ECHO_T}$with_install_o" >&6
14899 if test "x$with_install_o" = xyes
14900 then
14901         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'`
14902 else
14903         INSTALL_OPT_O=
14904 fi
14905
14906 # If we're avoiding relinking of shared libraries during install, that is to
14907 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14908 # the install program has "-p" (for preserving timestamps).
14909 cf_cv_do_reranlib=yes
14910 if test "x$cf_cv_install_p" = xyes
14911 then
14912         if test "x$cf_cv_do_relink" != xyes
14913         then
14914                 cf_cv_do_reranlib=no
14915                 INSTALL_OPT_P="-p"
14916                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14917         fi
14918 fi
14919
14920 ###     use option --enable-warnings to turn on all gcc warnings
14921 echo "$as_me:14921: checking if you want to see compiler warnings" >&5
14922 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14923
14924 # Check whether --enable-warnings or --disable-warnings was given.
14925 if test "${enable_warnings+set}" = set; then
14926   enableval="$enable_warnings"
14927   with_warnings=$enableval
14928 fi;
14929 echo "$as_me:14929: result: $with_warnings" >&5
14930 echo "${ECHO_T}$with_warnings" >&6
14931
14932 if test "x$with_warnings" = "xyes"; then
14933
14934         ADAFLAGS="$ADAFLAGS -gnatg"
14935
14936 INTEL_COMPILER=no
14937
14938 if test "$GCC" = yes ; then
14939         case $host_os in
14940         (linux*|gnu*)
14941                 echo "$as_me:14941: checking if this is really Intel C compiler" >&5
14942 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14943                 cf_save_CFLAGS="$CFLAGS"
14944                 CFLAGS="$CFLAGS -no-gcc"
14945                 cat >conftest.$ac_ext <<_ACEOF
14946 #line 14946 "configure"
14947 #include "confdefs.h"
14948
14949 int
14950 main (void)
14951 {
14952
14953 #ifdef __INTEL_COMPILER
14954 #else
14955 make an error
14956 #endif
14957
14958   ;
14959   return 0;
14960 }
14961 _ACEOF
14962 rm -f conftest.$ac_objext
14963 if { (eval echo "$as_me:14963: \"$ac_compile\"") >&5
14964   (eval $ac_compile) 2>&5
14965   ac_status=$?
14966   echo "$as_me:14966: \$? = $ac_status" >&5
14967   (exit $ac_status); } &&
14968          { ac_try='test -s conftest.$ac_objext'
14969   { (eval echo "$as_me:14969: \"$ac_try\"") >&5
14970   (eval $ac_try) 2>&5
14971   ac_status=$?
14972   echo "$as_me:14972: \$? = $ac_status" >&5
14973   (exit $ac_status); }; }; then
14974   INTEL_COMPILER=yes
14975 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14976
14977 else
14978   echo "$as_me: failed program was:" >&5
14979 cat conftest.$ac_ext >&5
14980 fi
14981 rm -f conftest.$ac_objext conftest.$ac_ext
14982                 CFLAGS="$cf_save_CFLAGS"
14983                 echo "$as_me:14983: result: $INTEL_COMPILER" >&5
14984 echo "${ECHO_T}$INTEL_COMPILER" >&6
14985                 ;;
14986         esac
14987 fi
14988
14989 CLANG_COMPILER=no
14990
14991 if test "$GCC" = yes ; then
14992         echo "$as_me:14992: checking if this is really Clang C compiler" >&5
14993 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14994         cf_save_CFLAGS="$CFLAGS"
14995         CFLAGS="$CFLAGS -Qunused-arguments"
14996         cat >conftest.$ac_ext <<_ACEOF
14997 #line 14997 "configure"
14998 #include "confdefs.h"
14999
15000 int
15001 main (void)
15002 {
15003
15004 #ifdef __clang__
15005 #else
15006 make an error
15007 #endif
15008
15009   ;
15010   return 0;
15011 }
15012 _ACEOF
15013 rm -f conftest.$ac_objext
15014 if { (eval echo "$as_me:15014: \"$ac_compile\"") >&5
15015   (eval $ac_compile) 2>&5
15016   ac_status=$?
15017   echo "$as_me:15017: \$? = $ac_status" >&5
15018   (exit $ac_status); } &&
15019          { ac_try='test -s conftest.$ac_objext'
15020   { (eval echo "$as_me:15020: \"$ac_try\"") >&5
15021   (eval $ac_try) 2>&5
15022   ac_status=$?
15023   echo "$as_me:15023: \$? = $ac_status" >&5
15024   (exit $ac_status); }; }; then
15025   CLANG_COMPILER=yes
15026 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15027
15028 else
15029   echo "$as_me: failed program was:" >&5
15030 cat conftest.$ac_ext >&5
15031 fi
15032 rm -f conftest.$ac_objext conftest.$ac_ext
15033         CFLAGS="$cf_save_CFLAGS"
15034         echo "$as_me:15034: result: $CLANG_COMPILER" >&5
15035 echo "${ECHO_T}$CLANG_COMPILER" >&6
15036 fi
15037
15038 cat > conftest.$ac_ext <<EOF
15039 #line 15039 "${as_me:-configure}"
15040 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15041 EOF
15042
15043 if test "$INTEL_COMPILER" = yes
15044 then
15045 # The "-wdXXX" options suppress warnings:
15046 # remark #1419: external declaration in primary source file
15047 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15048 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15049 # remark #193: zero used for undefined preprocessing identifier
15050 # remark #593: variable "curs_sb_left_arrow" was set but never used
15051 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15052 # remark #869: parameter "tw" was never referenced
15053 # remark #981: operands are evaluated in unspecified order
15054 # warning #279: controlling expression is constant
15055
15056         { echo "$as_me:15056: checking for $CC warning options..." >&5
15057 echo "$as_me: checking for $CC warning options..." >&6;}
15058         cf_save_CFLAGS="$CFLAGS"
15059         EXTRA_CFLAGS="-Wall"
15060         for cf_opt in \
15061                 wd1419 \
15062                 wd1683 \
15063                 wd1684 \
15064                 wd193 \
15065                 wd593 \
15066                 wd279 \
15067                 wd810 \
15068                 wd869 \
15069                 wd981
15070         do
15071                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15072                 if { (eval echo "$as_me:15072: \"$ac_compile\"") >&5
15073   (eval $ac_compile) 2>&5
15074   ac_status=$?
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit $ac_status); }; then
15077                         test -n "$verbose" && echo "$as_me:15077: result: ... -$cf_opt" >&5
15078 echo "${ECHO_T}... -$cf_opt" >&6
15079                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15080                 fi
15081         done
15082         CFLAGS="$cf_save_CFLAGS"
15083
15084 elif test "$GCC" = yes
15085 then
15086         { echo "$as_me:15086: checking for $CC warning options..." >&5
15087 echo "$as_me: checking for $CC warning options..." >&6;}
15088         cf_save_CFLAGS="$CFLAGS"
15089         EXTRA_CFLAGS=
15090         cf_warn_CONST=""
15091         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15092         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15093         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15094         for cf_opt in W Wall \
15095                 Wbad-function-cast \
15096                 Wcast-align \
15097                 Wcast-qual \
15098                 Wdeclaration-after-statement \
15099                 Wextra \
15100                 Winline \
15101                 Wmissing-declarations \
15102                 Wmissing-prototypes \
15103                 Wnested-externs \
15104                 Wpointer-arith \
15105                 Wshadow \
15106                 Wstrict-prototypes \
15107                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15108         do
15109                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15110                 if { (eval echo "$as_me:15110: \"$ac_compile\"") >&5
15111   (eval $ac_compile) 2>&5
15112   ac_status=$?
15113   echo "$as_me:15113: \$? = $ac_status" >&5
15114   (exit $ac_status); }; then
15115                         test -n "$verbose" && echo "$as_me:15115: result: ... -$cf_opt" >&5
15116 echo "${ECHO_T}... -$cf_opt" >&6
15117                         case $cf_opt in
15118                         (Wcast-qual)
15119
15120         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15121         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15122
15123                                 ;;
15124                         (Winline)
15125                                 case $GCC_VERSION in
15126                                 ([34].*)
15127                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15128
15129 echo "${as_me:-configure}:15129: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15130
15131                                         continue;;
15132                                 esac
15133                                 ;;
15134                         (Wpointer-arith)
15135                                 case $GCC_VERSION in
15136                                 ([12].*)
15137                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15138
15139 echo "${as_me:-configure}:15139: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15140
15141                                         continue;;
15142                                 esac
15143                                 ;;
15144                         esac
15145                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15146                 fi
15147         done
15148         CFLAGS="$cf_save_CFLAGS"
15149 fi
15150 rm -rf conftest*
15151
15152         if test "x$cf_with_cxx" = xyes ; then
15153
15154 INTEL_CPLUSPLUS=no
15155
15156 if test "$GCC" = yes ; then
15157         case $host_os in
15158         (linux*|gnu*)
15159                 echo "$as_me:15159: checking if this is really Intel C++ compiler" >&5
15160 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15161                 cf_save_CFLAGS="$CXXFLAGS"
15162                 CXXFLAGS="$CXXFLAGS -no-gcc"
15163                 cat >conftest.$ac_ext <<_ACEOF
15164 #line 15164 "configure"
15165 #include "confdefs.h"
15166
15167 int
15168 main (void)
15169 {
15170
15171 #ifdef __INTEL_COMPILER
15172 #else
15173 make an error
15174 #endif
15175
15176   ;
15177   return 0;
15178 }
15179 _ACEOF
15180 rm -f conftest.$ac_objext
15181 if { (eval echo "$as_me:15181: \"$ac_compile\"") >&5
15182   (eval $ac_compile) 2>&5
15183   ac_status=$?
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } &&
15186          { ac_try='test -s conftest.$ac_objext'
15187   { (eval echo "$as_me:15187: \"$ac_try\"") >&5
15188   (eval $ac_try) 2>&5
15189   ac_status=$?
15190   echo "$as_me:15190: \$? = $ac_status" >&5
15191   (exit $ac_status); }; }; then
15192   INTEL_CPLUSPLUS=yes
15193 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15194
15195 else
15196   echo "$as_me: failed program was:" >&5
15197 cat conftest.$ac_ext >&5
15198 fi
15199 rm -f conftest.$ac_objext conftest.$ac_ext
15200                 CXXFLAGS="$cf_save_CFLAGS"
15201                 echo "$as_me:15201: result: $INTEL_CPLUSPLUS" >&5
15202 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15203                 ;;
15204         esac
15205 fi
15206
15207 CLANG_CPLUSPLUS=no
15208
15209 if test "$GCC" = yes ; then
15210         echo "$as_me:15210: checking if this is really Clang C++ compiler" >&5
15211 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15212         cf_save_CFLAGS="$CXXFLAGS"
15213         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15214         cat >conftest.$ac_ext <<_ACEOF
15215 #line 15215 "configure"
15216 #include "confdefs.h"
15217
15218 int
15219 main (void)
15220 {
15221
15222 #ifdef __clang__
15223 #else
15224 make an error
15225 #endif
15226
15227   ;
15228   return 0;
15229 }
15230 _ACEOF
15231 rm -f conftest.$ac_objext
15232 if { (eval echo "$as_me:15232: \"$ac_compile\"") >&5
15233   (eval $ac_compile) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); } &&
15237          { ac_try='test -s conftest.$ac_objext'
15238   { (eval echo "$as_me:15238: \"$ac_try\"") >&5
15239   (eval $ac_try) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); }; }; then
15243   CLANG_CPLUSPLUS=yes
15244 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15245
15246 else
15247   echo "$as_me: failed program was:" >&5
15248 cat conftest.$ac_ext >&5
15249 fi
15250 rm -f conftest.$ac_objext conftest.$ac_ext
15251         CXXFLAGS="$cf_save_CFLAGS"
15252         echo "$as_me:15252: result: $CLANG_CPLUSPLUS" >&5
15253 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15254 fi
15255
15256 ac_ext=cc
15257 ac_cpp='$CXXCPP $CPPFLAGS'
15258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15261 ac_main_return=return
15262
15263 cat > conftest.$ac_ext <<EOF
15264 #line 15264 "configure"
15265 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15266 EOF
15267
15268 if test "$INTEL_CPLUSPLUS" = yes
15269 then
15270 # The "-wdXXX" options suppress warnings:
15271 # remark #1419: external declaration in primary source file
15272 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15273 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15274 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15275 # remark #193: zero used for undefined preprocessing identifier
15276 # remark #593: variable "curs_sb_left_arrow" was set but never used
15277 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15278 # remark #869: parameter "tw" was never referenced
15279 # remark #981: operands are evaluated in unspecified order
15280 # warning #269: invalid format string conversion
15281
15282         { echo "$as_me:15282: checking for $CC warning options..." >&5
15283 echo "$as_me: checking for $CC warning options..." >&6;}
15284         cf_save_CXXFLAGS="$CXXFLAGS"
15285         EXTRA_CXXFLAGS="-Wall"
15286         for cf_opt in \
15287                 wd1419 \
15288                 wd1682 \
15289                 wd1683 \
15290                 wd1684 \
15291                 wd193 \
15292                 wd279 \
15293                 wd593 \
15294                 wd810 \
15295                 wd869 \
15296                 wd981
15297         do
15298                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15299                 if { (eval echo "$as_me:15299: \"$ac_compile\"") >&5
15300   (eval $ac_compile) 2>&5
15301   ac_status=$?
15302   echo "$as_me:15302: \$? = $ac_status" >&5
15303   (exit $ac_status); }; then
15304                         test -n "$verbose" && echo "$as_me:15304: result: ... -$cf_opt" >&5
15305 echo "${ECHO_T}... -$cf_opt" >&6
15306                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15307                 fi
15308         done
15309         CXXFLAGS="$cf_save_CXXFLAGS"
15310
15311 elif test "$GXX" = yes
15312 then
15313         { echo "$as_me:15313: checking for $CXX warning options..." >&5
15314 echo "$as_me: checking for $CXX warning options..." >&6;}
15315         cf_save_CXXFLAGS="$CXXFLAGS"
15316         EXTRA_CXXFLAGS="-W -Wall"
15317         cf_gxx_extra_warnings=""
15318         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15319         case "$GCC_VERSION" in
15320         ([1-2].*)
15321                 ;;
15322         (*)
15323                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15324                 ;;
15325         esac
15326         for cf_opt in \
15327                 Wabi \
15328                 fabi-version=0 \
15329                 Wextra \
15330                 Wignored-qualifiers \
15331                 Wlogical-op \
15332                 Woverloaded-virtual \
15333                 Wsign-promo \
15334                 Wsynth \
15335                 Wold-style-cast \
15336                 Wcast-align \
15337                 Wcast-qual \
15338                 Wpointer-arith \
15339                 Wshadow \
15340                 Wundef $cf_gxx_extra_warnings Wno-unused
15341         do
15342                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15343                 if { (eval echo "$as_me:15343: \"$ac_compile\"") >&5
15344   (eval $ac_compile) 2>&5
15345   ac_status=$?
15346   echo "$as_me:15346: \$? = $ac_status" >&5
15347   (exit $ac_status); }; then
15348                         test -n "$verbose" && echo "$as_me:15348: result: ... -$cf_opt" >&5
15349 echo "${ECHO_T}... -$cf_opt" >&6
15350                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15351                 else
15352                         test -n "$verbose" && echo "$as_me:15352: result: ... no -$cf_opt" >&5
15353 echo "${ECHO_T}... no -$cf_opt" >&6
15354                 fi
15355         done
15356         CXXFLAGS="$cf_save_CXXFLAGS"
15357 fi
15358
15359 rm -rf conftest*
15360 ac_ext=c
15361 ac_cpp='$CPP $CPPFLAGS'
15362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15365 ac_main_return=return
15366
15367         fi
15368 fi
15369
15370 if test "$GCC" = yes
15371 then
15372 cat > conftest.i <<EOF
15373 #ifndef GCC_PRINTF
15374 #define GCC_PRINTF 0
15375 #endif
15376 #ifndef GCC_SCANF
15377 #define GCC_SCANF 0
15378 #endif
15379 #ifndef GCC_NORETURN
15380 #define GCC_NORETURN /* nothing */
15381 #endif
15382 #ifndef GCC_UNUSED
15383 #define GCC_UNUSED /* nothing */
15384 #endif
15385 EOF
15386 if test "$GCC" = yes
15387 then
15388         { echo "$as_me:15388: checking for $CC __attribute__ directives..." >&5
15389 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15390 cat > conftest.$ac_ext <<EOF
15391 #line 15391 "${as_me:-configure}"
15392 #include "confdefs.h"
15393 #include "conftest.h"
15394 #include "conftest.i"
15395 #if     GCC_PRINTF
15396 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15397 #else
15398 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15399 #endif
15400 #if     GCC_SCANF
15401 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15402 #else
15403 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15404 #endif
15405 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15406 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15407 extern void foo(void) GCC_NORETURN;
15408 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15409 EOF
15410         cf_printf_attribute=no
15411         cf_scanf_attribute=no
15412         for cf_attribute in scanf printf unused noreturn
15413         do
15414
15415 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15416
15417                 cf_directive="__attribute__(($cf_attribute))"
15418                 echo "checking for $CC $cf_directive" 1>&5
15419
15420                 case $cf_attribute in
15421                 (printf)
15422                         cf_printf_attribute=yes
15423                         cat >conftest.h <<EOF
15424 #define GCC_$cf_ATTRIBUTE 1
15425 EOF
15426                         ;;
15427                 (scanf)
15428                         cf_scanf_attribute=yes
15429                         cat >conftest.h <<EOF
15430 #define GCC_$cf_ATTRIBUTE 1
15431 EOF
15432                         ;;
15433                 (*)
15434                         cat >conftest.h <<EOF
15435 #define GCC_$cf_ATTRIBUTE $cf_directive
15436 EOF
15437                         ;;
15438                 esac
15439
15440                 if { (eval echo "$as_me:15440: \"$ac_compile\"") >&5
15441   (eval $ac_compile) 2>&5
15442   ac_status=$?
15443   echo "$as_me:15443: \$? = $ac_status" >&5
15444   (exit $ac_status); }; then
15445                         test -n "$verbose" && echo "$as_me:15445: result: ... $cf_attribute" >&5
15446 echo "${ECHO_T}... $cf_attribute" >&6
15447                         cat conftest.h >>confdefs.h
15448                         case $cf_attribute in
15449                         (noreturn)
15450
15451 cat >>confdefs.h <<EOF
15452 #define GCC_NORETURN $cf_directive
15453 EOF
15454
15455                                 ;;
15456                         (printf)
15457                                 cf_value='/* nothing */'
15458                                 if test "$cf_printf_attribute" != no ; then
15459                                         cf_value='__attribute__((format(printf,fmt,var)))'
15460
15461 cat >>confdefs.h <<\EOF
15462 #define GCC_PRINTF 1
15463 EOF
15464
15465                                 fi
15466
15467 cat >>confdefs.h <<EOF
15468 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15469 EOF
15470
15471                                 ;;
15472                         (scanf)
15473                                 cf_value='/* nothing */'
15474                                 if test "$cf_scanf_attribute" != no ; then
15475                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15476
15477 cat >>confdefs.h <<\EOF
15478 #define GCC_SCANF 1
15479 EOF
15480
15481                                 fi
15482
15483 cat >>confdefs.h <<EOF
15484 #define GCC_SCANFLIKE(fmt,var) $cf_value
15485 EOF
15486
15487                                 ;;
15488                         (unused)
15489
15490 cat >>confdefs.h <<EOF
15491 #define GCC_UNUSED $cf_directive
15492 EOF
15493
15494                                 ;;
15495                         esac
15496                 fi
15497         done
15498 else
15499         fgrep define conftest.i >>confdefs.h
15500 fi
15501 rm -rf conftest*
15502 fi
15503
15504 echo "$as_me:15504: checking if you want to work around bogus compiler/loader warnings" >&5
15505 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15506
15507 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15508 if test "${enable_string_hacks+set}" = set; then
15509   enableval="$enable_string_hacks"
15510   with_string_hacks=$enableval
15511 else
15512   with_string_hacks=no
15513 fi;
15514 echo "$as_me:15514: result: $with_string_hacks" >&5
15515 echo "${ECHO_T}$with_string_hacks" >&6
15516
15517 if test "x$with_string_hacks" = "xyes"; then
15518
15519 cat >>confdefs.h <<\EOF
15520 #define USE_STRING_HACKS 1
15521 EOF
15522
15523         { echo "$as_me:15523: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15524 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15525         echo "$as_me:15525: checking for strlcat" >&5
15526 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15527 if test "${ac_cv_func_strlcat+set}" = set; then
15528   echo $ECHO_N "(cached) $ECHO_C" >&6
15529 else
15530   cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15533 #define strlcat autoconf_temporary
15534 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15535 #undef strlcat
15536
15537 #ifdef __cplusplus
15538 extern "C"
15539 #endif
15540
15541 /* We use char because int might match the return type of a gcc2
15542    builtin and then its argument prototype would still apply.  */
15543 char strlcat (void);
15544
15545 int
15546 main (void)
15547 {
15548
15549 /* The GNU C library defines stubs for functions which it implements
15550     to always fail with ENOSYS.  Some functions are actually named
15551     something starting with __ and the normal name is an alias.  */
15552 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15553 #error found stub for strlcat
15554 #endif
15555
15556         return strlcat ();
15557   ;
15558   return 0;
15559 }
15560 _ACEOF
15561 rm -f conftest.$ac_objext conftest$ac_exeext
15562 if { (eval echo "$as_me:15562: \"$ac_link\"") >&5
15563   (eval $ac_link) 2>&5
15564   ac_status=$?
15565   echo "$as_me:15565: \$? = $ac_status" >&5
15566   (exit $ac_status); } &&
15567          { ac_try='test -s conftest$ac_exeext'
15568   { (eval echo "$as_me:15568: \"$ac_try\"") >&5
15569   (eval $ac_try) 2>&5
15570   ac_status=$?
15571   echo "$as_me:15571: \$? = $ac_status" >&5
15572   (exit $ac_status); }; }; then
15573   ac_cv_func_strlcat=yes
15574 else
15575   echo "$as_me: failed program was:" >&5
15576 cat conftest.$ac_ext >&5
15577 ac_cv_func_strlcat=no
15578 fi
15579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15580 fi
15581 echo "$as_me:15581: result: $ac_cv_func_strlcat" >&5
15582 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15583 if test $ac_cv_func_strlcat = yes; then
15584
15585 cat >>confdefs.h <<\EOF
15586 #define HAVE_STRLCAT 1
15587 EOF
15588
15589 else
15590
15591                 echo "$as_me:15591: checking for strlcat in -lbsd" >&5
15592 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15593 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15594   echo $ECHO_N "(cached) $ECHO_C" >&6
15595 else
15596   ac_check_lib_save_LIBS=$LIBS
15597 LIBS="-lbsd  $LIBS"
15598 cat >conftest.$ac_ext <<_ACEOF
15599 #line 15599 "configure"
15600 #include "confdefs.h"
15601
15602 /* Override any gcc2 internal prototype to avoid an error.  */
15603 #ifdef __cplusplus
15604 extern "C"
15605 #endif
15606 /* We use char because int might match the return type of a gcc2
15607    builtin and then its argument prototype would still apply.  */
15608 char strlcat ();
15609 int
15610 main (void)
15611 {
15612 strlcat ();
15613   ;
15614   return 0;
15615 }
15616 _ACEOF
15617 rm -f conftest.$ac_objext conftest$ac_exeext
15618 if { (eval echo "$as_me:15618: \"$ac_link\"") >&5
15619   (eval $ac_link) 2>&5
15620   ac_status=$?
15621   echo "$as_me:15621: \$? = $ac_status" >&5
15622   (exit $ac_status); } &&
15623          { ac_try='test -s conftest$ac_exeext'
15624   { (eval echo "$as_me:15624: \"$ac_try\"") >&5
15625   (eval $ac_try) 2>&5
15626   ac_status=$?
15627   echo "$as_me:15627: \$? = $ac_status" >&5
15628   (exit $ac_status); }; }; then
15629   ac_cv_lib_bsd_strlcat=yes
15630 else
15631   echo "$as_me: failed program was:" >&5
15632 cat conftest.$ac_ext >&5
15633 ac_cv_lib_bsd_strlcat=no
15634 fi
15635 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15636 LIBS=$ac_check_lib_save_LIBS
15637 fi
15638 echo "$as_me:15638: result: $ac_cv_lib_bsd_strlcat" >&5
15639 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15640 if test $ac_cv_lib_bsd_strlcat = yes; then
15641
15642 cf_add_libs="-lbsd"
15643 # Filter out duplicates - this happens with badly-designed ".pc" files...
15644 for cf_add_1lib in $LIBS
15645 do
15646         for cf_add_2lib in $cf_add_libs
15647         do
15648                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15649                 then
15650                         cf_add_1lib=
15651                         break
15652                 fi
15653         done
15654         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15655 done
15656 LIBS="$cf_add_libs"
15657
15658 for ac_header in bsd/string.h
15659 do
15660 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15661 echo "$as_me:15661: checking for $ac_header" >&5
15662 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15663 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15664   echo $ECHO_N "(cached) $ECHO_C" >&6
15665 else
15666   cat >conftest.$ac_ext <<_ACEOF
15667 #line 15667 "configure"
15668 #include "confdefs.h"
15669 #include <$ac_header>
15670 _ACEOF
15671 if { (eval echo "$as_me:15671: \"$ac_cpp conftest.$ac_ext\"") >&5
15672   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15673   ac_status=$?
15674   egrep -v '^ *\+' conftest.er1 >conftest.err
15675   rm -f conftest.er1
15676   cat conftest.err >&5
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); } >/dev/null; then
15679   if test -s conftest.err; then
15680     ac_cpp_err=$ac_c_preproc_warn_flag
15681   else
15682     ac_cpp_err=
15683   fi
15684 else
15685   ac_cpp_err=yes
15686 fi
15687 if test -z "$ac_cpp_err"; then
15688   eval "$as_ac_Header=yes"
15689 else
15690   echo "$as_me: failed program was:" >&5
15691   cat conftest.$ac_ext >&5
15692   eval "$as_ac_Header=no"
15693 fi
15694 rm -f conftest.err conftest.$ac_ext
15695 fi
15696 echo "$as_me:15696: result: `eval echo '${'$as_ac_Header'}'`" >&5
15697 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15698 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15699   cat >>confdefs.h <<EOF
15700 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15701 EOF
15702
15703 fi
15704 done
15705
15706 cat >>confdefs.h <<\EOF
15707 #define HAVE_STRLCAT 1
15708 EOF
15709
15710 fi
15711
15712 fi
15713
15714 for ac_func in strlcpy snprintf
15715 do
15716 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15717 echo "$as_me:15717: checking for $ac_func" >&5
15718 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15719 if eval "test \"\${$as_ac_var+set}\" = set"; then
15720   echo $ECHO_N "(cached) $ECHO_C" >&6
15721 else
15722   cat >conftest.$ac_ext <<_ACEOF
15723 #line 15723 "configure"
15724 #include "confdefs.h"
15725 #define $ac_func autoconf_temporary
15726 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15727 #undef $ac_func
15728
15729 #ifdef __cplusplus
15730 extern "C"
15731 #endif
15732
15733 /* We use char because int might match the return type of a gcc2
15734    builtin and then its argument prototype would still apply.  */
15735 char $ac_func (void);
15736
15737 int
15738 main (void)
15739 {
15740
15741 /* The GNU C library defines stubs for functions which it implements
15742     to always fail with ENOSYS.  Some functions are actually named
15743     something starting with __ and the normal name is an alias.  */
15744 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15745 #error found stub for $ac_func
15746 #endif
15747
15748         return $ac_func ();
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 rm -f conftest.$ac_objext conftest$ac_exeext
15754 if { (eval echo "$as_me:15754: \"$ac_link\"") >&5
15755   (eval $ac_link) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); } &&
15759          { ac_try='test -s conftest$ac_exeext'
15760   { (eval echo "$as_me:15760: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:15763: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   eval "$as_ac_var=yes"
15766 else
15767   echo "$as_me: failed program was:" >&5
15768 cat conftest.$ac_ext >&5
15769 eval "$as_ac_var=no"
15770 fi
15771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15772 fi
15773 echo "$as_me:15773: result: `eval echo '${'$as_ac_var'}'`" >&5
15774 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15775 if test `eval echo '${'$as_ac_var'}'` = yes; then
15776   cat >>confdefs.h <<EOF
15777 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15778 EOF
15779
15780 fi
15781 done
15782
15783 fi
15784
15785 ###     use option --enable-assertions to turn on generation of assertion code
15786 echo "$as_me:15786: checking if you want to enable runtime assertions" >&5
15787 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15788
15789 # Check whether --enable-assertions or --disable-assertions was given.
15790 if test "${enable_assertions+set}" = set; then
15791   enableval="$enable_assertions"
15792   with_assertions=$enableval
15793 else
15794   with_assertions=no
15795 fi;
15796 echo "$as_me:15796: result: $with_assertions" >&5
15797 echo "${ECHO_T}$with_assertions" >&6
15798 if test -n "$GCC"
15799 then
15800         if test "$with_assertions" = no
15801         then
15802                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15803         else
15804
15805         ADAFLAGS="$ADAFLAGS -gnata"
15806
15807         fi
15808 fi
15809
15810 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15811
15812 echo "$as_me:15812: checking if you want to use dmalloc for testing" >&5
15813 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15814
15815 # Check whether --with-dmalloc or --without-dmalloc was given.
15816 if test "${with_dmalloc+set}" = set; then
15817   withval="$with_dmalloc"
15818
15819 cat >>confdefs.h <<EOF
15820 #define USE_DMALLOC 1
15821 EOF
15822
15823         : ${with_cflags:=-g}
15824         : ${with_no_leaks:=yes}
15825          with_dmalloc=yes
15826 else
15827   with_dmalloc=
15828 fi;
15829 echo "$as_me:15829: result: ${with_dmalloc:-no}" >&5
15830 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15831
15832 case .$with_cflags in
15833 (.*-g*)
15834         case .$CFLAGS in
15835         (.*-g*)
15836                 ;;
15837         (*)
15838
15839 cf_fix_cppflags=no
15840 cf_new_cflags=
15841 cf_new_cppflags=
15842 cf_new_extra_cppflags=
15843
15844 for cf_add_cflags in -g
15845 do
15846 case $cf_fix_cppflags in
15847 (no)
15848         case $cf_add_cflags in
15849         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15850                 case $cf_add_cflags in
15851                 (-D*)
15852                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15853
15854                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15855                                 && test -z "${cf_tst_cflags}" \
15856                                 && cf_fix_cppflags=yes
15857
15858                         if test $cf_fix_cppflags = yes ; then
15859
15860         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15861         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15862
15863                                 continue
15864                         elif test "${cf_tst_cflags}" = "\"'" ; then
15865
15866         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15867         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15868
15869                                 continue
15870                         fi
15871                         ;;
15872                 esac
15873                 case "$CPPFLAGS" in
15874                 (*$cf_add_cflags)
15875                         ;;
15876                 (*)
15877                         case $cf_add_cflags in
15878                         (-D*)
15879                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15880
15881 CPPFLAGS=`echo "$CPPFLAGS" | \
15882         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15883                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15884
15885                                 ;;
15886                         esac
15887
15888         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15889         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15890
15891                         ;;
15892                 esac
15893                 ;;
15894         (*)
15895
15896         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15897         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15898
15899                 ;;
15900         esac
15901         ;;
15902 (yes)
15903
15904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15906
15907         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15908
15909         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15910                 && test -z "${cf_tst_cflags}" \
15911                 && cf_fix_cppflags=no
15912         ;;
15913 esac
15914 done
15915
15916 if test -n "$cf_new_cflags" ; then
15917
15918         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15919         CFLAGS="${CFLAGS}$cf_new_cflags"
15920
15921 fi
15922
15923 if test -n "$cf_new_cppflags" ; then
15924
15925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15926         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15927
15928 fi
15929
15930 if test -n "$cf_new_extra_cppflags" ; then
15931
15932         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15933         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15934
15935 fi
15936
15937                 ;;
15938         esac
15939         ;;
15940 esac
15941
15942 if test "$with_dmalloc" = yes ; then
15943         echo "$as_me:15943: checking for dmalloc.h" >&5
15944 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15945 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15946   echo $ECHO_N "(cached) $ECHO_C" >&6
15947 else
15948   cat >conftest.$ac_ext <<_ACEOF
15949 #line 15949 "configure"
15950 #include "confdefs.h"
15951 #include <dmalloc.h>
15952 _ACEOF
15953 if { (eval echo "$as_me:15953: \"$ac_cpp conftest.$ac_ext\"") >&5
15954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15955   ac_status=$?
15956   egrep -v '^ *\+' conftest.er1 >conftest.err
15957   rm -f conftest.er1
15958   cat conftest.err >&5
15959   echo "$as_me:15959: \$? = $ac_status" >&5
15960   (exit $ac_status); } >/dev/null; then
15961   if test -s conftest.err; then
15962     ac_cpp_err=$ac_c_preproc_warn_flag
15963   else
15964     ac_cpp_err=
15965   fi
15966 else
15967   ac_cpp_err=yes
15968 fi
15969 if test -z "$ac_cpp_err"; then
15970   ac_cv_header_dmalloc_h=yes
15971 else
15972   echo "$as_me: failed program was:" >&5
15973   cat conftest.$ac_ext >&5
15974   ac_cv_header_dmalloc_h=no
15975 fi
15976 rm -f conftest.err conftest.$ac_ext
15977 fi
15978 echo "$as_me:15978: result: $ac_cv_header_dmalloc_h" >&5
15979 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15980 if test $ac_cv_header_dmalloc_h = yes; then
15981
15982 echo "$as_me:15982: checking for dmalloc_debug in -ldmalloc" >&5
15983 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15984 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15985   echo $ECHO_N "(cached) $ECHO_C" >&6
15986 else
15987   ac_check_lib_save_LIBS=$LIBS
15988 LIBS="-ldmalloc  $LIBS"
15989 cat >conftest.$ac_ext <<_ACEOF
15990 #line 15990 "configure"
15991 #include "confdefs.h"
15992
15993 /* Override any gcc2 internal prototype to avoid an error.  */
15994 #ifdef __cplusplus
15995 extern "C"
15996 #endif
15997 /* We use char because int might match the return type of a gcc2
15998    builtin and then its argument prototype would still apply.  */
15999 char dmalloc_debug ();
16000 int
16001 main (void)
16002 {
16003 dmalloc_debug ();
16004   ;
16005   return 0;
16006 }
16007 _ACEOF
16008 rm -f conftest.$ac_objext conftest$ac_exeext
16009 if { (eval echo "$as_me:16009: \"$ac_link\"") >&5
16010   (eval $ac_link) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); } &&
16014          { ac_try='test -s conftest$ac_exeext'
16015   { (eval echo "$as_me:16015: \"$ac_try\"") >&5
16016   (eval $ac_try) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); }; }; then
16020   ac_cv_lib_dmalloc_dmalloc_debug=yes
16021 else
16022   echo "$as_me: failed program was:" >&5
16023 cat conftest.$ac_ext >&5
16024 ac_cv_lib_dmalloc_dmalloc_debug=no
16025 fi
16026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16027 LIBS=$ac_check_lib_save_LIBS
16028 fi
16029 echo "$as_me:16029: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16030 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16031 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16032   cat >>confdefs.h <<EOF
16033 #define HAVE_LIBDMALLOC 1
16034 EOF
16035
16036   LIBS="-ldmalloc $LIBS"
16037
16038 fi
16039
16040 fi
16041
16042 fi
16043
16044 echo "$as_me:16044: checking if you want to use dbmalloc for testing" >&5
16045 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16046
16047 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16048 if test "${with_dbmalloc+set}" = set; then
16049   withval="$with_dbmalloc"
16050
16051 cat >>confdefs.h <<EOF
16052 #define USE_DBMALLOC 1
16053 EOF
16054
16055         : ${with_cflags:=-g}
16056         : ${with_no_leaks:=yes}
16057          with_dbmalloc=yes
16058 else
16059   with_dbmalloc=
16060 fi;
16061 echo "$as_me:16061: result: ${with_dbmalloc:-no}" >&5
16062 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16063
16064 case .$with_cflags in
16065 (.*-g*)
16066         case .$CFLAGS in
16067         (.*-g*)
16068                 ;;
16069         (*)
16070
16071 cf_fix_cppflags=no
16072 cf_new_cflags=
16073 cf_new_cppflags=
16074 cf_new_extra_cppflags=
16075
16076 for cf_add_cflags in -g
16077 do
16078 case $cf_fix_cppflags in
16079 (no)
16080         case $cf_add_cflags in
16081         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16082                 case $cf_add_cflags in
16083                 (-D*)
16084                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16085
16086                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16087                                 && test -z "${cf_tst_cflags}" \
16088                                 && cf_fix_cppflags=yes
16089
16090                         if test $cf_fix_cppflags = yes ; then
16091
16092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16094
16095                                 continue
16096                         elif test "${cf_tst_cflags}" = "\"'" ; then
16097
16098         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16099         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16100
16101                                 continue
16102                         fi
16103                         ;;
16104                 esac
16105                 case "$CPPFLAGS" in
16106                 (*$cf_add_cflags)
16107                         ;;
16108                 (*)
16109                         case $cf_add_cflags in
16110                         (-D*)
16111                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16112
16113 CPPFLAGS=`echo "$CPPFLAGS" | \
16114         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16115                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16116
16117                                 ;;
16118                         esac
16119
16120         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16121         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16122
16123                         ;;
16124                 esac
16125                 ;;
16126         (*)
16127
16128         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16129         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16130
16131                 ;;
16132         esac
16133         ;;
16134 (yes)
16135
16136         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16137         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16138
16139         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16140
16141         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16142                 && test -z "${cf_tst_cflags}" \
16143                 && cf_fix_cppflags=no
16144         ;;
16145 esac
16146 done
16147
16148 if test -n "$cf_new_cflags" ; then
16149
16150         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16151         CFLAGS="${CFLAGS}$cf_new_cflags"
16152
16153 fi
16154
16155 if test -n "$cf_new_cppflags" ; then
16156
16157         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16158         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16159
16160 fi
16161
16162 if test -n "$cf_new_extra_cppflags" ; then
16163
16164         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16165         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16166
16167 fi
16168
16169                 ;;
16170         esac
16171         ;;
16172 esac
16173
16174 if test "$with_dbmalloc" = yes ; then
16175         echo "$as_me:16175: checking for dbmalloc.h" >&5
16176 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16177 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16178   echo $ECHO_N "(cached) $ECHO_C" >&6
16179 else
16180   cat >conftest.$ac_ext <<_ACEOF
16181 #line 16181 "configure"
16182 #include "confdefs.h"
16183 #include <dbmalloc.h>
16184 _ACEOF
16185 if { (eval echo "$as_me:16185: \"$ac_cpp conftest.$ac_ext\"") >&5
16186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16187   ac_status=$?
16188   egrep -v '^ *\+' conftest.er1 >conftest.err
16189   rm -f conftest.er1
16190   cat conftest.err >&5
16191   echo "$as_me:16191: \$? = $ac_status" >&5
16192   (exit $ac_status); } >/dev/null; then
16193   if test -s conftest.err; then
16194     ac_cpp_err=$ac_c_preproc_warn_flag
16195   else
16196     ac_cpp_err=
16197   fi
16198 else
16199   ac_cpp_err=yes
16200 fi
16201 if test -z "$ac_cpp_err"; then
16202   ac_cv_header_dbmalloc_h=yes
16203 else
16204   echo "$as_me: failed program was:" >&5
16205   cat conftest.$ac_ext >&5
16206   ac_cv_header_dbmalloc_h=no
16207 fi
16208 rm -f conftest.err conftest.$ac_ext
16209 fi
16210 echo "$as_me:16210: result: $ac_cv_header_dbmalloc_h" >&5
16211 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16212 if test $ac_cv_header_dbmalloc_h = yes; then
16213
16214 echo "$as_me:16214: checking for debug_malloc in -ldbmalloc" >&5
16215 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16216 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16217   echo $ECHO_N "(cached) $ECHO_C" >&6
16218 else
16219   ac_check_lib_save_LIBS=$LIBS
16220 LIBS="-ldbmalloc  $LIBS"
16221 cat >conftest.$ac_ext <<_ACEOF
16222 #line 16222 "configure"
16223 #include "confdefs.h"
16224
16225 /* Override any gcc2 internal prototype to avoid an error.  */
16226 #ifdef __cplusplus
16227 extern "C"
16228 #endif
16229 /* We use char because int might match the return type of a gcc2
16230    builtin and then its argument prototype would still apply.  */
16231 char debug_malloc ();
16232 int
16233 main (void)
16234 {
16235 debug_malloc ();
16236   ;
16237   return 0;
16238 }
16239 _ACEOF
16240 rm -f conftest.$ac_objext conftest$ac_exeext
16241 if { (eval echo "$as_me:16241: \"$ac_link\"") >&5
16242   (eval $ac_link) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); } &&
16246          { ac_try='test -s conftest$ac_exeext'
16247   { (eval echo "$as_me:16247: \"$ac_try\"") >&5
16248   (eval $ac_try) 2>&5
16249   ac_status=$?
16250   echo "$as_me:16250: \$? = $ac_status" >&5
16251   (exit $ac_status); }; }; then
16252   ac_cv_lib_dbmalloc_debug_malloc=yes
16253 else
16254   echo "$as_me: failed program was:" >&5
16255 cat conftest.$ac_ext >&5
16256 ac_cv_lib_dbmalloc_debug_malloc=no
16257 fi
16258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16259 LIBS=$ac_check_lib_save_LIBS
16260 fi
16261 echo "$as_me:16261: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16262 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16263 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16264   cat >>confdefs.h <<EOF
16265 #define HAVE_LIBDBMALLOC 1
16266 EOF
16267
16268   LIBS="-ldbmalloc $LIBS"
16269
16270 fi
16271
16272 fi
16273
16274 fi
16275
16276 echo "$as_me:16276: checking if you want to use valgrind for testing" >&5
16277 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16278
16279 # Check whether --with-valgrind or --without-valgrind was given.
16280 if test "${with_valgrind+set}" = set; then
16281   withval="$with_valgrind"
16282
16283 cat >>confdefs.h <<EOF
16284 #define USE_VALGRIND 1
16285 EOF
16286
16287         : ${with_cflags:=-g}
16288         : ${with_no_leaks:=yes}
16289          with_valgrind=yes
16290 else
16291   with_valgrind=
16292 fi;
16293 echo "$as_me:16293: result: ${with_valgrind:-no}" >&5
16294 echo "${ECHO_T}${with_valgrind:-no}" >&6
16295
16296 case .$with_cflags in
16297 (.*-g*)
16298         case .$CFLAGS in
16299         (.*-g*)
16300                 ;;
16301         (*)
16302
16303 cf_fix_cppflags=no
16304 cf_new_cflags=
16305 cf_new_cppflags=
16306 cf_new_extra_cppflags=
16307
16308 for cf_add_cflags in -g
16309 do
16310 case $cf_fix_cppflags in
16311 (no)
16312         case $cf_add_cflags in
16313         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16314                 case $cf_add_cflags in
16315                 (-D*)
16316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16317
16318                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16319                                 && test -z "${cf_tst_cflags}" \
16320                                 && cf_fix_cppflags=yes
16321
16322                         if test $cf_fix_cppflags = yes ; then
16323
16324         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16325         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16326
16327                                 continue
16328                         elif test "${cf_tst_cflags}" = "\"'" ; then
16329
16330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16332
16333                                 continue
16334                         fi
16335                         ;;
16336                 esac
16337                 case "$CPPFLAGS" in
16338                 (*$cf_add_cflags)
16339                         ;;
16340                 (*)
16341                         case $cf_add_cflags in
16342                         (-D*)
16343                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16344
16345 CPPFLAGS=`echo "$CPPFLAGS" | \
16346         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16347                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16348
16349                                 ;;
16350                         esac
16351
16352         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16353         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16354
16355                         ;;
16356                 esac
16357                 ;;
16358         (*)
16359
16360         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16361         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16362
16363                 ;;
16364         esac
16365         ;;
16366 (yes)
16367
16368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16370
16371         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16372
16373         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16374                 && test -z "${cf_tst_cflags}" \
16375                 && cf_fix_cppflags=no
16376         ;;
16377 esac
16378 done
16379
16380 if test -n "$cf_new_cflags" ; then
16381
16382         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16383         CFLAGS="${CFLAGS}$cf_new_cflags"
16384
16385 fi
16386
16387 if test -n "$cf_new_cppflags" ; then
16388
16389         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16390         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16391
16392 fi
16393
16394 if test -n "$cf_new_extra_cppflags" ; then
16395
16396         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16397         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16398
16399 fi
16400
16401                 ;;
16402         esac
16403         ;;
16404 esac
16405
16406 echo "$as_me:16406: checking if you want to perform memory-leak testing" >&5
16407 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16408
16409 # Check whether --enable-leaks or --disable-leaks was given.
16410 if test "${enable_leaks+set}" = set; then
16411   enableval="$enable_leaks"
16412   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16413 else
16414   : ${with_no_leaks:=no}
16415 fi;
16416 echo "$as_me:16416: result: $with_no_leaks" >&5
16417 echo "${ECHO_T}$with_no_leaks" >&6
16418
16419 if test "$with_no_leaks" = yes ; then
16420
16421 cat >>confdefs.h <<\EOF
16422 #define NO_LEAKS 1
16423 EOF
16424
16425 cat >>confdefs.h <<\EOF
16426 #define YY_NO_LEAKS 1
16427 EOF
16428
16429 fi
16430
16431 cat >>confdefs.h <<\EOF
16432 #define HAVE_NC_ALLOC_H 1
16433 EOF
16434
16435 ###     use option --enable-expanded to generate certain macros as functions
16436
16437 # Check whether --enable-expanded or --disable-expanded was given.
16438 if test "${enable_expanded+set}" = set; then
16439   enableval="$enable_expanded"
16440   test "x$enableval" = xyes &&
16441 cat >>confdefs.h <<\EOF
16442 #define NCURSES_EXPANDED 1
16443 EOF
16444
16445 fi;
16446
16447 ###     use option --disable-macros to suppress macros in favor of functions
16448
16449 # Check whether --enable-macros or --disable-macros was given.
16450 if test "${enable_macros+set}" = set; then
16451   enableval="$enable_macros"
16452   test "$enableval" = no &&
16453 cat >>confdefs.h <<\EOF
16454 #define NCURSES_NOMACROS 1
16455 EOF
16456
16457 fi;
16458
16459 # Normally we only add trace() to the debug-library.  Allow this to be
16460 # extended to all models of the ncurses library:
16461 cf_all_traces=no
16462 case "$CFLAGS $CPPFLAGS" in
16463 (*-DTRACE*)
16464         cf_all_traces=yes
16465         ;;
16466 esac
16467
16468 echo "$as_me:16468: checking whether to add trace feature to all models" >&5
16469 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16470
16471 # Check whether --with-trace or --without-trace was given.
16472 if test "${with_trace+set}" = set; then
16473   withval="$with_trace"
16474   cf_with_trace=$withval
16475 else
16476   cf_with_trace=$cf_all_traces
16477 fi;
16478 echo "$as_me:16478: result: $cf_with_trace" >&5
16479 echo "${ECHO_T}$cf_with_trace" >&6
16480
16481 if test "x$cf_with_trace" = xyes ; then
16482         LIB_TRACING=all
16483         ADA_TRACE=TRUE
16484
16485 cf_fix_cppflags=no
16486 cf_new_cflags=
16487 cf_new_cppflags=
16488 cf_new_extra_cppflags=
16489
16490 for cf_add_cflags in -DTRACE
16491 do
16492 case $cf_fix_cppflags in
16493 (no)
16494         case $cf_add_cflags in
16495         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16496                 case $cf_add_cflags in
16497                 (-D*)
16498                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16499
16500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16501                                 && test -z "${cf_tst_cflags}" \
16502                                 && cf_fix_cppflags=yes
16503
16504                         if test $cf_fix_cppflags = yes ; then
16505
16506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16508
16509                                 continue
16510                         elif test "${cf_tst_cflags}" = "\"'" ; then
16511
16512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16514
16515                                 continue
16516                         fi
16517                         ;;
16518                 esac
16519                 case "$CPPFLAGS" in
16520                 (*$cf_add_cflags)
16521                         ;;
16522                 (*)
16523                         case $cf_add_cflags in
16524                         (-D*)
16525                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16526
16527 CPPFLAGS=`echo "$CPPFLAGS" | \
16528         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16529                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16530
16531                                 ;;
16532                         esac
16533
16534         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16535         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16536
16537                         ;;
16538                 esac
16539                 ;;
16540         (*)
16541
16542         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16543         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16544
16545                 ;;
16546         esac
16547         ;;
16548 (yes)
16549
16550         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16551         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16552
16553         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16554
16555         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16556                 && test -z "${cf_tst_cflags}" \
16557                 && cf_fix_cppflags=no
16558         ;;
16559 esac
16560 done
16561
16562 if test -n "$cf_new_cflags" ; then
16563
16564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16565         CFLAGS="${CFLAGS}$cf_new_cflags"
16566
16567 fi
16568
16569 if test -n "$cf_new_cppflags" ; then
16570
16571         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16572         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16573
16574 fi
16575
16576 if test -n "$cf_new_extra_cppflags" ; then
16577
16578         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16579         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16580
16581 fi
16582
16583 cat >>confdefs.h <<\EOF
16584 #define HAVE__TRACEF 1
16585 EOF
16586
16587 else
16588         LIB_TRACING=DEBUG
16589         ADA_TRACE=FALSE
16590 fi
16591
16592 echo "$as_me:16592: checking if we want to use GNAT projects" >&5
16593 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16594
16595 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16596 if test "${enable_gnat_projects+set}" = set; then
16597   enableval="$enable_gnat_projects"
16598   test "$enableval" != no && enableval=yes
16599         if test "$enableval" != "yes" ; then
16600     enable_gnat_projects=no
16601         else
16602                 enable_gnat_projects=yes
16603         fi
16604 else
16605   enableval=yes
16606         enable_gnat_projects=yes
16607
16608 fi;
16609 echo "$as_me:16609: result: $enable_gnat_projects" >&5
16610 echo "${ECHO_T}$enable_gnat_projects" >&6
16611
16612 ###     Checks for libraries.
16613 case $cf_cv_system_name in
16614 (*mingw32*|*mingw64*)
16615         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16616         LIBS=" -lpsapi $LIBS"
16617         ;;
16618 (*)
16619 echo "$as_me:16619: checking for gettimeofday" >&5
16620 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16621 if test "${ac_cv_func_gettimeofday+set}" = set; then
16622   echo $ECHO_N "(cached) $ECHO_C" >&6
16623 else
16624   cat >conftest.$ac_ext <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16627 #define gettimeofday autoconf_temporary
16628 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16629 #undef gettimeofday
16630
16631 #ifdef __cplusplus
16632 extern "C"
16633 #endif
16634
16635 /* We use char because int might match the return type of a gcc2
16636    builtin and then its argument prototype would still apply.  */
16637 char gettimeofday (void);
16638
16639 int
16640 main (void)
16641 {
16642
16643 /* The GNU C library defines stubs for functions which it implements
16644     to always fail with ENOSYS.  Some functions are actually named
16645     something starting with __ and the normal name is an alias.  */
16646 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16647 #error found stub for gettimeofday
16648 #endif
16649
16650         return gettimeofday ();
16651   ;
16652   return 0;
16653 }
16654 _ACEOF
16655 rm -f conftest.$ac_objext conftest$ac_exeext
16656 if { (eval echo "$as_me:16656: \"$ac_link\"") >&5
16657   (eval $ac_link) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); } &&
16661          { ac_try='test -s conftest$ac_exeext'
16662   { (eval echo "$as_me:16662: \"$ac_try\"") >&5
16663   (eval $ac_try) 2>&5
16664   ac_status=$?
16665   echo "$as_me:16665: \$? = $ac_status" >&5
16666   (exit $ac_status); }; }; then
16667   ac_cv_func_gettimeofday=yes
16668 else
16669   echo "$as_me: failed program was:" >&5
16670 cat conftest.$ac_ext >&5
16671 ac_cv_func_gettimeofday=no
16672 fi
16673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16674 fi
16675 echo "$as_me:16675: result: $ac_cv_func_gettimeofday" >&5
16676 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16677 if test $ac_cv_func_gettimeofday = yes; then
16678
16679 cat >>confdefs.h <<\EOF
16680 #define HAVE_GETTIMEOFDAY 1
16681 EOF
16682
16683 else
16684
16685 echo "$as_me:16685: checking for gettimeofday in -lbsd" >&5
16686 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16687 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16688   echo $ECHO_N "(cached) $ECHO_C" >&6
16689 else
16690   ac_check_lib_save_LIBS=$LIBS
16691 LIBS="-lbsd  $LIBS"
16692 cat >conftest.$ac_ext <<_ACEOF
16693 #line 16693 "configure"
16694 #include "confdefs.h"
16695
16696 /* Override any gcc2 internal prototype to avoid an error.  */
16697 #ifdef __cplusplus
16698 extern "C"
16699 #endif
16700 /* We use char because int might match the return type of a gcc2
16701    builtin and then its argument prototype would still apply.  */
16702 char gettimeofday ();
16703 int
16704 main (void)
16705 {
16706 gettimeofday ();
16707   ;
16708   return 0;
16709 }
16710 _ACEOF
16711 rm -f conftest.$ac_objext conftest$ac_exeext
16712 if { (eval echo "$as_me:16712: \"$ac_link\"") >&5
16713   (eval $ac_link) 2>&5
16714   ac_status=$?
16715   echo "$as_me:16715: \$? = $ac_status" >&5
16716   (exit $ac_status); } &&
16717          { ac_try='test -s conftest$ac_exeext'
16718   { (eval echo "$as_me:16718: \"$ac_try\"") >&5
16719   (eval $ac_try) 2>&5
16720   ac_status=$?
16721   echo "$as_me:16721: \$? = $ac_status" >&5
16722   (exit $ac_status); }; }; then
16723   ac_cv_lib_bsd_gettimeofday=yes
16724 else
16725   echo "$as_me: failed program was:" >&5
16726 cat conftest.$ac_ext >&5
16727 ac_cv_lib_bsd_gettimeofday=no
16728 fi
16729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16730 LIBS=$ac_check_lib_save_LIBS
16731 fi
16732 echo "$as_me:16732: result: $ac_cv_lib_bsd_gettimeofday" >&5
16733 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16734 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16735
16736 cat >>confdefs.h <<\EOF
16737 #define HAVE_GETTIMEOFDAY 1
16738 EOF
16739
16740 cf_add_libs="-lbsd"
16741 # Filter out duplicates - this happens with badly-designed ".pc" files...
16742 for cf_add_1lib in $LIBS
16743 do
16744         for cf_add_2lib in $cf_add_libs
16745         do
16746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16747                 then
16748                         cf_add_1lib=
16749                         break
16750                 fi
16751         done
16752         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16753 done
16754 LIBS="$cf_add_libs"
16755
16756 fi
16757
16758 fi
16759         ;;
16760 esac
16761
16762 echo "$as_me:16762: checking if -lm needed for math functions" >&5
16763 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16764 if test "${cf_cv_need_libm+set}" = set; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 else
16767
16768         cat >conftest.$ac_ext <<_ACEOF
16769 #line 16769 "configure"
16770 #include "confdefs.h"
16771
16772         #include <stdio.h>
16773         #include <stdlib.h>
16774         #include <math.h>
16775
16776 int
16777 main (void)
16778 {
16779 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16780   ;
16781   return 0;
16782 }
16783 _ACEOF
16784 rm -f conftest.$ac_objext conftest$ac_exeext
16785 if { (eval echo "$as_me:16785: \"$ac_link\"") >&5
16786   (eval $ac_link) 2>&5
16787   ac_status=$?
16788   echo "$as_me:16788: \$? = $ac_status" >&5
16789   (exit $ac_status); } &&
16790          { ac_try='test -s conftest$ac_exeext'
16791   { (eval echo "$as_me:16791: \"$ac_try\"") >&5
16792   (eval $ac_try) 2>&5
16793   ac_status=$?
16794   echo "$as_me:16794: \$? = $ac_status" >&5
16795   (exit $ac_status); }; }; then
16796   cf_cv_need_libm=no
16797 else
16798   echo "$as_me: failed program was:" >&5
16799 cat conftest.$ac_ext >&5
16800 cf_cv_need_libm=yes
16801 fi
16802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16803 fi
16804 echo "$as_me:16804: result: $cf_cv_need_libm" >&5
16805 echo "${ECHO_T}$cf_cv_need_libm" >&6
16806 if test "$cf_cv_need_libm" = yes
16807 then
16808 MATH_LIB=-lm
16809 fi
16810
16811 ###     Checks for header files.
16812 echo "$as_me:16812: checking for ANSI C header files" >&5
16813 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16814 if test "${ac_cv_header_stdc+set}" = set; then
16815   echo $ECHO_N "(cached) $ECHO_C" >&6
16816 else
16817   cat >conftest.$ac_ext <<_ACEOF
16818 #line 16818 "configure"
16819 #include "confdefs.h"
16820 #include <stdlib.h>
16821 #include <stdarg.h>
16822 #include <string.h>
16823 #include <float.h>
16824
16825 _ACEOF
16826 if { (eval echo "$as_me:16826: \"$ac_cpp conftest.$ac_ext\"") >&5
16827   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16828   ac_status=$?
16829   egrep -v '^ *\+' conftest.er1 >conftest.err
16830   rm -f conftest.er1
16831   cat conftest.err >&5
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); } >/dev/null; then
16834   if test -s conftest.err; then
16835     ac_cpp_err=$ac_c_preproc_warn_flag
16836   else
16837     ac_cpp_err=
16838   fi
16839 else
16840   ac_cpp_err=yes
16841 fi
16842 if test -z "$ac_cpp_err"; then
16843   ac_cv_header_stdc=yes
16844 else
16845   echo "$as_me: failed program was:" >&5
16846   cat conftest.$ac_ext >&5
16847   ac_cv_header_stdc=no
16848 fi
16849 rm -f conftest.err conftest.$ac_ext
16850
16851 if test $ac_cv_header_stdc = yes; then
16852   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16853   cat >conftest.$ac_ext <<_ACEOF
16854 #line 16854 "configure"
16855 #include "confdefs.h"
16856 #include <string.h>
16857
16858 _ACEOF
16859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16860   egrep "memchr" >/dev/null 2>&1; then
16861   :
16862 else
16863   ac_cv_header_stdc=no
16864 fi
16865 rm -rf conftest*
16866
16867 fi
16868
16869 if test $ac_cv_header_stdc = yes; then
16870   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16871   cat >conftest.$ac_ext <<_ACEOF
16872 #line 16872 "configure"
16873 #include "confdefs.h"
16874 #include <stdlib.h>
16875
16876 _ACEOF
16877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16878   egrep "free" >/dev/null 2>&1; then
16879   :
16880 else
16881   ac_cv_header_stdc=no
16882 fi
16883 rm -rf conftest*
16884
16885 fi
16886
16887 if test $ac_cv_header_stdc = yes; then
16888   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16889   if test "$cross_compiling" = yes; then
16890   :
16891 else
16892   cat >conftest.$ac_ext <<_ACEOF
16893 #line 16893 "configure"
16894 #include "confdefs.h"
16895 #include <ctype.h>
16896 #if ((' ' & 0x0FF) == 0x020)
16897 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16898 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16899 #else
16900 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16901                      || ('j' <= (c) && (c) <= 'r') \
16902                      || ('s' <= (c) && (c) <= 'z'))
16903 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16904 #endif
16905
16906 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16907 int
16908 main (void)
16909 {
16910   int i;
16911   for (i = 0; i < 256; i++)
16912     if (XOR (islower (i), ISLOWER (i))
16913         || toupper (i) != TOUPPER (i))
16914       $ac_main_return(2);
16915   $ac_main_return (0);
16916 }
16917 _ACEOF
16918 rm -f conftest$ac_exeext
16919 if { (eval echo "$as_me:16919: \"$ac_link\"") >&5
16920   (eval $ac_link) 2>&5
16921   ac_status=$?
16922   echo "$as_me:16922: \$? = $ac_status" >&5
16923   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16924   { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925   (eval $ac_try) 2>&5
16926   ac_status=$?
16927   echo "$as_me:16927: \$? = $ac_status" >&5
16928   (exit $ac_status); }; }; then
16929   :
16930 else
16931   echo "$as_me: program exited with status $ac_status" >&5
16932 echo "$as_me: failed program was:" >&5
16933 cat conftest.$ac_ext >&5
16934 ac_cv_header_stdc=no
16935 fi
16936 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16937 fi
16938 fi
16939 fi
16940 echo "$as_me:16940: result: $ac_cv_header_stdc" >&5
16941 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16942 if test $ac_cv_header_stdc = yes; then
16943
16944 cat >>confdefs.h <<\EOF
16945 #define STDC_HEADERS 1
16946 EOF
16947
16948 fi
16949
16950 ac_header_dirent=no
16951 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16952   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16953 echo "$as_me:16953: checking for $ac_hdr that defines DIR" >&5
16954 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16956   echo $ECHO_N "(cached) $ECHO_C" >&6
16957 else
16958   cat >conftest.$ac_ext <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961 #include <sys/types.h>
16962 #include <$ac_hdr>
16963
16964 int
16965 main (void)
16966 {
16967 if ((DIR *) 0)
16968 return 0;
16969   ;
16970   return 0;
16971 }
16972 _ACEOF
16973 rm -f conftest.$ac_objext
16974 if { (eval echo "$as_me:16974: \"$ac_compile\"") >&5
16975   (eval $ac_compile) 2>&5
16976   ac_status=$?
16977   echo "$as_me:16977: \$? = $ac_status" >&5
16978   (exit $ac_status); } &&
16979          { ac_try='test -s conftest.$ac_objext'
16980   { (eval echo "$as_me:16980: \"$ac_try\"") >&5
16981   (eval $ac_try) 2>&5
16982   ac_status=$?
16983   echo "$as_me:16983: \$? = $ac_status" >&5
16984   (exit $ac_status); }; }; then
16985   eval "$as_ac_Header=yes"
16986 else
16987   echo "$as_me: failed program was:" >&5
16988 cat conftest.$ac_ext >&5
16989 eval "$as_ac_Header=no"
16990 fi
16991 rm -f conftest.$ac_objext conftest.$ac_ext
16992 fi
16993 echo "$as_me:16993: result: `eval echo '${'$as_ac_Header'}'`" >&5
16994 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16995 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16996   cat >>confdefs.h <<EOF
16997 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16998 EOF
16999
17000 ac_header_dirent=$ac_hdr; break
17001 fi
17002
17003 done
17004 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17005 if test $ac_header_dirent = dirent.h; then
17006   echo "$as_me:17006: checking for opendir in -ldir" >&5
17007 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17008 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17009   echo $ECHO_N "(cached) $ECHO_C" >&6
17010 else
17011   ac_check_lib_save_LIBS=$LIBS
17012 LIBS="-ldir  $LIBS"
17013 cat >conftest.$ac_ext <<_ACEOF
17014 #line 17014 "configure"
17015 #include "confdefs.h"
17016
17017 /* Override any gcc2 internal prototype to avoid an error.  */
17018 #ifdef __cplusplus
17019 extern "C"
17020 #endif
17021 /* We use char because int might match the return type of a gcc2
17022    builtin and then its argument prototype would still apply.  */
17023 char opendir ();
17024 int
17025 main (void)
17026 {
17027 opendir ();
17028   ;
17029   return 0;
17030 }
17031 _ACEOF
17032 rm -f conftest.$ac_objext conftest$ac_exeext
17033 if { (eval echo "$as_me:17033: \"$ac_link\"") >&5
17034   (eval $ac_link) 2>&5
17035   ac_status=$?
17036   echo "$as_me:17036: \$? = $ac_status" >&5
17037   (exit $ac_status); } &&
17038          { ac_try='test -s conftest$ac_exeext'
17039   { (eval echo "$as_me:17039: \"$ac_try\"") >&5
17040   (eval $ac_try) 2>&5
17041   ac_status=$?
17042   echo "$as_me:17042: \$? = $ac_status" >&5
17043   (exit $ac_status); }; }; then
17044   ac_cv_lib_dir_opendir=yes
17045 else
17046   echo "$as_me: failed program was:" >&5
17047 cat conftest.$ac_ext >&5
17048 ac_cv_lib_dir_opendir=no
17049 fi
17050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17051 LIBS=$ac_check_lib_save_LIBS
17052 fi
17053 echo "$as_me:17053: result: $ac_cv_lib_dir_opendir" >&5
17054 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17055 if test $ac_cv_lib_dir_opendir = yes; then
17056   LIBS="$LIBS -ldir"
17057 fi
17058
17059 else
17060   echo "$as_me:17060: checking for opendir in -lx" >&5
17061 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17062 if test "${ac_cv_lib_x_opendir+set}" = set; then
17063   echo $ECHO_N "(cached) $ECHO_C" >&6
17064 else
17065   ac_check_lib_save_LIBS=$LIBS
17066 LIBS="-lx  $LIBS"
17067 cat >conftest.$ac_ext <<_ACEOF
17068 #line 17068 "configure"
17069 #include "confdefs.h"
17070
17071 /* Override any gcc2 internal prototype to avoid an error.  */
17072 #ifdef __cplusplus
17073 extern "C"
17074 #endif
17075 /* We use char because int might match the return type of a gcc2
17076    builtin and then its argument prototype would still apply.  */
17077 char opendir ();
17078 int
17079 main (void)
17080 {
17081 opendir ();
17082   ;
17083   return 0;
17084 }
17085 _ACEOF
17086 rm -f conftest.$ac_objext conftest$ac_exeext
17087 if { (eval echo "$as_me:17087: \"$ac_link\"") >&5
17088   (eval $ac_link) 2>&5
17089   ac_status=$?
17090   echo "$as_me:17090: \$? = $ac_status" >&5
17091   (exit $ac_status); } &&
17092          { ac_try='test -s conftest$ac_exeext'
17093   { (eval echo "$as_me:17093: \"$ac_try\"") >&5
17094   (eval $ac_try) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit $ac_status); }; }; then
17098   ac_cv_lib_x_opendir=yes
17099 else
17100   echo "$as_me: failed program was:" >&5
17101 cat conftest.$ac_ext >&5
17102 ac_cv_lib_x_opendir=no
17103 fi
17104 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17105 LIBS=$ac_check_lib_save_LIBS
17106 fi
17107 echo "$as_me:17107: result: $ac_cv_lib_x_opendir" >&5
17108 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17109 if test $ac_cv_lib_x_opendir = yes; then
17110   LIBS="$LIBS -lx"
17111 fi
17112
17113 fi
17114
17115 echo "$as_me:17115: checking whether time.h and sys/time.h may both be included" >&5
17116 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17117 if test "${ac_cv_header_time+set}" = set; then
17118   echo $ECHO_N "(cached) $ECHO_C" >&6
17119 else
17120   cat >conftest.$ac_ext <<_ACEOF
17121 #line 17121 "configure"
17122 #include "confdefs.h"
17123 #include <sys/types.h>
17124 #include <sys/time.h>
17125 #include <time.h>
17126
17127 int
17128 main (void)
17129 {
17130 if ((struct tm *) 0)
17131 return 0;
17132   ;
17133   return 0;
17134 }
17135 _ACEOF
17136 rm -f conftest.$ac_objext
17137 if { (eval echo "$as_me:17137: \"$ac_compile\"") >&5
17138   (eval $ac_compile) 2>&5
17139   ac_status=$?
17140   echo "$as_me:17140: \$? = $ac_status" >&5
17141   (exit $ac_status); } &&
17142          { ac_try='test -s conftest.$ac_objext'
17143   { (eval echo "$as_me:17143: \"$ac_try\"") >&5
17144   (eval $ac_try) 2>&5
17145   ac_status=$?
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); }; }; then
17148   ac_cv_header_time=yes
17149 else
17150   echo "$as_me: failed program was:" >&5
17151 cat conftest.$ac_ext >&5
17152 ac_cv_header_time=no
17153 fi
17154 rm -f conftest.$ac_objext conftest.$ac_ext
17155 fi
17156 echo "$as_me:17156: result: $ac_cv_header_time" >&5
17157 echo "${ECHO_T}$ac_cv_header_time" >&6
17158 if test $ac_cv_header_time = yes; then
17159
17160 cat >>confdefs.h <<\EOF
17161 #define TIME_WITH_SYS_TIME 1
17162 EOF
17163
17164 fi
17165
17166 cf_regex_func=no
17167
17168 cf_regex_libs="regex re"
17169 case $host_os in
17170 (mingw*)
17171         cf_regex_libs="gnurx $cf_regex_libs"
17172         ;;
17173 esac
17174
17175 echo "$as_me:17175: checking for regcomp" >&5
17176 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17177 if test "${ac_cv_func_regcomp+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180   cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183 #define regcomp autoconf_temporary
17184 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17185 #undef regcomp
17186
17187 #ifdef __cplusplus
17188 extern "C"
17189 #endif
17190
17191 /* We use char because int might match the return type of a gcc2
17192    builtin and then its argument prototype would still apply.  */
17193 char regcomp (void);
17194
17195 int
17196 main (void)
17197 {
17198
17199 /* The GNU C library defines stubs for functions which it implements
17200     to always fail with ENOSYS.  Some functions are actually named
17201     something starting with __ and the normal name is an alias.  */
17202 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17203 #error found stub for regcomp
17204 #endif
17205
17206         return regcomp ();
17207   ;
17208   return 0;
17209 }
17210 _ACEOF
17211 rm -f conftest.$ac_objext conftest$ac_exeext
17212 if { (eval echo "$as_me:17212: \"$ac_link\"") >&5
17213   (eval $ac_link) 2>&5
17214   ac_status=$?
17215   echo "$as_me:17215: \$? = $ac_status" >&5
17216   (exit $ac_status); } &&
17217          { ac_try='test -s conftest$ac_exeext'
17218   { (eval echo "$as_me:17218: \"$ac_try\"") >&5
17219   (eval $ac_try) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); }; }; then
17223   ac_cv_func_regcomp=yes
17224 else
17225   echo "$as_me: failed program was:" >&5
17226 cat conftest.$ac_ext >&5
17227 ac_cv_func_regcomp=no
17228 fi
17229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17230 fi
17231 echo "$as_me:17231: result: $ac_cv_func_regcomp" >&5
17232 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17233 if test $ac_cv_func_regcomp = yes; then
17234   cf_regex_func=regcomp
17235 else
17236
17237         for cf_regex_lib in $cf_regex_libs
17238         do
17239                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17240 echo "$as_me:17240: checking for regcomp in -l$cf_regex_lib" >&5
17241 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17242 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 else
17245   ac_check_lib_save_LIBS=$LIBS
17246 LIBS="-l$cf_regex_lib  $LIBS"
17247 cat >conftest.$ac_ext <<_ACEOF
17248 #line 17248 "configure"
17249 #include "confdefs.h"
17250
17251 /* Override any gcc2 internal prototype to avoid an error.  */
17252 #ifdef __cplusplus
17253 extern "C"
17254 #endif
17255 /* We use char because int might match the return type of a gcc2
17256    builtin and then its argument prototype would still apply.  */
17257 char regcomp ();
17258 int
17259 main (void)
17260 {
17261 regcomp ();
17262   ;
17263   return 0;
17264 }
17265 _ACEOF
17266 rm -f conftest.$ac_objext conftest$ac_exeext
17267 if { (eval echo "$as_me:17267: \"$ac_link\"") >&5
17268   (eval $ac_link) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); } &&
17272          { ac_try='test -s conftest$ac_exeext'
17273   { (eval echo "$as_me:17273: \"$ac_try\"") >&5
17274   (eval $ac_try) 2>&5
17275   ac_status=$?
17276   echo "$as_me:17276: \$? = $ac_status" >&5
17277   (exit $ac_status); }; }; then
17278   eval "$as_ac_Lib=yes"
17279 else
17280   echo "$as_me: failed program was:" >&5
17281 cat conftest.$ac_ext >&5
17282 eval "$as_ac_Lib=no"
17283 fi
17284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17285 LIBS=$ac_check_lib_save_LIBS
17286 fi
17287 echo "$as_me:17287: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17288 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17289 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17290
17291 cf_add_libs="-l$cf_regex_lib"
17292 # Filter out duplicates - this happens with badly-designed ".pc" files...
17293 for cf_add_1lib in $LIBS
17294 do
17295         for cf_add_2lib in $cf_add_libs
17296         do
17297                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17298                 then
17299                         cf_add_1lib=
17300                         break
17301                 fi
17302         done
17303         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17304 done
17305 LIBS="$cf_add_libs"
17306
17307                                 cf_regex_func=regcomp
17308                                 break
17309 fi
17310
17311         done
17312
17313 fi
17314
17315 if test "$cf_regex_func" = no ; then
17316         echo "$as_me:17316: checking for compile" >&5
17317 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17318 if test "${ac_cv_func_compile+set}" = set; then
17319   echo $ECHO_N "(cached) $ECHO_C" >&6
17320 else
17321   cat >conftest.$ac_ext <<_ACEOF
17322 #line 17322 "configure"
17323 #include "confdefs.h"
17324 #define compile autoconf_temporary
17325 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17326 #undef compile
17327
17328 #ifdef __cplusplus
17329 extern "C"
17330 #endif
17331
17332 /* We use char because int might match the return type of a gcc2
17333    builtin and then its argument prototype would still apply.  */
17334 char compile (void);
17335
17336 int
17337 main (void)
17338 {
17339
17340 /* The GNU C library defines stubs for functions which it implements
17341     to always fail with ENOSYS.  Some functions are actually named
17342     something starting with __ and the normal name is an alias.  */
17343 #if defined (__stub_compile) || defined (__stub___compile)
17344 #error found stub for compile
17345 #endif
17346
17347         return compile ();
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 rm -f conftest.$ac_objext conftest$ac_exeext
17353 if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354   (eval $ac_link) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -s conftest$ac_exeext'
17359   { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); }; }; then
17364   ac_cv_func_compile=yes
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat conftest.$ac_ext >&5
17368 ac_cv_func_compile=no
17369 fi
17370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17371 fi
17372 echo "$as_me:17372: result: $ac_cv_func_compile" >&5
17373 echo "${ECHO_T}$ac_cv_func_compile" >&6
17374 if test $ac_cv_func_compile = yes; then
17375   cf_regex_func=compile
17376 else
17377
17378                 echo "$as_me:17378: checking for compile in -lgen" >&5
17379 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17380 if test "${ac_cv_lib_gen_compile+set}" = set; then
17381   echo $ECHO_N "(cached) $ECHO_C" >&6
17382 else
17383   ac_check_lib_save_LIBS=$LIBS
17384 LIBS="-lgen  $LIBS"
17385 cat >conftest.$ac_ext <<_ACEOF
17386 #line 17386 "configure"
17387 #include "confdefs.h"
17388
17389 /* Override any gcc2 internal prototype to avoid an error.  */
17390 #ifdef __cplusplus
17391 extern "C"
17392 #endif
17393 /* We use char because int might match the return type of a gcc2
17394    builtin and then its argument prototype would still apply.  */
17395 char compile ();
17396 int
17397 main (void)
17398 {
17399 compile ();
17400   ;
17401   return 0;
17402 }
17403 _ACEOF
17404 rm -f conftest.$ac_objext conftest$ac_exeext
17405 if { (eval echo "$as_me:17405: \"$ac_link\"") >&5
17406   (eval $ac_link) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit $ac_status); } &&
17410          { ac_try='test -s conftest$ac_exeext'
17411   { (eval echo "$as_me:17411: \"$ac_try\"") >&5
17412   (eval $ac_try) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); }; }; then
17416   ac_cv_lib_gen_compile=yes
17417 else
17418   echo "$as_me: failed program was:" >&5
17419 cat conftest.$ac_ext >&5
17420 ac_cv_lib_gen_compile=no
17421 fi
17422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17423 LIBS=$ac_check_lib_save_LIBS
17424 fi
17425 echo "$as_me:17425: result: $ac_cv_lib_gen_compile" >&5
17426 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17427 if test $ac_cv_lib_gen_compile = yes; then
17428
17429 cf_add_libs="-lgen"
17430 # Filter out duplicates - this happens with badly-designed ".pc" files...
17431 for cf_add_1lib in $LIBS
17432 do
17433         for cf_add_2lib in $cf_add_libs
17434         do
17435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17436                 then
17437                         cf_add_1lib=
17438                         break
17439                 fi
17440         done
17441         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17442 done
17443 LIBS="$cf_add_libs"
17444
17445                                 cf_regex_func=compile
17446 fi
17447
17448 fi
17449
17450 fi
17451
17452 if test "$cf_regex_func" = no ; then
17453         { echo "$as_me:17453: WARNING: cannot find regular expression library" >&5
17454 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17455 fi
17456
17457 echo "$as_me:17457: checking for regular-expression headers" >&5
17458 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17459 if test "${cf_cv_regex_hdrs+set}" = set; then
17460   echo $ECHO_N "(cached) $ECHO_C" >&6
17461 else
17462
17463 cf_cv_regex_hdrs=no
17464 case $cf_regex_func in
17465 (compile)
17466         for cf_regex_hdr in regexp.h regexpr.h
17467         do
17468                 cat >conftest.$ac_ext <<_ACEOF
17469 #line 17469 "configure"
17470 #include "confdefs.h"
17471 #include <$cf_regex_hdr>
17472 int
17473 main (void)
17474 {
17475
17476                         char *p = compile("", "", "", 0);
17477                         int x = step("", "");
17478
17479   ;
17480   return 0;
17481 }
17482 _ACEOF
17483 rm -f conftest.$ac_objext conftest$ac_exeext
17484 if { (eval echo "$as_me:17484: \"$ac_link\"") >&5
17485   (eval $ac_link) 2>&5
17486   ac_status=$?
17487   echo "$as_me:17487: \$? = $ac_status" >&5
17488   (exit $ac_status); } &&
17489          { ac_try='test -s conftest$ac_exeext'
17490   { (eval echo "$as_me:17490: \"$ac_try\"") >&5
17491   (eval $ac_try) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); }; }; then
17495
17496                         cf_cv_regex_hdrs=$cf_regex_hdr
17497                         break
17498
17499 else
17500   echo "$as_me: failed program was:" >&5
17501 cat conftest.$ac_ext >&5
17502 fi
17503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17504         done
17505         ;;
17506 (*)
17507         for cf_regex_hdr in regex.h
17508         do
17509                 cat >conftest.$ac_ext <<_ACEOF
17510 #line 17510 "configure"
17511 #include "confdefs.h"
17512 #include <sys/types.h>
17513 #include <$cf_regex_hdr>
17514 int
17515 main (void)
17516 {
17517
17518                         regex_t *p;
17519                         int x = regcomp(p, "", 0);
17520                         int y = regexec(p, "", 0, 0, 0);
17521                         regfree(p);
17522
17523   ;
17524   return 0;
17525 }
17526 _ACEOF
17527 rm -f conftest.$ac_objext conftest$ac_exeext
17528 if { (eval echo "$as_me:17528: \"$ac_link\"") >&5
17529   (eval $ac_link) 2>&5
17530   ac_status=$?
17531   echo "$as_me:17531: \$? = $ac_status" >&5
17532   (exit $ac_status); } &&
17533          { ac_try='test -s conftest$ac_exeext'
17534   { (eval echo "$as_me:17534: \"$ac_try\"") >&5
17535   (eval $ac_try) 2>&5
17536   ac_status=$?
17537   echo "$as_me:17537: \$? = $ac_status" >&5
17538   (exit $ac_status); }; }; then
17539
17540                         cf_cv_regex_hdrs=$cf_regex_hdr
17541                         break
17542
17543 else
17544   echo "$as_me: failed program was:" >&5
17545 cat conftest.$ac_ext >&5
17546 fi
17547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17548         done
17549         ;;
17550 esac
17551
17552 fi
17553 echo "$as_me:17553: result: $cf_cv_regex_hdrs" >&5
17554 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17555
17556 case $cf_cv_regex_hdrs in
17557         (no)            { echo "$as_me:17557: WARNING: no regular expression header found" >&5
17558 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17559         (regex.h)
17560 cat >>confdefs.h <<\EOF
17561 #define HAVE_REGEX_H_FUNCS 1
17562 EOF
17563  ;;
17564         (regexp.h)
17565 cat >>confdefs.h <<\EOF
17566 #define HAVE_REGEXP_H_FUNCS 1
17567 EOF
17568  ;;
17569         (regexpr.h)
17570 cat >>confdefs.h <<\EOF
17571 #define HAVE_REGEXPR_H_FUNCS 1
17572 EOF
17573  ;;
17574 esac
17575
17576 for ac_header in \
17577 fcntl.h \
17578 getopt.h \
17579 limits.h \
17580 locale.h \
17581 math.h \
17582 poll.h \
17583 sys/bsdtypes.h \
17584 sys/ioctl.h \
17585 sys/param.h \
17586 sys/poll.h \
17587 sys/select.h \
17588 sys/time.h \
17589 sys/times.h \
17590 ttyent.h \
17591 unistd.h \
17592 wctype.h \
17593
17594 do
17595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17596 echo "$as_me:17596: checking for $ac_header" >&5
17597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   cat >conftest.$ac_ext <<_ACEOF
17602 #line 17602 "configure"
17603 #include "confdefs.h"
17604 #include <$ac_header>
17605 _ACEOF
17606 if { (eval echo "$as_me:17606: \"$ac_cpp conftest.$ac_ext\"") >&5
17607   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17608   ac_status=$?
17609   egrep -v '^ *\+' conftest.er1 >conftest.err
17610   rm -f conftest.er1
17611   cat conftest.err >&5
17612   echo "$as_me:17612: \$? = $ac_status" >&5
17613   (exit $ac_status); } >/dev/null; then
17614   if test -s conftest.err; then
17615     ac_cpp_err=$ac_c_preproc_warn_flag
17616   else
17617     ac_cpp_err=
17618   fi
17619 else
17620   ac_cpp_err=yes
17621 fi
17622 if test -z "$ac_cpp_err"; then
17623   eval "$as_ac_Header=yes"
17624 else
17625   echo "$as_me: failed program was:" >&5
17626   cat conftest.$ac_ext >&5
17627   eval "$as_ac_Header=no"
17628 fi
17629 rm -f conftest.err conftest.$ac_ext
17630 fi
17631 echo "$as_me:17631: result: `eval echo '${'$as_ac_Header'}'`" >&5
17632 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17633 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17634   cat >>confdefs.h <<EOF
17635 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17636 EOF
17637
17638 fi
17639 done
17640
17641 for ac_header in unistd.h getopt.h
17642 do
17643 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17644 echo "$as_me:17644: checking for $ac_header" >&5
17645 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17646 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649   cat >conftest.$ac_ext <<_ACEOF
17650 #line 17650 "configure"
17651 #include "confdefs.h"
17652 #include <$ac_header>
17653 _ACEOF
17654 if { (eval echo "$as_me:17654: \"$ac_cpp conftest.$ac_ext\"") >&5
17655   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17656   ac_status=$?
17657   egrep -v '^ *\+' conftest.er1 >conftest.err
17658   rm -f conftest.er1
17659   cat conftest.err >&5
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } >/dev/null; then
17662   if test -s conftest.err; then
17663     ac_cpp_err=$ac_c_preproc_warn_flag
17664   else
17665     ac_cpp_err=
17666   fi
17667 else
17668   ac_cpp_err=yes
17669 fi
17670 if test -z "$ac_cpp_err"; then
17671   eval "$as_ac_Header=yes"
17672 else
17673   echo "$as_me: failed program was:" >&5
17674   cat conftest.$ac_ext >&5
17675   eval "$as_ac_Header=no"
17676 fi
17677 rm -f conftest.err conftest.$ac_ext
17678 fi
17679 echo "$as_me:17679: result: `eval echo '${'$as_ac_Header'}'`" >&5
17680 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17681 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17682   cat >>confdefs.h <<EOF
17683 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17684 EOF
17685
17686 fi
17687 done
17688
17689 echo "$as_me:17689: checking for header declaring getopt variables" >&5
17690 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17691 if test "${cf_cv_getopt_header+set}" = set; then
17692   echo $ECHO_N "(cached) $ECHO_C" >&6
17693 else
17694
17695 cf_cv_getopt_header=none
17696 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17697 do
17698 cat >conftest.$ac_ext <<_ACEOF
17699 #line 17699 "configure"
17700 #include "confdefs.h"
17701
17702 #include <$cf_header>
17703 int
17704 main (void)
17705 {
17706 int x = optind; char *y = optarg
17707   ;
17708   return 0;
17709 }
17710 _ACEOF
17711 rm -f conftest.$ac_objext
17712 if { (eval echo "$as_me:17712: \"$ac_compile\"") >&5
17713   (eval $ac_compile) 2>&5
17714   ac_status=$?
17715   echo "$as_me:17715: \$? = $ac_status" >&5
17716   (exit $ac_status); } &&
17717          { ac_try='test -s conftest.$ac_objext'
17718   { (eval echo "$as_me:17718: \"$ac_try\"") >&5
17719   (eval $ac_try) 2>&5
17720   ac_status=$?
17721   echo "$as_me:17721: \$? = $ac_status" >&5
17722   (exit $ac_status); }; }; then
17723   cf_cv_getopt_header=$cf_header
17724  break
17725 else
17726   echo "$as_me: failed program was:" >&5
17727 cat conftest.$ac_ext >&5
17728 fi
17729 rm -f conftest.$ac_objext conftest.$ac_ext
17730 done
17731
17732 fi
17733 echo "$as_me:17733: result: $cf_cv_getopt_header" >&5
17734 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17735 if test $cf_cv_getopt_header != none ; then
17736
17737 cat >>confdefs.h <<\EOF
17738 #define HAVE_GETOPT_HEADER 1
17739 EOF
17740
17741 fi
17742 if test $cf_cv_getopt_header = getopt.h ; then
17743
17744 cat >>confdefs.h <<\EOF
17745 #define NEED_GETOPT_H 1
17746 EOF
17747
17748 fi
17749
17750 # check for ISC (this may also define _POSIX_SOURCE)
17751 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17752 if test "x$ISC" = xyes ; then
17753
17754 echo "$as_me:17754: checking for main in -lcposix" >&5
17755 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17756 if test "${ac_cv_lib_cposix_main+set}" = set; then
17757   echo $ECHO_N "(cached) $ECHO_C" >&6
17758 else
17759   ac_check_lib_save_LIBS=$LIBS
17760 LIBS="-lcposix  $LIBS"
17761 cat >conftest.$ac_ext <<_ACEOF
17762 #line 17762 "configure"
17763 #include "confdefs.h"
17764
17765 int
17766 main (void)
17767 {
17768 main ();
17769   ;
17770   return 0;
17771 }
17772 _ACEOF
17773 rm -f conftest.$ac_objext conftest$ac_exeext
17774 if { (eval echo "$as_me:17774: \"$ac_link\"") >&5
17775   (eval $ac_link) 2>&5
17776   ac_status=$?
17777   echo "$as_me:17777: \$? = $ac_status" >&5
17778   (exit $ac_status); } &&
17779          { ac_try='test -s conftest$ac_exeext'
17780   { (eval echo "$as_me:17780: \"$ac_try\"") >&5
17781   (eval $ac_try) 2>&5
17782   ac_status=$?
17783   echo "$as_me:17783: \$? = $ac_status" >&5
17784   (exit $ac_status); }; }; then
17785   ac_cv_lib_cposix_main=yes
17786 else
17787   echo "$as_me: failed program was:" >&5
17788 cat conftest.$ac_ext >&5
17789 ac_cv_lib_cposix_main=no
17790 fi
17791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17792 LIBS=$ac_check_lib_save_LIBS
17793 fi
17794 echo "$as_me:17794: result: $ac_cv_lib_cposix_main" >&5
17795 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17796 if test $ac_cv_lib_cposix_main = yes; then
17797   cat >>confdefs.h <<EOF
17798 #define HAVE_LIBCPOSIX 1
17799 EOF
17800
17801   LIBS="-lcposix $LIBS"
17802
17803 fi
17804
17805         echo "$as_me:17805: checking for bzero in -linet" >&5
17806 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17807 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17808   echo $ECHO_N "(cached) $ECHO_C" >&6
17809 else
17810   ac_check_lib_save_LIBS=$LIBS
17811 LIBS="-linet  $LIBS"
17812 cat >conftest.$ac_ext <<_ACEOF
17813 #line 17813 "configure"
17814 #include "confdefs.h"
17815
17816 /* Override any gcc2 internal prototype to avoid an error.  */
17817 #ifdef __cplusplus
17818 extern "C"
17819 #endif
17820 /* We use char because int might match the return type of a gcc2
17821    builtin and then its argument prototype would still apply.  */
17822 char bzero ();
17823 int
17824 main (void)
17825 {
17826 bzero ();
17827   ;
17828   return 0;
17829 }
17830 _ACEOF
17831 rm -f conftest.$ac_objext conftest$ac_exeext
17832 if { (eval echo "$as_me:17832: \"$ac_link\"") >&5
17833   (eval $ac_link) 2>&5
17834   ac_status=$?
17835   echo "$as_me:17835: \$? = $ac_status" >&5
17836   (exit $ac_status); } &&
17837          { ac_try='test -s conftest$ac_exeext'
17838   { (eval echo "$as_me:17838: \"$ac_try\"") >&5
17839   (eval $ac_try) 2>&5
17840   ac_status=$?
17841   echo "$as_me:17841: \$? = $ac_status" >&5
17842   (exit $ac_status); }; }; then
17843   ac_cv_lib_inet_bzero=yes
17844 else
17845   echo "$as_me: failed program was:" >&5
17846 cat conftest.$ac_ext >&5
17847 ac_cv_lib_inet_bzero=no
17848 fi
17849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17850 LIBS=$ac_check_lib_save_LIBS
17851 fi
17852 echo "$as_me:17852: result: $ac_cv_lib_inet_bzero" >&5
17853 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17854 if test $ac_cv_lib_inet_bzero = yes; then
17855
17856 cf_add_libs="-linet"
17857 # Filter out duplicates - this happens with badly-designed ".pc" files...
17858 for cf_add_1lib in $LIBS
17859 do
17860         for cf_add_2lib in $cf_add_libs
17861         do
17862                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17863                 then
17864                         cf_add_1lib=
17865                         break
17866                 fi
17867         done
17868         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17869 done
17870 LIBS="$cf_add_libs"
17871
17872 fi
17873 fi
17874
17875 echo "$as_me:17875: checking if sys/time.h works with sys/select.h" >&5
17876 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17877 if test "${cf_cv_sys_time_select+set}" = set; then
17878   echo $ECHO_N "(cached) $ECHO_C" >&6
17879 else
17880
17881 cat >conftest.$ac_ext <<_ACEOF
17882 #line 17882 "configure"
17883 #include "confdefs.h"
17884
17885 #include <sys/types.h>
17886 #ifdef HAVE_SYS_TIME_H
17887 #include <sys/time.h>
17888 #endif
17889 #ifdef HAVE_SYS_SELECT_H
17890 #include <sys/select.h>
17891 #endif
17892
17893 int
17894 main (void)
17895 {
17896
17897   ;
17898   return 0;
17899 }
17900 _ACEOF
17901 rm -f conftest.$ac_objext
17902 if { (eval echo "$as_me:17902: \"$ac_compile\"") >&5
17903   (eval $ac_compile) 2>&5
17904   ac_status=$?
17905   echo "$as_me:17905: \$? = $ac_status" >&5
17906   (exit $ac_status); } &&
17907          { ac_try='test -s conftest.$ac_objext'
17908   { (eval echo "$as_me:17908: \"$ac_try\"") >&5
17909   (eval $ac_try) 2>&5
17910   ac_status=$?
17911   echo "$as_me:17911: \$? = $ac_status" >&5
17912   (exit $ac_status); }; }; then
17913   cf_cv_sys_time_select=yes
17914 else
17915   echo "$as_me: failed program was:" >&5
17916 cat conftest.$ac_ext >&5
17917 cf_cv_sys_time_select=no
17918 fi
17919 rm -f conftest.$ac_objext conftest.$ac_ext
17920
17921 fi
17922
17923 echo "$as_me:17923: result: $cf_cv_sys_time_select" >&5
17924 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17925 test "$cf_cv_sys_time_select" = yes &&
17926 cat >>confdefs.h <<\EOF
17927 #define HAVE_SYS_TIME_SELECT 1
17928 EOF
17929
17930 ###     checks for compiler characteristics
17931 ac_ext=c
17932 ac_cpp='$CPP $CPPFLAGS'
17933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17936 ac_main_return=return
17937
17938 echo "$as_me:17938: checking for an ANSI C-conforming const" >&5
17939 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17940 if test "${ac_cv_c_const+set}" = set; then
17941   echo $ECHO_N "(cached) $ECHO_C" >&6
17942 else
17943   cat >conftest.$ac_ext <<_ACEOF
17944 #line 17944 "configure"
17945 #include "confdefs.h"
17946
17947 int
17948 main (void)
17949 {
17950 /* FIXME: Include the comments suggested by Paul. */
17951 #ifndef __cplusplus
17952   /* Ultrix mips cc rejects this.  */
17953   typedef int charset[2];
17954   const charset x;
17955   /* SunOS 4.1.1 cc rejects this.  */
17956   char const *const *ccp;
17957   char **p;
17958   /* NEC SVR4.0.2 mips cc rejects this.  */
17959   struct point {int x, y;};
17960   static struct point const zero = {0,0};
17961   /* AIX XL C 1.02.0.0 rejects this.
17962      It does not let you subtract one const X* pointer from another in
17963      an arm of an if-expression whose if-part is not a constant
17964      expression */
17965   const char *g = "string";
17966   ccp = &g + (g ? g-g : 0);
17967   /* HPUX 7.0 cc rejects these. */
17968   ++ccp;
17969   p = (char**) ccp;
17970   ccp = (char const *const *) p;
17971   { /* SCO 3.2v4 cc rejects this.  */
17972     char *t;
17973     char const *s = 0 ? (char *) 0 : (char const *) 0;
17974
17975     *t++ = 0;
17976   }
17977   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17978     int x[] = {25, 17};
17979     const int *foo = &x[0];
17980     ++foo;
17981   }
17982   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17983     typedef const int *iptr;
17984     iptr p = 0;
17985     ++p;
17986   }
17987   { /* AIX XL C 1.02.0.0 rejects this saying
17988        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17989     struct s { int j; const int *ap[3]; };
17990     struct s *b; b->j = 5;
17991   }
17992   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17993     const int foo = 10;
17994   }
17995 #endif
17996
17997   ;
17998   return 0;
17999 }
18000 _ACEOF
18001 rm -f conftest.$ac_objext
18002 if { (eval echo "$as_me:18002: \"$ac_compile\"") >&5
18003   (eval $ac_compile) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); } &&
18007          { ac_try='test -s conftest.$ac_objext'
18008   { (eval echo "$as_me:18008: \"$ac_try\"") >&5
18009   (eval $ac_try) 2>&5
18010   ac_status=$?
18011   echo "$as_me:18011: \$? = $ac_status" >&5
18012   (exit $ac_status); }; }; then
18013   ac_cv_c_const=yes
18014 else
18015   echo "$as_me: failed program was:" >&5
18016 cat conftest.$ac_ext >&5
18017 ac_cv_c_const=no
18018 fi
18019 rm -f conftest.$ac_objext conftest.$ac_ext
18020 fi
18021 echo "$as_me:18021: result: $ac_cv_c_const" >&5
18022 echo "${ECHO_T}$ac_cv_c_const" >&6
18023 if test $ac_cv_c_const = no; then
18024
18025 cat >>confdefs.h <<\EOF
18026 #define const
18027 EOF
18028
18029 fi
18030
18031 echo "$as_me:18031: checking for inline" >&5
18032 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18033 if test "${ac_cv_c_inline+set}" = set; then
18034   echo $ECHO_N "(cached) $ECHO_C" >&6
18035 else
18036   ac_cv_c_inline=no
18037 for ac_kw in inline __inline__ __inline; do
18038   cat >conftest.$ac_ext <<_ACEOF
18039 #line 18039 "configure"
18040 #include "confdefs.h"
18041 #ifndef __cplusplus
18042 static $ac_kw int static_foo () {return 0; }
18043 $ac_kw int foo () {return 0; }
18044 #endif
18045
18046 _ACEOF
18047 rm -f conftest.$ac_objext
18048 if { (eval echo "$as_me:18048: \"$ac_compile\"") >&5
18049   (eval $ac_compile) 2>&5
18050   ac_status=$?
18051   echo "$as_me:18051: \$? = $ac_status" >&5
18052   (exit $ac_status); } &&
18053          { ac_try='test -s conftest.$ac_objext'
18054   { (eval echo "$as_me:18054: \"$ac_try\"") >&5
18055   (eval $ac_try) 2>&5
18056   ac_status=$?
18057   echo "$as_me:18057: \$? = $ac_status" >&5
18058   (exit $ac_status); }; }; then
18059   ac_cv_c_inline=$ac_kw; break
18060 else
18061   echo "$as_me: failed program was:" >&5
18062 cat conftest.$ac_ext >&5
18063 fi
18064 rm -f conftest.$ac_objext conftest.$ac_ext
18065 done
18066
18067 fi
18068 echo "$as_me:18068: result: $ac_cv_c_inline" >&5
18069 echo "${ECHO_T}$ac_cv_c_inline" >&6
18070 case $ac_cv_c_inline in
18071   inline | yes) ;;
18072   no)
18073 cat >>confdefs.h <<\EOF
18074 #define inline
18075 EOF
18076  ;;
18077   *)  cat >>confdefs.h <<EOF
18078 #define inline $ac_cv_c_inline
18079 EOF
18080  ;;
18081 esac
18082
18083 NCURSES_INLINE=
18084 if test "$ac_cv_c_inline" != no ; then
18085         NCURSES_INLINE=inline
18086         if test "$INTEL_COMPILER" = yes
18087         then
18088                 :
18089         elif test "$CLANG_COMPILER" = yes
18090         then
18091                 :
18092         elif test "$GCC" = yes
18093         then
18094                 echo "$as_me:18094: checking if $CC supports options to tune inlining" >&5
18095 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18096 if test "${cf_cv_gcc_inline+set}" = set; then
18097   echo $ECHO_N "(cached) $ECHO_C" >&6
18098 else
18099
18100                 cf_save_CFLAGS=$CFLAGS
18101                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18102                 cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105 inline int foo(void) { return 1; }
18106 int
18107 main (void)
18108 {
18109 ${cf_cv_main_return:-return} foo()
18110   ;
18111   return 0;
18112 }
18113 _ACEOF
18114 rm -f conftest.$ac_objext
18115 if { (eval echo "$as_me:18115: \"$ac_compile\"") >&5
18116   (eval $ac_compile) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); } &&
18120          { ac_try='test -s conftest.$ac_objext'
18121   { (eval echo "$as_me:18121: \"$ac_try\"") >&5
18122   (eval $ac_try) 2>&5
18123   ac_status=$?
18124   echo "$as_me:18124: \$? = $ac_status" >&5
18125   (exit $ac_status); }; }; then
18126   cf_cv_gcc_inline=yes
18127 else
18128   echo "$as_me: failed program was:" >&5
18129 cat conftest.$ac_ext >&5
18130 cf_cv_gcc_inline=no
18131 fi
18132 rm -f conftest.$ac_objext conftest.$ac_ext
18133                 CFLAGS=$cf_save_CFLAGS
18134
18135 fi
18136 echo "$as_me:18136: result: $cf_cv_gcc_inline" >&5
18137 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18138                 if test "$cf_cv_gcc_inline" = yes ; then
18139
18140 cf_fix_cppflags=no
18141 cf_new_cflags=
18142 cf_new_cppflags=
18143 cf_new_extra_cppflags=
18144
18145 for cf_add_cflags in --param max-inline-insns-single=1200
18146 do
18147 case $cf_fix_cppflags in
18148 (no)
18149         case $cf_add_cflags in
18150         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18151                 case $cf_add_cflags in
18152                 (-D*)
18153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18154
18155                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18156                                 && test -z "${cf_tst_cflags}" \
18157                                 && cf_fix_cppflags=yes
18158
18159                         if test $cf_fix_cppflags = yes ; then
18160
18161         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18162         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18163
18164                                 continue
18165                         elif test "${cf_tst_cflags}" = "\"'" ; then
18166
18167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18169
18170                                 continue
18171                         fi
18172                         ;;
18173                 esac
18174                 case "$CPPFLAGS" in
18175                 (*$cf_add_cflags)
18176                         ;;
18177                 (*)
18178                         case $cf_add_cflags in
18179                         (-D*)
18180                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18181
18182 CPPFLAGS=`echo "$CPPFLAGS" | \
18183         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18184                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18185
18186                                 ;;
18187                         esac
18188
18189         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18190         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18191
18192                         ;;
18193                 esac
18194                 ;;
18195         (*)
18196
18197         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18198         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18199
18200                 ;;
18201         esac
18202         ;;
18203 (yes)
18204
18205         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18206         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18207
18208         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18209
18210         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18211                 && test -z "${cf_tst_cflags}" \
18212                 && cf_fix_cppflags=no
18213         ;;
18214 esac
18215 done
18216
18217 if test -n "$cf_new_cflags" ; then
18218
18219         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18220         CFLAGS="${CFLAGS}$cf_new_cflags"
18221
18222 fi
18223
18224 if test -n "$cf_new_cppflags" ; then
18225
18226         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18227         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18228
18229 fi
18230
18231 if test -n "$cf_new_extra_cppflags" ; then
18232
18233         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18234         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18235
18236 fi
18237
18238                 fi
18239         fi
18240 fi
18241
18242 echo "$as_me:18242: checking for signal global datatype" >&5
18243 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18244 if test "${cf_cv_sig_atomic_t+set}" = set; then
18245   echo $ECHO_N "(cached) $ECHO_C" >&6
18246 else
18247
18248         for cf_type in \
18249                 "volatile sig_atomic_t" \
18250                 "sig_atomic_t" \
18251                 "int"
18252         do
18253         cat >conftest.$ac_ext <<_ACEOF
18254 #line 18254 "configure"
18255 #include "confdefs.h"
18256
18257 #include <sys/types.h>
18258 #include <signal.h>
18259 #include <stdio.h>
18260
18261 extern $cf_type x;
18262 $cf_type x;
18263 static void handler(int sig)
18264 {
18265         x = 5;
18266 }
18267 int
18268 main (void)
18269 {
18270 signal(SIGINT, handler);
18271                  x = 1
18272   ;
18273   return 0;
18274 }
18275 _ACEOF
18276 rm -f conftest.$ac_objext
18277 if { (eval echo "$as_me:18277: \"$ac_compile\"") >&5
18278   (eval $ac_compile) 2>&5
18279   ac_status=$?
18280   echo "$as_me:18280: \$? = $ac_status" >&5
18281   (exit $ac_status); } &&
18282          { ac_try='test -s conftest.$ac_objext'
18283   { (eval echo "$as_me:18283: \"$ac_try\"") >&5
18284   (eval $ac_try) 2>&5
18285   ac_status=$?
18286   echo "$as_me:18286: \$? = $ac_status" >&5
18287   (exit $ac_status); }; }; then
18288   cf_cv_sig_atomic_t=$cf_type
18289 else
18290   echo "$as_me: failed program was:" >&5
18291 cat conftest.$ac_ext >&5
18292 cf_cv_sig_atomic_t=no
18293 fi
18294 rm -f conftest.$ac_objext conftest.$ac_ext
18295                 test "$cf_cv_sig_atomic_t" != no && break
18296         done
18297
18298 fi
18299
18300 echo "$as_me:18300: result: $cf_cv_sig_atomic_t" >&5
18301 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18302 test "$cf_cv_sig_atomic_t" != no &&
18303 cat >>confdefs.h <<EOF
18304 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18305 EOF
18306
18307 if test $NCURSES_CHTYPE = auto ; then
18308
18309 echo "$as_me:18309: checking for type of chtype" >&5
18310 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18311 if test "${cf_cv_typeof_chtype+set}" = set; then
18312   echo $ECHO_N "(cached) $ECHO_C" >&6
18313 else
18314
18315                 if test "$cross_compiling" = yes; then
18316   cf_cv_typeof_chtype=long
18317 else
18318   cat >conftest.$ac_ext <<_ACEOF
18319 #line 18319 "configure"
18320 #include "confdefs.h"
18321
18322 #define WANT_BITS 31
18323 #include <stdio.h>
18324 int main(void)
18325 {
18326         FILE *fp = fopen("cf_test.out", "w");
18327         if (fp != 0) {
18328                 char *result = "long";
18329                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18330                         int n;
18331                         unsigned int x, y;
18332                         for (n = 0; n < WANT_BITS; n++) {
18333                                 x = (1 << n);
18334                                 y = (x >> n);
18335                                 if (y != 1 || x == 0) {
18336                                         x = 0;
18337                                         break;
18338                                 }
18339                         }
18340                         /*
18341                          * If x is nonzero, an int is big enough for the bits
18342                          * that we want.
18343                          */
18344                         result = (x != 0) ? "int" : "long";
18345                 }
18346                 fputs(result, fp);
18347                 fclose(fp);
18348         }
18349         ${cf_cv_main_return:-return}(0);
18350 }
18351
18352 _ACEOF
18353 rm -f conftest$ac_exeext
18354 if { (eval echo "$as_me:18354: \"$ac_link\"") >&5
18355   (eval $ac_link) 2>&5
18356   ac_status=$?
18357   echo "$as_me:18357: \$? = $ac_status" >&5
18358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18359   { (eval echo "$as_me:18359: \"$ac_try\"") >&5
18360   (eval $ac_try) 2>&5
18361   ac_status=$?
18362   echo "$as_me:18362: \$? = $ac_status" >&5
18363   (exit $ac_status); }; }; then
18364   cf_cv_typeof_chtype=`cat cf_test.out`
18365 else
18366   echo "$as_me: program exited with status $ac_status" >&5
18367 echo "$as_me: failed program was:" >&5
18368 cat conftest.$ac_ext >&5
18369 cf_cv_typeof_chtype=long
18370 fi
18371 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18372 fi
18373                 rm -f cf_test.out
18374
18375 fi
18376
18377 echo "$as_me:18377: result: $cf_cv_typeof_chtype" >&5
18378 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18379
18380 cat >>confdefs.h <<EOF
18381 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18382 EOF
18383
18384 else
18385         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18386 fi
18387 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18388
18389 echo "$as_me:18389: checking if unsigned literals are legal" >&5
18390 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18391 if test "${cf_cv_unsigned_literals+set}" = set; then
18392   echo $ECHO_N "(cached) $ECHO_C" >&6
18393 else
18394
18395         cat >conftest.$ac_ext <<_ACEOF
18396 #line 18396 "configure"
18397 #include "confdefs.h"
18398
18399 int
18400 main (void)
18401 {
18402 long x = 1L + 1UL + 1U + 1
18403   ;
18404   return 0;
18405 }
18406 _ACEOF
18407 rm -f conftest.$ac_objext
18408 if { (eval echo "$as_me:18408: \"$ac_compile\"") >&5
18409   (eval $ac_compile) 2>&5
18410   ac_status=$?
18411   echo "$as_me:18411: \$? = $ac_status" >&5
18412   (exit $ac_status); } &&
18413          { ac_try='test -s conftest.$ac_objext'
18414   { (eval echo "$as_me:18414: \"$ac_try\"") >&5
18415   (eval $ac_try) 2>&5
18416   ac_status=$?
18417   echo "$as_me:18417: \$? = $ac_status" >&5
18418   (exit $ac_status); }; }; then
18419   cf_cv_unsigned_literals=yes
18420 else
18421   echo "$as_me: failed program was:" >&5
18422 cat conftest.$ac_ext >&5
18423 cf_cv_unsigned_literals=no
18424 fi
18425 rm -f conftest.$ac_objext conftest.$ac_ext
18426
18427 fi
18428
18429 echo "$as_me:18429: result: $cf_cv_unsigned_literals" >&5
18430 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18431
18432 cf_cv_1UL="1"
18433 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18434 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18435
18436 if test $NCURSES_MMASK_T = auto ; then
18437         cf_cv_typeof_mmask_t=long
18438 else
18439         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18440 fi
18441 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18442
18443 ###     Checks for external-data
18444
18445 echo "$as_me:18445: checking if external errno is declared" >&5
18446 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18447 if test "${cf_cv_dcl_errno+set}" = set; then
18448   echo $ECHO_N "(cached) $ECHO_C" >&6
18449 else
18450
18451         cat >conftest.$ac_ext <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18454
18455 #ifdef HAVE_STDLIB_H
18456 #include <stdlib.h>
18457 #endif
18458 #include <stdio.h>
18459 #include <sys/types.h>
18460 #include <errno.h>
18461 int
18462 main (void)
18463 {
18464 int x = (int) errno
18465   ;
18466   return 0;
18467 }
18468 _ACEOF
18469 rm -f conftest.$ac_objext
18470 if { (eval echo "$as_me:18470: \"$ac_compile\"") >&5
18471   (eval $ac_compile) 2>&5
18472   ac_status=$?
18473   echo "$as_me:18473: \$? = $ac_status" >&5
18474   (exit $ac_status); } &&
18475          { ac_try='test -s conftest.$ac_objext'
18476   { (eval echo "$as_me:18476: \"$ac_try\"") >&5
18477   (eval $ac_try) 2>&5
18478   ac_status=$?
18479   echo "$as_me:18479: \$? = $ac_status" >&5
18480   (exit $ac_status); }; }; then
18481   cf_cv_dcl_errno=yes
18482 else
18483   echo "$as_me: failed program was:" >&5
18484 cat conftest.$ac_ext >&5
18485 cf_cv_dcl_errno=no
18486 fi
18487 rm -f conftest.$ac_objext conftest.$ac_ext
18488
18489 fi
18490 echo "$as_me:18490: result: $cf_cv_dcl_errno" >&5
18491 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18492
18493 if test "$cf_cv_dcl_errno" = no ; then
18494
18495 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18496
18497         cat >>confdefs.h <<EOF
18498 #define $cf_result 1
18499 EOF
18500
18501 fi
18502
18503 # It's possible (for near-UNIX clones) that the data doesn't exist
18504
18505 echo "$as_me:18505: checking if external errno exists" >&5
18506 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18507 if test "${cf_cv_have_errno+set}" = set; then
18508   echo $ECHO_N "(cached) $ECHO_C" >&6
18509 else
18510
18511         cat >conftest.$ac_ext <<_ACEOF
18512 #line 18512 "configure"
18513 #include "confdefs.h"
18514
18515 #undef errno
18516 extern int errno;
18517
18518 int
18519 main (void)
18520 {
18521 errno = 2
18522   ;
18523   return 0;
18524 }
18525 _ACEOF
18526 rm -f conftest.$ac_objext conftest$ac_exeext
18527 if { (eval echo "$as_me:18527: \"$ac_link\"") >&5
18528   (eval $ac_link) 2>&5
18529   ac_status=$?
18530   echo "$as_me:18530: \$? = $ac_status" >&5
18531   (exit $ac_status); } &&
18532          { ac_try='test -s conftest$ac_exeext'
18533   { (eval echo "$as_me:18533: \"$ac_try\"") >&5
18534   (eval $ac_try) 2>&5
18535   ac_status=$?
18536   echo "$as_me:18536: \$? = $ac_status" >&5
18537   (exit $ac_status); }; }; then
18538   cf_cv_have_errno=yes
18539 else
18540   echo "$as_me: failed program was:" >&5
18541 cat conftest.$ac_ext >&5
18542 cf_cv_have_errno=no
18543 fi
18544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18545
18546 fi
18547 echo "$as_me:18547: result: $cf_cv_have_errno" >&5
18548 echo "${ECHO_T}$cf_cv_have_errno" >&6
18549
18550 if test "$cf_cv_have_errno" = yes ; then
18551
18552 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18553
18554         cat >>confdefs.h <<EOF
18555 #define $cf_result 1
18556 EOF
18557
18558 fi
18559
18560 echo "$as_me:18560: checking if data-only library module links" >&5
18561 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18562 if test "${cf_cv_link_dataonly+set}" = set; then
18563   echo $ECHO_N "(cached) $ECHO_C" >&6
18564 else
18565
18566         rm -f conftest.a
18567         cat >conftest.$ac_ext <<EOF
18568 #line 18568 "configure"
18569 int     testdata[3] = { 123, 456, 789 };
18570 EOF
18571         if { (eval echo "$as_me:18571: \"$ac_compile\"") >&5
18572   (eval $ac_compile) 2>&5
18573   ac_status=$?
18574   echo "$as_me:18574: \$? = $ac_status" >&5
18575   (exit $ac_status); } ; then
18576                 mv conftest.o data.o && \
18577                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18578         fi
18579         rm -f conftest.$ac_ext data.o
18580         cat >conftest.$ac_ext <<EOF
18581 #line 18581 "configure"
18582 int     testfunc(void)
18583 {
18584 #if defined(NeXT)
18585         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18586 #else
18587         extern int testdata[3];
18588         return testdata[0] == 123
18589            &&  testdata[1] == 456
18590            &&  testdata[2] == 789;
18591 #endif
18592 }
18593 EOF
18594         if { (eval echo "$as_me:18594: \"$ac_compile\"") >&5
18595   (eval $ac_compile) 2>&5
18596   ac_status=$?
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); }; then
18599                 mv conftest.o func.o && \
18600                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18601         fi
18602         rm -f conftest.$ac_ext func.o
18603         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18604         cf_saveLIBS="$LIBS"
18605         LIBS="conftest.a $LIBS"
18606         if test "$cross_compiling" = yes; then
18607   cf_cv_link_dataonly=unknown
18608 else
18609   cat >conftest.$ac_ext <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612
18613         int main(void)
18614         {
18615                 extern int testfunc();
18616                 ${cf_cv_main_return:-return} (!testfunc());
18617         }
18618
18619 _ACEOF
18620 rm -f conftest$ac_exeext
18621 if { (eval echo "$as_me:18621: \"$ac_link\"") >&5
18622   (eval $ac_link) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18626   { (eval echo "$as_me:18626: \"$ac_try\"") >&5
18627   (eval $ac_try) 2>&5
18628   ac_status=$?
18629   echo "$as_me:18629: \$? = $ac_status" >&5
18630   (exit $ac_status); }; }; then
18631   cf_cv_link_dataonly=yes
18632 else
18633   echo "$as_me: program exited with status $ac_status" >&5
18634 echo "$as_me: failed program was:" >&5
18635 cat conftest.$ac_ext >&5
18636 cf_cv_link_dataonly=no
18637 fi
18638 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18639 fi
18640         LIBS="$cf_saveLIBS"
18641
18642 fi
18643
18644 echo "$as_me:18644: result: $cf_cv_link_dataonly" >&5
18645 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18646
18647 if test "$cf_cv_link_dataonly" = no ; then
18648
18649 cat >>confdefs.h <<\EOF
18650 #define BROKEN_LINKER 1
18651 EOF
18652
18653         BROKEN_LINKER=1
18654 fi
18655
18656 ###     Checks for library functions.
18657
18658 for ac_func in \
18659 getcwd \
18660 getegid \
18661 geteuid \
18662 getopt \
18663 getttynam \
18664 issetugid \
18665 poll \
18666 putenv \
18667 remove \
18668 select \
18669 setbuf \
18670 setbuffer \
18671 setenv \
18672 setvbuf \
18673 sigaction \
18674 sigvec \
18675 strdup \
18676 strstr \
18677 sysconf \
18678 tcgetpgrp \
18679 tdestroy \
18680 times \
18681 tsearch \
18682 vsnprintf \
18683
18684 do
18685 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18686 echo "$as_me:18686: checking for $ac_func" >&5
18687 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18688 if eval "test \"\${$as_ac_var+set}\" = set"; then
18689   echo $ECHO_N "(cached) $ECHO_C" >&6
18690 else
18691   cat >conftest.$ac_ext <<_ACEOF
18692 #line 18692 "configure"
18693 #include "confdefs.h"
18694 #define $ac_func autoconf_temporary
18695 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18696 #undef $ac_func
18697
18698 #ifdef __cplusplus
18699 extern "C"
18700 #endif
18701
18702 /* We use char because int might match the return type of a gcc2
18703    builtin and then its argument prototype would still apply.  */
18704 char $ac_func (void);
18705
18706 int
18707 main (void)
18708 {
18709
18710 /* The GNU C library defines stubs for functions which it implements
18711     to always fail with ENOSYS.  Some functions are actually named
18712     something starting with __ and the normal name is an alias.  */
18713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18714 #error found stub for $ac_func
18715 #endif
18716
18717         return $ac_func ();
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f conftest.$ac_objext conftest$ac_exeext
18723 if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
18724   (eval $ac_link) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit $ac_status); } &&
18728          { ac_try='test -s conftest$ac_exeext'
18729   { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:18732: \$? = $ac_status" >&5
18733   (exit $ac_status); }; }; then
18734   eval "$as_ac_var=yes"
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 cat conftest.$ac_ext >&5
18738 eval "$as_ac_var=no"
18739 fi
18740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18741 fi
18742 echo "$as_me:18742: result: `eval echo '${'$as_ac_var'}'`" >&5
18743 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18744 if test `eval echo '${'$as_ac_var'}'` = yes; then
18745   cat >>confdefs.h <<EOF
18746 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18747 EOF
18748
18749 fi
18750 done
18751
18752 if test "x$ac_cv_func_getopt" = xno && \
18753    test "x$cf_with_progs$cf_with_tests" != xnono; then
18754         { { echo "$as_me:18754: error: getopt is required for building programs" >&5
18755 echo "$as_me: error: getopt is required for building programs" >&2;}
18756    { (exit 1); exit 1; }; }
18757 fi
18758
18759 if test "x$with_safe_sprintf" = xyes
18760 then
18761         if test "x$ac_cv_func_vsnprintf" = xyes
18762         then
18763                 { echo "$as_me:18763: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18764 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18765         else
18766
18767 cat >>confdefs.h <<\EOF
18768 #define USE_SAFE_SPRINTF 1
18769 EOF
18770
18771         fi
18772 fi
18773
18774 if test "x$with_getcap" = "xyes" ; then
18775
18776 echo "$as_me:18776: checking for terminal-capability database functions" >&5
18777 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18778 if test "${cf_cv_cgetent+set}" = set; then
18779   echo $ECHO_N "(cached) $ECHO_C" >&6
18780 else
18781
18782 cat >conftest.$ac_ext <<_ACEOF
18783 #line 18783 "configure"
18784 #include "confdefs.h"
18785
18786 #include <stdlib.h>
18787 int
18788 main (void)
18789 {
18790
18791         char temp[128];
18792         char *buf = temp;
18793         char *db_array = temp;
18794         cgetent(&buf, &db_array, "vt100");
18795         cgetcap(buf, "tc", '=');
18796         cgetmatch(buf, "tc");
18797
18798   ;
18799   return 0;
18800 }
18801 _ACEOF
18802 rm -f conftest.$ac_objext conftest$ac_exeext
18803 if { (eval echo "$as_me:18803: \"$ac_link\"") >&5
18804   (eval $ac_link) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); } &&
18808          { ac_try='test -s conftest$ac_exeext'
18809   { (eval echo "$as_me:18809: \"$ac_try\"") >&5
18810   (eval $ac_try) 2>&5
18811   ac_status=$?
18812   echo "$as_me:18812: \$? = $ac_status" >&5
18813   (exit $ac_status); }; }; then
18814   cf_cv_cgetent=yes
18815 else
18816   echo "$as_me: failed program was:" >&5
18817 cat conftest.$ac_ext >&5
18818 cf_cv_cgetent=no
18819 fi
18820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18821
18822 fi
18823 echo "$as_me:18823: result: $cf_cv_cgetent" >&5
18824 echo "${ECHO_T}$cf_cv_cgetent" >&6
18825
18826 if test "$cf_cv_cgetent" = yes
18827 then
18828
18829 cat >>confdefs.h <<\EOF
18830 #define HAVE_BSD_CGETENT 1
18831 EOF
18832
18833 echo "$as_me:18833: checking if cgetent uses const parameter" >&5
18834 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18835 if test "${cf_cv_cgetent_const+set}" = set; then
18836   echo $ECHO_N "(cached) $ECHO_C" >&6
18837 else
18838
18839 cat >conftest.$ac_ext <<_ACEOF
18840 #line 18840 "configure"
18841 #include "confdefs.h"
18842
18843 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18844 #include <stdlib.h>
18845 int
18846 main (void)
18847 {
18848
18849         char temp[128];
18850         char *buf = temp;
18851 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18852         const char *db_array = temp;
18853         cgetent(&buf, &db_array, "vt100");
18854 #endif
18855         cgetcap(buf, "tc", '=');
18856         cgetmatch(buf, "tc");
18857
18858   ;
18859   return 0;
18860 }
18861 _ACEOF
18862 rm -f conftest.$ac_objext conftest$ac_exeext
18863 if { (eval echo "$as_me:18863: \"$ac_link\"") >&5
18864   (eval $ac_link) 2>&5
18865   ac_status=$?
18866   echo "$as_me:18866: \$? = $ac_status" >&5
18867   (exit $ac_status); } &&
18868          { ac_try='test -s conftest$ac_exeext'
18869   { (eval echo "$as_me:18869: \"$ac_try\"") >&5
18870   (eval $ac_try) 2>&5
18871   ac_status=$?
18872   echo "$as_me:18872: \$? = $ac_status" >&5
18873   (exit $ac_status); }; }; then
18874   cf_cv_cgetent_const=yes
18875 else
18876   echo "$as_me: failed program was:" >&5
18877 cat conftest.$ac_ext >&5
18878 cf_cv_cgetent_const=no
18879 fi
18880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18881
18882 fi
18883 echo "$as_me:18883: result: $cf_cv_cgetent_const" >&5
18884 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18885         if test "$cf_cv_cgetent_const" = yes
18886         then
18887
18888 cat >>confdefs.h <<EOF
18889 #define CGETENT_CONST const
18890 EOF
18891
18892         fi
18893 fi
18894
18895 fi
18896
18897 echo "$as_me:18897: checking for isascii" >&5
18898 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18899 if test "${cf_cv_have_isascii+set}" = set; then
18900   echo $ECHO_N "(cached) $ECHO_C" >&6
18901 else
18902
18903         cat >conftest.$ac_ext <<_ACEOF
18904 #line 18904 "configure"
18905 #include "confdefs.h"
18906 #include <ctype.h>
18907 int
18908 main (void)
18909 {
18910 int x = isascii(' ')
18911   ;
18912   return 0;
18913 }
18914 _ACEOF
18915 rm -f conftest.$ac_objext conftest$ac_exeext
18916 if { (eval echo "$as_me:18916: \"$ac_link\"") >&5
18917   (eval $ac_link) 2>&5
18918   ac_status=$?
18919   echo "$as_me:18919: \$? = $ac_status" >&5
18920   (exit $ac_status); } &&
18921          { ac_try='test -s conftest$ac_exeext'
18922   { (eval echo "$as_me:18922: \"$ac_try\"") >&5
18923   (eval $ac_try) 2>&5
18924   ac_status=$?
18925   echo "$as_me:18925: \$? = $ac_status" >&5
18926   (exit $ac_status); }; }; then
18927   cf_cv_have_isascii=yes
18928 else
18929   echo "$as_me: failed program was:" >&5
18930 cat conftest.$ac_ext >&5
18931 cf_cv_have_isascii=no
18932 fi
18933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18934
18935 fi
18936 echo "$as_me:18936: result: $cf_cv_have_isascii" >&5
18937 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18938 test "$cf_cv_have_isascii" = yes &&
18939 cat >>confdefs.h <<\EOF
18940 #define HAVE_ISASCII 1
18941 EOF
18942
18943 if test "$ac_cv_func_sigaction" = yes; then
18944 echo "$as_me:18944: checking whether sigaction needs _POSIX_SOURCE" >&5
18945 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18946 cat >conftest.$ac_ext <<_ACEOF
18947 #line 18947 "configure"
18948 #include "confdefs.h"
18949
18950 #include <sys/types.h>
18951 #include <signal.h>
18952 int
18953 main (void)
18954 {
18955 struct sigaction act
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest.$ac_objext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972   sigact_bad=no
18973 else
18974   echo "$as_me: failed program was:" >&5
18975 cat conftest.$ac_ext >&5
18976
18977 cat >conftest.$ac_ext <<_ACEOF
18978 #line 18978 "configure"
18979 #include "confdefs.h"
18980
18981 #define _POSIX_SOURCE
18982 #include <sys/types.h>
18983 #include <signal.h>
18984 int
18985 main (void)
18986 {
18987 struct sigaction act
18988   ;
18989   return 0;
18990 }
18991 _ACEOF
18992 rm -f conftest.$ac_objext
18993 if { (eval echo "$as_me:18993: \"$ac_compile\"") >&5
18994   (eval $ac_compile) 2>&5
18995   ac_status=$?
18996   echo "$as_me:18996: \$? = $ac_status" >&5
18997   (exit $ac_status); } &&
18998          { ac_try='test -s conftest.$ac_objext'
18999   { (eval echo "$as_me:18999: \"$ac_try\"") >&5
19000   (eval $ac_try) 2>&5
19001   ac_status=$?
19002   echo "$as_me:19002: \$? = $ac_status" >&5
19003   (exit $ac_status); }; }; then
19004   sigact_bad=yes
19005
19006 cat >>confdefs.h <<\EOF
19007 #define _POSIX_SOURCE 1
19008 EOF
19009
19010 else
19011   echo "$as_me: failed program was:" >&5
19012 cat conftest.$ac_ext >&5
19013 sigact_bad=unknown
19014 fi
19015 rm -f conftest.$ac_objext conftest.$ac_ext
19016 fi
19017 rm -f conftest.$ac_objext conftest.$ac_ext
19018 echo "$as_me:19018: result: $sigact_bad" >&5
19019 echo "${ECHO_T}$sigact_bad" >&6
19020 fi
19021
19022 echo "$as_me:19022: checking if nanosleep really works" >&5
19023 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19024 if test "${cf_cv_func_nanosleep+set}" = set; then
19025   echo $ECHO_N "(cached) $ECHO_C" >&6
19026 else
19027
19028 if test "$cross_compiling" = yes; then
19029   cf_cv_func_nanosleep=unknown
19030 else
19031   cat >conftest.$ac_ext <<_ACEOF
19032 #line 19032 "configure"
19033 #include "confdefs.h"
19034
19035 #include <stdio.h>
19036 #include <errno.h>
19037 #include <time.h>
19038
19039 #ifdef HAVE_SYS_TIME_H
19040 #include <sys/time.h>
19041 #endif
19042
19043 int main(void) {
19044         struct timespec ts1, ts2;
19045         int code;
19046         ts1.tv_sec  = 0;
19047         ts1.tv_nsec = 750000000;
19048         ts2.tv_sec  = 0;
19049         ts2.tv_nsec = 0;
19050         errno = 0;
19051         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19052         ${cf_cv_main_return:-return}(code != 0);
19053 }
19054
19055 _ACEOF
19056 rm -f conftest$ac_exeext
19057 if { (eval echo "$as_me:19057: \"$ac_link\"") >&5
19058   (eval $ac_link) 2>&5
19059   ac_status=$?
19060   echo "$as_me:19060: \$? = $ac_status" >&5
19061   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19062   { (eval echo "$as_me:19062: \"$ac_try\"") >&5
19063   (eval $ac_try) 2>&5
19064   ac_status=$?
19065   echo "$as_me:19065: \$? = $ac_status" >&5
19066   (exit $ac_status); }; }; then
19067   cf_cv_func_nanosleep=yes
19068 else
19069   echo "$as_me: program exited with status $ac_status" >&5
19070 echo "$as_me: failed program was:" >&5
19071 cat conftest.$ac_ext >&5
19072 cf_cv_func_nanosleep=no
19073 fi
19074 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19075 fi
19076 fi
19077 echo "$as_me:19077: result: $cf_cv_func_nanosleep" >&5
19078 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19079
19080 test "$cf_cv_func_nanosleep" = "yes" &&
19081 cat >>confdefs.h <<\EOF
19082 #define HAVE_NANOSLEEP 1
19083 EOF
19084
19085 for ac_header in \
19086 termio.h \
19087 termios.h \
19088 unistd.h \
19089 sys/ioctl.h \
19090 sys/termio.h \
19091
19092 do
19093 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19094 echo "$as_me:19094: checking for $ac_header" >&5
19095 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19096 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19097   echo $ECHO_N "(cached) $ECHO_C" >&6
19098 else
19099   cat >conftest.$ac_ext <<_ACEOF
19100 #line 19100 "configure"
19101 #include "confdefs.h"
19102 #include <$ac_header>
19103 _ACEOF
19104 if { (eval echo "$as_me:19104: \"$ac_cpp conftest.$ac_ext\"") >&5
19105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19106   ac_status=$?
19107   egrep -v '^ *\+' conftest.er1 >conftest.err
19108   rm -f conftest.er1
19109   cat conftest.err >&5
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); } >/dev/null; then
19112   if test -s conftest.err; then
19113     ac_cpp_err=$ac_c_preproc_warn_flag
19114   else
19115     ac_cpp_err=
19116   fi
19117 else
19118   ac_cpp_err=yes
19119 fi
19120 if test -z "$ac_cpp_err"; then
19121   eval "$as_ac_Header=yes"
19122 else
19123   echo "$as_me: failed program was:" >&5
19124   cat conftest.$ac_ext >&5
19125   eval "$as_ac_Header=no"
19126 fi
19127 rm -f conftest.err conftest.$ac_ext
19128 fi
19129 echo "$as_me:19129: result: `eval echo '${'$as_ac_Header'}'`" >&5
19130 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19131 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19132   cat >>confdefs.h <<EOF
19133 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19134 EOF
19135
19136 fi
19137 done
19138
19139 if test "$ac_cv_header_termios_h" = yes ; then
19140         case "$CFLAGS $CPPFLAGS" in
19141         (*-D_POSIX_SOURCE*)
19142                 termios_bad=dunno ;;
19143         (*)     termios_bad=maybe ;;
19144         esac
19145         if test "$termios_bad" = maybe ; then
19146         echo "$as_me:19146: checking whether termios.h needs _POSIX_SOURCE" >&5
19147 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19148         cat >conftest.$ac_ext <<_ACEOF
19149 #line 19149 "configure"
19150 #include "confdefs.h"
19151 #include <termios.h>
19152 int
19153 main (void)
19154 {
19155 struct termios foo; int x = foo.c_iflag
19156   ;
19157   return 0;
19158 }
19159 _ACEOF
19160 rm -f conftest.$ac_objext
19161 if { (eval echo "$as_me:19161: \"$ac_compile\"") >&5
19162   (eval $ac_compile) 2>&5
19163   ac_status=$?
19164   echo "$as_me:19164: \$? = $ac_status" >&5
19165   (exit $ac_status); } &&
19166          { ac_try='test -s conftest.$ac_objext'
19167   { (eval echo "$as_me:19167: \"$ac_try\"") >&5
19168   (eval $ac_try) 2>&5
19169   ac_status=$?
19170   echo "$as_me:19170: \$? = $ac_status" >&5
19171   (exit $ac_status); }; }; then
19172   termios_bad=no
19173 else
19174   echo "$as_me: failed program was:" >&5
19175 cat conftest.$ac_ext >&5
19176
19177                 cat >conftest.$ac_ext <<_ACEOF
19178 #line 19178 "configure"
19179 #include "confdefs.h"
19180
19181 #define _POSIX_SOURCE
19182 #include <termios.h>
19183 int
19184 main (void)
19185 {
19186 struct termios foo; int x = foo.c_iflag
19187   ;
19188   return 0;
19189 }
19190 _ACEOF
19191 rm -f conftest.$ac_objext
19192 if { (eval echo "$as_me:19192: \"$ac_compile\"") >&5
19193   (eval $ac_compile) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); } &&
19197          { ac_try='test -s conftest.$ac_objext'
19198   { (eval echo "$as_me:19198: \"$ac_try\"") >&5
19199   (eval $ac_try) 2>&5
19200   ac_status=$?
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit $ac_status); }; }; then
19203   termios_bad=unknown
19204 else
19205   echo "$as_me: failed program was:" >&5
19206 cat conftest.$ac_ext >&5
19207 termios_bad=yes
19208 cat >>confdefs.h <<\EOF
19209 #define _POSIX_SOURCE 1
19210 EOF
19211
19212 fi
19213 rm -f conftest.$ac_objext conftest.$ac_ext
19214
19215 fi
19216 rm -f conftest.$ac_objext conftest.$ac_ext
19217         echo "$as_me:19217: result: $termios_bad" >&5
19218 echo "${ECHO_T}$termios_bad" >&6
19219         fi
19220 fi
19221
19222 echo "$as_me:19222: checking for tcgetattr" >&5
19223 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19224 if test "${cf_cv_have_tcgetattr+set}" = set; then
19225   echo $ECHO_N "(cached) $ECHO_C" >&6
19226 else
19227
19228 cat >conftest.$ac_ext <<_ACEOF
19229 #line 19229 "configure"
19230 #include "confdefs.h"
19231
19232 #include <sys/types.h>
19233 #ifdef HAVE_UNISTD_H
19234 #include <unistd.h>
19235 #endif
19236 #ifdef HAVE_TERMIOS_H
19237 #include <termios.h>
19238 #define TTY struct termios
19239 #else
19240 #ifdef HAVE_TERMIO_H
19241 #include <termio.h>
19242 #define TTY struct termio
19243 #endif
19244 #endif
19245
19246 int
19247 main (void)
19248 {
19249
19250 TTY foo;
19251 tcgetattr(1, &foo);
19252   ;
19253   return 0;
19254 }
19255 _ACEOF
19256 rm -f conftest.$ac_objext conftest$ac_exeext
19257 if { (eval echo "$as_me:19257: \"$ac_link\"") >&5
19258   (eval $ac_link) 2>&5
19259   ac_status=$?
19260   echo "$as_me:19260: \$? = $ac_status" >&5
19261   (exit $ac_status); } &&
19262          { ac_try='test -s conftest$ac_exeext'
19263   { (eval echo "$as_me:19263: \"$ac_try\"") >&5
19264   (eval $ac_try) 2>&5
19265   ac_status=$?
19266   echo "$as_me:19266: \$? = $ac_status" >&5
19267   (exit $ac_status); }; }; then
19268   cf_cv_have_tcgetattr=yes
19269 else
19270   echo "$as_me: failed program was:" >&5
19271 cat conftest.$ac_ext >&5
19272 cf_cv_have_tcgetattr=no
19273 fi
19274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19275 fi
19276 echo "$as_me:19276: result: $cf_cv_have_tcgetattr" >&5
19277 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19278 test "$cf_cv_have_tcgetattr" = yes &&
19279 cat >>confdefs.h <<\EOF
19280 #define HAVE_TCGETATTR 1
19281 EOF
19282
19283 echo "$as_me:19283: checking for vsscanf function or workaround" >&5
19284 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19285 if test "${cf_cv_func_vsscanf+set}" = set; then
19286   echo $ECHO_N "(cached) $ECHO_C" >&6
19287 else
19288
19289 cat >conftest.$ac_ext <<_ACEOF
19290 #line 19290 "configure"
19291 #include "confdefs.h"
19292
19293 #include <stdarg.h>
19294 #include <stdio.h>
19295 int
19296 main (void)
19297 {
19298
19299         va_list ap;
19300         vsscanf("from", "%d", ap)
19301   ;
19302   return 0;
19303 }
19304 _ACEOF
19305 rm -f conftest.$ac_objext conftest$ac_exeext
19306 if { (eval echo "$as_me:19306: \"$ac_link\"") >&5
19307   (eval $ac_link) 2>&5
19308   ac_status=$?
19309   echo "$as_me:19309: \$? = $ac_status" >&5
19310   (exit $ac_status); } &&
19311          { ac_try='test -s conftest$ac_exeext'
19312   { (eval echo "$as_me:19312: \"$ac_try\"") >&5
19313   (eval $ac_try) 2>&5
19314   ac_status=$?
19315   echo "$as_me:19315: \$? = $ac_status" >&5
19316   (exit $ac_status); }; }; then
19317   cf_cv_func_vsscanf=vsscanf
19318 else
19319   echo "$as_me: failed program was:" >&5
19320 cat conftest.$ac_ext >&5
19321
19322 cat >conftest.$ac_ext <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19325
19326 #include <stdarg.h>
19327 #include <stdio.h>
19328 int
19329 main (void)
19330 {
19331
19332         FILE strbuf;
19333         char *str = "from";
19334
19335         strbuf._flag = _IOREAD;
19336         strbuf._ptr = strbuf._base = (unsigned char *) str;
19337         strbuf._cnt = strlen(str);
19338         strbuf._file = _NFILE;
19339         return (vfscanf(&strbuf, "%d", ap))
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f conftest.$ac_objext conftest$ac_exeext
19345 if { (eval echo "$as_me:19345: \"$ac_link\"") >&5
19346   (eval $ac_link) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit $ac_status); } &&
19350          { ac_try='test -s conftest$ac_exeext'
19351   { (eval echo "$as_me:19351: \"$ac_try\"") >&5
19352   (eval $ac_try) 2>&5
19353   ac_status=$?
19354   echo "$as_me:19354: \$? = $ac_status" >&5
19355   (exit $ac_status); }; }; then
19356   cf_cv_func_vsscanf=vfscanf
19357 else
19358   echo "$as_me: failed program was:" >&5
19359 cat conftest.$ac_ext >&5
19360
19361 cat >conftest.$ac_ext <<_ACEOF
19362 #line 19362 "configure"
19363 #include "confdefs.h"
19364
19365 #include <stdarg.h>
19366 #include <stdio.h>
19367 int
19368 main (void)
19369 {
19370
19371         FILE strbuf;
19372         char *str = "from";
19373
19374         strbuf._flag = _IOREAD;
19375         strbuf._ptr = strbuf._base = (unsigned char *) str;
19376         strbuf._cnt = strlen(str);
19377         strbuf._file = _NFILE;
19378         return (_doscan(&strbuf, "%d", ap))
19379   ;
19380   return 0;
19381 }
19382 _ACEOF
19383 rm -f conftest.$ac_objext conftest$ac_exeext
19384 if { (eval echo "$as_me:19384: \"$ac_link\"") >&5
19385   (eval $ac_link) 2>&5
19386   ac_status=$?
19387   echo "$as_me:19387: \$? = $ac_status" >&5
19388   (exit $ac_status); } &&
19389          { ac_try='test -s conftest$ac_exeext'
19390   { (eval echo "$as_me:19390: \"$ac_try\"") >&5
19391   (eval $ac_try) 2>&5
19392   ac_status=$?
19393   echo "$as_me:19393: \$? = $ac_status" >&5
19394   (exit $ac_status); }; }; then
19395   cf_cv_func_vsscanf=_doscan
19396 else
19397   echo "$as_me: failed program was:" >&5
19398 cat conftest.$ac_ext >&5
19399
19400 cf_cv_func_vsscanf=no
19401 fi
19402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19403 fi
19404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19405 fi
19406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19407 fi
19408 echo "$as_me:19408: result: $cf_cv_func_vsscanf" >&5
19409 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19410
19411 case $cf_cv_func_vsscanf in
19412 (vsscanf)
19413 cat >>confdefs.h <<\EOF
19414 #define HAVE_VSSCANF 1
19415 EOF
19416 ;;
19417 (vfscanf)
19418 cat >>confdefs.h <<\EOF
19419 #define HAVE_VFSCANF 1
19420 EOF
19421 ;;
19422 (_doscan)
19423 cat >>confdefs.h <<\EOF
19424 #define HAVE__DOSCAN 1
19425 EOF
19426 ;;
19427 esac
19428
19429 for ac_header in \
19430 unistd.h \
19431
19432 do
19433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19434 echo "$as_me:19434: checking for $ac_header" >&5
19435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19437   echo $ECHO_N "(cached) $ECHO_C" >&6
19438 else
19439   cat >conftest.$ac_ext <<_ACEOF
19440 #line 19440 "configure"
19441 #include "confdefs.h"
19442 #include <$ac_header>
19443 _ACEOF
19444 if { (eval echo "$as_me:19444: \"$ac_cpp conftest.$ac_ext\"") >&5
19445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19446   ac_status=$?
19447   egrep -v '^ *\+' conftest.er1 >conftest.err
19448   rm -f conftest.er1
19449   cat conftest.err >&5
19450   echo "$as_me:19450: \$? = $ac_status" >&5
19451   (exit $ac_status); } >/dev/null; then
19452   if test -s conftest.err; then
19453     ac_cpp_err=$ac_c_preproc_warn_flag
19454   else
19455     ac_cpp_err=
19456   fi
19457 else
19458   ac_cpp_err=yes
19459 fi
19460 if test -z "$ac_cpp_err"; then
19461   eval "$as_ac_Header=yes"
19462 else
19463   echo "$as_me: failed program was:" >&5
19464   cat conftest.$ac_ext >&5
19465   eval "$as_ac_Header=no"
19466 fi
19467 rm -f conftest.err conftest.$ac_ext
19468 fi
19469 echo "$as_me:19469: result: `eval echo '${'$as_ac_Header'}'`" >&5
19470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19471 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19472   cat >>confdefs.h <<EOF
19473 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19474 EOF
19475
19476 fi
19477 done
19478
19479 echo "$as_me:19479: checking for working mkstemp" >&5
19480 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19481 if test "${cf_cv_func_mkstemp+set}" = set; then
19482   echo $ECHO_N "(cached) $ECHO_C" >&6
19483 else
19484
19485 rm -rf conftest*
19486 if test "$cross_compiling" = yes; then
19487   cf_cv_func_mkstemp=maybe
19488 else
19489   cat >conftest.$ac_ext <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492
19493 #include <sys/types.h>
19494 #ifdef HAVE_UNISTD_H
19495 #include <unistd.h>
19496 #endif
19497 #include <stdlib.h>
19498 #include <stdio.h>
19499 #include <string.h>
19500 #include <sys/stat.h>
19501 int main(void)
19502 {
19503         char *tmpl = "conftestXXXXXX";
19504         char name[2][80];
19505         int n;
19506         int result = 0;
19507         int fd;
19508         struct stat sb;
19509
19510         umask(077);
19511         for (n = 0; n < 2; ++n) {
19512                 strcpy(name[n], tmpl);
19513                 if ((fd = mkstemp(name[n])) >= 0) {
19514                         if (!strcmp(name[n], tmpl)
19515                          || stat(name[n], &sb) != 0
19516                          || (sb.st_mode & S_IFMT) != S_IFREG
19517                          || (sb.st_mode & 077) != 0) {
19518                                 result = 1;
19519                         }
19520                         close(fd);
19521                 }
19522         }
19523         if (result == 0
19524          && !strcmp(name[0], name[1]))
19525                 result = 1;
19526         ${cf_cv_main_return:-return}(result);
19527 }
19528
19529 _ACEOF
19530 rm -f conftest$ac_exeext
19531 if { (eval echo "$as_me:19531: \"$ac_link\"") >&5
19532   (eval $ac_link) 2>&5
19533   ac_status=$?
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19536   { (eval echo "$as_me:19536: \"$ac_try\"") >&5
19537   (eval $ac_try) 2>&5
19538   ac_status=$?
19539   echo "$as_me:19539: \$? = $ac_status" >&5
19540   (exit $ac_status); }; }; then
19541   cf_cv_func_mkstemp=yes
19542
19543 else
19544   echo "$as_me: program exited with status $ac_status" >&5
19545 echo "$as_me: failed program was:" >&5
19546 cat conftest.$ac_ext >&5
19547 cf_cv_func_mkstemp=no
19548
19549 fi
19550 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19551 fi
19552
19553 fi
19554 echo "$as_me:19554: result: $cf_cv_func_mkstemp" >&5
19555 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19556 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19557         echo "$as_me:19557: checking for mkstemp" >&5
19558 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19559 if test "${ac_cv_func_mkstemp+set}" = set; then
19560   echo $ECHO_N "(cached) $ECHO_C" >&6
19561 else
19562   cat >conftest.$ac_ext <<_ACEOF
19563 #line 19563 "configure"
19564 #include "confdefs.h"
19565 #define mkstemp autoconf_temporary
19566 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19567 #undef mkstemp
19568
19569 #ifdef __cplusplus
19570 extern "C"
19571 #endif
19572
19573 /* We use char because int might match the return type of a gcc2
19574    builtin and then its argument prototype would still apply.  */
19575 char mkstemp (void);
19576
19577 int
19578 main (void)
19579 {
19580
19581 /* The GNU C library defines stubs for functions which it implements
19582     to always fail with ENOSYS.  Some functions are actually named
19583     something starting with __ and the normal name is an alias.  */
19584 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19585 #error found stub for mkstemp
19586 #endif
19587
19588         return mkstemp ();
19589   ;
19590   return 0;
19591 }
19592 _ACEOF
19593 rm -f conftest.$ac_objext conftest$ac_exeext
19594 if { (eval echo "$as_me:19594: \"$ac_link\"") >&5
19595   (eval $ac_link) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit $ac_status); } &&
19599          { ac_try='test -s conftest$ac_exeext'
19600   { (eval echo "$as_me:19600: \"$ac_try\"") >&5
19601   (eval $ac_try) 2>&5
19602   ac_status=$?
19603   echo "$as_me:19603: \$? = $ac_status" >&5
19604   (exit $ac_status); }; }; then
19605   ac_cv_func_mkstemp=yes
19606 else
19607   echo "$as_me: failed program was:" >&5
19608 cat conftest.$ac_ext >&5
19609 ac_cv_func_mkstemp=no
19610 fi
19611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19612 fi
19613 echo "$as_me:19613: result: $ac_cv_func_mkstemp" >&5
19614 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19615
19616 fi
19617 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19618
19619 cat >>confdefs.h <<\EOF
19620 #define HAVE_MKSTEMP 1
19621 EOF
19622
19623 fi
19624
19625 # setup for prototype of fallback for vsscanf()
19626
19627 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19628         HAVE_VSSCANF=1
19629 else
19630         HAVE_VSSCANF=0
19631 fi
19632
19633 if test "x$cross_compiling" = xyes ; then
19634         { echo "$as_me:19634: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19635 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19636 else
19637         echo "$as_me:19637: checking whether setvbuf arguments are reversed" >&5
19638 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19639 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19640   echo $ECHO_N "(cached) $ECHO_C" >&6
19641 else
19642   if test "$cross_compiling" = yes; then
19643   { { echo "$as_me:19643: error: cannot run test program while cross compiling" >&5
19644 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19645    { (exit 1); exit 1; }; }
19646 else
19647   cat >conftest.$ac_ext <<_ACEOF
19648 #line 19648 "configure"
19649 #include "confdefs.h"
19650 #include <stdio.h>
19651 /* If setvbuf has the reversed format, exit 0. */
19652 int
19653 main (void)
19654 {
19655   /* This call has the arguments reversed.
19656      A reversed system may check and see that the address of main
19657      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19658   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19659     $ac_main_return(1);
19660   putc('\r', stdout);
19661   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19662 }
19663 _ACEOF
19664 rm -f conftest$ac_exeext
19665 if { (eval echo "$as_me:19665: \"$ac_link\"") >&5
19666   (eval $ac_link) 2>&5
19667   ac_status=$?
19668   echo "$as_me:19668: \$? = $ac_status" >&5
19669   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19670   { (eval echo "$as_me:19670: \"$ac_try\"") >&5
19671   (eval $ac_try) 2>&5
19672   ac_status=$?
19673   echo "$as_me:19673: \$? = $ac_status" >&5
19674   (exit $ac_status); }; }; then
19675   ac_cv_func_setvbuf_reversed=yes
19676 else
19677   echo "$as_me: program exited with status $ac_status" >&5
19678 echo "$as_me: failed program was:" >&5
19679 cat conftest.$ac_ext >&5
19680 ac_cv_func_setvbuf_reversed=no
19681 fi
19682 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19683 fi
19684 rm -f core core.* *.core
19685 fi
19686 echo "$as_me:19686: result: $ac_cv_func_setvbuf_reversed" >&5
19687 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19688 if test $ac_cv_func_setvbuf_reversed = yes; then
19689
19690 cat >>confdefs.h <<\EOF
19691 #define SETVBUF_REVERSED 1
19692 EOF
19693
19694 fi
19695
19696 fi
19697 echo "$as_me:19697: checking for intptr_t" >&5
19698 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19699 if test "${ac_cv_type_intptr_t+set}" = set; then
19700   echo $ECHO_N "(cached) $ECHO_C" >&6
19701 else
19702   cat >conftest.$ac_ext <<_ACEOF
19703 #line 19703 "configure"
19704 #include "confdefs.h"
19705 $ac_includes_default
19706 int
19707 main (void)
19708 {
19709 if ((intptr_t *) 0)
19710   return 0;
19711 if (sizeof (intptr_t))
19712   return 0;
19713   ;
19714   return 0;
19715 }
19716 _ACEOF
19717 rm -f conftest.$ac_objext
19718 if { (eval echo "$as_me:19718: \"$ac_compile\"") >&5
19719   (eval $ac_compile) 2>&5
19720   ac_status=$?
19721   echo "$as_me:19721: \$? = $ac_status" >&5
19722   (exit $ac_status); } &&
19723          { ac_try='test -s conftest.$ac_objext'
19724   { (eval echo "$as_me:19724: \"$ac_try\"") >&5
19725   (eval $ac_try) 2>&5
19726   ac_status=$?
19727   echo "$as_me:19727: \$? = $ac_status" >&5
19728   (exit $ac_status); }; }; then
19729   ac_cv_type_intptr_t=yes
19730 else
19731   echo "$as_me: failed program was:" >&5
19732 cat conftest.$ac_ext >&5
19733 ac_cv_type_intptr_t=no
19734 fi
19735 rm -f conftest.$ac_objext conftest.$ac_ext
19736 fi
19737 echo "$as_me:19737: result: $ac_cv_type_intptr_t" >&5
19738 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19739 if test $ac_cv_type_intptr_t = yes; then
19740   :
19741 else
19742
19743 cat >>confdefs.h <<EOF
19744 #define intptr_t long
19745 EOF
19746
19747 fi
19748
19749 echo "$as_me:19749: checking for ssize_t" >&5
19750 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19751 if test "${ac_cv_type_ssize_t+set}" = set; then
19752   echo $ECHO_N "(cached) $ECHO_C" >&6
19753 else
19754   cat >conftest.$ac_ext <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19757 $ac_includes_default
19758 int
19759 main (void)
19760 {
19761 if ((ssize_t *) 0)
19762   return 0;
19763 if (sizeof (ssize_t))
19764   return 0;
19765   ;
19766   return 0;
19767 }
19768 _ACEOF
19769 rm -f conftest.$ac_objext
19770 if { (eval echo "$as_me:19770: \"$ac_compile\"") >&5
19771   (eval $ac_compile) 2>&5
19772   ac_status=$?
19773   echo "$as_me:19773: \$? = $ac_status" >&5
19774   (exit $ac_status); } &&
19775          { ac_try='test -s conftest.$ac_objext'
19776   { (eval echo "$as_me:19776: \"$ac_try\"") >&5
19777   (eval $ac_try) 2>&5
19778   ac_status=$?
19779   echo "$as_me:19779: \$? = $ac_status" >&5
19780   (exit $ac_status); }; }; then
19781   ac_cv_type_ssize_t=yes
19782 else
19783   echo "$as_me: failed program was:" >&5
19784 cat conftest.$ac_ext >&5
19785 ac_cv_type_ssize_t=no
19786 fi
19787 rm -f conftest.$ac_objext conftest.$ac_ext
19788 fi
19789 echo "$as_me:19789: result: $ac_cv_type_ssize_t" >&5
19790 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19791 if test $ac_cv_type_ssize_t = yes; then
19792   :
19793 else
19794
19795 cat >>confdefs.h <<EOF
19796 #define ssize_t int
19797 EOF
19798
19799 fi
19800
19801 echo "$as_me:19801: checking for type sigaction_t" >&5
19802 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19803 if test "${cf_cv_type_sigaction+set}" = set; then
19804   echo $ECHO_N "(cached) $ECHO_C" >&6
19805 else
19806
19807         cat >conftest.$ac_ext <<_ACEOF
19808 #line 19808 "configure"
19809 #include "confdefs.h"
19810
19811 #include <signal.h>
19812 int
19813 main (void)
19814 {
19815 sigaction_t x
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -f conftest.$ac_objext
19821 if { (eval echo "$as_me:19821: \"$ac_compile\"") >&5
19822   (eval $ac_compile) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); } &&
19826          { ac_try='test -s conftest.$ac_objext'
19827   { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); }; }; then
19832   cf_cv_type_sigaction=yes
19833 else
19834   echo "$as_me: failed program was:" >&5
19835 cat conftest.$ac_ext >&5
19836 cf_cv_type_sigaction=no
19837 fi
19838 rm -f conftest.$ac_objext conftest.$ac_ext
19839 fi
19840
19841 echo "$as_me:19841: result: $cf_cv_type_sigaction" >&5
19842 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19843 test "$cf_cv_type_sigaction" = yes &&
19844 cat >>confdefs.h <<\EOF
19845 #define HAVE_TYPE_SIGACTION 1
19846 EOF
19847
19848 echo "$as_me:19848: checking declaration of size-change" >&5
19849 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19850 if test "${cf_cv_sizechange+set}" = set; then
19851   echo $ECHO_N "(cached) $ECHO_C" >&6
19852 else
19853
19854         cf_cv_sizechange=unknown
19855         cf_save_CPPFLAGS="$CPPFLAGS"
19856
19857 for cf_opts in "" "NEED_PTEM_H"
19858 do
19859
19860         CPPFLAGS="$cf_save_CPPFLAGS"
19861         if test -n "$cf_opts"
19862         then
19863
19864         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19865         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19866
19867         fi
19868         cat >conftest.$ac_ext <<_ACEOF
19869 #line 19869 "configure"
19870 #include "confdefs.h"
19871 #include <sys/types.h>
19872 #ifdef HAVE_TERMIOS_H
19873 #include <termios.h>
19874 #else
19875 #ifdef HAVE_TERMIO_H
19876 #include <termio.h>
19877 #endif
19878 #endif
19879
19880 #ifdef NEED_PTEM_H
19881 /* This is a workaround for SCO:  they neglected to define struct winsize in
19882  * termios.h -- it's only in termio.h and ptem.h
19883  */
19884 #include <sys/stream.h>
19885 #include <sys/ptem.h>
19886 #endif
19887
19888 #ifdef HAVE_SYS_IOCTL_H
19889 #include <sys/ioctl.h>
19890 #endif
19891
19892 int
19893 main (void)
19894 {
19895
19896 #ifdef TIOCGSIZE
19897         struct ttysize win;     /* SunOS 3.0... */
19898         int y = win.ts_lines;
19899         int x = win.ts_cols;
19900 #else
19901 #ifdef TIOCGWINSZ
19902         struct winsize win;     /* everything else */
19903         int y = win.ws_row;
19904         int x = win.ws_col;
19905 #else
19906         no TIOCGSIZE or TIOCGWINSZ
19907 #endif /* TIOCGWINSZ */
19908 #endif /* TIOCGSIZE */
19909
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 rm -f conftest.$ac_objext
19915 if { (eval echo "$as_me:19915: \"$ac_compile\"") >&5
19916   (eval $ac_compile) 2>&5
19917   ac_status=$?
19918   echo "$as_me:19918: \$? = $ac_status" >&5
19919   (exit $ac_status); } &&
19920          { ac_try='test -s conftest.$ac_objext'
19921   { (eval echo "$as_me:19921: \"$ac_try\"") >&5
19922   (eval $ac_try) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); }; }; then
19926   cf_cv_sizechange=yes
19927 else
19928   echo "$as_me: failed program was:" >&5
19929 cat conftest.$ac_ext >&5
19930 cf_cv_sizechange=no
19931 fi
19932 rm -f conftest.$ac_objext conftest.$ac_ext
19933
19934         CPPFLAGS="$cf_save_CPPFLAGS"
19935         if test "$cf_cv_sizechange" = yes ; then
19936                 echo "size-change succeeded ($cf_opts)" >&5
19937                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19938                 break
19939         fi
19940 done
19941
19942 fi
19943 echo "$as_me:19943: result: $cf_cv_sizechange" >&5
19944 echo "${ECHO_T}$cf_cv_sizechange" >&6
19945 if test "$cf_cv_sizechange" != no ; then
19946
19947 cat >>confdefs.h <<\EOF
19948 #define HAVE_SIZECHANGE 1
19949 EOF
19950
19951         case $cf_cv_sizechange in
19952         (NEED*)
19953                 cat >>confdefs.h <<EOF
19954 #define $cf_cv_sizechange  1
19955 EOF
19956
19957                 ;;
19958         esac
19959 fi
19960
19961 echo "$as_me:19961: checking for memmove" >&5
19962 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19963 if test "${ac_cv_func_memmove+set}" = set; then
19964   echo $ECHO_N "(cached) $ECHO_C" >&6
19965 else
19966   cat >conftest.$ac_ext <<_ACEOF
19967 #line 19967 "configure"
19968 #include "confdefs.h"
19969 #define memmove autoconf_temporary
19970 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19971 #undef memmove
19972
19973 #ifdef __cplusplus
19974 extern "C"
19975 #endif
19976
19977 /* We use char because int might match the return type of a gcc2
19978    builtin and then its argument prototype would still apply.  */
19979 char memmove (void);
19980
19981 int
19982 main (void)
19983 {
19984
19985 /* The GNU C library defines stubs for functions which it implements
19986     to always fail with ENOSYS.  Some functions are actually named
19987     something starting with __ and the normal name is an alias.  */
19988 #if defined (__stub_memmove) || defined (__stub___memmove)
19989 #error found stub for memmove
19990 #endif
19991
19992         return memmove ();
19993   ;
19994   return 0;
19995 }
19996 _ACEOF
19997 rm -f conftest.$ac_objext conftest$ac_exeext
19998 if { (eval echo "$as_me:19998: \"$ac_link\"") >&5
19999   (eval $ac_link) 2>&5
20000   ac_status=$?
20001   echo "$as_me:20001: \$? = $ac_status" >&5
20002   (exit $ac_status); } &&
20003          { ac_try='test -s conftest$ac_exeext'
20004   { (eval echo "$as_me:20004: \"$ac_try\"") >&5
20005   (eval $ac_try) 2>&5
20006   ac_status=$?
20007   echo "$as_me:20007: \$? = $ac_status" >&5
20008   (exit $ac_status); }; }; then
20009   ac_cv_func_memmove=yes
20010 else
20011   echo "$as_me: failed program was:" >&5
20012 cat conftest.$ac_ext >&5
20013 ac_cv_func_memmove=no
20014 fi
20015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20016 fi
20017 echo "$as_me:20017: result: $ac_cv_func_memmove" >&5
20018 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20019 if test $ac_cv_func_memmove = yes; then
20020   :
20021 else
20022
20023 echo "$as_me:20023: checking for bcopy" >&5
20024 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20025 if test "${ac_cv_func_bcopy+set}" = set; then
20026   echo $ECHO_N "(cached) $ECHO_C" >&6
20027 else
20028   cat >conftest.$ac_ext <<_ACEOF
20029 #line 20029 "configure"
20030 #include "confdefs.h"
20031 #define bcopy autoconf_temporary
20032 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20033 #undef bcopy
20034
20035 #ifdef __cplusplus
20036 extern "C"
20037 #endif
20038
20039 /* We use char because int might match the return type of a gcc2
20040    builtin and then its argument prototype would still apply.  */
20041 char bcopy (void);
20042
20043 int
20044 main (void)
20045 {
20046
20047 /* The GNU C library defines stubs for functions which it implements
20048     to always fail with ENOSYS.  Some functions are actually named
20049     something starting with __ and the normal name is an alias.  */
20050 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20051 #error found stub for bcopy
20052 #endif
20053
20054         return bcopy ();
20055   ;
20056   return 0;
20057 }
20058 _ACEOF
20059 rm -f conftest.$ac_objext conftest$ac_exeext
20060 if { (eval echo "$as_me:20060: \"$ac_link\"") >&5
20061   (eval $ac_link) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit $ac_status); } &&
20065          { ac_try='test -s conftest$ac_exeext'
20066   { (eval echo "$as_me:20066: \"$ac_try\"") >&5
20067   (eval $ac_try) 2>&5
20068   ac_status=$?
20069   echo "$as_me:20069: \$? = $ac_status" >&5
20070   (exit $ac_status); }; }; then
20071   ac_cv_func_bcopy=yes
20072 else
20073   echo "$as_me: failed program was:" >&5
20074 cat conftest.$ac_ext >&5
20075 ac_cv_func_bcopy=no
20076 fi
20077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20078 fi
20079 echo "$as_me:20079: result: $ac_cv_func_bcopy" >&5
20080 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20081 if test $ac_cv_func_bcopy = yes; then
20082
20083         echo "$as_me:20083: checking if bcopy does overlapping moves" >&5
20084 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20085 if test "${cf_cv_good_bcopy+set}" = set; then
20086   echo $ECHO_N "(cached) $ECHO_C" >&6
20087 else
20088
20089                 if test "$cross_compiling" = yes; then
20090   cf_cv_good_bcopy=unknown
20091 else
20092   cat >conftest.$ac_ext <<_ACEOF
20093 #line 20093 "configure"
20094 #include "confdefs.h"
20095
20096 int main(void) {
20097         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20098         char temp[40];
20099         bcopy(data, temp, sizeof(data));
20100         bcopy(temp+10, temp, 15);
20101         bcopy(temp+5, temp+15, 10);
20102         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20103 }
20104
20105 _ACEOF
20106 rm -f conftest$ac_exeext
20107 if { (eval echo "$as_me:20107: \"$ac_link\"") >&5
20108   (eval $ac_link) 2>&5
20109   ac_status=$?
20110   echo "$as_me:20110: \$? = $ac_status" >&5
20111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20112   { (eval echo "$as_me:20112: \"$ac_try\"") >&5
20113   (eval $ac_try) 2>&5
20114   ac_status=$?
20115   echo "$as_me:20115: \$? = $ac_status" >&5
20116   (exit $ac_status); }; }; then
20117   cf_cv_good_bcopy=yes
20118 else
20119   echo "$as_me: program exited with status $ac_status" >&5
20120 echo "$as_me: failed program was:" >&5
20121 cat conftest.$ac_ext >&5
20122 cf_cv_good_bcopy=no
20123 fi
20124 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20125 fi
20126
20127 fi
20128 echo "$as_me:20128: result: $cf_cv_good_bcopy" >&5
20129 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20130
20131 else
20132   cf_cv_good_bcopy=no
20133 fi
20134
20135         if test "$cf_cv_good_bcopy" = yes ; then
20136
20137 cat >>confdefs.h <<\EOF
20138 #define USE_OK_BCOPY 1
20139 EOF
20140
20141         else
20142
20143 cat >>confdefs.h <<\EOF
20144 #define USE_MY_MEMMOVE 1
20145 EOF
20146
20147         fi
20148
20149 fi
20150
20151 tty 2>&1 >/dev/null || {
20152 for ac_func in posix_openpt
20153 do
20154 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20155 echo "$as_me:20155: checking for $ac_func" >&5
20156 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20157 if eval "test \"\${$as_ac_var+set}\" = set"; then
20158   echo $ECHO_N "(cached) $ECHO_C" >&6
20159 else
20160   cat >conftest.$ac_ext <<_ACEOF
20161 #line 20161 "configure"
20162 #include "confdefs.h"
20163 #define $ac_func autoconf_temporary
20164 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20165 #undef $ac_func
20166
20167 #ifdef __cplusplus
20168 extern "C"
20169 #endif
20170
20171 /* We use char because int might match the return type of a gcc2
20172    builtin and then its argument prototype would still apply.  */
20173 char $ac_func (void);
20174
20175 int
20176 main (void)
20177 {
20178
20179 /* The GNU C library defines stubs for functions which it implements
20180     to always fail with ENOSYS.  Some functions are actually named
20181     something starting with __ and the normal name is an alias.  */
20182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20183 #error found stub for $ac_func
20184 #endif
20185
20186         return $ac_func ();
20187   ;
20188   return 0;
20189 }
20190 _ACEOF
20191 rm -f conftest.$ac_objext conftest$ac_exeext
20192 if { (eval echo "$as_me:20192: \"$ac_link\"") >&5
20193   (eval $ac_link) 2>&5
20194   ac_status=$?
20195   echo "$as_me:20195: \$? = $ac_status" >&5
20196   (exit $ac_status); } &&
20197          { ac_try='test -s conftest$ac_exeext'
20198   { (eval echo "$as_me:20198: \"$ac_try\"") >&5
20199   (eval $ac_try) 2>&5
20200   ac_status=$?
20201   echo "$as_me:20201: \$? = $ac_status" >&5
20202   (exit $ac_status); }; }; then
20203   eval "$as_ac_var=yes"
20204 else
20205   echo "$as_me: failed program was:" >&5
20206 cat conftest.$ac_ext >&5
20207 eval "$as_ac_var=no"
20208 fi
20209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20210 fi
20211 echo "$as_me:20211: result: `eval echo '${'$as_ac_var'}'`" >&5
20212 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20213 if test `eval echo '${'$as_ac_var'}'` = yes; then
20214   cat >>confdefs.h <<EOF
20215 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20216 EOF
20217
20218 fi
20219 done
20220  }
20221 echo "$as_me:20221: checking if poll really works" >&5
20222 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20223 if test "${cf_cv_working_poll+set}" = set; then
20224   echo $ECHO_N "(cached) $ECHO_C" >&6
20225 else
20226
20227 if test "$cross_compiling" = yes; then
20228   cf_cv_working_poll=unknown
20229 else
20230   cat >conftest.$ac_ext <<_ACEOF
20231 #line 20231 "configure"
20232 #include "confdefs.h"
20233
20234 #include <stdlib.h>
20235 #include <stdio.h>
20236 #include <unistd.h>
20237 #include <fcntl.h>
20238 #ifdef HAVE_POLL_H
20239 #include <poll.h>
20240 #else
20241 #include <sys/poll.h>
20242 #endif
20243 int main(void) {
20244         struct pollfd myfds;
20245         int ret;
20246
20247         /* check for Darwin bug with respect to "devices" */
20248         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20249         if (myfds.fd < 0)
20250                 myfds.fd = 0;
20251         myfds.events = POLLIN;
20252         myfds.revents = 0;
20253
20254         ret = poll(&myfds, 1, 100);
20255
20256         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20257                 ret = -1;
20258         } else {
20259                 int fd = 0;
20260                 if (!isatty(fd)) {
20261                         fd = open("/dev/tty", 2);       /* O_RDWR */
20262                 }
20263 #ifdef HAVE_POSIX_OPENPT
20264                 if (fd < 0) {
20265                         fd = posix_openpt(O_RDWR);
20266                 }
20267 #endif
20268
20269                 if (fd >= 0) {
20270                         /* also check with standard input */
20271                         myfds.fd = fd;
20272                         myfds.events = POLLIN;
20273                         myfds.revents = 0;
20274                         ret = poll(&myfds, 1, 100);
20275                 } else {
20276                         ret = -1;
20277                 }
20278         }
20279         ${cf_cv_main_return:-return}(ret < 0);
20280 }
20281 _ACEOF
20282 rm -f conftest$ac_exeext
20283 if { (eval echo "$as_me:20283: \"$ac_link\"") >&5
20284   (eval $ac_link) 2>&5
20285   ac_status=$?
20286   echo "$as_me:20286: \$? = $ac_status" >&5
20287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20288   { (eval echo "$as_me:20288: \"$ac_try\"") >&5
20289   (eval $ac_try) 2>&5
20290   ac_status=$?
20291   echo "$as_me:20291: \$? = $ac_status" >&5
20292   (exit $ac_status); }; }; then
20293   cf_cv_working_poll=yes
20294 else
20295   echo "$as_me: program exited with status $ac_status" >&5
20296 echo "$as_me: failed program was:" >&5
20297 cat conftest.$ac_ext >&5
20298 cf_cv_working_poll=no
20299 fi
20300 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20301 fi
20302 fi
20303 echo "$as_me:20303: result: $cf_cv_working_poll" >&5
20304 echo "${ECHO_T}$cf_cv_working_poll" >&6
20305 test "$cf_cv_working_poll" = "yes" &&
20306 cat >>confdefs.h <<\EOF
20307 #define HAVE_WORKING_POLL 1
20308 EOF
20309
20310 echo "$as_me:20310: checking for va_copy" >&5
20311 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20312 if test "${cf_cv_have_va_copy+set}" = set; then
20313   echo $ECHO_N "(cached) $ECHO_C" >&6
20314 else
20315
20316 cat >conftest.$ac_ext <<_ACEOF
20317 #line 20317 "configure"
20318 #include "confdefs.h"
20319
20320 #include <stdarg.h>
20321
20322 int
20323 main (void)
20324 {
20325
20326         static va_list dst;
20327         static va_list src;
20328         va_copy(dst, src)
20329   ;
20330   return 0;
20331 }
20332 _ACEOF
20333 rm -f conftest.$ac_objext conftest$ac_exeext
20334 if { (eval echo "$as_me:20334: \"$ac_link\"") >&5
20335   (eval $ac_link) 2>&5
20336   ac_status=$?
20337   echo "$as_me:20337: \$? = $ac_status" >&5
20338   (exit $ac_status); } &&
20339          { ac_try='test -s conftest$ac_exeext'
20340   { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341   (eval $ac_try) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit $ac_status); }; }; then
20345   cf_cv_have_va_copy=yes
20346 else
20347   echo "$as_me: failed program was:" >&5
20348 cat conftest.$ac_ext >&5
20349 cf_cv_have_va_copy=no
20350 fi
20351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20352 fi
20353 echo "$as_me:20353: result: $cf_cv_have_va_copy" >&5
20354 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20355
20356 test "$cf_cv_have_va_copy" = yes &&
20357 cat >>confdefs.h <<\EOF
20358 #define HAVE_VA_COPY 1
20359 EOF
20360
20361 echo "$as_me:20361: checking for __va_copy" >&5
20362 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20363 if test "${cf_cv_have___va_copy+set}" = set; then
20364   echo $ECHO_N "(cached) $ECHO_C" >&6
20365 else
20366
20367 cat >conftest.$ac_ext <<_ACEOF
20368 #line 20368 "configure"
20369 #include "confdefs.h"
20370
20371 #include <stdarg.h>
20372
20373 int
20374 main (void)
20375 {
20376
20377         static va_list dst;
20378         static va_list src;
20379         __va_copy(dst, src)
20380   ;
20381   return 0;
20382 }
20383 _ACEOF
20384 rm -f conftest.$ac_objext conftest$ac_exeext
20385 if { (eval echo "$as_me:20385: \"$ac_link\"") >&5
20386   (eval $ac_link) 2>&5
20387   ac_status=$?
20388   echo "$as_me:20388: \$? = $ac_status" >&5
20389   (exit $ac_status); } &&
20390          { ac_try='test -s conftest$ac_exeext'
20391   { (eval echo "$as_me:20391: \"$ac_try\"") >&5
20392   (eval $ac_try) 2>&5
20393   ac_status=$?
20394   echo "$as_me:20394: \$? = $ac_status" >&5
20395   (exit $ac_status); }; }; then
20396   cf_cv_have___va_copy=yes
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 cat conftest.$ac_ext >&5
20400 cf_cv_have___va_copy=no
20401 fi
20402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20403 fi
20404 echo "$as_me:20404: result: $cf_cv_have___va_copy" >&5
20405 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20406
20407 test "$cf_cv_have___va_copy" = yes &&
20408 cat >>confdefs.h <<\EOF
20409 #define HAVE___VA_COPY 1
20410 EOF
20411
20412 echo "$as_me:20412: checking for pid_t" >&5
20413 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20414 if test "${ac_cv_type_pid_t+set}" = set; then
20415   echo $ECHO_N "(cached) $ECHO_C" >&6
20416 else
20417   cat >conftest.$ac_ext <<_ACEOF
20418 #line 20418 "configure"
20419 #include "confdefs.h"
20420 $ac_includes_default
20421 int
20422 main (void)
20423 {
20424 if ((pid_t *) 0)
20425   return 0;
20426 if (sizeof (pid_t))
20427   return 0;
20428   ;
20429   return 0;
20430 }
20431 _ACEOF
20432 rm -f conftest.$ac_objext
20433 if { (eval echo "$as_me:20433: \"$ac_compile\"") >&5
20434   (eval $ac_compile) 2>&5
20435   ac_status=$?
20436   echo "$as_me:20436: \$? = $ac_status" >&5
20437   (exit $ac_status); } &&
20438          { ac_try='test -s conftest.$ac_objext'
20439   { (eval echo "$as_me:20439: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit $ac_status); }; }; then
20444   ac_cv_type_pid_t=yes
20445 else
20446   echo "$as_me: failed program was:" >&5
20447 cat conftest.$ac_ext >&5
20448 ac_cv_type_pid_t=no
20449 fi
20450 rm -f conftest.$ac_objext conftest.$ac_ext
20451 fi
20452 echo "$as_me:20452: result: $ac_cv_type_pid_t" >&5
20453 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20454 if test $ac_cv_type_pid_t = yes; then
20455   :
20456 else
20457
20458 cat >>confdefs.h <<EOF
20459 #define pid_t int
20460 EOF
20461
20462 fi
20463
20464 for ac_header in unistd.h vfork.h
20465 do
20466 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20467 echo "$as_me:20467: checking for $ac_header" >&5
20468 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20469 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20470   echo $ECHO_N "(cached) $ECHO_C" >&6
20471 else
20472   cat >conftest.$ac_ext <<_ACEOF
20473 #line 20473 "configure"
20474 #include "confdefs.h"
20475 #include <$ac_header>
20476 _ACEOF
20477 if { (eval echo "$as_me:20477: \"$ac_cpp conftest.$ac_ext\"") >&5
20478   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20479   ac_status=$?
20480   egrep -v '^ *\+' conftest.er1 >conftest.err
20481   rm -f conftest.er1
20482   cat conftest.err >&5
20483   echo "$as_me:20483: \$? = $ac_status" >&5
20484   (exit $ac_status); } >/dev/null; then
20485   if test -s conftest.err; then
20486     ac_cpp_err=$ac_c_preproc_warn_flag
20487   else
20488     ac_cpp_err=
20489   fi
20490 else
20491   ac_cpp_err=yes
20492 fi
20493 if test -z "$ac_cpp_err"; then
20494   eval "$as_ac_Header=yes"
20495 else
20496   echo "$as_me: failed program was:" >&5
20497   cat conftest.$ac_ext >&5
20498   eval "$as_ac_Header=no"
20499 fi
20500 rm -f conftest.err conftest.$ac_ext
20501 fi
20502 echo "$as_me:20502: result: `eval echo '${'$as_ac_Header'}'`" >&5
20503 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20504 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20505   cat >>confdefs.h <<EOF
20506 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20507 EOF
20508
20509 fi
20510 done
20511
20512 for ac_func in fork vfork
20513 do
20514 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20515 echo "$as_me:20515: checking for $ac_func" >&5
20516 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20517 if eval "test \"\${$as_ac_var+set}\" = set"; then
20518   echo $ECHO_N "(cached) $ECHO_C" >&6
20519 else
20520   cat >conftest.$ac_ext <<_ACEOF
20521 #line 20521 "configure"
20522 #include "confdefs.h"
20523 #define $ac_func autoconf_temporary
20524 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20525 #undef $ac_func
20526
20527 #ifdef __cplusplus
20528 extern "C"
20529 #endif
20530
20531 /* We use char because int might match the return type of a gcc2
20532    builtin and then its argument prototype would still apply.  */
20533 char $ac_func (void);
20534
20535 int
20536 main (void)
20537 {
20538
20539 /* The GNU C library defines stubs for functions which it implements
20540     to always fail with ENOSYS.  Some functions are actually named
20541     something starting with __ and the normal name is an alias.  */
20542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20543 #error found stub for $ac_func
20544 #endif
20545
20546         return $ac_func ();
20547   ;
20548   return 0;
20549 }
20550 _ACEOF
20551 rm -f conftest.$ac_objext conftest$ac_exeext
20552 if { (eval echo "$as_me:20552: \"$ac_link\"") >&5
20553   (eval $ac_link) 2>&5
20554   ac_status=$?
20555   echo "$as_me:20555: \$? = $ac_status" >&5
20556   (exit $ac_status); } &&
20557          { ac_try='test -s conftest$ac_exeext'
20558   { (eval echo "$as_me:20558: \"$ac_try\"") >&5
20559   (eval $ac_try) 2>&5
20560   ac_status=$?
20561   echo "$as_me:20561: \$? = $ac_status" >&5
20562   (exit $ac_status); }; }; then
20563   eval "$as_ac_var=yes"
20564 else
20565   echo "$as_me: failed program was:" >&5
20566 cat conftest.$ac_ext >&5
20567 eval "$as_ac_var=no"
20568 fi
20569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20570 fi
20571 echo "$as_me:20571: result: `eval echo '${'$as_ac_var'}'`" >&5
20572 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20573 if test `eval echo '${'$as_ac_var'}'` = yes; then
20574   cat >>confdefs.h <<EOF
20575 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20576 EOF
20577
20578 fi
20579 done
20580
20581 ac_cv_func_fork_works=$ac_cv_func_fork
20582 if test "x$ac_cv_func_fork" = xyes; then
20583   echo "$as_me:20583: checking for working fork" >&5
20584 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20585 if test "${ac_cv_func_fork_works+set}" = set; then
20586   echo $ECHO_N "(cached) $ECHO_C" >&6
20587 else
20588   if test "$cross_compiling" = yes; then
20589   ac_cv_func_fork_works=cross
20590 else
20591   cat >conftest.$ac_ext <<_ACEOF
20592 /* By Rüdiger Kuhlmann. */
20593       #include <sys/types.h>
20594       #if HAVE_UNISTD_H
20595       # include <unistd.h>
20596       #endif
20597       /* Some systems only have a dummy stub for fork() */
20598       int main (void)
20599       {
20600         if (fork() < 0)
20601           $ac_main_return (1);
20602         $ac_main_return (0);
20603       }
20604 _ACEOF
20605 rm -f conftest$ac_exeext
20606 if { (eval echo "$as_me:20606: \"$ac_link\"") >&5
20607   (eval $ac_link) 2>&5
20608   ac_status=$?
20609   echo "$as_me:20609: \$? = $ac_status" >&5
20610   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20611   { (eval echo "$as_me:20611: \"$ac_try\"") >&5
20612   (eval $ac_try) 2>&5
20613   ac_status=$?
20614   echo "$as_me:20614: \$? = $ac_status" >&5
20615   (exit $ac_status); }; }; then
20616   ac_cv_func_fork_works=yes
20617 else
20618   echo "$as_me: program exited with status $ac_status" >&5
20619 echo "$as_me: failed program was:" >&5
20620 cat conftest.$ac_ext >&5
20621 ac_cv_func_fork_works=no
20622 fi
20623 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20624 fi
20625 fi
20626 echo "$as_me:20626: result: $ac_cv_func_fork_works" >&5
20627 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20628
20629 fi
20630 if test "x$ac_cv_func_fork_works" = xcross; then
20631   case $host in
20632     *-*-amigaos* | *-*-msdosdjgpp*)
20633       # Override, as these systems have only a dummy fork() stub
20634       ac_cv_func_fork_works=no
20635       ;;
20636     *)
20637       ac_cv_func_fork_works=yes
20638       ;;
20639   esac
20640   { echo "$as_me:20640: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20641 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20642 fi
20643 ac_cv_func_vfork_works=$ac_cv_func_vfork
20644 if test "x$ac_cv_func_vfork" = xyes; then
20645   echo "$as_me:20645: checking for working vfork" >&5
20646 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20647 if test "${ac_cv_func_vfork_works+set}" = set; then
20648   echo $ECHO_N "(cached) $ECHO_C" >&6
20649 else
20650   if test "$cross_compiling" = yes; then
20651   ac_cv_func_vfork_works=cross
20652 else
20653   cat >conftest.$ac_ext <<_ACEOF
20654 #line 20654 "configure"
20655 #include "confdefs.h"
20656 /* Thanks to Paul Eggert for this test.  */
20657 #include <stdio.h>
20658 #include <sys/types.h>
20659 #include <sys/stat.h>
20660 #if HAVE_UNISTD_H
20661 # include <unistd.h>
20662 #endif
20663 #if HAVE_VFORK_H
20664 # include <vfork.h>
20665 #endif
20666 /* On some sparc systems, changes by the child to local and incoming
20667    argument registers are propagated back to the parent.  The compiler
20668    is told about this with #include <vfork.h>, but some compilers
20669    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20670    static variable whose address is put into a register that is
20671    clobbered by the vfork.  */
20672 static
20673 #ifdef __cplusplus
20674 sparc_address_test (int arg)
20675 # else
20676 sparc_address_test (arg) int arg;
20677 #endif
20678 {
20679   static pid_t child;
20680   if (!child) {
20681     child = vfork ();
20682     if (child < 0) {
20683       perror ("vfork");
20684       _exit(2);
20685     }
20686     if (!child) {
20687       arg = getpid();
20688       write(-1, "", 0);
20689       _exit (arg);
20690     }
20691   }
20692 }
20693
20694 int
20695 main (void)
20696 {
20697   pid_t parent = getpid ();
20698   pid_t child;
20699
20700   sparc_address_test ();
20701
20702   child = vfork ();
20703
20704   if (child == 0) {
20705     /* Here is another test for sparc vfork register problems.  This
20706        test uses lots of local variables, at least as many local
20707        variables as main has allocated so far including compiler
20708        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20709        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20710        reuse the register of parent for one of the local variables,
20711        since it will think that parent can't possibly be used any more
20712        in this routine.  Assigning to the local variable will thus
20713        munge parent in the parent process.  */
20714     pid_t
20715       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20716       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20717     /* Convince the compiler that p..p7 are live; otherwise, it might
20718        use the same hardware register for all 8 local variables.  */
20719     if (p != p1 || p != p2 || p != p3 || p != p4
20720         || p != p5 || p != p6 || p != p7)
20721       _exit(1);
20722
20723     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20724        from child file descriptors.  If the child closes a descriptor
20725        before it execs or exits, this munges the parent's descriptor
20726        as well.  Test for this by closing stdout in the child.  */
20727     _exit(close(fileno(stdout)) != 0);
20728   } else {
20729     int status;
20730     struct stat st;
20731
20732     while (wait(&status) != child)
20733       ;
20734     $ac_main_return(
20735          /* Was there some problem with vforking?  */
20736          child < 0
20737
20738          /* Did the child fail?  (This shouldn't happen.)  */
20739          || status
20740
20741          /* Did the vfork/compiler bug occur?  */
20742          || parent != getpid()
20743
20744          /* Did the file descriptor bug occur?  */
20745          || fstat(fileno(stdout), &st) != 0
20746          );
20747   }
20748 }
20749 _ACEOF
20750 rm -f conftest$ac_exeext
20751 if { (eval echo "$as_me:20751: \"$ac_link\"") >&5
20752   (eval $ac_link) 2>&5
20753   ac_status=$?
20754   echo "$as_me:20754: \$? = $ac_status" >&5
20755   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20756   { (eval echo "$as_me:20756: \"$ac_try\"") >&5
20757   (eval $ac_try) 2>&5
20758   ac_status=$?
20759   echo "$as_me:20759: \$? = $ac_status" >&5
20760   (exit $ac_status); }; }; then
20761   ac_cv_func_vfork_works=yes
20762 else
20763   echo "$as_me: program exited with status $ac_status" >&5
20764 echo "$as_me: failed program was:" >&5
20765 cat conftest.$ac_ext >&5
20766 ac_cv_func_vfork_works=no
20767 fi
20768 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20769 fi
20770 fi
20771 echo "$as_me:20771: result: $ac_cv_func_vfork_works" >&5
20772 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20773
20774 fi;
20775 if test "x$ac_cv_func_fork_works" = xcross; then
20776   ac_cv_func_vfork_works=ac_cv_func_vfork
20777   { echo "$as_me:20777: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20778 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20779 fi
20780
20781 if test "x$ac_cv_func_vfork_works" = xyes; then
20782
20783 cat >>confdefs.h <<\EOF
20784 #define HAVE_WORKING_VFORK 1
20785 EOF
20786
20787 else
20788
20789 cat >>confdefs.h <<\EOF
20790 #define vfork fork
20791 EOF
20792
20793 fi
20794 if test "x$ac_cv_func_fork_works" = xyes; then
20795
20796 cat >>confdefs.h <<\EOF
20797 #define HAVE_WORKING_FORK 1
20798 EOF
20799
20800 fi
20801
20802 # special check for test/ditto.c
20803
20804 echo "$as_me:20804: checking for openpty in -lutil" >&5
20805 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20806 if test "${ac_cv_lib_util_openpty+set}" = set; then
20807   echo $ECHO_N "(cached) $ECHO_C" >&6
20808 else
20809   ac_check_lib_save_LIBS=$LIBS
20810 LIBS="-lutil  $LIBS"
20811 cat >conftest.$ac_ext <<_ACEOF
20812 #line 20812 "configure"
20813 #include "confdefs.h"
20814
20815 /* Override any gcc2 internal prototype to avoid an error.  */
20816 #ifdef __cplusplus
20817 extern "C"
20818 #endif
20819 /* We use char because int might match the return type of a gcc2
20820    builtin and then its argument prototype would still apply.  */
20821 char openpty ();
20822 int
20823 main (void)
20824 {
20825 openpty ();
20826   ;
20827   return 0;
20828 }
20829 _ACEOF
20830 rm -f conftest.$ac_objext conftest$ac_exeext
20831 if { (eval echo "$as_me:20831: \"$ac_link\"") >&5
20832   (eval $ac_link) 2>&5
20833   ac_status=$?
20834   echo "$as_me:20834: \$? = $ac_status" >&5
20835   (exit $ac_status); } &&
20836          { ac_try='test -s conftest$ac_exeext'
20837   { (eval echo "$as_me:20837: \"$ac_try\"") >&5
20838   (eval $ac_try) 2>&5
20839   ac_status=$?
20840   echo "$as_me:20840: \$? = $ac_status" >&5
20841   (exit $ac_status); }; }; then
20842   ac_cv_lib_util_openpty=yes
20843 else
20844   echo "$as_me: failed program was:" >&5
20845 cat conftest.$ac_ext >&5
20846 ac_cv_lib_util_openpty=no
20847 fi
20848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20849 LIBS=$ac_check_lib_save_LIBS
20850 fi
20851 echo "$as_me:20851: result: $ac_cv_lib_util_openpty" >&5
20852 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20853 if test $ac_cv_lib_util_openpty = yes; then
20854   cf_cv_lib_util=yes
20855 else
20856   cf_cv_lib_util=no
20857 fi
20858
20859 echo "$as_me:20859: checking for openpty header" >&5
20860 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20861 if test "${cf_cv_func_openpty+set}" = set; then
20862   echo $ECHO_N "(cached) $ECHO_C" >&6
20863 else
20864
20865         cf_save_LIBS="$LIBS"
20866         test $cf_cv_lib_util = yes && {
20867 cf_add_libs="-lutil"
20868 # Filter out duplicates - this happens with badly-designed ".pc" files...
20869 for cf_add_1lib in $LIBS
20870 do
20871         for cf_add_2lib in $cf_add_libs
20872         do
20873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20874                 then
20875                         cf_add_1lib=
20876                         break
20877                 fi
20878         done
20879         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20880 done
20881 LIBS="$cf_add_libs"
20882  }
20883         for cf_header in pty.h libutil.h util.h
20884         do
20885         cat >conftest.$ac_ext <<_ACEOF
20886 #line 20886 "configure"
20887 #include "confdefs.h"
20888
20889 #include <$cf_header>
20890
20891 int
20892 main (void)
20893 {
20894
20895         int x = openpty((int *)0, (int *)0, (char *)0,
20896                                    (struct termios *)0, (struct winsize *)0);
20897
20898   ;
20899   return 0;
20900 }
20901 _ACEOF
20902 rm -f conftest.$ac_objext conftest$ac_exeext
20903 if { (eval echo "$as_me:20903: \"$ac_link\"") >&5
20904   (eval $ac_link) 2>&5
20905   ac_status=$?
20906   echo "$as_me:20906: \$? = $ac_status" >&5
20907   (exit $ac_status); } &&
20908          { ac_try='test -s conftest$ac_exeext'
20909   { (eval echo "$as_me:20909: \"$ac_try\"") >&5
20910   (eval $ac_try) 2>&5
20911   ac_status=$?
20912   echo "$as_me:20912: \$? = $ac_status" >&5
20913   (exit $ac_status); }; }; then
20914
20915                 cf_cv_func_openpty=$cf_header
20916                 break
20917
20918 else
20919   echo "$as_me: failed program was:" >&5
20920 cat conftest.$ac_ext >&5
20921
20922                 cf_cv_func_openpty=no
20923
20924 fi
20925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20926         done
20927         LIBS="$cf_save_LIBS"
20928
20929 fi
20930 echo "$as_me:20930: result: $cf_cv_func_openpty" >&5
20931 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20932
20933 if test "$cf_cv_func_openpty" != no ; then
20934
20935 cat >>confdefs.h <<EOF
20936 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20937 EOF
20938
20939 cat >>confdefs.h <<\EOF
20940 #define USE_XTERM_PTY 1
20941 EOF
20942
20943         if test "x$cf_cv_lib_util" = xyes ; then
20944
20945 cf_add_libs="-lutil"
20946 # Filter out duplicates - this happens with badly-designed ".pc" files...
20947 for cf_add_1lib in $TEST_LIBS
20948 do
20949         for cf_add_2lib in $cf_add_libs
20950         do
20951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20952                 then
20953                         cf_add_1lib=
20954                         break
20955                 fi
20956         done
20957         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20958 done
20959 TEST_LIBS="$cf_add_libs"
20960
20961         fi
20962 fi
20963
20964 if test "$with_hashed_db" != no ; then
20965
20966 cat >>confdefs.h <<\EOF
20967 #define USE_HASHED_DB 1
20968 EOF
20969
20970 case $with_hashed_db in
20971 (yes|*able*)
20972         ;;
20973 (*)
20974         if test -d "$with_hashed_db" ; then
20975
20976 if test -n "$with_hashed_db/include" ; then
20977   for cf_add_incdir in $with_hashed_db/include
20978   do
20979         while test $cf_add_incdir != /usr/include
20980         do
20981           if test -d $cf_add_incdir
20982           then
20983                 cf_have_incdir=no
20984                 if test -n "$CFLAGS$CPPFLAGS" ; then
20985                   # a loop is needed to ensure we can add subdirs of existing dirs
20986                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20987                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20988                           cf_have_incdir=yes; break
20989                         fi
20990                   done
20991                 fi
20992
20993                 if test "$cf_have_incdir" = no ; then
20994                   if test "$cf_add_incdir" = /usr/local/include ; then
20995                         if test "$GCC" = yes
20996                         then
20997                           cf_save_CPPFLAGS=$CPPFLAGS
20998
20999         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21000         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21001
21002                           cat >conftest.$ac_ext <<_ACEOF
21003 #line 21003 "configure"
21004 #include "confdefs.h"
21005 #include <stdio.h>
21006 int
21007 main (void)
21008 {
21009 printf("Hello")
21010   ;
21011   return 0;
21012 }
21013 _ACEOF
21014 rm -f conftest.$ac_objext
21015 if { (eval echo "$as_me:21015: \"$ac_compile\"") >&5
21016   (eval $ac_compile) 2>&5
21017   ac_status=$?
21018   echo "$as_me:21018: \$? = $ac_status" >&5
21019   (exit $ac_status); } &&
21020          { ac_try='test -s conftest.$ac_objext'
21021   { (eval echo "$as_me:21021: \"$ac_try\"") >&5
21022   (eval $ac_try) 2>&5
21023   ac_status=$?
21024   echo "$as_me:21024: \$? = $ac_status" >&5
21025   (exit $ac_status); }; }; then
21026   :
21027 else
21028   echo "$as_me: failed program was:" >&5
21029 cat conftest.$ac_ext >&5
21030 cf_have_incdir=yes
21031 fi
21032 rm -f conftest.$ac_objext conftest.$ac_ext
21033                           CPPFLAGS=$cf_save_CPPFLAGS
21034                         fi
21035                   fi
21036                 fi
21037
21038                 if test "$cf_have_incdir" = no ; then
21039                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21040
21041 echo "${as_me:-configure}:21041: testing adding $cf_add_incdir to include-path ..." 1>&5
21042
21043                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21044
21045                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21046                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21047                   cf_add_incdir="$cf_top_incdir"
21048                 else
21049                   break
21050                 fi
21051           else
21052                 break
21053           fi
21054         done
21055   done
21056 fi
21057
21058 if test -n "$with_hashed_db/lib" ; then
21059         for cf_add_libdir in $with_hashed_db/lib
21060         do
21061                 if test $cf_add_libdir = /usr/lib ; then
21062                         :
21063                 elif test -d $cf_add_libdir
21064                 then
21065                         cf_have_libdir=no
21066                         if test -n "$LDFLAGS$LIBS" ; then
21067                                 # a loop is needed to ensure we can add subdirs of existing dirs
21068                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21069                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21070                                                 cf_have_libdir=yes; break
21071                                         fi
21072                                 done
21073                         fi
21074                         if test "$cf_have_libdir" = no ; then
21075                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21076
21077 echo "${as_me:-configure}:21077: testing adding $cf_add_libdir to library-path ..." 1>&5
21078
21079                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21080                         fi
21081                 fi
21082         done
21083 fi
21084
21085         else
21086                 case "$with_hashed_db" in
21087                 (./*|../*|/*)
21088                         { echo "$as_me:21088: WARNING: no such directory $with_hashed_db" >&5
21089 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21090                         ;;
21091                 (*)
21092
21093 cf_search=
21094
21095 test "x$prefix" != "xNONE" && \
21096 test -d "$prefix" && \
21097  {
21098         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21099         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21100         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21101         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21102         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21103         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21104 }
21105
21106 for cf_subdir_prefix in \
21107         /usr \
21108         /usr/local \
21109         /usr/pkg \
21110         /opt \
21111         /opt/local \
21112         $HOME
21113 do
21114
21115 test "x$cf_subdir_prefix" != "x$prefix" && \
21116 test -d "$cf_subdir_prefix" && \
21117 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21118         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21119         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21120         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21121         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21122         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21123         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"
21124 }
21125
21126 done
21127
21128         for cf_item in $cf_search
21129         do
21130                 case $cf_item in
21131                 (*/$with_hashed_db)
21132
21133 if test -n "$cf_item" ; then
21134   for cf_add_incdir in $cf_item
21135   do
21136         while test $cf_add_incdir != /usr/include
21137         do
21138           if test -d $cf_add_incdir
21139           then
21140                 cf_have_incdir=no
21141                 if test -n "$CFLAGS$CPPFLAGS" ; then
21142                   # a loop is needed to ensure we can add subdirs of existing dirs
21143                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21144                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21145                           cf_have_incdir=yes; break
21146                         fi
21147                   done
21148                 fi
21149
21150                 if test "$cf_have_incdir" = no ; then
21151                   if test "$cf_add_incdir" = /usr/local/include ; then
21152                         if test "$GCC" = yes
21153                         then
21154                           cf_save_CPPFLAGS=$CPPFLAGS
21155
21156         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21157         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21158
21159                           cat >conftest.$ac_ext <<_ACEOF
21160 #line 21160 "configure"
21161 #include "confdefs.h"
21162 #include <stdio.h>
21163 int
21164 main (void)
21165 {
21166 printf("Hello")
21167   ;
21168   return 0;
21169 }
21170 _ACEOF
21171 rm -f conftest.$ac_objext
21172 if { (eval echo "$as_me:21172: \"$ac_compile\"") >&5
21173   (eval $ac_compile) 2>&5
21174   ac_status=$?
21175   echo "$as_me:21175: \$? = $ac_status" >&5
21176   (exit $ac_status); } &&
21177          { ac_try='test -s conftest.$ac_objext'
21178   { (eval echo "$as_me:21178: \"$ac_try\"") >&5
21179   (eval $ac_try) 2>&5
21180   ac_status=$?
21181   echo "$as_me:21181: \$? = $ac_status" >&5
21182   (exit $ac_status); }; }; then
21183   :
21184 else
21185   echo "$as_me: failed program was:" >&5
21186 cat conftest.$ac_ext >&5
21187 cf_have_incdir=yes
21188 fi
21189 rm -f conftest.$ac_objext conftest.$ac_ext
21190                           CPPFLAGS=$cf_save_CPPFLAGS
21191                         fi
21192                   fi
21193                 fi
21194
21195                 if test "$cf_have_incdir" = no ; then
21196                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21197
21198 echo "${as_me:-configure}:21198: testing adding $cf_add_incdir to include-path ..." 1>&5
21199
21200                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21201
21202                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21203                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21204                   cf_add_incdir="$cf_top_incdir"
21205                 else
21206                   break
21207                 fi
21208           else
21209                 break
21210           fi
21211         done
21212   done
21213 fi
21214
21215                         ;;
21216                 esac
21217         done
21218
21219 cf_search=
21220
21221 test "x$prefix" != "xNONE" && \
21222 test -d "$prefix" && \
21223  {
21224         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21225         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21226         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21227         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21228         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21229         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21230 }
21231
21232 for cf_subdir_prefix in \
21233         /usr \
21234         /usr/local \
21235         /usr/pkg \
21236         /opt \
21237         /opt/local \
21238         $HOME
21239 do
21240
21241 test "x$cf_subdir_prefix" != "x$prefix" && \
21242 test -d "$cf_subdir_prefix" && \
21243 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21244         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21245         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21246         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21247         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21248         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21249         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"
21250 }
21251
21252 done
21253
21254         for cf_item in $cf_search
21255         do
21256                 case $cf_item in
21257                 (*/$with_hashed_db)
21258
21259 if test -n "$cf_item" ; then
21260         for cf_add_libdir in $cf_item
21261         do
21262                 if test $cf_add_libdir = /usr/lib ; then
21263                         :
21264                 elif test -d $cf_add_libdir
21265                 then
21266                         cf_have_libdir=no
21267                         if test -n "$LDFLAGS$LIBS" ; then
21268                                 # a loop is needed to ensure we can add subdirs of existing dirs
21269                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21270                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21271                                                 cf_have_libdir=yes; break
21272                                         fi
21273                                 done
21274                         fi
21275                         if test "$cf_have_libdir" = no ; then
21276                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21277
21278 echo "${as_me:-configure}:21278: testing adding $cf_add_libdir to library-path ..." 1>&5
21279
21280                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21281                         fi
21282                 fi
21283         done
21284 fi
21285
21286                         ;;
21287                 esac
21288         done
21289
21290                         ;;
21291                 esac
21292         fi
21293 esac
21294
21295 echo "$as_me:21295: checking for db.h" >&5
21296 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21297 if test "${ac_cv_header_db_h+set}" = set; then
21298   echo $ECHO_N "(cached) $ECHO_C" >&6
21299 else
21300   cat >conftest.$ac_ext <<_ACEOF
21301 #line 21301 "configure"
21302 #include "confdefs.h"
21303 #include <db.h>
21304 _ACEOF
21305 if { (eval echo "$as_me:21305: \"$ac_cpp conftest.$ac_ext\"") >&5
21306   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21307   ac_status=$?
21308   egrep -v '^ *\+' conftest.er1 >conftest.err
21309   rm -f conftest.er1
21310   cat conftest.err >&5
21311   echo "$as_me:21311: \$? = $ac_status" >&5
21312   (exit $ac_status); } >/dev/null; then
21313   if test -s conftest.err; then
21314     ac_cpp_err=$ac_c_preproc_warn_flag
21315   else
21316     ac_cpp_err=
21317   fi
21318 else
21319   ac_cpp_err=yes
21320 fi
21321 if test -z "$ac_cpp_err"; then
21322   ac_cv_header_db_h=yes
21323 else
21324   echo "$as_me: failed program was:" >&5
21325   cat conftest.$ac_ext >&5
21326   ac_cv_header_db_h=no
21327 fi
21328 rm -f conftest.err conftest.$ac_ext
21329 fi
21330 echo "$as_me:21330: result: $ac_cv_header_db_h" >&5
21331 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21332 if test $ac_cv_header_db_h = yes; then
21333
21334 echo "$as_me:21334: checking for version of db" >&5
21335 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21336 if test "${cf_cv_hashed_db_version+set}" = set; then
21337   echo $ECHO_N "(cached) $ECHO_C" >&6
21338 else
21339
21340 cf_cv_hashed_db_version=unknown
21341
21342 for cf_db_version in 1 2 3 4 5 6
21343 do
21344
21345 echo "${as_me:-configure}:21345: testing checking for db version $cf_db_version ..." 1>&5
21346
21347         cat >conftest.$ac_ext <<_ACEOF
21348 #line 21348 "configure"
21349 #include "confdefs.h"
21350
21351 $ac_includes_default
21352 #include <db.h>
21353
21354 #ifdef DB_VERSION_MAJOR
21355         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21356 #if $cf_db_version == DB_VERSION_MAJOR
21357         /* ok */
21358 #else
21359         make an error
21360 #endif
21361 #else
21362 #if $cf_db_version == 1
21363         /* ok: assuming this is DB 1.8.5 */
21364 #else
21365         make an error
21366 #endif
21367 #endif
21368
21369 int
21370 main (void)
21371 {
21372 DBT *foo = 0
21373   ;
21374   return 0;
21375 }
21376 _ACEOF
21377 rm -f conftest.$ac_objext
21378 if { (eval echo "$as_me:21378: \"$ac_compile\"") >&5
21379   (eval $ac_compile) 2>&5
21380   ac_status=$?
21381   echo "$as_me:21381: \$? = $ac_status" >&5
21382   (exit $ac_status); } &&
21383          { ac_try='test -s conftest.$ac_objext'
21384   { (eval echo "$as_me:21384: \"$ac_try\"") >&5
21385   (eval $ac_try) 2>&5
21386   ac_status=$?
21387   echo "$as_me:21387: \$? = $ac_status" >&5
21388   (exit $ac_status); }; }; then
21389
21390         cf_cv_hashed_db_version=$cf_db_version
21391         break
21392
21393 else
21394   echo "$as_me: failed program was:" >&5
21395 cat conftest.$ac_ext >&5
21396 fi
21397 rm -f conftest.$ac_objext conftest.$ac_ext
21398 done
21399
21400 fi
21401 echo "$as_me:21401: result: $cf_cv_hashed_db_version" >&5
21402 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21403
21404 if test "$cf_cv_hashed_db_version" = unknown ; then
21405         { { echo "$as_me:21405: error: Cannot determine version of db" >&5
21406 echo "$as_me: error: Cannot determine version of db" >&2;}
21407    { (exit 1); exit 1; }; }
21408 else
21409
21410 echo "$as_me:21410: checking for db libraries" >&5
21411 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21412 if test "${cf_cv_hashed_db_libs+set}" = set; then
21413   echo $ECHO_N "(cached) $ECHO_C" >&6
21414 else
21415
21416 cf_cv_hashed_db_libs=unknown
21417 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21418 do
21419         cf_save_libs="$LIBS"
21420         if test -n "$cf_db_libs"; then
21421
21422 cf_add_libs="-l$cf_db_libs"
21423 # Filter out duplicates - this happens with badly-designed ".pc" files...
21424 for cf_add_1lib in $LIBS
21425 do
21426         for cf_add_2lib in $cf_add_libs
21427         do
21428                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21429                 then
21430                         cf_add_1lib=
21431                         break
21432                 fi
21433         done
21434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21435 done
21436 LIBS="$cf_add_libs"
21437
21438         fi
21439
21440 echo "${as_me:-configure}:21440: testing checking for library "$cf_db_libs" ..." 1>&5
21441
21442         cat >conftest.$ac_ext <<_ACEOF
21443 #line 21443 "configure"
21444 #include "confdefs.h"
21445
21446 $ac_includes_default
21447 #include <db.h>
21448
21449 int
21450 main (void)
21451 {
21452
21453         char *path = "/tmp/foo";
21454 #ifdef DB_VERSION_MAJOR
21455 #if DB_VERSION_MAJOR >= 4
21456         DB *result = 0;
21457         db_create(&result, NULL, 0);
21458         result->open(result,
21459                 NULL,
21460                 path,
21461                 path,
21462                 DB_HASH,
21463                 DB_CREATE,
21464                 0644);
21465 #elif DB_VERSION_MAJOR >= 3
21466         DB *result = 0;
21467         db_create(&result, NULL, 0);
21468         result->open(result,
21469                 path,
21470                 path,
21471                 DB_HASH,
21472                 DB_CREATE,
21473                 0644);
21474 #elif DB_VERSION_MAJOR >= 2
21475         DB *result = 0;
21476         db_open(path,
21477                 DB_HASH,
21478                 DB_CREATE,
21479                 0644,
21480                 (DB_ENV *) 0,
21481                 (DB_INFO *) 0,
21482                 &result);
21483 #endif /* DB_VERSION_MAJOR */
21484 #else
21485         DB *result = dbopen(path,
21486                      2,
21487                      0644,
21488                      DB_HASH,
21489                      0);
21490 #endif
21491         ${cf_cv_main_return:-return}(result != 0)
21492
21493   ;
21494   return 0;
21495 }
21496 _ACEOF
21497 rm -f conftest.$ac_objext conftest$ac_exeext
21498 if { (eval echo "$as_me:21498: \"$ac_link\"") >&5
21499   (eval $ac_link) 2>&5
21500   ac_status=$?
21501   echo "$as_me:21501: \$? = $ac_status" >&5
21502   (exit $ac_status); } &&
21503          { ac_try='test -s conftest$ac_exeext'
21504   { (eval echo "$as_me:21504: \"$ac_try\"") >&5
21505   (eval $ac_try) 2>&5
21506   ac_status=$?
21507   echo "$as_me:21507: \$? = $ac_status" >&5
21508   (exit $ac_status); }; }; then
21509
21510         if test -n "$cf_db_libs" ; then
21511                 cf_cv_hashed_db_libs=$cf_db_libs
21512         else
21513                 cf_cv_hashed_db_libs=default
21514         fi
21515         LIBS="$cf_save_libs"
21516         break
21517
21518 else
21519   echo "$as_me: failed program was:" >&5
21520 cat conftest.$ac_ext >&5
21521 fi
21522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21523         LIBS="$cf_save_libs"
21524 done
21525
21526 fi
21527 echo "$as_me:21527: result: $cf_cv_hashed_db_libs" >&5
21528 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21529
21530         if test "$cf_cv_hashed_db_libs" = unknown ; then
21531                 { { echo "$as_me:21531: error: Cannot determine library for db" >&5
21532 echo "$as_me: error: Cannot determine library for db" >&2;}
21533    { (exit 1); exit 1; }; }
21534         elif test "$cf_cv_hashed_db_libs" != default ; then
21535
21536 cf_add_libs="-l$cf_cv_hashed_db_libs"
21537 # Filter out duplicates - this happens with badly-designed ".pc" files...
21538 for cf_add_1lib in $LIBS
21539 do
21540         for cf_add_2lib in $cf_add_libs
21541         do
21542                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21543                 then
21544                         cf_add_1lib=
21545                         break
21546                 fi
21547         done
21548         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21549 done
21550 LIBS="$cf_add_libs"
21551
21552         fi
21553 fi
21554
21555 else
21556
21557         { { echo "$as_me:21557: error: Cannot find db.h" >&5
21558 echo "$as_me: error: Cannot find db.h" >&2;}
21559    { (exit 1); exit 1; }; }
21560
21561 fi
21562
21563 fi
21564
21565 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21566         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21567         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21568 fi
21569
21570 # Just in case, check if the C compiler has a bool type.
21571
21572 echo "$as_me:21572: checking if we should include stdbool.h" >&5
21573 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21574
21575 if test "${cf_cv_header_stdbool_h+set}" = set; then
21576   echo $ECHO_N "(cached) $ECHO_C" >&6
21577 else
21578
21579         cat >conftest.$ac_ext <<_ACEOF
21580 #line 21580 "configure"
21581 #include "confdefs.h"
21582
21583 int
21584 main (void)
21585 {
21586 bool foo = false
21587   ;
21588   return 0;
21589 }
21590 _ACEOF
21591 rm -f conftest.$ac_objext
21592 if { (eval echo "$as_me:21592: \"$ac_compile\"") >&5
21593   (eval $ac_compile) 2>&5
21594   ac_status=$?
21595   echo "$as_me:21595: \$? = $ac_status" >&5
21596   (exit $ac_status); } &&
21597          { ac_try='test -s conftest.$ac_objext'
21598   { (eval echo "$as_me:21598: \"$ac_try\"") >&5
21599   (eval $ac_try) 2>&5
21600   ac_status=$?
21601   echo "$as_me:21601: \$? = $ac_status" >&5
21602   (exit $ac_status); }; }; then
21603   cf_cv_header_stdbool_h=0
21604 else
21605   echo "$as_me: failed program was:" >&5
21606 cat conftest.$ac_ext >&5
21607 cat >conftest.$ac_ext <<_ACEOF
21608 #line 21608 "configure"
21609 #include "confdefs.h"
21610
21611 #ifndef __BEOS__
21612 #include <stdbool.h>
21613 #endif
21614
21615 int
21616 main (void)
21617 {
21618 bool foo = false
21619   ;
21620   return 0;
21621 }
21622 _ACEOF
21623 rm -f conftest.$ac_objext
21624 if { (eval echo "$as_me:21624: \"$ac_compile\"") >&5
21625   (eval $ac_compile) 2>&5
21626   ac_status=$?
21627   echo "$as_me:21627: \$? = $ac_status" >&5
21628   (exit $ac_status); } &&
21629          { ac_try='test -s conftest.$ac_objext'
21630   { (eval echo "$as_me:21630: \"$ac_try\"") >&5
21631   (eval $ac_try) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit $ac_status); }; }; then
21635   cf_cv_header_stdbool_h=1
21636 else
21637   echo "$as_me: failed program was:" >&5
21638 cat conftest.$ac_ext >&5
21639 cf_cv_header_stdbool_h=0
21640 fi
21641 rm -f conftest.$ac_objext conftest.$ac_ext
21642 fi
21643 rm -f conftest.$ac_objext conftest.$ac_ext
21644 fi
21645
21646 if test "$cf_cv_header_stdbool_h" = 1
21647 then    echo "$as_me:21647: result: yes" >&5
21648 echo "${ECHO_T}yes" >&6
21649 else    echo "$as_me:21649: result: no" >&5
21650 echo "${ECHO_T}no" >&6
21651 fi
21652
21653 echo "$as_me:21653: checking for builtin bool type" >&5
21654 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21655
21656 if test "${cf_cv_cc_bool_type+set}" = set; then
21657   echo $ECHO_N "(cached) $ECHO_C" >&6
21658 else
21659
21660         cat >conftest.$ac_ext <<_ACEOF
21661 #line 21661 "configure"
21662 #include "confdefs.h"
21663
21664 #include <stdio.h>
21665 #include <sys/types.h>
21666
21667 int
21668 main (void)
21669 {
21670 bool x = false
21671   ;
21672   return 0;
21673 }
21674 _ACEOF
21675 rm -f conftest.$ac_objext
21676 if { (eval echo "$as_me:21676: \"$ac_compile\"") >&5
21677   (eval $ac_compile) 2>&5
21678   ac_status=$?
21679   echo "$as_me:21679: \$? = $ac_status" >&5
21680   (exit $ac_status); } &&
21681          { ac_try='test -s conftest.$ac_objext'
21682   { (eval echo "$as_me:21682: \"$ac_try\"") >&5
21683   (eval $ac_try) 2>&5
21684   ac_status=$?
21685   echo "$as_me:21685: \$? = $ac_status" >&5
21686   (exit $ac_status); }; }; then
21687   cf_cv_cc_bool_type=1
21688 else
21689   echo "$as_me: failed program was:" >&5
21690 cat conftest.$ac_ext >&5
21691 cf_cv_cc_bool_type=0
21692 fi
21693 rm -f conftest.$ac_objext conftest.$ac_ext
21694
21695 fi
21696
21697 if test "$cf_cv_cc_bool_type" = 1
21698 then    echo "$as_me:21698: result: yes" >&5
21699 echo "${ECHO_T}yes" >&6
21700 else    echo "$as_me:21700: result: no" >&5
21701 echo "${ECHO_T}no" >&6
21702 fi
21703
21704 # Check for C++ compiler characteristics (and ensure that it's there!)
21705 if test -n "$CXX" ; then
21706         ac_ext=cc
21707 ac_cpp='$CXXCPP $CPPFLAGS'
21708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21709 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21711 ac_main_return=return
21712
21713 if test -n "$GXX" ; then
21714
21715         cf_save="$LIBS"
21716         LIBS="$LIBS $CXXLIBS"
21717         echo "$as_me:21717: checking if we already have C++ library" >&5
21718 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21719         cat >conftest.$ac_ext <<_ACEOF
21720 #line 21720 "configure"
21721 #include "confdefs.h"
21722
21723                         #include <iostream>
21724 int
21725 main (void)
21726 {
21727
21728                         std::cout << "Hello World!" << std::endl;
21729   ;
21730   return 0;
21731 }
21732 _ACEOF
21733 rm -f conftest.$ac_objext conftest$ac_exeext
21734 if { (eval echo "$as_me:21734: \"$ac_link\"") >&5
21735   (eval $ac_link) 2>&5
21736   ac_status=$?
21737   echo "$as_me:21737: \$? = $ac_status" >&5
21738   (exit $ac_status); } &&
21739          { ac_try='test -s conftest$ac_exeext'
21740   { (eval echo "$as_me:21740: \"$ac_try\"") >&5
21741   (eval $ac_try) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); }; }; then
21745   cf_have_libstdcpp=yes
21746 else
21747   echo "$as_me: failed program was:" >&5
21748 cat conftest.$ac_ext >&5
21749 cf_have_libstdcpp=no
21750 fi
21751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21752         echo "$as_me:21752: result: $cf_have_libstdcpp" >&5
21753 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21754         LIBS="$cf_save"
21755
21756         if test $cf_have_libstdcpp != yes
21757         then
21758                 case $cf_cv_system_name in
21759                 (os2*)
21760                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21761                                 cf_stdcpp_libname=stdcpp
21762                         else
21763                                 cf_stdcpp_libname=stdc++
21764                         fi
21765                         ;;
21766                 (*)
21767                         cf_stdcpp_libname=stdc++
21768                         ;;
21769                 esac
21770
21771                 echo "$as_me:21771: checking for library $cf_stdcpp_libname" >&5
21772 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21773 if test "${cf_cv_libstdcpp+set}" = set; then
21774   echo $ECHO_N "(cached) $ECHO_C" >&6
21775 else
21776
21777                         cf_save="$LIBS"
21778                         LIBS="$LIBS $CXXLIBS"
21779
21780 cf_add_libs="-l$cf_stdcpp_libname"
21781 # Filter out duplicates - this happens with badly-designed ".pc" files...
21782 for cf_add_1lib in $LIBS
21783 do
21784         for cf_add_2lib in $cf_add_libs
21785         do
21786                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21787                 then
21788                         cf_add_1lib=
21789                         break
21790                 fi
21791         done
21792         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21793 done
21794 LIBS="$cf_add_libs"
21795
21796                 cat >conftest.$ac_ext <<_ACEOF
21797 #line 21797 "configure"
21798 #include "confdefs.h"
21799
21800                                 #include <iostream>
21801 int
21802 main (void)
21803 {
21804
21805                                 std::cout << "Hello World!" << std::endl;
21806   ;
21807   return 0;
21808 }
21809 _ACEOF
21810 rm -f conftest.$ac_objext conftest$ac_exeext
21811 if { (eval echo "$as_me:21811: \"$ac_link\"") >&5
21812   (eval $ac_link) 2>&5
21813   ac_status=$?
21814   echo "$as_me:21814: \$? = $ac_status" >&5
21815   (exit $ac_status); } &&
21816          { ac_try='test -s conftest$ac_exeext'
21817   { (eval echo "$as_me:21817: \"$ac_try\"") >&5
21818   (eval $ac_try) 2>&5
21819   ac_status=$?
21820   echo "$as_me:21820: \$? = $ac_status" >&5
21821   (exit $ac_status); }; }; then
21822   cf_cv_libstdcpp=yes
21823 else
21824   echo "$as_me: failed program was:" >&5
21825 cat conftest.$ac_ext >&5
21826 cf_cv_libstdcpp=no
21827 fi
21828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21829                         LIBS="$cf_save"
21830
21831 fi
21832 echo "$as_me:21832: result: $cf_cv_libstdcpp" >&5
21833 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21834                 test "$cf_cv_libstdcpp" = yes && {
21835 cf_add_libs="-l$cf_stdcpp_libname"
21836 # Filter out duplicates - this happens with badly-designed ".pc" files...
21837 for cf_add_1lib in $CXXLIBS
21838 do
21839         for cf_add_2lib in $cf_add_libs
21840         do
21841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21842                 then
21843                         cf_add_1lib=
21844                         break
21845                 fi
21846         done
21847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21848 done
21849 CXXLIBS="$cf_add_libs"
21850  }
21851         fi
21852 fi
21853
21854         echo "$as_me:21854: checking whether $CXX understands -c and -o together" >&5
21855 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21856 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21857   echo $ECHO_N "(cached) $ECHO_C" >&6
21858 else
21859
21860 cat > conftest.$ac_ext <<CF_EOF
21861 int main(void)
21862 {
21863         ${cf_cv_main_return:-return}(0);
21864 }
21865 CF_EOF
21866 # We do the test twice because some compilers refuse to overwrite an
21867 # existing .o file with -o, though they will create one.
21868 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21869 if { (eval echo "$as_me:21869: \"$ac_try\"") >&5
21870   (eval $ac_try) 2>&5
21871   ac_status=$?
21872   echo "$as_me:21872: \$? = $ac_status" >&5
21873   (exit $ac_status); } &&
21874   test -f conftest2.$ac_objext && { (eval echo "$as_me:21874: \"$ac_try\"") >&5
21875   (eval $ac_try) 2>&5
21876   ac_status=$?
21877   echo "$as_me:21877: \$? = $ac_status" >&5
21878   (exit $ac_status); };
21879 then
21880   eval cf_cv_prog_CXX_c_o=yes
21881 else
21882   eval cf_cv_prog_CXX_c_o=no
21883 fi
21884 rm -rf conftest*
21885
21886 fi
21887 if test $cf_cv_prog_CXX_c_o = yes; then
21888   echo "$as_me:21888: result: yes" >&5
21889 echo "${ECHO_T}yes" >&6
21890 else
21891   echo "$as_me:21891: result: no" >&5
21892 echo "${ECHO_T}no" >&6
21893 fi
21894
21895         case $GXX_VERSION in
21896         (1*|2.0-6*)
21897                 cf_cxx_library=yes
21898                 ;;
21899         (*-2.7*|2.7*)
21900
21901 cf_cxx_library=unknown
21902 case $cf_cv_system_name in
21903 (os2*)
21904         cf_gpp_libname=gpp
21905         ;;
21906 (*)
21907         cf_gpp_libname=g++
21908         ;;
21909 esac
21910 if test "$GXX" = yes; then
21911         echo "$as_me:21911: checking for lib$cf_gpp_libname" >&5
21912 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21913         cf_save="$LIBS"
21914
21915 cf_add_libs="-l$cf_gpp_libname"
21916 # Filter out duplicates - this happens with badly-designed ".pc" files...
21917 for cf_add_1lib in $LIBS
21918 do
21919         for cf_add_2lib in $cf_add_libs
21920         do
21921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21922                 then
21923                         cf_add_1lib=
21924                         break
21925                 fi
21926         done
21927         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21928 done
21929 LIBS="$cf_add_libs"
21930
21931         cat >conftest.$ac_ext <<_ACEOF
21932 #line 21932 "configure"
21933 #include "confdefs.h"
21934
21935 #include <$cf_gpp_libname/builtin.h>
21936
21937 int
21938 main (void)
21939 {
21940 two_arg_error_handler_t foo2 = lib_error_handler
21941   ;
21942   return 0;
21943 }
21944 _ACEOF
21945 rm -f conftest.$ac_objext conftest$ac_exeext
21946 if { (eval echo "$as_me:21946: \"$ac_link\"") >&5
21947   (eval $ac_link) 2>&5
21948   ac_status=$?
21949   echo "$as_me:21949: \$? = $ac_status" >&5
21950   (exit $ac_status); } &&
21951          { ac_try='test -s conftest$ac_exeext'
21952   { (eval echo "$as_me:21952: \"$ac_try\"") >&5
21953   (eval $ac_try) 2>&5
21954   ac_status=$?
21955   echo "$as_me:21955: \$? = $ac_status" >&5
21956   (exit $ac_status); }; }; then
21957   cf_cxx_library=yes
21958
21959 cf_add_libs="-l$cf_gpp_libname"
21960 # Filter out duplicates - this happens with badly-designed ".pc" files...
21961 for cf_add_1lib in $CXXLIBS
21962 do
21963         for cf_add_2lib in $cf_add_libs
21964         do
21965                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21966                 then
21967                         cf_add_1lib=
21968                         break
21969                 fi
21970         done
21971         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21972 done
21973 CXXLIBS="$cf_add_libs"
21974
21975          if test "$cf_gpp_libname" = cpp ; then
21976
21977 cat >>confdefs.h <<\EOF
21978 #define HAVE_GPP_BUILTIN_H 1
21979 EOF
21980
21981          else
21982
21983 cat >>confdefs.h <<\EOF
21984 #define HAVE_GXX_BUILTIN_H 1
21985 EOF
21986
21987          fi
21988 else
21989   echo "$as_me: failed program was:" >&5
21990 cat conftest.$ac_ext >&5
21991 cat >conftest.$ac_ext <<_ACEOF
21992 #line 21992 "configure"
21993 #include "confdefs.h"
21994
21995 #include <builtin.h>
21996
21997 int
21998 main (void)
21999 {
22000 two_arg_error_handler_t foo2 = lib_error_handler
22001   ;
22002   return 0;
22003 }
22004 _ACEOF
22005 rm -f conftest.$ac_objext conftest$ac_exeext
22006 if { (eval echo "$as_me:22006: \"$ac_link\"") >&5
22007   (eval $ac_link) 2>&5
22008   ac_status=$?
22009   echo "$as_me:22009: \$? = $ac_status" >&5
22010   (exit $ac_status); } &&
22011          { ac_try='test -s conftest$ac_exeext'
22012   { (eval echo "$as_me:22012: \"$ac_try\"") >&5
22013   (eval $ac_try) 2>&5
22014   ac_status=$?
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit $ac_status); }; }; then
22017   cf_cxx_library=yes
22018
22019 cf_add_libs="-l$cf_gpp_libname"
22020 # Filter out duplicates - this happens with badly-designed ".pc" files...
22021 for cf_add_1lib in $CXXLIBS
22022 do
22023         for cf_add_2lib in $cf_add_libs
22024         do
22025                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22026                 then
22027                         cf_add_1lib=
22028                         break
22029                 fi
22030         done
22031         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22032 done
22033 CXXLIBS="$cf_add_libs"
22034
22035 cat >>confdefs.h <<\EOF
22036 #define HAVE_BUILTIN_H 1
22037 EOF
22038
22039 else
22040   echo "$as_me: failed program was:" >&5
22041 cat conftest.$ac_ext >&5
22042 cf_cxx_library=no
22043 fi
22044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22045 fi
22046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22047         LIBS="$cf_save"
22048         echo "$as_me:22048: result: $cf_cxx_library" >&5
22049 echo "${ECHO_T}$cf_cxx_library" >&6
22050 fi
22051
22052                 ;;
22053         (*)
22054                 cf_cxx_library=no
22055                 ;;
22056         esac
22057
22058         ac_ext=cc
22059 ac_cpp='$CXXCPP $CPPFLAGS'
22060 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22061 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22062 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22063 ac_main_return=return
22064 echo "$as_me:22064: checking how to run the C++ preprocessor" >&5
22065 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22066 if test -z "$CXXCPP"; then
22067   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22068   echo $ECHO_N "(cached) $ECHO_C" >&6
22069 else
22070       # Double quotes because CXXCPP needs to be expanded
22071     for CXXCPP in "$CXX -E" "/lib/cpp"
22072     do
22073       ac_preproc_ok=false
22074 for ac_cxx_preproc_warn_flag in '' yes
22075 do
22076   # Use a header file that comes with gcc, so configuring glibc
22077   # with a fresh cross-compiler works.
22078   # On the NeXT, cc -E runs the code through the compiler's parser,
22079   # not just through cpp. "Syntax error" is here to catch this case.
22080   cat >conftest.$ac_ext <<_ACEOF
22081 #line 22081 "configure"
22082 #include "confdefs.h"
22083 #include <assert.h>
22084                      Syntax error
22085 _ACEOF
22086 if { (eval echo "$as_me:22086: \"$ac_cpp conftest.$ac_ext\"") >&5
22087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22088   ac_status=$?
22089   egrep -v '^ *\+' conftest.er1 >conftest.err
22090   rm -f conftest.er1
22091   cat conftest.err >&5
22092   echo "$as_me:22092: \$? = $ac_status" >&5
22093   (exit $ac_status); } >/dev/null; then
22094   if test -s conftest.err; then
22095     ac_cpp_err=$ac_cxx_preproc_warn_flag
22096   else
22097     ac_cpp_err=
22098   fi
22099 else
22100   ac_cpp_err=yes
22101 fi
22102 if test -z "$ac_cpp_err"; then
22103   :
22104 else
22105   echo "$as_me: failed program was:" >&5
22106   cat conftest.$ac_ext >&5
22107   # Broken: fails on valid input.
22108 continue
22109 fi
22110 rm -f conftest.err conftest.$ac_ext
22111
22112   # OK, works on sane cases.  Now check whether non-existent headers
22113   # can be detected and how.
22114   cat >conftest.$ac_ext <<_ACEOF
22115 #line 22115 "configure"
22116 #include "confdefs.h"
22117 #include <ac_nonexistent.h>
22118 _ACEOF
22119 if { (eval echo "$as_me:22119: \"$ac_cpp conftest.$ac_ext\"") >&5
22120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22121   ac_status=$?
22122   egrep -v '^ *\+' conftest.er1 >conftest.err
22123   rm -f conftest.er1
22124   cat conftest.err >&5
22125   echo "$as_me:22125: \$? = $ac_status" >&5
22126   (exit $ac_status); } >/dev/null; then
22127   if test -s conftest.err; then
22128     ac_cpp_err=$ac_cxx_preproc_warn_flag
22129   else
22130     ac_cpp_err=
22131   fi
22132 else
22133   ac_cpp_err=yes
22134 fi
22135 if test -z "$ac_cpp_err"; then
22136   # Broken: success on invalid input.
22137 continue
22138 else
22139   echo "$as_me: failed program was:" >&5
22140   cat conftest.$ac_ext >&5
22141   # Passes both tests.
22142 ac_preproc_ok=:
22143 break
22144 fi
22145 rm -f conftest.err conftest.$ac_ext
22146
22147 done
22148 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22149 rm -f conftest.err conftest.$ac_ext
22150 if $ac_preproc_ok; then
22151   break
22152 fi
22153
22154     done
22155     ac_cv_prog_CXXCPP=$CXXCPP
22156
22157 fi
22158   CXXCPP=$ac_cv_prog_CXXCPP
22159 else
22160   ac_cv_prog_CXXCPP=$CXXCPP
22161 fi
22162 echo "$as_me:22162: result: $CXXCPP" >&5
22163 echo "${ECHO_T}$CXXCPP" >&6
22164 ac_preproc_ok=false
22165 for ac_cxx_preproc_warn_flag in '' yes
22166 do
22167   # Use a header file that comes with gcc, so configuring glibc
22168   # with a fresh cross-compiler works.
22169   # On the NeXT, cc -E runs the code through the compiler's parser,
22170   # not just through cpp. "Syntax error" is here to catch this case.
22171   cat >conftest.$ac_ext <<_ACEOF
22172 #line 22172 "configure"
22173 #include "confdefs.h"
22174 #include <assert.h>
22175                      Syntax error
22176 _ACEOF
22177 if { (eval echo "$as_me:22177: \"$ac_cpp conftest.$ac_ext\"") >&5
22178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22179   ac_status=$?
22180   egrep -v '^ *\+' conftest.er1 >conftest.err
22181   rm -f conftest.er1
22182   cat conftest.err >&5
22183   echo "$as_me:22183: \$? = $ac_status" >&5
22184   (exit $ac_status); } >/dev/null; then
22185   if test -s conftest.err; then
22186     ac_cpp_err=$ac_cxx_preproc_warn_flag
22187   else
22188     ac_cpp_err=
22189   fi
22190 else
22191   ac_cpp_err=yes
22192 fi
22193 if test -z "$ac_cpp_err"; then
22194   :
22195 else
22196   echo "$as_me: failed program was:" >&5
22197   cat conftest.$ac_ext >&5
22198   # Broken: fails on valid input.
22199 continue
22200 fi
22201 rm -f conftest.err conftest.$ac_ext
22202
22203   # OK, works on sane cases.  Now check whether non-existent headers
22204   # can be detected and how.
22205   cat >conftest.$ac_ext <<_ACEOF
22206 #line 22206 "configure"
22207 #include "confdefs.h"
22208 #include <ac_nonexistent.h>
22209 _ACEOF
22210 if { (eval echo "$as_me:22210: \"$ac_cpp conftest.$ac_ext\"") >&5
22211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22212   ac_status=$?
22213   egrep -v '^ *\+' conftest.er1 >conftest.err
22214   rm -f conftest.er1
22215   cat conftest.err >&5
22216   echo "$as_me:22216: \$? = $ac_status" >&5
22217   (exit $ac_status); } >/dev/null; then
22218   if test -s conftest.err; then
22219     ac_cpp_err=$ac_cxx_preproc_warn_flag
22220   else
22221     ac_cpp_err=
22222   fi
22223 else
22224   ac_cpp_err=yes
22225 fi
22226 if test -z "$ac_cpp_err"; then
22227   # Broken: success on invalid input.
22228 continue
22229 else
22230   echo "$as_me: failed program was:" >&5
22231   cat conftest.$ac_ext >&5
22232   # Passes both tests.
22233 ac_preproc_ok=:
22234 break
22235 fi
22236 rm -f conftest.err conftest.$ac_ext
22237
22238 done
22239 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22240 rm -f conftest.err conftest.$ac_ext
22241 if $ac_preproc_ok; then
22242   :
22243 else
22244   { { echo "$as_me:22244: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22245 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22246    { (exit 1); exit 1; }; }
22247 fi
22248
22249 ac_ext=cc
22250 ac_cpp='$CXXCPP $CPPFLAGS'
22251 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22252 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22253 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22254 ac_main_return=return
22255
22256 for ac_header in typeinfo
22257 do
22258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22259 echo "$as_me:22259: checking for $ac_header" >&5
22260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22262   echo $ECHO_N "(cached) $ECHO_C" >&6
22263 else
22264   cat >conftest.$ac_ext <<_ACEOF
22265 #line 22265 "configure"
22266 #include "confdefs.h"
22267 #include <$ac_header>
22268 _ACEOF
22269 if { (eval echo "$as_me:22269: \"$ac_cpp conftest.$ac_ext\"") >&5
22270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22271   ac_status=$?
22272   egrep -v '^ *\+' conftest.er1 >conftest.err
22273   rm -f conftest.er1
22274   cat conftest.err >&5
22275   echo "$as_me:22275: \$? = $ac_status" >&5
22276   (exit $ac_status); } >/dev/null; then
22277   if test -s conftest.err; then
22278     ac_cpp_err=$ac_cxx_preproc_warn_flag
22279   else
22280     ac_cpp_err=
22281   fi
22282 else
22283   ac_cpp_err=yes
22284 fi
22285 if test -z "$ac_cpp_err"; then
22286   eval "$as_ac_Header=yes"
22287 else
22288   echo "$as_me: failed program was:" >&5
22289   cat conftest.$ac_ext >&5
22290   eval "$as_ac_Header=no"
22291 fi
22292 rm -f conftest.err conftest.$ac_ext
22293 fi
22294 echo "$as_me:22294: result: `eval echo '${'$as_ac_Header'}'`" >&5
22295 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22296 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22297   cat >>confdefs.h <<EOF
22298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22299 EOF
22300
22301 fi
22302 done
22303
22304 for ac_header in iostream
22305 do
22306 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22307 echo "$as_me:22307: checking for $ac_header" >&5
22308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22310   echo $ECHO_N "(cached) $ECHO_C" >&6
22311 else
22312   cat >conftest.$ac_ext <<_ACEOF
22313 #line 22313 "configure"
22314 #include "confdefs.h"
22315 #include <$ac_header>
22316 _ACEOF
22317 if { (eval echo "$as_me:22317: \"$ac_cpp conftest.$ac_ext\"") >&5
22318   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22319   ac_status=$?
22320   egrep -v '^ *\+' conftest.er1 >conftest.err
22321   rm -f conftest.er1
22322   cat conftest.err >&5
22323   echo "$as_me:22323: \$? = $ac_status" >&5
22324   (exit $ac_status); } >/dev/null; then
22325   if test -s conftest.err; then
22326     ac_cpp_err=$ac_cxx_preproc_warn_flag
22327   else
22328     ac_cpp_err=
22329   fi
22330 else
22331   ac_cpp_err=yes
22332 fi
22333 if test -z "$ac_cpp_err"; then
22334   eval "$as_ac_Header=yes"
22335 else
22336   echo "$as_me: failed program was:" >&5
22337   cat conftest.$ac_ext >&5
22338   eval "$as_ac_Header=no"
22339 fi
22340 rm -f conftest.err conftest.$ac_ext
22341 fi
22342 echo "$as_me:22342: result: `eval echo '${'$as_ac_Header'}'`" >&5
22343 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22344 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22345   cat >>confdefs.h <<EOF
22346 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22347 EOF
22348
22349 fi
22350 done
22351
22352 if test x"$ac_cv_header_iostream" = xyes ; then
22353         echo "$as_me:22353: checking if iostream uses std-namespace" >&5
22354 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22355         cat >conftest.$ac_ext <<_ACEOF
22356 #line 22356 "configure"
22357 #include "confdefs.h"
22358
22359 #include <iostream>
22360 using std::endl;
22361 using std::cerr;
22362 int
22363 main (void)
22364 {
22365
22366 cerr << "testing" << endl;
22367
22368   ;
22369   return 0;
22370 }
22371 _ACEOF
22372 rm -f conftest.$ac_objext
22373 if { (eval echo "$as_me:22373: \"$ac_compile\"") >&5
22374   (eval $ac_compile) 2>&5
22375   ac_status=$?
22376   echo "$as_me:22376: \$? = $ac_status" >&5
22377   (exit $ac_status); } &&
22378          { ac_try='test -s conftest.$ac_objext'
22379   { (eval echo "$as_me:22379: \"$ac_try\"") >&5
22380   (eval $ac_try) 2>&5
22381   ac_status=$?
22382   echo "$as_me:22382: \$? = $ac_status" >&5
22383   (exit $ac_status); }; }; then
22384   cf_iostream_namespace=yes
22385 else
22386   echo "$as_me: failed program was:" >&5
22387 cat conftest.$ac_ext >&5
22388 cf_iostream_namespace=no
22389 fi
22390 rm -f conftest.$ac_objext conftest.$ac_ext
22391         echo "$as_me:22391: result: $cf_iostream_namespace" >&5
22392 echo "${ECHO_T}$cf_iostream_namespace" >&6
22393         if test "$cf_iostream_namespace" = yes ; then
22394
22395 cat >>confdefs.h <<\EOF
22396 #define IOSTREAM_NAMESPACE 1
22397 EOF
22398
22399         fi
22400 fi
22401
22402 echo "$as_me:22402: checking if we should include stdbool.h" >&5
22403 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22404
22405 if test "${cf_cv_header_stdbool_h+set}" = set; then
22406   echo $ECHO_N "(cached) $ECHO_C" >&6
22407 else
22408
22409         cat >conftest.$ac_ext <<_ACEOF
22410 #line 22410 "configure"
22411 #include "confdefs.h"
22412
22413 int
22414 main (void)
22415 {
22416 bool foo = false
22417   ;
22418   return 0;
22419 }
22420 _ACEOF
22421 rm -f conftest.$ac_objext
22422 if { (eval echo "$as_me:22422: \"$ac_compile\"") >&5
22423   (eval $ac_compile) 2>&5
22424   ac_status=$?
22425   echo "$as_me:22425: \$? = $ac_status" >&5
22426   (exit $ac_status); } &&
22427          { ac_try='test -s conftest.$ac_objext'
22428   { (eval echo "$as_me:22428: \"$ac_try\"") >&5
22429   (eval $ac_try) 2>&5
22430   ac_status=$?
22431   echo "$as_me:22431: \$? = $ac_status" >&5
22432   (exit $ac_status); }; }; then
22433   cf_cv_header_stdbool_h=0
22434 else
22435   echo "$as_me: failed program was:" >&5
22436 cat conftest.$ac_ext >&5
22437 cat >conftest.$ac_ext <<_ACEOF
22438 #line 22438 "configure"
22439 #include "confdefs.h"
22440
22441 #ifndef __BEOS__
22442 #include <stdbool.h>
22443 #endif
22444
22445 int
22446 main (void)
22447 {
22448 bool foo = false
22449   ;
22450   return 0;
22451 }
22452 _ACEOF
22453 rm -f conftest.$ac_objext
22454 if { (eval echo "$as_me:22454: \"$ac_compile\"") >&5
22455   (eval $ac_compile) 2>&5
22456   ac_status=$?
22457   echo "$as_me:22457: \$? = $ac_status" >&5
22458   (exit $ac_status); } &&
22459          { ac_try='test -s conftest.$ac_objext'
22460   { (eval echo "$as_me:22460: \"$ac_try\"") >&5
22461   (eval $ac_try) 2>&5
22462   ac_status=$?
22463   echo "$as_me:22463: \$? = $ac_status" >&5
22464   (exit $ac_status); }; }; then
22465   cf_cv_header_stdbool_h=1
22466 else
22467   echo "$as_me: failed program was:" >&5
22468 cat conftest.$ac_ext >&5
22469 cf_cv_header_stdbool_h=0
22470 fi
22471 rm -f conftest.$ac_objext conftest.$ac_ext
22472 fi
22473 rm -f conftest.$ac_objext conftest.$ac_ext
22474 fi
22475
22476 if test "$cf_cv_header_stdbool_h" = 1
22477 then    echo "$as_me:22477: result: yes" >&5
22478 echo "${ECHO_T}yes" >&6
22479 else    echo "$as_me:22479: result: no" >&5
22480 echo "${ECHO_T}no" >&6
22481 fi
22482
22483 echo "$as_me:22483: checking for builtin bool type" >&5
22484 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22485
22486 if test "${cf_cv_builtin_bool+set}" = set; then
22487   echo $ECHO_N "(cached) $ECHO_C" >&6
22488 else
22489
22490         cat >conftest.$ac_ext <<_ACEOF
22491 #line 22491 "configure"
22492 #include "confdefs.h"
22493
22494 #include <stdio.h>
22495 #include <sys/types.h>
22496
22497 int
22498 main (void)
22499 {
22500 bool x = false
22501   ;
22502   return 0;
22503 }
22504 _ACEOF
22505 rm -f conftest.$ac_objext
22506 if { (eval echo "$as_me:22506: \"$ac_compile\"") >&5
22507   (eval $ac_compile) 2>&5
22508   ac_status=$?
22509   echo "$as_me:22509: \$? = $ac_status" >&5
22510   (exit $ac_status); } &&
22511          { ac_try='test -s conftest.$ac_objext'
22512   { (eval echo "$as_me:22512: \"$ac_try\"") >&5
22513   (eval $ac_try) 2>&5
22514   ac_status=$?
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit $ac_status); }; }; then
22517   cf_cv_builtin_bool=1
22518 else
22519   echo "$as_me: failed program was:" >&5
22520 cat conftest.$ac_ext >&5
22521 cf_cv_builtin_bool=0
22522 fi
22523 rm -f conftest.$ac_objext conftest.$ac_ext
22524
22525 fi
22526
22527 if test "$cf_cv_builtin_bool" = 1
22528 then    echo "$as_me:22528: result: yes" >&5
22529 echo "${ECHO_T}yes" >&6
22530 else    echo "$as_me:22530: result: no" >&5
22531 echo "${ECHO_T}no" >&6
22532 fi
22533
22534 echo "$as_me:22534: checking for size of bool" >&5
22535 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22536 if test "${cf_cv_type_of_bool+set}" = set; then
22537   echo $ECHO_N "(cached) $ECHO_C" >&6
22538 else
22539
22540         rm -f cf_test.out
22541         if test "$cross_compiling" = yes; then
22542   cf_cv_type_of_bool=unknown
22543 else
22544   cat >conftest.$ac_ext <<_ACEOF
22545 #line 22545 "configure"
22546 #include "confdefs.h"
22547
22548 #include <stdlib.h>
22549 #include <stdio.h>
22550
22551 #if defined(__cplusplus)
22552
22553 #ifdef HAVE_GXX_BUILTIN_H
22554 #include <g++/builtin.h>
22555 #elif HAVE_GPP_BUILTIN_H
22556 #include <gpp/builtin.h>
22557 #elif HAVE_BUILTIN_H
22558 #include <builtin.h>
22559 #endif
22560
22561 #else
22562
22563 #if $cf_cv_header_stdbool_h
22564 #include <stdbool.h>
22565 #endif
22566
22567 #endif
22568
22569 int main(void)
22570 {
22571         FILE *fp = fopen("cf_test.out", "w");
22572         if (fp != 0) {
22573                 bool x = true;
22574                 if ((bool)(-x) >= 0)
22575                         fputs("unsigned ", fp);
22576                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22577                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22578                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22579                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22580                 fclose(fp);
22581         }
22582         ${cf_cv_main_return:-return}(0);
22583 }
22584
22585 _ACEOF
22586 rm -f conftest$ac_exeext
22587 if { (eval echo "$as_me:22587: \"$ac_link\"") >&5
22588   (eval $ac_link) 2>&5
22589   ac_status=$?
22590   echo "$as_me:22590: \$? = $ac_status" >&5
22591   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22592   { (eval echo "$as_me:22592: \"$ac_try\"") >&5
22593   (eval $ac_try) 2>&5
22594   ac_status=$?
22595   echo "$as_me:22595: \$? = $ac_status" >&5
22596   (exit $ac_status); }; }; then
22597   cf_cv_type_of_bool=`cat cf_test.out`
22598                  if test -z "$cf_cv_type_of_bool"; then
22599                    cf_cv_type_of_bool=unknown
22600                  fi
22601 else
22602   echo "$as_me: program exited with status $ac_status" >&5
22603 echo "$as_me: failed program was:" >&5
22604 cat conftest.$ac_ext >&5
22605 cf_cv_type_of_bool=unknown
22606 fi
22607 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22608 fi
22609
22610 fi
22611
22612         rm -f cf_test.out
22613 echo "$as_me:22613: result: $cf_cv_type_of_bool" >&5
22614 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22615 if test "$cf_cv_type_of_bool" = unknown ; then
22616         case .$NCURSES_BOOL in
22617         (.auto|.) NCURSES_BOOL=unsigned;;
22618         esac
22619         { echo "$as_me:22619: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22620 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22621         cf_cv_type_of_bool=$NCURSES_BOOL
22622 fi
22623
22624 echo "$as_me:22624: checking for special defines needed for etip.h" >&5
22625 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22626 cf_save_CXXFLAGS="$CXXFLAGS"
22627 cf_result="none"
22628
22629 # etip.h includes ncurses.h which includes ncurses_dll.h
22630 # But ncurses_dll.h is generated - fix here.
22631 test -d include || mkdir include
22632 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
22633
22634 for cf_math in "" MATH_H
22635 do
22636 for cf_excp in "" MATH_EXCEPTION
22637 do
22638         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22639         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22640         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22641 cat >conftest.$ac_ext <<_ACEOF
22642 #line 22642 "configure"
22643 #include "confdefs.h"
22644
22645 #include <etip.h.in>
22646
22647 int
22648 main (void)
22649 {
22650
22651   ;
22652   return 0;
22653 }
22654 _ACEOF
22655 rm -f conftest.$ac_objext
22656 if { (eval echo "$as_me:22656: \"$ac_compile\"") >&5
22657   (eval $ac_compile) 2>&5
22658   ac_status=$?
22659   echo "$as_me:22659: \$? = $ac_status" >&5
22660   (exit $ac_status); } &&
22661          { ac_try='test -s conftest.$ac_objext'
22662   { (eval echo "$as_me:22662: \"$ac_try\"") >&5
22663   (eval $ac_try) 2>&5
22664   ac_status=$?
22665   echo "$as_me:22665: \$? = $ac_status" >&5
22666   (exit $ac_status); }; }; then
22667
22668         test -n "$cf_math" && cat >>confdefs.h <<EOF
22669 #define ETIP_NEEDS_${cf_math} 1
22670 EOF
22671
22672         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22673 #define ETIP_NEEDS_${cf_excp} 1
22674 EOF
22675
22676         cf_result="$cf_math $cf_excp"
22677         break 2
22678
22679 else
22680   echo "$as_me: failed program was:" >&5
22681 cat conftest.$ac_ext >&5
22682 fi
22683 rm -f conftest.$ac_objext conftest.$ac_ext
22684 done
22685 done
22686 echo "$as_me:22686: result: $cf_result" >&5
22687 echo "${ECHO_T}$cf_result" >&6
22688 CXXFLAGS="$cf_save_CXXFLAGS"
22689
22690 if test -n "$CXX"; then
22691 echo "$as_me:22691: checking if $CXX accepts parameter initialization" >&5
22692 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22693 if test "${cf_cv_cpp_param_init+set}" = set; then
22694   echo $ECHO_N "(cached) $ECHO_C" >&6
22695 else
22696
22697         ac_ext=cc
22698 ac_cpp='$CXXCPP $CPPFLAGS'
22699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22702 ac_main_return=return
22703
22704         if test "$cross_compiling" = yes; then
22705   cf_cv_cpp_param_init=unknown
22706 else
22707   cat >conftest.$ac_ext <<_ACEOF
22708 #line 22708 "configure"
22709 #include "confdefs.h"
22710
22711 class TEST {
22712 private:
22713         int value;
22714 public:
22715         TEST(int x = 1);
22716         ~TEST();
22717 };
22718
22719 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22720 {
22721         value = x;
22722 }
22723 int main(void) { }
22724
22725 _ACEOF
22726 rm -f conftest$ac_exeext
22727 if { (eval echo "$as_me:22727: \"$ac_link\"") >&5
22728   (eval $ac_link) 2>&5
22729   ac_status=$?
22730   echo "$as_me:22730: \$? = $ac_status" >&5
22731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22732   { (eval echo "$as_me:22732: \"$ac_try\"") >&5
22733   (eval $ac_try) 2>&5
22734   ac_status=$?
22735   echo "$as_me:22735: \$? = $ac_status" >&5
22736   (exit $ac_status); }; }; then
22737   cf_cv_cpp_param_init=yes
22738 else
22739   echo "$as_me: program exited with status $ac_status" >&5
22740 echo "$as_me: failed program was:" >&5
22741 cat conftest.$ac_ext >&5
22742 cf_cv_cpp_param_init=no
22743 fi
22744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22745 fi
22746         ac_ext=cc
22747 ac_cpp='$CXXCPP $CPPFLAGS'
22748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22751 ac_main_return=return
22752
22753 fi
22754 echo "$as_me:22754: result: $cf_cv_cpp_param_init" >&5
22755 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22756 fi
22757 test "$cf_cv_cpp_param_init" = yes &&
22758 cat >>confdefs.h <<\EOF
22759 #define CPP_HAS_PARAM_INIT 1
22760 EOF
22761
22762 if test -n "$CXX"; then
22763
22764 echo "$as_me:22764: checking if $CXX accepts static_cast" >&5
22765 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22766 if test "${cf_cv_cpp_static_cast+set}" = set; then
22767   echo $ECHO_N "(cached) $ECHO_C" >&6
22768 else
22769
22770         ac_ext=cc
22771 ac_cpp='$CXXCPP $CPPFLAGS'
22772 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22773 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22774 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22775 ac_main_return=return
22776
22777         cat >conftest.$ac_ext <<_ACEOF
22778 #line 22778 "configure"
22779 #include "confdefs.h"
22780
22781 class NCursesPanel
22782 {
22783 public:
22784   NCursesPanel(int nlines,
22785                int ncols,
22786                int begin_y = 0,
22787                int begin_x = 0)
22788   {
22789   }
22790   NCursesPanel();
22791   ~NCursesPanel();
22792 };
22793
22794 template<class T> class NCursesUserPanel : public NCursesPanel
22795 {
22796 public:
22797   NCursesUserPanel (int nlines,
22798                     int ncols,
22799                     int begin_y = 0,
22800                     int begin_x = 0,
22801                     const T* p_UserData = static_cast<T*>(0))
22802     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22803   {
22804   };
22805   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22806   {
22807   };
22808
22809   virtual ~NCursesUserPanel() {};
22810 };
22811
22812 int
22813 main (void)
22814 {
22815
22816         const char* p_UserData = static_cast<char*>(0)
22817   ;
22818   return 0;
22819 }
22820 _ACEOF
22821 rm -f conftest.$ac_objext
22822 if { (eval echo "$as_me:22822: \"$ac_compile\"") >&5
22823   (eval $ac_compile) 2>&5
22824   ac_status=$?
22825   echo "$as_me:22825: \$? = $ac_status" >&5
22826   (exit $ac_status); } &&
22827          { ac_try='test -s conftest.$ac_objext'
22828   { (eval echo "$as_me:22828: \"$ac_try\"") >&5
22829   (eval $ac_try) 2>&5
22830   ac_status=$?
22831   echo "$as_me:22831: \$? = $ac_status" >&5
22832   (exit $ac_status); }; }; then
22833   cf_cv_cpp_static_cast=yes
22834 else
22835   echo "$as_me: failed program was:" >&5
22836 cat conftest.$ac_ext >&5
22837 cf_cv_cpp_static_cast=no
22838 fi
22839 rm -f conftest.$ac_objext conftest.$ac_ext
22840
22841         ac_ext=cc
22842 ac_cpp='$CXXCPP $CPPFLAGS'
22843 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22844 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22845 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22846 ac_main_return=return
22847
22848 fi
22849 echo "$as_me:22849: result: $cf_cv_cpp_static_cast" >&5
22850 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22851
22852 fi
22853
22854 test "$cf_cv_cpp_static_cast" = yes &&
22855 cat >>confdefs.h <<\EOF
22856 #define CPP_HAS_STATIC_CAST 1
22857 EOF
22858
22859         CXX_AR='$(AR)'
22860         CXX_ARFLAGS='$(ARFLAGS)'
22861         case $cf_cv_system_name in
22862         (irix*)
22863             if test "$GXX" != yes ; then
22864                 CXX_AR='$(CXX)'
22865                 CXX_ARFLAGS='-ar -o'
22866             fi
22867             ;;
22868         (sco3.2v5*)
22869             CXXLDFLAGS="-u main"
22870             ;;
22871         (solaris2*)
22872             if test "$GXX" != yes ; then
22873                 CXX_AR='$(CXX)'
22874                 CXX_ARFLAGS='-xar -o'
22875             fi
22876             ;;
22877         esac
22878
22879 else
22880         cf_cxx_library=no
22881         cf_cv_builtin_bool=1
22882
22883         # Just because we are not configuring against C++ right now does not
22884         # mean that a user will not want to use C++.  Some distributors disable
22885         # the C++ portion of this configuration as a shortcut (or just to avoid
22886         # compiling the demo in the c++ directory).  So we need a reasonable
22887         # default for the 'bool' type.
22888         #
22889         # Caveat: since the storage of the bool type is not standardized, it
22890         # may change.
22891
22892         if test "$NCURSES_BOOL" != auto ; then
22893                 cf_cv_type_of_bool=$NCURSES_BOOL
22894                 cf_cv_header_stdbool_h=0
22895         else
22896                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22897
22898 echo "$as_me:22898: checking for size of bool" >&5
22899 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22900 if test "${cf_cv_type_of_bool+set}" = set; then
22901   echo $ECHO_N "(cached) $ECHO_C" >&6
22902 else
22903
22904         rm -f cf_test.out
22905         if test "$cross_compiling" = yes; then
22906   cf_cv_type_of_bool=unknown
22907 else
22908   cat >conftest.$ac_ext <<_ACEOF
22909 #line 22909 "configure"
22910 #include "confdefs.h"
22911
22912 #include <stdlib.h>
22913 #include <stdio.h>
22914
22915 #if defined(__cplusplus)
22916
22917 #ifdef HAVE_GXX_BUILTIN_H
22918 #include <g++/builtin.h>
22919 #elif HAVE_GPP_BUILTIN_H
22920 #include <gpp/builtin.h>
22921 #elif HAVE_BUILTIN_H
22922 #include <builtin.h>
22923 #endif
22924
22925 #else
22926
22927 #if $cf_cv_header_stdbool_h
22928 #include <stdbool.h>
22929 #endif
22930
22931 #endif
22932
22933 int main(void)
22934 {
22935         FILE *fp = fopen("cf_test.out", "w");
22936         if (fp != 0) {
22937                 bool x = true;
22938                 if ((bool)(-x) >= 0)
22939                         fputs("unsigned ", fp);
22940                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22941                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22942                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22943                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22944                 fclose(fp);
22945         }
22946         ${cf_cv_main_return:-return}(0);
22947 }
22948
22949 _ACEOF
22950 rm -f conftest$ac_exeext
22951 if { (eval echo "$as_me:22951: \"$ac_link\"") >&5
22952   (eval $ac_link) 2>&5
22953   ac_status=$?
22954   echo "$as_me:22954: \$? = $ac_status" >&5
22955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22956   { (eval echo "$as_me:22956: \"$ac_try\"") >&5
22957   (eval $ac_try) 2>&5
22958   ac_status=$?
22959   echo "$as_me:22959: \$? = $ac_status" >&5
22960   (exit $ac_status); }; }; then
22961   cf_cv_type_of_bool=`cat cf_test.out`
22962                  if test -z "$cf_cv_type_of_bool"; then
22963                    cf_cv_type_of_bool=unknown
22964                  fi
22965 else
22966   echo "$as_me: program exited with status $ac_status" >&5
22967 echo "$as_me: failed program was:" >&5
22968 cat conftest.$ac_ext >&5
22969 cf_cv_type_of_bool=unknown
22970 fi
22971 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22972 fi
22973
22974 fi
22975
22976         rm -f cf_test.out
22977 echo "$as_me:22977: result: $cf_cv_type_of_bool" >&5
22978 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22979 if test "$cf_cv_type_of_bool" = unknown ; then
22980         case .$NCURSES_BOOL in
22981         (.auto|.) NCURSES_BOOL=unsigned;;
22982         esac
22983         { echo "$as_me:22983: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22984 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22985         cf_cv_type_of_bool=$NCURSES_BOOL
22986 fi
22987
22988                 else
22989                         echo "$as_me:22989: checking for fallback type of bool" >&5
22990 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22991                         case "$host_cpu" in
22992                         (i?86)  cf_cv_type_of_bool=char ;;
22993                         (*)     cf_cv_type_of_bool=int  ;;
22994                         esac
22995                         echo "$as_me:22995: result: $cf_cv_type_of_bool" >&5
22996 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22997                 fi
22998         fi
22999 fi
23000
23001 # If the C compiler did not declare bool, and we did not determine that the C++
23002 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
23003 # ncurses library use the same type as C++ bool.  Note that this allows one to
23004 # specify the type of bool in a configure-script option and postpone
23005 # integration with the C++ compiler provided that the types are compatible.
23006 USE_CXX_BOOL=1
23007 if test $cf_cv_cc_bool_type = 1
23008 then
23009         # oops: C has a bool.  Unlikely, but C++ could differ.
23010         USE_CXX_BOOL=0
23011 elif test $cf_cv_builtin_bool = 0
23012 then
23013         # C++ has no bool
23014         USE_CXX_BOOL=0
23015 else
23016         # this is the normal case
23017         USE_CXX_BOOL='defined(__cplusplus)'
23018 fi
23019
23020 if test -f "${srcdir}/Ada95/Makefile.in" ; then
23021
23022         if test "$cf_with_ada" != "no" ; then
23023                 if test "$with_libtool" != "no"; then
23024                         { echo "$as_me:23024: WARNING: libtool does not support Ada - disabling feature" >&5
23025 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23026                         cf_with_ada=no
23027                 fi
23028         fi
23029
23030         if test "$cf_with_ada" != "no" ; then
23031
23032 cf_ada_make=gnatmake
23033 cf_ada_config="#"
23034 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23035 set dummy $cf_ada_make; ac_word=$2
23036 echo "$as_me:23036: checking for $ac_word" >&5
23037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23038 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23039   echo $ECHO_N "(cached) $ECHO_C" >&6
23040 else
23041   if test -n "$gnatmake_exists"; then
23042   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23043 else
23044   ac_save_IFS=$IFS; IFS=$ac_path_separator
23045 ac_dummy="$PATH"
23046 for ac_dir in $ac_dummy; do
23047   IFS=$ac_save_IFS
23048   test -z "$ac_dir" && ac_dir=.
23049   $as_executable_p "$ac_dir/$ac_word" || continue
23050 ac_cv_prog_gnatmake_exists="yes"
23051 echo "$as_me:23051: found $ac_dir/$ac_word" >&5
23052 break
23053 done
23054
23055   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23056 fi
23057 fi
23058 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23059 if test -n "$gnatmake_exists"; then
23060   echo "$as_me:23060: result: $gnatmake_exists" >&5
23061 echo "${ECHO_T}$gnatmake_exists" >&6
23062 else
23063   echo "$as_me:23063: result: no" >&5
23064 echo "${ECHO_T}no" >&6
23065 fi
23066
23067 if test "$ac_cv_prog_gnatmake_exists" = no; then
23068         cf_ada_make=
23069         cf_cv_prog_gnat_correct=no
23070 else
23071         # Extract the first word of "gprconfig", so it can be a program name with args.
23072 set dummy gprconfig; ac_word=$2
23073 echo "$as_me:23073: checking for $ac_word" >&5
23074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23075 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23076   echo $ECHO_N "(cached) $ECHO_C" >&6
23077 else
23078   if test -n "$gprconfig_exists"; then
23079   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23080 else
23081   ac_save_IFS=$IFS; IFS=$ac_path_separator
23082 ac_dummy="$PATH"
23083 for ac_dir in $ac_dummy; do
23084   IFS=$ac_save_IFS
23085   test -z "$ac_dir" && ac_dir=.
23086   $as_executable_p "$ac_dir/$ac_word" || continue
23087 ac_cv_prog_gprconfig_exists="yes"
23088 echo "$as_me:23088: found $ac_dir/$ac_word" >&5
23089 break
23090 done
23091
23092   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23093 fi
23094 fi
23095 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23096 if test -n "$gprconfig_exists"; then
23097   echo "$as_me:23097: result: $gprconfig_exists" >&5
23098 echo "${ECHO_T}$gprconfig_exists" >&6
23099 else
23100   echo "$as_me:23100: result: no" >&5
23101 echo "${ECHO_T}no" >&6
23102 fi
23103
23104         if test "$ac_cv_prog_gprconfig_exists" = yes
23105         then
23106                 rm -rf conftest* *~conftest*
23107                 if mkdir conftest.src
23108                 then
23109                         cf_ada_config=""
23110                         cd conftest.src
23111                         for cf_gprconfig in Ada C
23112                         do
23113                                 echo "$as_me:23113: checking for gprconfig name for $cf_gprconfig" >&5
23114 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23115                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23116                                 if test -n "$cf_gprconfig_value"
23117                                 then
23118                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23119                                         echo "$as_me:23119: result: $cf_gprconfig_value" >&5
23120 echo "${ECHO_T}$cf_gprconfig_value" >&6
23121                                 else
23122                                         echo "$as_me:23122: result: missing" >&5
23123 echo "${ECHO_T}missing" >&6
23124                                         cf_ada_config="#"
23125                                         break
23126                                 fi
23127                         done
23128                         cd ..
23129                         rm -rf conftest* *~conftest*
23130                 fi
23131         else
23132                 # gprconfig is newer than gnatmake; we can continue...
23133                 cf_ada_config="##"
23134         fi
23135         if test "x$cf_ada_config" != "x#"
23136         then
23137
23138 echo "$as_me:23138: checking for gnat version" >&5
23139 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23140 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23141         grep '[0-9].[0-9][0-9]*' |\
23142         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23143 echo "$as_me:23143: result: $cf_gnat_version" >&5
23144 echo "${ECHO_T}$cf_gnat_version" >&6
23145
23146 case $cf_gnat_version in
23147 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23148         cf_cv_prog_gnat_correct=yes
23149         ;;
23150 (*)
23151         { echo "$as_me:23151: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23152 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23153         cf_cv_prog_gnat_correct=no
23154         ;;
23155 esac
23156
23157                 # Extract the first word of "m4", so it can be a program name with args.
23158 set dummy m4; ac_word=$2
23159 echo "$as_me:23159: checking for $ac_word" >&5
23160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23161 if test "${ac_cv_prog_M4_exists+set}" = set; then
23162   echo $ECHO_N "(cached) $ECHO_C" >&6
23163 else
23164   if test -n "$M4_exists"; then
23165   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23166 else
23167   ac_save_IFS=$IFS; IFS=$ac_path_separator
23168 ac_dummy="$PATH"
23169 for ac_dir in $ac_dummy; do
23170   IFS=$ac_save_IFS
23171   test -z "$ac_dir" && ac_dir=.
23172   $as_executable_p "$ac_dir/$ac_word" || continue
23173 ac_cv_prog_M4_exists="yes"
23174 echo "$as_me:23174: found $ac_dir/$ac_word" >&5
23175 break
23176 done
23177
23178   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23179 fi
23180 fi
23181 M4_exists=$ac_cv_prog_M4_exists
23182 if test -n "$M4_exists"; then
23183   echo "$as_me:23183: result: $M4_exists" >&5
23184 echo "${ECHO_T}$M4_exists" >&6
23185 else
23186   echo "$as_me:23186: result: no" >&5
23187 echo "${ECHO_T}no" >&6
23188 fi
23189
23190                 if test "$ac_cv_prog_M4_exists" = no; then
23191                         cf_cv_prog_gnat_correct=no
23192                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23193                 fi
23194                 if test "$cf_cv_prog_gnat_correct" = yes; then
23195                         echo "$as_me:23195: checking if GNAT works" >&5
23196 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23197
23198 rm -rf conftest* *~conftest*
23199 cat >>conftest.ads <<CF_EOF
23200 procedure conftest;
23201 CF_EOF
23202 cat >>conftest.adb <<CF_EOF
23203 with Text_IO;
23204 with GNAT.OS_Lib;
23205 procedure conftest is
23206 begin
23207    Text_IO.Put ("Hello World");
23208    Text_IO.New_Line;
23209    GNAT.OS_Lib.OS_Exit (0);
23210 end conftest;
23211 CF_EOF
23212 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23213    if ( ./conftest 1>&5 2>&1 ) ; then
23214       cf_cv_prog_gnat_correct=yes
23215    else
23216       cf_cv_prog_gnat_correct=no
23217    fi
23218 else
23219    cf_cv_prog_gnat_correct=no
23220 fi
23221 rm -rf conftest* *~conftest*
23222
23223                         echo "$as_me:23223: result: $cf_cv_prog_gnat_correct" >&5
23224 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23225                 fi
23226         else
23227                 cf_cv_prog_gnat_correct=no
23228         fi
23229 fi
23230
23231                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23232
23233         ADAFLAGS="$ADAFLAGS -gnatpn"
23234
23235         echo "$as_me:23235: checking optimization options for ADAFLAGS" >&5
23236 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23237         case "$CFLAGS" in
23238         (*-g*)
23239
23240         ADAFLAGS="$ADAFLAGS -g"
23241
23242                 ;;
23243         esac
23244         case "$CFLAGS" in
23245         (*-O*)
23246                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23247
23248         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23249
23250                 ;;
23251         esac
23252         echo "$as_me:23252: result: $ADAFLAGS" >&5
23253 echo "${ECHO_T}$ADAFLAGS" >&6
23254
23255 echo "$as_me:23255: checking if GNATPREP supports -T option" >&5
23256 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23257 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23258   echo $ECHO_N "(cached) $ECHO_C" >&6
23259 else
23260
23261 cf_cv_gnatprep_opt_t=no
23262 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23263
23264 fi
23265 echo "$as_me:23265: result: $cf_cv_gnatprep_opt_t" >&5
23266 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23267 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23268
23269 echo "$as_me:23269: checking if GNAT supports generics" >&5
23270 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23271 case $cf_gnat_version in
23272 (3.[1-9]*|[4-9].*)
23273         cf_gnat_generics=yes
23274         ;;
23275 (*)
23276         cf_gnat_generics=no
23277         ;;
23278 esac
23279 echo "$as_me:23279: result: $cf_gnat_generics" >&5
23280 echo "${ECHO_T}$cf_gnat_generics" >&6
23281
23282 if test "$cf_gnat_generics" = yes
23283 then
23284         cf_compile_generics=generics
23285         cf_generic_objects="\${GENOBJS}"
23286 else
23287         cf_compile_generics=
23288         cf_generic_objects=
23289 fi
23290
23291 echo "$as_me:23291: checking if GNAT supports SIGINT" >&5
23292 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23293 if test "${cf_cv_gnat_sigint+set}" = set; then
23294   echo $ECHO_N "(cached) $ECHO_C" >&6
23295 else
23296
23297 rm -rf conftest* *~conftest*
23298 cat >>conftest.ads <<CF_EOF
23299 with Ada.Interrupts.Names;
23300
23301 package ConfTest is
23302
23303    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23304    pragma Unreserve_All_Interrupts;
23305    pragma Warnings (On);
23306
23307    protected Process is
23308       procedure Stop;
23309       function Continue return Boolean;
23310       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23311    private
23312       Done : Boolean := False;
23313    end Process;
23314
23315 end ConfTest;
23316 CF_EOF
23317 cat >>conftest.adb <<CF_EOF
23318 package body ConfTest is
23319    protected body Process is
23320       procedure Stop is
23321       begin
23322          Done := True;
23323       end Stop;
23324       function Continue return Boolean is
23325       begin
23326          return not Done;
23327       end Continue;
23328    end Process;
23329 end ConfTest;
23330 CF_EOF
23331 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23332       cf_cv_gnat_sigint=yes
23333 else
23334    cf_cv_gnat_sigint=no
23335 fi
23336 rm -rf conftest* *~conftest*
23337
23338 fi
23339 echo "$as_me:23339: result: $cf_cv_gnat_sigint" >&5
23340 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23341
23342 if test $cf_cv_gnat_sigint = yes ; then
23343         USE_GNAT_SIGINT=""
23344 else
23345         USE_GNAT_SIGINT="#"
23346 fi
23347
23348 cf_gnat_libraries=no
23349 cf_gnat_projects=no
23350
23351 if test "$enable_gnat_projects" != no ; then
23352 echo "$as_me:23352: checking if GNAT supports project files" >&5
23353 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23354 case $cf_gnat_version in
23355 (3.[0-9]*)
23356         ;;
23357 (*)
23358         case $cf_cv_system_name in
23359         (cygwin*|msys*)
23360                 ;;
23361         (*)
23362                 rm -rf conftest* *~conftest*
23363                 if mkdir conftest.src conftest.bin conftest.lib
23364                 then
23365                         cd conftest.src
23366                         rm -rf conftest* *~conftest*
23367                         cat >>library.gpr <<CF_EOF
23368 project Library is
23369   Kind := External ("LIB_KIND");
23370   for Library_Name use "ConfTest";
23371   for Object_Dir use ".";
23372   for Library_ALI_Dir use External("LIBRARY_DIR");
23373   for Library_Version use External ("SONAME");
23374   for Library_Kind use Kind;
23375   for Library_Dir use External("BUILD_DIR");
23376   Source_Dir := External ("SOURCE_DIR");
23377   for Source_Dirs use (Source_Dir);
23378 end Library;
23379 CF_EOF
23380                         cat >>confpackage.ads <<CF_EOF
23381 package ConfPackage is
23382    procedure conftest;
23383 end ConfPackage;
23384 CF_EOF
23385                         cat >>confpackage.adb <<CF_EOF
23386 with Text_IO;
23387 package body ConfPackage is
23388    procedure conftest is
23389    begin
23390       Text_IO.Put ("Hello World");
23391       Text_IO.New_Line;
23392    end conftest;
23393 end ConfPackage;
23394 CF_EOF
23395                         if ( $cf_ada_make $ADAFLAGS \
23396                                         -Plibrary.gpr \
23397                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23398                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23399                                         -XSOURCE_DIR=`pwd` \
23400                                         -XSONAME=libConfTest.so.1 \
23401                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23402                                 cf_gnat_projects=yes
23403                         fi
23404                         cd ..
23405                 fi
23406                 if test -f conftest.lib/confpackage.ali
23407                 then
23408                         cf_gnat_libraries=yes
23409                 fi
23410                 rm -rf conftest* *~conftest*
23411                 ;;
23412         esac
23413         ;;
23414 esac
23415 echo "$as_me:23415: result: $cf_gnat_projects" >&5
23416 echo "${ECHO_T}$cf_gnat_projects" >&6
23417 fi # enable_gnat_projects
23418
23419 if test $cf_gnat_projects = yes
23420 then
23421         echo "$as_me:23421: checking if GNAT supports libraries" >&5
23422 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23423         echo "$as_me:23423: result: $cf_gnat_libraries" >&5
23424 echo "${ECHO_T}$cf_gnat_libraries" >&6
23425 fi
23426
23427 if test "$cf_gnat_projects" = yes
23428 then
23429         USE_OLD_MAKERULES="#"
23430         USE_GNAT_PROJECTS=""
23431 else
23432         USE_OLD_MAKERULES=""
23433         USE_GNAT_PROJECTS="#"
23434 fi
23435
23436 if test "$cf_gnat_libraries" = yes
23437 then
23438         USE_GNAT_LIBRARIES=""
23439 else
23440         USE_GNAT_LIBRARIES="#"
23441 fi
23442
23443 echo "$as_me:23443: checking for ada-compiler" >&5
23444 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23445
23446 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23447 if test "${with_ada_compiler+set}" = set; then
23448   withval="$with_ada_compiler"
23449   cf_ada_compiler=$withval
23450 else
23451   cf_ada_compiler=gnatmake
23452 fi;
23453
23454 echo "$as_me:23454: result: $cf_ada_compiler" >&5
23455 echo "${ECHO_T}$cf_ada_compiler" >&6
23456
23457                         cf_ada_package=terminal_interface
23458
23459 echo "$as_me:23459: checking for ada-include" >&5
23460 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23461
23462 # Check whether --with-ada-include or --without-ada-include was given.
23463 if test "${with_ada_include+set}" = set; then
23464   withval="$with_ada_include"
23465
23466 else
23467   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23468 fi; if test -n "$prefix/share/ada/adainclude" ; then
23469
23470 if test "x$prefix" != xNONE; then
23471         cf_path_syntax="$prefix"
23472 else
23473         cf_path_syntax="$ac_default_prefix"
23474 fi
23475
23476 case ".$withval" in
23477 (.\$\(*\)*|.\'*\'*)
23478         ;;
23479 (..|./*|.\\*)
23480         ;;
23481 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23482         ;;
23483 (.\${*prefix}*|.\${*dir}*)
23484         eval withval="$withval"
23485         case ".$withval" in
23486         (.NONE/*)
23487                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23488                 ;;
23489         esac
23490         ;;
23491 (.no|.NONE/*)
23492         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23493         ;;
23494 (*)
23495         { { echo "$as_me:23495: error: expected a pathname, not \"$withval\"" >&5
23496 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23497    { (exit 1); exit 1; }; }
23498         ;;
23499 esac
23500
23501 fi
23502 eval ADA_INCLUDE="$withval"
23503
23504 echo "$as_me:23504: result: $ADA_INCLUDE" >&5
23505 echo "${ECHO_T}$ADA_INCLUDE" >&6
23506
23507 echo "$as_me:23507: checking for ada-objects" >&5
23508 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23509
23510 # Check whether --with-ada-objects or --without-ada-objects was given.
23511 if test "${with_ada_objects+set}" = set; then
23512   withval="$with_ada_objects"
23513
23514 else
23515   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23516 fi; if test -n "$prefix/lib/ada/adalib" ; then
23517
23518 if test "x$prefix" != xNONE; then
23519         cf_path_syntax="$prefix"
23520 else
23521         cf_path_syntax="$ac_default_prefix"
23522 fi
23523
23524 case ".$withval" in
23525 (.\$\(*\)*|.\'*\'*)
23526         ;;
23527 (..|./*|.\\*)
23528         ;;
23529 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23530         ;;
23531 (.\${*prefix}*|.\${*dir}*)
23532         eval withval="$withval"
23533         case ".$withval" in
23534         (.NONE/*)
23535                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23536                 ;;
23537         esac
23538         ;;
23539 (.no|.NONE/*)
23540         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23541         ;;
23542 (*)
23543         { { echo "$as_me:23543: error: expected a pathname, not \"$withval\"" >&5
23544 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23545    { (exit 1); exit 1; }; }
23546         ;;
23547 esac
23548
23549 fi
23550 eval ADA_OBJECTS="$withval"
23551
23552 echo "$as_me:23552: result: $ADA_OBJECTS" >&5
23553 echo "${ECHO_T}$ADA_OBJECTS" >&6
23554
23555 echo "$as_me:23555: checking if an Ada95 shared-library should be built" >&5
23556 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23557
23558 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23559 if test "${with_ada_sharedlib+set}" = set; then
23560   withval="$with_ada_sharedlib"
23561   with_ada_sharedlib=$withval
23562 else
23563   with_ada_sharedlib=no
23564 fi;
23565 echo "$as_me:23565: result: $with_ada_sharedlib" >&5
23566 echo "${ECHO_T}$with_ada_sharedlib" >&6
23567
23568 if test "x$with_ada_sharedlib" != xno
23569 then
23570         if test "x$cf_gnat_projects" != xyes
23571         then
23572                 { echo "$as_me:23572: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23573 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23574                 with_ada_sharedlib=no
23575         fi
23576 fi
23577
23578 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23579 MAKE_ADA_SHAREDLIB="#"
23580
23581 if test "x$with_ada_sharedlib" != xno
23582 then
23583         MAKE_ADA_SHAREDLIB=
23584         if test "x$with_ada_sharedlib" != xyes
23585         then
23586                 ADA_SHAREDLIB="$with_ada_sharedlib"
23587         fi
23588 fi
23589
23590                 fi
23591         fi
23592 else
23593         cf_with_ada=no
23594 fi
23595
23596 # do this "late" to avoid conflict with header-checks
23597 if test "x$with_widec" = xyes ; then
23598         echo "$as_me:23598: checking for wchar_t" >&5
23599 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23600 if test "${ac_cv_type_wchar_t+set}" = set; then
23601   echo $ECHO_N "(cached) $ECHO_C" >&6
23602 else
23603   cat >conftest.$ac_ext <<_ACEOF
23604 #line 23604 "configure"
23605 #include "confdefs.h"
23606 $ac_includes_default
23607 int
23608 main (void)
23609 {
23610 if ((wchar_t *) 0)
23611   return 0;
23612 if (sizeof (wchar_t))
23613   return 0;
23614   ;
23615   return 0;
23616 }
23617 _ACEOF
23618 rm -f conftest.$ac_objext
23619 if { (eval echo "$as_me:23619: \"$ac_compile\"") >&5
23620   (eval $ac_compile) 2>&5
23621   ac_status=$?
23622   echo "$as_me:23622: \$? = $ac_status" >&5
23623   (exit $ac_status); } &&
23624          { ac_try='test -s conftest.$ac_objext'
23625   { (eval echo "$as_me:23625: \"$ac_try\"") >&5
23626   (eval $ac_try) 2>&5
23627   ac_status=$?
23628   echo "$as_me:23628: \$? = $ac_status" >&5
23629   (exit $ac_status); }; }; then
23630   ac_cv_type_wchar_t=yes
23631 else
23632   echo "$as_me: failed program was:" >&5
23633 cat conftest.$ac_ext >&5
23634 ac_cv_type_wchar_t=no
23635 fi
23636 rm -f conftest.$ac_objext conftest.$ac_ext
23637 fi
23638 echo "$as_me:23638: result: $ac_cv_type_wchar_t" >&5
23639 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23640
23641 echo "$as_me:23641: checking size of wchar_t" >&5
23642 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23643 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23644   echo $ECHO_N "(cached) $ECHO_C" >&6
23645 else
23646   if test "$ac_cv_type_wchar_t" = yes; then
23647   if test "$cross_compiling" = yes; then
23648   # Depending upon the size, compute the lo and hi bounds.
23649 cat >conftest.$ac_ext <<_ACEOF
23650 #line 23650 "configure"
23651 #include "confdefs.h"
23652 $ac_includes_default
23653 int
23654 main (void)
23655 {
23656 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23657   ;
23658   return 0;
23659 }
23660 _ACEOF
23661 rm -f conftest.$ac_objext
23662 if { (eval echo "$as_me:23662: \"$ac_compile\"") >&5
23663   (eval $ac_compile) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit $ac_status); } &&
23667          { ac_try='test -s conftest.$ac_objext'
23668   { (eval echo "$as_me:23668: \"$ac_try\"") >&5
23669   (eval $ac_try) 2>&5
23670   ac_status=$?
23671   echo "$as_me:23671: \$? = $ac_status" >&5
23672   (exit $ac_status); }; }; then
23673   ac_lo=0 ac_mid=0
23674   while :; do
23675     cat >conftest.$ac_ext <<_ACEOF
23676 #line 23676 "configure"
23677 #include "confdefs.h"
23678 $ac_includes_default
23679 int
23680 main (void)
23681 {
23682 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23683   ;
23684   return 0;
23685 }
23686 _ACEOF
23687 rm -f conftest.$ac_objext
23688 if { (eval echo "$as_me:23688: \"$ac_compile\"") >&5
23689   (eval $ac_compile) 2>&5
23690   ac_status=$?
23691   echo "$as_me:23691: \$? = $ac_status" >&5
23692   (exit $ac_status); } &&
23693          { ac_try='test -s conftest.$ac_objext'
23694   { (eval echo "$as_me:23694: \"$ac_try\"") >&5
23695   (eval $ac_try) 2>&5
23696   ac_status=$?
23697   echo "$as_me:23697: \$? = $ac_status" >&5
23698   (exit $ac_status); }; }; then
23699   ac_hi=$ac_mid; break
23700 else
23701   echo "$as_me: failed program was:" >&5
23702 cat conftest.$ac_ext >&5
23703 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23704 fi
23705 rm -f conftest.$ac_objext conftest.$ac_ext
23706   done
23707 else
23708   echo "$as_me: failed program was:" >&5
23709 cat conftest.$ac_ext >&5
23710 ac_hi=-1 ac_mid=-1
23711   while :; do
23712     cat >conftest.$ac_ext <<_ACEOF
23713 #line 23713 "configure"
23714 #include "confdefs.h"
23715 $ac_includes_default
23716 int
23717 main (void)
23718 {
23719 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23720   ;
23721   return 0;
23722 }
23723 _ACEOF
23724 rm -f conftest.$ac_objext
23725 if { (eval echo "$as_me:23725: \"$ac_compile\"") >&5
23726   (eval $ac_compile) 2>&5
23727   ac_status=$?
23728   echo "$as_me:23728: \$? = $ac_status" >&5
23729   (exit $ac_status); } &&
23730          { ac_try='test -s conftest.$ac_objext'
23731   { (eval echo "$as_me:23731: \"$ac_try\"") >&5
23732   (eval $ac_try) 2>&5
23733   ac_status=$?
23734   echo "$as_me:23734: \$? = $ac_status" >&5
23735   (exit $ac_status); }; }; then
23736   ac_lo=$ac_mid; break
23737 else
23738   echo "$as_me: failed program was:" >&5
23739 cat conftest.$ac_ext >&5
23740 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23741 fi
23742 rm -f conftest.$ac_objext conftest.$ac_ext
23743   done
23744 fi
23745 rm -f conftest.$ac_objext conftest.$ac_ext
23746 # Binary search between lo and hi bounds.
23747 while test "x$ac_lo" != "x$ac_hi"; do
23748   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23749   cat >conftest.$ac_ext <<_ACEOF
23750 #line 23750 "configure"
23751 #include "confdefs.h"
23752 $ac_includes_default
23753 int
23754 main (void)
23755 {
23756 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23757   ;
23758   return 0;
23759 }
23760 _ACEOF
23761 rm -f conftest.$ac_objext
23762 if { (eval echo "$as_me:23762: \"$ac_compile\"") >&5
23763   (eval $ac_compile) 2>&5
23764   ac_status=$?
23765   echo "$as_me:23765: \$? = $ac_status" >&5
23766   (exit $ac_status); } &&
23767          { ac_try='test -s conftest.$ac_objext'
23768   { (eval echo "$as_me:23768: \"$ac_try\"") >&5
23769   (eval $ac_try) 2>&5
23770   ac_status=$?
23771   echo "$as_me:23771: \$? = $ac_status" >&5
23772   (exit $ac_status); }; }; then
23773   ac_hi=$ac_mid
23774 else
23775   echo "$as_me: failed program was:" >&5
23776 cat conftest.$ac_ext >&5
23777 ac_lo=`expr $ac_mid + 1`
23778 fi
23779 rm -f conftest.$ac_objext conftest.$ac_ext
23780 done
23781 ac_cv_sizeof_wchar_t=$ac_lo
23782 else
23783   if test "$cross_compiling" = yes; then
23784   { { echo "$as_me:23784: error: cannot run test program while cross compiling" >&5
23785 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23786    { (exit 1); exit 1; }; }
23787 else
23788   cat >conftest.$ac_ext <<_ACEOF
23789 #line 23789 "configure"
23790 #include "confdefs.h"
23791 $ac_includes_default
23792 int
23793 main (void)
23794 {
23795 FILE *f = fopen ("conftest.val", "w");
23796 if (!f)
23797   $ac_main_return (1);
23798 fprintf (f, "%d", (sizeof (wchar_t)));
23799 fclose (f);
23800   ;
23801   return 0;
23802 }
23803 _ACEOF
23804 rm -f conftest$ac_exeext
23805 if { (eval echo "$as_me:23805: \"$ac_link\"") >&5
23806   (eval $ac_link) 2>&5
23807   ac_status=$?
23808   echo "$as_me:23808: \$? = $ac_status" >&5
23809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23810   { (eval echo "$as_me:23810: \"$ac_try\"") >&5
23811   (eval $ac_try) 2>&5
23812   ac_status=$?
23813   echo "$as_me:23813: \$? = $ac_status" >&5
23814   (exit $ac_status); }; }; then
23815   ac_cv_sizeof_wchar_t=`cat conftest.val`
23816 else
23817   echo "$as_me: program exited with status $ac_status" >&5
23818 echo "$as_me: failed program was:" >&5
23819 cat conftest.$ac_ext >&5
23820 fi
23821 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23822 fi
23823 fi
23824 rm -f conftest.val
23825 else
23826   ac_cv_sizeof_wchar_t=0
23827 fi
23828 fi
23829 echo "$as_me:23829: result: $ac_cv_sizeof_wchar_t" >&5
23830 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23831 cat >>confdefs.h <<EOF
23832 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23833 EOF
23834
23835 fi
23836
23837 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23838 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23839 ###
23840 ### ticlib modules may be a separate library, otherwise contained in termlib.
23841 ### termlib modules may be a separate library, otherwise contained in ncurses.
23842 ###
23843 ### The of "+" or " " between the tokens controls the way the script
23844 ### chooses to split module lists into libraries.
23845 ###
23846 ### (see CF_LIB_RULES).
23847 echo "$as_me:23847: checking for library subsets" >&5
23848 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23849 LIB_SUBSETS=
23850
23851 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23852         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23853         if test "$with_ticlib" != no ; then
23854                 LIB_SUBSETS="${LIB_SUBSETS} "
23855         else
23856                 LIB_SUBSETS="${LIB_SUBSETS}+"
23857         fi
23858 fi
23859
23860 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23861 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23862
23863 if test "$with_termlib" != no ; then
23864         LIB_SUBSETS="${LIB_SUBSETS} "
23865 else
23866         LIB_SUBSETS="${LIB_SUBSETS}+"
23867 fi
23868
23869 LIB_SUBSETS="${LIB_SUBSETS}base"
23870
23871 # Most term-driver calls are to tinfo, but some like init_pair are to the
23872 # base library (so it resides in base).
23873 if test "$with_term_driver" != no ; then
23874         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23875         case $cf_cv_system_name in
23876         (*mingw32*|*mingw64*)
23877                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23878                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23879                 ;;
23880         (*)
23881                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23882                 ;;
23883         esac
23884 fi
23885
23886 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23887 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23888
23889 echo "$as_me:23889: result: $LIB_SUBSETS" >&5
23890 echo "${ECHO_T}$LIB_SUBSETS" >&6
23891
23892 ### Construct the list of include-directories to be generated
23893
23894 if test "$srcdir" != "."; then
23895         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23896 fi
23897 CPPFLAGS="-I../include $CPPFLAGS"
23898 if test "$srcdir" != "."; then
23899         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23900 fi
23901 CPPFLAGS="-I. $CPPFLAGS"
23902
23903 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23904 if test "$srcdir" != "."; then
23905         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23906 fi
23907 if test "$GCC" != yes; then
23908         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23909 elif test "$includedir" != "/usr/include"; then
23910         if test "$includedir" = '${prefix}/include' ; then
23911                 if test x$prefix != x/usr ; then
23912                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23913                 fi
23914         else
23915                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23916         fi
23917 fi
23918
23919 ### Build up pieces for makefile rules
23920 echo "$as_me:23920: checking default library suffix" >&5
23921 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23922
23923         case $DFT_LWR_MODEL in
23924         (libtool) DFT_ARG_SUFFIX=''   ;;
23925         (normal)  DFT_ARG_SUFFIX=''   ;;
23926         (debug)   DFT_ARG_SUFFIX='_g' ;;
23927         (profile) DFT_ARG_SUFFIX='_p' ;;
23928         (shared)  DFT_ARG_SUFFIX=''   ;;
23929         esac
23930         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23931 echo "$as_me:23931: result: $DFT_ARG_SUFFIX" >&5
23932 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23933
23934 echo "$as_me:23934: checking default library-dependency suffix" >&5
23935 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23936
23937         case X$DFT_LWR_MODEL in
23938         (Xlibtool)
23939                 DFT_LIB_SUFFIX='.la'
23940                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23941                 ;;
23942         (Xdebug)
23943                 DFT_LIB_SUFFIX='_g.a'
23944                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23945                 ;;
23946         (Xprofile)
23947                 DFT_LIB_SUFFIX='_p.a'
23948                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23949                 ;;
23950         (Xshared)
23951                 case $cf_cv_system_name in
23952                 (aix[5-7]*)
23953                         DFT_LIB_SUFFIX='.so'
23954                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23955                         ;;
23956                 (cygwin*|msys*|mingw*)
23957                         DFT_LIB_SUFFIX='.dll'
23958                         DFT_DEP_SUFFIX='.dll.a'
23959                         ;;
23960                 (darwin*)
23961                         DFT_LIB_SUFFIX='.dylib'
23962                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23963                         ;;
23964                 (hpux*)
23965                         case $target in
23966                         (ia64*)
23967                                 DFT_LIB_SUFFIX='.so'
23968                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23969                                 ;;
23970                         (*)
23971                                 DFT_LIB_SUFFIX='.sl'
23972                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23973                                 ;;
23974                         esac
23975                         ;;
23976                 (*)
23977                         DFT_LIB_SUFFIX='.so'
23978                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23979                         ;;
23980                 esac
23981                 ;;
23982         (*)
23983                 DFT_LIB_SUFFIX='.a'
23984                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23985                 ;;
23986         esac
23987         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23988         then
23989                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23990                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23991         fi
23992 echo "$as_me:23992: result: $DFT_DEP_SUFFIX" >&5
23993 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23994
23995 echo "$as_me:23995: checking default object directory" >&5
23996 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23997
23998         case $DFT_LWR_MODEL in
23999         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
24000         (normal)  DFT_OBJ_SUBDIR='objects' ;;
24001         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
24002         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
24003         (shared)
24004                 case $cf_cv_system_name in
24005                 (cygwin|msys)
24006                         DFT_OBJ_SUBDIR='objects' ;;
24007                 (*)
24008                         DFT_OBJ_SUBDIR='obj_s' ;;
24009                 esac
24010         esac
24011 echo "$as_me:24011: result: $DFT_OBJ_SUBDIR" >&5
24012 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
24013
24014 if test "x$cf_with_cxx" = xyes ; then
24015 echo "$as_me:24015: checking c++ library-dependency suffix" >&5
24016 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
24017 if test "$with_libtool" != "no"; then
24018         # libtool thinks it can make c++ shared libraries (perhaps only g++)
24019         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24020 elif test "$with_shared_cxx" != "no"; then
24021         # also for g++ users...
24022         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24023 else
24024         # we normally make a static library because C/C++ library rules differ
24025
24026         case Xnormal in
24027         (Xlibtool)
24028                 CXX_LIB_SUFFIX='.la'
24029                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24030                 ;;
24031         (Xdebug)
24032                 CXX_LIB_SUFFIX='_g.a'
24033                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24034                 ;;
24035         (Xprofile)
24036                 CXX_LIB_SUFFIX='_p.a'
24037                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24038                 ;;
24039         (Xshared)
24040                 case $cf_cv_system_name in
24041                 (aix[5-7]*)
24042                         CXX_LIB_SUFFIX='.so'
24043                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24044                         ;;
24045                 (cygwin*|msys*|mingw*)
24046                         CXX_LIB_SUFFIX='.dll'
24047                         CXX_DEP_SUFFIX='.dll.a'
24048                         ;;
24049                 (darwin*)
24050                         CXX_LIB_SUFFIX='.dylib'
24051                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24052                         ;;
24053                 (hpux*)
24054                         case $target in
24055                         (ia64*)
24056                                 CXX_LIB_SUFFIX='.so'
24057                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24058                                 ;;
24059                         (*)
24060                                 CXX_LIB_SUFFIX='.sl'
24061                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24062                                 ;;
24063                         esac
24064                         ;;
24065                 (*)
24066                         CXX_LIB_SUFFIX='.so'
24067                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24068                         ;;
24069                 esac
24070                 ;;
24071         (*)
24072                 CXX_LIB_SUFFIX='.a'
24073                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24074                 ;;
24075         esac
24076         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24077         then
24078                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24079                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24080         fi
24081
24082 fi
24083 echo "$as_me:24083: result: $CXX_LIB_SUFFIX" >&5
24084 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24085
24086 fi
24087
24088 # do not want -ldl in build except as needed for -lncurses dependency
24089 if test "x$with_dlsym" = xyes ; then
24090 if test $DFT_LWR_MODEL = shared || \
24091    test $DFT_LWR_MODEL = libtool ; then
24092
24093 # remove dl library from $LIBS
24094 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24095
24096 fi
24097 fi
24098 ### Set up low-level terminfo dependencies for makefiles.
24099
24100 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24101 # do not need libdl
24102 TICS_LIST=
24103 if test "x$with_dlsym" = xyes ; then
24104
24105 # remove dl library from $SHLIB_LIST
24106 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24107
24108 fi
24109
24110 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24111 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24112 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24113 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24114 then
24115         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24116 fi
24117
24118 if test "$with_ticlib" != no ; then
24119
24120         if test "x$with_ticlib" != xyes ; then
24121                 TICS_NAME=$with_ticlib
24122                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24123                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24124                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24125                 TICS_LIB_SUFFIX="${with_ticlib}"
24126         else
24127                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24128                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24129                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24130                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24131         fi
24132         TICS_LDFLAGS="-L${LIB_DIR}"
24133         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24134 else
24135         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24136         TICS_LDFLAGS="-L${LIB_DIR}"
24137         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24138 fi
24139
24140 if test "$with_termlib" != no ; then
24141
24142         if test "x$with_termlib" != xyes ; then
24143                 TINFO_NAME=$with_termlib
24144                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24145                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24146                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24147                 TINFO_LIB_SUFFIX="${with_termlib}"
24148         else
24149                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24150                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24151                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24152                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24153         fi
24154
24155         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24156         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24157         if test "$DFT_LWR_MODEL" = "libtool"; then
24158                 TEST_ARGS="${TEST_DEPS}"
24159                 TEST_ARG2="${TEST_DEP2}"
24160                 TINFO_LDFLAGS="-L${LIB_DIR}"
24161                 TINFO_LIBS="$TEST_ARGS"
24162                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24163                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24164         else
24165                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24166                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24167                 if test "x$with_term_driver" != xno ; then
24168                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24169                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24170                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24171                 else
24172                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24173                         TINFO_LIBS="$TEST_ARGS"
24174                 fi
24175                 TINFO_LDFLAGS="-L${LIB_DIR}"
24176                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24177         fi
24178 else
24179         # the next lines are needed for linking libtic over libncurses
24180         TINFO_NAME=${LIB_NAME}
24181         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24182         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24183         if test "x$with_tic_depends" = xyes ; then
24184                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24185         else
24186                 TICS_LIST="$SHLIB_LIST"
24187         fi
24188
24189         TINFO_LDFLAGS="-L${LIB_DIR}"
24190         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24191 fi
24192
24193 if test "$DFT_LWR_MODEL" = shared ; then
24194         case $cf_cv_system_name in
24195         (cygwin*|msys*)
24196                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24197                 TINFO_SUFFIX=.dll
24198                 ;;
24199         esac
24200 fi
24201
24202 if test "x$with_dlsym" = xyes ; then
24203
24204 # remove dl library from $TICS_LIST
24205 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24206
24207 fi
24208
24209 if test "$DFT_LWR_MODEL" = "libtool"; then
24210         OBJEXT=lo
24211 fi
24212
24213 # needed for Ada95
24214 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24215
24216 case $DFT_LWR_MODEL in
24217 (normal|debug|profile)
24218
24219 if test "$GCC" = yes ; then
24220         case $cf_cv_system_name in
24221         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24222                 LDFLAGS_STATIC=
24223                 LDFLAGS_SHARED=
24224                 ;;
24225         (*)     # normally, except when broken
24226                 LDFLAGS_STATIC=-static
24227                 LDFLAGS_SHARED=-dynamic
24228                 ;;
24229         esac
24230 else
24231         case $cf_cv_system_name in
24232         (aix[4-7]*)     # from ld manpage
24233                 LDFLAGS_STATIC=-bstatic
24234                 LDFLAGS_SHARED=-bdynamic
24235                 ;;
24236         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24237                 # We could also use just "archive" and "shared".
24238                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24239                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24240                 ;;
24241         (irix*)         # from ld manpage IRIX64
24242                 LDFLAGS_STATIC=-Bstatic
24243                 LDFLAGS_SHARED=-Bdynamic
24244                 ;;
24245         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24246                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24247                 LDFLAGS_STATIC=-noso
24248                 LDFLAGS_SHARED=-so_archive
24249                 ;;
24250         (solaris2*)
24251                 LDFLAGS_STATIC=-Bstatic
24252                 LDFLAGS_SHARED=-Bdynamic
24253                 ;;
24254         esac
24255 fi
24256
24257 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24258 then
24259         echo "$as_me:24259: checking if linker supports switching between static/dynamic" >&5
24260 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24261
24262         rm -f libconftest.a
24263         cat >conftest.$ac_ext <<EOF
24264 #line 24264 "configure"
24265 #include <stdio.h>
24266 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24267 EOF
24268         if { (eval echo "$as_me:24268: \"$ac_compile\"") >&5
24269   (eval $ac_compile) 2>&5
24270   ac_status=$?
24271   echo "$as_me:24271: \$? = $ac_status" >&5
24272   (exit $ac_status); } ; then
24273                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24274                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24275         fi
24276         rm -f conftest.*
24277
24278         cf_save_LIBS="$LIBS"
24279
24280         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24281         cat >conftest.$ac_ext <<_ACEOF
24282 #line 24282 "configure"
24283 #include "confdefs.h"
24284
24285 #line 24285 "configure"
24286 #include <stdio.h>
24287 int cf_ldflags_static(FILE *fp);
24288
24289 int
24290 main (void)
24291 {
24292
24293         return cf_ldflags_static(stdin);
24294
24295   ;
24296   return 0;
24297 }
24298 _ACEOF
24299 rm -f conftest.$ac_objext conftest$ac_exeext
24300 if { (eval echo "$as_me:24300: \"$ac_link\"") >&5
24301   (eval $ac_link) 2>&5
24302   ac_status=$?
24303   echo "$as_me:24303: \$? = $ac_status" >&5
24304   (exit $ac_status); } &&
24305          { ac_try='test -s conftest$ac_exeext'
24306   { (eval echo "$as_me:24306: \"$ac_try\"") >&5
24307   (eval $ac_try) 2>&5
24308   ac_status=$?
24309   echo "$as_me:24309: \$? = $ac_status" >&5
24310   (exit $ac_status); }; }; then
24311
24312         # some linkers simply ignore the -dynamic
24313         case x`file conftest$ac_exeext 2>/dev/null` in
24314         (*static*)
24315                 cf_ldflags_static=no
24316                 ;;
24317         (*)
24318                 cf_ldflags_static=yes
24319                 ;;
24320         esac
24321
24322 else
24323   echo "$as_me: failed program was:" >&5
24324 cat conftest.$ac_ext >&5
24325 cf_ldflags_static=no
24326 fi
24327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24328
24329         rm -f libconftest.*
24330         LIBS="$cf_save_LIBS"
24331
24332         echo "$as_me:24332: result: $cf_ldflags_static" >&5
24333 echo "${ECHO_T}$cf_ldflags_static" >&6
24334
24335         if test $cf_ldflags_static != yes
24336         then
24337                 LDFLAGS_STATIC=
24338                 LDFLAGS_SHARED=
24339         fi
24340 else
24341         LDFLAGS_STATIC=
24342         LDFLAGS_SHARED=
24343 fi
24344
24345         ;;
24346 esac
24347
24348 echo "$as_me:24348: checking where we will install curses.h" >&5
24349 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24350
24351 includesubdir=
24352 if test "$with_overwrite" = no && \
24353  ( test "x$includedir" = 'x${prefix}/include' || \
24354    test "x$includedir" = "x${prefix}/include" )
24355 then
24356         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24357 fi
24358 echo "$as_me:24358: result: ${includedir}${includesubdir}" >&5
24359 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24360
24361 ### Resolve a conflict between normal and wide-curses by forcing applications
24362 ### that will need libutf8 to add it to their configure script.
24363 if test "$with_overwrite" != no ; then
24364 if test "$NCURSES_LIBUTF8" = 1 ; then
24365         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24366         { echo "$as_me:24366: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24367 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24368 fi
24369 fi
24370 WITH_OVERWRITE=$with_overwrite
24371
24372 # used to separate tack out of the tree
24373 NCURSES_TREE=
24374
24375 ### predefined stuff for the test programs
24376
24377 cat >>confdefs.h <<\EOF
24378 #define HAVE_SLK_COLOR 1
24379 EOF
24380
24381 ### Construct the list of subdirectories for which we'll customize makefiles
24382 ### with the appropriate compile-rules.
24383
24384 echo "$as_me:24384: checking for src modules" >&5
24385 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24386
24387 # dependencies and linker-arguments for test-programs
24388 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24389 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24390 if test "$DFT_LWR_MODEL" = "libtool"; then
24391         TEST_ARGS="${TEST_DEPS}"
24392         TEST_ARG2="${TEST_DEP2}"
24393 else
24394         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24395         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24396 fi
24397
24398 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24399 cf_cv_src_modules=
24400 for cf_dir in $modules_to_build
24401 do
24402         if test -f $srcdir/$cf_dir/modules; then
24403
24404                 # We may/may not have tack in the distribution, though the
24405                 # makefile is.
24406                 if test $cf_dir = tack ; then
24407                         if test "x$cf_with_tack" != "xyes"; then
24408                                 continue
24409                         fi
24410                 fi
24411
24412                 if test -z "$cf_cv_src_modules"; then
24413                         cf_cv_src_modules=$cf_dir
24414                 else
24415                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24416                 fi
24417
24418                 # Make the ncurses_cfg.h file record the library interface files as
24419                 # well.  These are header files that are the same name as their
24420                 # directory.  Ncurses is the only library that does not follow
24421                 # that pattern.
24422                 if test $cf_dir = tack ; then
24423                         continue
24424                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24425
24426 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24427
24428                         cat >>confdefs.h <<EOF
24429 #define HAVE_${cf_have_include}_H 1
24430 EOF
24431
24432                         cat >>confdefs.h <<EOF
24433 #define HAVE_LIB${cf_have_include} 1
24434 EOF
24435
24436                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24437                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24438                         if test "$DFT_LWR_MODEL" = "libtool"; then
24439                                 TEST_ARGS="${TEST_DEPS}"
24440                                 TEST_ARG2="${TEST_DEP2}"
24441                         else
24442                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24443                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24444                         fi
24445                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24446                 fi
24447         fi
24448 done
24449 echo "$as_me:24449: result: $cf_cv_src_modules" >&5
24450 echo "${ECHO_T}$cf_cv_src_modules" >&6
24451
24452 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24453 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24454
24455 SRC_SUBDIRS=
24456 if test "x$cf_with_manpages" != xno ; then
24457         SRC_SUBDIRS="$SRC_SUBDIRS man"
24458 fi
24459 SRC_SUBDIRS="$SRC_SUBDIRS include"
24460 for cf_dir in $cf_cv_src_modules
24461 do
24462         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24463 done
24464 if test "x$cf_with_tests" != "xno" ; then
24465         SRC_SUBDIRS="$SRC_SUBDIRS test"
24466 fi
24467 # always make this, to install the ncurses-config script
24468 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24469 if test "$cf_with_cxx_binding" != no; then
24470         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24471         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24472 fi
24473
24474 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24475 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24476
24477 ADA_SUBDIRS=
24478 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24479         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24480         ADA_SUBDIRS="gen src"
24481         if test "x$cf_with_tests" != "xno" ; then
24482                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24483         fi
24484 fi
24485
24486 SUB_MAKEFILES=
24487 for cf_dir in $SRC_SUBDIRS
24488 do
24489         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24490 done
24491
24492 if test -n "$ADA_SUBDIRS"; then
24493         for cf_dir in $ADA_SUBDIRS
24494         do
24495                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24496         done
24497
24498 fi
24499
24500 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24501    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24502    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24503 fi
24504
24505 DIRS_TO_MAKE="lib"
24506 for cf_item in $cf_list_models
24507 do
24508
24509         case $cf_item in
24510         (libtool) cf_subdir='obj_lo'  ;;
24511         (normal)  cf_subdir='objects' ;;
24512         (debug)   cf_subdir='obj_g' ;;
24513         (profile) cf_subdir='obj_p' ;;
24514         (shared)
24515                 case $cf_cv_system_name in
24516                 (cygwin|msys)
24517                         cf_subdir='objects' ;;
24518                 (*)
24519                         cf_subdir='obj_s' ;;
24520                 esac
24521         esac
24522
24523         for cf_item2 in $DIRS_TO_MAKE
24524         do
24525                 test $cf_item2 = $cf_subdir && break
24526         done
24527         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24528 done
24529 for cf_dir in $DIRS_TO_MAKE
24530 do
24531         test ! -d $cf_dir && mkdir $cf_dir
24532 done
24533
24534 # symbols that differ when compiling Ada95 by itself.
24535 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24536
24537 # values to use as strings
24538
24539 cat >>confdefs.h <<EOF
24540 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24541 EOF
24542
24543 cat >>confdefs.h <<EOF
24544 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24545 EOF
24546
24547 ### Now that we're done running tests, add the compiler-warnings, if any
24548
24549 cf_fix_cppflags=no
24550 cf_new_cflags=
24551 cf_new_cppflags=
24552 cf_new_extra_cppflags=
24553
24554 for cf_add_cflags in $EXTRA_CFLAGS
24555 do
24556 case $cf_fix_cppflags in
24557 (no)
24558         case $cf_add_cflags in
24559         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24560                 case $cf_add_cflags in
24561                 (-D*)
24562                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24563
24564                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24565                                 && test -z "${cf_tst_cflags}" \
24566                                 && cf_fix_cppflags=yes
24567
24568                         if test $cf_fix_cppflags = yes ; then
24569
24570         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24571         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24572
24573                                 continue
24574                         elif test "${cf_tst_cflags}" = "\"'" ; then
24575
24576         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24577         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24578
24579                                 continue
24580                         fi
24581                         ;;
24582                 esac
24583                 case "$CPPFLAGS" in
24584                 (*$cf_add_cflags)
24585                         ;;
24586                 (*)
24587                         case $cf_add_cflags in
24588                         (-D*)
24589                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24590
24591 CPPFLAGS=`echo "$CPPFLAGS" | \
24592         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24593                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24594
24595                                 ;;
24596                         esac
24597
24598         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24599         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24600
24601                         ;;
24602                 esac
24603                 ;;
24604         (*)
24605
24606         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24607         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24608
24609                 ;;
24610         esac
24611         ;;
24612 (yes)
24613
24614         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24615         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24616
24617         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24618
24619         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24620                 && test -z "${cf_tst_cflags}" \
24621                 && cf_fix_cppflags=no
24622         ;;
24623 esac
24624 done
24625
24626 if test -n "$cf_new_cflags" ; then
24627
24628         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24629         CFLAGS="${CFLAGS}$cf_new_cflags"
24630
24631 fi
24632
24633 if test -n "$cf_new_cppflags" ; then
24634
24635         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24636         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24637
24638 fi
24639
24640 if test -n "$cf_new_extra_cppflags" ; then
24641
24642         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24643         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24644
24645 fi
24646
24647 ### Define substitutions for header files to avoid name-pollution
24648
24649 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24650         HAVE_TCGETATTR=1
24651 else
24652         HAVE_TCGETATTR=0
24653 fi
24654
24655 if test "x$ac_cv_header_stdint_h" = xyes ; then
24656         HAVE_STDINT_H=1
24657 else
24658         HAVE_STDINT_H=0
24659 fi
24660
24661 if test "x$ac_cv_header_termio_h" = xyes ; then
24662         HAVE_TERMIO_H=1
24663 else
24664         HAVE_TERMIO_H=0
24665 fi
24666
24667 if test "x$ac_cv_header_termios_h" = xyes ; then
24668         HAVE_TERMIOS_H=1
24669 else
24670         HAVE_TERMIOS_H=0
24671 fi
24672
24673 ################################################################################
24674 test "x$use_database" = xyes && \
24675 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24676
24677 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24678 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24679
24680 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24681 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24682 fi
24683
24684 # Extract the first word of "tic", so it can be a program name with args.
24685 set dummy tic; ac_word=$2
24686 echo "$as_me:24686: checking for $ac_word" >&5
24687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24688 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24689   echo $ECHO_N "(cached) $ECHO_C" >&6
24690 else
24691   case $TIC_PATH in
24692   [\\/]* | ?:[\\/]*)
24693   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24694   ;;
24695   *)
24696   ac_save_IFS=$IFS; IFS=$ac_path_separator
24697 ac_dummy="$PATH:/usr/local/ncurses/bin"
24698 for ac_dir in $ac_dummy; do
24699   IFS=$ac_save_IFS
24700   test -z "$ac_dir" && ac_dir=.
24701   if $as_executable_p "$ac_dir/$ac_word"; then
24702    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24703    echo "$as_me:24703: found $ac_dir/$ac_word" >&5
24704    break
24705 fi
24706 done
24707
24708   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24709   ;;
24710 esac
24711 fi
24712 TIC_PATH=$ac_cv_path_TIC_PATH
24713
24714 if test -n "$TIC_PATH"; then
24715   echo "$as_me:24715: result: $TIC_PATH" >&5
24716 echo "${ECHO_T}$TIC_PATH" >&6
24717 else
24718   echo "$as_me:24718: result: no" >&5
24719 echo "${ECHO_T}no" >&6
24720 fi
24721
24722 if test -n "$FALLBACK_LIST"
24723 then
24724         if test "$TIC_PATH" = unknown
24725         then
24726                 { echo "$as_me:24726: WARNING: no tic program found for fallbacks" >&5
24727 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24728         fi
24729 fi
24730
24731 if test "x$cf_with_tests" != xno ; then
24732         MAKE_TESTS=
24733 else
24734         MAKE_TESTS="#"
24735 fi
24736
24737 ADAHTML_DIR=../../doc/html/ada
24738
24739 # these could be configurable, but are not currently
24740 PANEL_NAME=panel
24741 MENU_NAME=menu
24742 FORM_NAME=form
24743 CXX_NAME=ncurses++
24744
24745 # workaround for OS/2 (20151017)
24746 case $cf_cv_system_name in
24747 (os2*)
24748         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24749         ;;
24750 (*)
24751         LIBTOOL_OPTS_CXX=
24752         ;;
24753 esac
24754
24755 # workaround for g++ versus Solaris (20131116)
24756 case $cf_cv_system_name in
24757 (solaris2*)
24758         case "x$CPPFLAGS" in
24759         (*-D_XOPEN_SOURCE_EXTENDED*)
24760                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24761
24762 echo "${as_me:-configure}:24762: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24763
24764                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24765                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24766                 ;;
24767         esac
24768         ;;
24769 esac
24770
24771 # Help to automatically enable the extended curses features when using either
24772 # the *-config or the ".pc" files by adding defines.
24773 echo "$as_me:24773: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24774 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24775 PKG_CFLAGS=
24776 for cf_loop1 in $CPPFLAGS_after_XOPEN
24777 do
24778         cf_found=no
24779         for cf_loop2 in $CPPFLAGS_before_XOPEN
24780         do
24781                 if test "x$cf_loop1" = "x$cf_loop2"
24782                 then
24783                         cf_found=yes
24784                         break
24785                 fi
24786         done
24787         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24788 done
24789 echo "$as_me:24789: result: $PKG_CFLAGS" >&5
24790 echo "${ECHO_T}$PKG_CFLAGS" >&6
24791
24792 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24793 case "x$NCURSES_OSPEED" in
24794 (*short*)
24795         cf_compatible=1
24796         ;;
24797 (*)
24798         cf_compatible=0
24799         ;;
24800 esac
24801
24802 cat >>confdefs.h <<EOF
24803 #define NCURSES_OSPEED_COMPAT $cf_compatible
24804 EOF
24805
24806 case "x$cf_cv_typeof_chtype" in
24807 (xshort|xint|xlong)
24808         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24809         ;;
24810 esac
24811
24812 case "x$cf_cv_typeof_mmask_t" in
24813 (xshort|xint|xlong)
24814         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24815         ;;
24816 esac
24817
24818 # substitute into misc/Makefile to suppress
24819 # (un)install.data from the
24820 # (un)install rules.
24821 if test "x$cf_with_db_install" = "xno"; then
24822         MISC_INSTALL_DATA=
24823         MISC_UNINSTALL_DATA=
24824 else
24825         MISC_INSTALL_DATA=install.data
24826         MISC_UNINSTALL_DATA=uninstall.data
24827 fi
24828
24829 SUB_SCRIPTS=
24830
24831 if test -n "$PACKAGE"
24832 then
24833         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24834         export PACKAGE
24835         echo "package: $PACKAGE"
24836 fi
24837
24838 UNALTERED_SYMS=
24839 cf_filter_syms=no
24840
24841 if test -n "$RESULTING_SYMS"
24842 then
24843         cf_filter_syms=$cf_dft_filter_syms
24844         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24845
24846 echo "${as_me:-configure}:24846: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24847
24848 fi
24849
24850 if test "x$WILDCARD_SYMS" = xno
24851 then
24852         cf_filter_syms=yes
24853 fi
24854
24855 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24856
24857 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24858 if test $cf_filter_syms = yes
24859 then
24860         RESULTING_SYMS=resulting.map
24861 fi
24862
24863 if test "x$cross_compiling" = xyes ; then
24864         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24865         CHECK_BUILD="#"
24866 else
24867         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24868         CHECK_BUILD=
24869 fi
24870
24871 cat >>confdefs.h <<\EOF
24872 #define HAVE_CURSES_DATA_BOOLNAMES 1
24873 EOF
24874
24875 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
24876 ac_config_commands="$ac_config_commands default"
24877 cat >confcache <<\_ACEOF
24878 # This file is a shell script that caches the results of configure
24879 # tests run on this system so they can be shared between configure
24880 # scripts and configure runs, see configure's option --config-cache.
24881 # It is not useful on other systems.  If it contains results you don't
24882 # want to keep, you may remove or edit it.
24883 #
24884 # config.status only pays attention to the cache file if you give it
24885 # the --recheck option to rerun configure.
24886 #
24887 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24888 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24889 # following values.
24890
24891 _ACEOF
24892
24893 # The following way of writing the cache mishandles newlines in values,
24894 # but we know of no workaround that is simple, portable, and efficient.
24895 # So, don't put newlines in cache variables' values.
24896 # Ultrix sh set writes to stderr and can't be redirected directly,
24897 # and sets the high bit in the cache file unless we assign to the vars.
24898 {
24899   (set) 2>&1 |
24900     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24901     *ac_space=\ *)
24902       # `set' does not quote correctly, so add quotes (double-quote
24903       # substitution turns \\\\ into \\, and sed turns \\ into \).
24904       sed -n \
24905         "s/'/'\\\\''/g;
24906           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24907       ;;
24908     *)
24909       # `set' quotes correctly as required by POSIX, so do not add quotes.
24910       sed -n \
24911         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24912       ;;
24913     esac;
24914 } |
24915   sed '
24916      t clear
24917      : clear
24918      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24919      t end
24920      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24921      : end' >>confcache
24922 if cmp -s $cache_file confcache; then :; else
24923   if test -w $cache_file; then
24924     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24925     cat confcache >$cache_file
24926   else
24927     echo "not updating unwritable cache $cache_file"
24928   fi
24929 fi
24930 rm -f confcache
24931
24932 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24933 # Let make expand exec_prefix.
24934 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24935
24936 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24937 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24938 # trailing colons and then remove the whole line if VPATH becomes empty
24939 # (actually we leave an empty line to preserve line numbers).
24940 if test "x$srcdir" = x.; then
24941   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24942 s/:*\$(srcdir):*/:/;
24943 s/:*\${srcdir}:*/:/;
24944 s/:*@srcdir@:*/:/;
24945 s/^\([^=]*=[    ]*\):*/\1/;
24946 s/:*$//;
24947 s/^[^=]*=[      ]*$//;
24948 }'
24949 fi
24950
24951 DEFS=-DHAVE_CONFIG_H
24952
24953 : ${CONFIG_STATUS=./config.status}
24954 ac_clean_files_save=$ac_clean_files
24955 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24956 { echo "$as_me:24956: creating $CONFIG_STATUS" >&5
24957 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24958 cat >$CONFIG_STATUS <<_ACEOF
24959 #! $SHELL
24960 # Generated automatically by configure.
24961 # Run this file to recreate the current configuration.
24962 # Compiler output produced by configure, useful for debugging
24963 # configure, is in config.log if it exists.
24964
24965 debug=false
24966 SHELL=\${CONFIG_SHELL-$SHELL}
24967 ac_cs_invocation="\$0 \$@"
24968
24969 _ACEOF
24970
24971 cat >>$CONFIG_STATUS <<\_ACEOF
24972 # Be Bourne compatible
24973 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24974   emulate sh
24975   NULLCMD=:
24976 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24977   set -o posix
24978 fi
24979
24980 # Name of the executable.
24981 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24982
24983 if expr a : '\(a\)' >/dev/null 2>&1; then
24984   as_expr=expr
24985 else
24986   as_expr=false
24987 fi
24988
24989 rm -f conf$$ conf$$.exe conf$$.file
24990 echo >conf$$.file
24991 if ln -s conf$$.file conf$$ 2>/dev/null; then
24992   # We could just check for DJGPP; but this test a) works b) is more generic
24993   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24994   if test -f conf$$.exe; then
24995     # Don't use ln at all; we don't have any links
24996     as_ln_s='cp -p'
24997   else
24998     as_ln_s='ln -s'
24999   fi
25000 elif ln conf$$.file conf$$ 2>/dev/null; then
25001   as_ln_s=ln
25002 else
25003   as_ln_s='cp -p'
25004 fi
25005 rm -f conf$$ conf$$.exe conf$$.file
25006
25007 as_executable_p="test -f"
25008
25009 # Support unset when possible.
25010 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25011   as_unset=unset
25012 else
25013   as_unset=false
25014 fi
25015
25016 # NLS nuisances.
25017 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25018 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25019 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25020 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25021 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25022 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25023 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25024 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25025
25026 # IFS
25027 # We need space, tab and new line, in precisely that order.
25028 as_nl='
25029 '
25030 IFS="   $as_nl"
25031
25032 # CDPATH.
25033 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25034
25035 exec 6>&1
25036
25037 _ACEOF
25038
25039 # Files that config.status was made for.
25040 if test -n "$ac_config_files"; then
25041   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25042 fi
25043
25044 if test -n "$ac_config_headers"; then
25045   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25046 fi
25047
25048 if test -n "$ac_config_links"; then
25049   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25050 fi
25051
25052 if test -n "$ac_config_commands"; then
25053   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25054 fi
25055
25056 cat >>$CONFIG_STATUS <<\EOF
25057
25058 ac_cs_usage="\
25059 \`$as_me' instantiates files from templates according to the
25060 current configuration.
25061
25062 Usage: $0 [OPTIONS] [FILE]...
25063
25064   -h, --help       print this help, then exit
25065   -V, --version    print version number, then exit
25066   -d, --debug      don't remove temporary files
25067       --recheck    update $as_me by reconfiguring in the same conditions
25068   --file=FILE[:TEMPLATE]
25069                    instantiate the configuration file FILE
25070   --header=FILE[:TEMPLATE]
25071                    instantiate the configuration header FILE
25072
25073 Configuration files:
25074 $config_files
25075
25076 Configuration headers:
25077 $config_headers
25078
25079 Configuration commands:
25080 $config_commands
25081
25082 Report bugs to <dickey@invisible-island.net>."
25083 EOF
25084
25085 cat >>$CONFIG_STATUS <<EOF
25086 ac_cs_version="\\
25087 config.status
25088 configured by $0, generated by GNU Autoconf 2.52.20181006,
25089   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25090
25091 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25092 Free Software Foundation, Inc.
25093 This config.status script is free software; the Free Software Foundation
25094 gives unlimited permission to copy, distribute and modify it."
25095 srcdir=$srcdir
25096 INSTALL="$INSTALL"
25097 EOF
25098
25099 cat >>$CONFIG_STATUS <<\EOF
25100 # If no file are specified by the user, then we need to provide default
25101 # value.  By we need to know if files were specified by the user.
25102 ac_need_defaults=:
25103 while test $# != 0
25104 do
25105   case $1 in
25106   --*=*)
25107     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25108     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25109     shift
25110     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25111     shift
25112     ;;
25113   -*);;
25114   *) # This is not an option, so the user has probably given explicit
25115      # arguments.
25116      ac_need_defaults=false;;
25117   esac
25118
25119   case $1 in
25120   # Handling of the options.
25121 EOF
25122 cat >>$CONFIG_STATUS <<EOF
25123   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25124     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25125     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25126 EOF
25127 cat >>$CONFIG_STATUS <<\EOF
25128   --version | --vers* | -V )
25129     echo "$ac_cs_version"; exit 0 ;;
25130   --he | --h)
25131     # Conflict between --help and --header
25132     { { echo "$as_me:25132: error: ambiguous option: $1
25133 Try \`$0 --help' for more information." >&5
25134 echo "$as_me: error: ambiguous option: $1
25135 Try \`$0 --help' for more information." >&2;}
25136    { (exit 1); exit 1; }; };;
25137   --help | --hel | -h )
25138     echo "$ac_cs_usage"; exit 0 ;;
25139   --debug | --d* | -d )
25140     debug=: ;;
25141   --file | --fil | --fi | --f )
25142     shift
25143     CONFIG_FILES="$CONFIG_FILES $1"
25144     ac_need_defaults=false;;
25145   --header | --heade | --head | --hea )
25146     shift
25147     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25148     ac_need_defaults=false;;
25149
25150   # This is an error.
25151   -*) { { echo "$as_me:25151: error: unrecognized option: $1
25152 Try \`$0 --help' for more information." >&5
25153 echo "$as_me: error: unrecognized option: $1
25154 Try \`$0 --help' for more information." >&2;}
25155    { (exit 1); exit 1; }; } ;;
25156
25157   *) ac_config_targets="$ac_config_targets $1" ;;
25158
25159   esac
25160   shift
25161 done
25162
25163 exec 5>>config.log
25164 cat >&5 << _ACEOF
25165
25166 ## ----------------------- ##
25167 ## Running config.status.  ##
25168 ## ----------------------- ##
25169
25170 This file was extended by $as_me 2.52.20181006, executed with
25171   CONFIG_FILES    = $CONFIG_FILES
25172   CONFIG_HEADERS  = $CONFIG_HEADERS
25173   CONFIG_LINKS    = $CONFIG_LINKS
25174   CONFIG_COMMANDS = $CONFIG_COMMANDS
25175   > $ac_cs_invocation
25176 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25177
25178 _ACEOF
25179 EOF
25180
25181 cat >>$CONFIG_STATUS <<EOF
25182 #
25183 # INIT-COMMANDS section.
25184 #
25185
25186 ### Special initialization commands, used to pass information from the
25187 ### configuration-run into config.status
25188
25189 AWK="$AWK"
25190 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25191 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25192 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25193 ECHO_LD="$ECHO_LD"
25194 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25195 LDCONFIG="$LDCONFIG"
25196 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25197 LIB_NAME="$LIB_NAME"
25198 LIB_PREFIX="$LIB_PREFIX"
25199 LIB_SUBSETS="$LIB_SUBSETS"
25200 LIB_SUFFIX="$LIB_SUFFIX"
25201 LIB_TRACING="$LIB_TRACING"
25202 LN_S="$LN_S"
25203 MAKE_TERMINFO="$MAKE_TERMINFO"
25204 NCURSES_MAJOR="$NCURSES_MAJOR"
25205 NCURSES_MINOR="$NCURSES_MINOR"
25206 NCURSES_OSPEED="$NCURSES_OSPEED"
25207 NCURSES_PATCH="$NCURSES_PATCH"
25208 SRC_SUBDIRS="$SRC_SUBDIRS"
25209 TERMINFO="$TERMINFO"
25210 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25211 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25212 TICS_NAME="$TICS_NAME"
25213 TICS_SUFFIX="$TICS_SUFFIX"
25214 TIC_PATH="$TIC_PATH"
25215 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25216 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25217 TINFO_NAME="$TINFO_NAME"
25218 TINFO_SUFFIX="$TINFO_SUFFIX"
25219 UNALTERED_SYMS="$UNALTERED_SYMS"
25220 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25221 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25222 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25223 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25224 WILDCARD_SYMS="$WILDCARD_SYMS"
25225 WITH_CURSES_H="$with_curses_h"
25226 WITH_ECHO="${enable_echo:=yes}"
25227 WITH_OVERWRITE="$with_overwrite"
25228 cf_LIST_MODELS="$cf_list_models"
25229 cf_cv_abi_version="$cf_cv_abi_version"
25230 cf_cv_do_relink="$cf_cv_do_relink"
25231 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25232 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25233 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25234 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25235 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25236 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25237 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25238 cf_cv_rel_version="$cf_cv_rel_version"
25239 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25240 cf_cv_shared_soname='$cf_cv_shared_soname'
25241 cf_cv_shlib_version="$cf_cv_shlib_version"
25242 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25243 cf_cv_system_name="$cf_cv_system_name"
25244 cf_cv_term_driver="$with_term_driver"
25245 cf_with_ada="$cf_with_ada"
25246 cf_with_cxx_binding="$cf_with_cxx_binding"
25247 cf_with_db_install="$cf_with_db_install"
25248 cf_with_manpages="$cf_with_manpages"
25249 cf_with_tests="$cf_with_tests"
25250 host="$host"
25251 target="$target"
25252 with_shared_cxx="$with_shared_cxx"
25253
25254 EOF
25255
25256 cat >>$CONFIG_STATUS <<\EOF
25257 for ac_config_target in $ac_config_targets
25258 do
25259   case "$ac_config_target" in
25260   # Handling of arguments.
25261   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25262   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25263   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25264   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25265   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25266   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25267   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25268   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25269   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25270   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25271   *) { { echo "$as_me:25271: error: invalid argument: $ac_config_target" >&5
25272 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25273    { (exit 1); exit 1; }; };;
25274   esac
25275 done
25276
25277 # If the user did not use the arguments to specify the items to instantiate,
25278 # then the envvar interface is used.  Set only those that are not.
25279 # We use the long form for the default assignment because of an extremely
25280 # bizarre bug on SunOS 4.1.3.
25281 if $ac_need_defaults; then
25282   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25283   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25284   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25285 fi
25286
25287 # Create a temporary directory, and hook for its removal unless debugging.
25288 $debug ||
25289 {
25290   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25291   trap '{ (exit 1); exit 1; }' 1 2 13 15
25292 }
25293
25294 # Create a (secure) tmp directory for tmp files.
25295 : ${TMPDIR=/tmp}
25296 {
25297   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25298   test -n "$tmp" && test -d "$tmp"
25299 }  ||
25300 {
25301   tmp=$TMPDIR/cs$$-$RANDOM
25302   (umask 077 && mkdir $tmp)
25303 } ||
25304 {
25305    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25306    { (exit 1); exit 1; }
25307 }
25308
25309 EOF
25310
25311 cat >>$CONFIG_STATUS <<EOF
25312
25313 #
25314 # CONFIG_FILES section.
25315 #
25316
25317 # No need to generate the scripts if there are no CONFIG_FILES.
25318 # This happens for instance when ./config.status config.h
25319 if test -n "\$CONFIG_FILES"; then
25320   # Protect against being on the right side of a sed subst in config.status.
25321   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25322    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25323 s,@SHELL@,$SHELL,;t t
25324 s,@exec_prefix@,$exec_prefix,;t t
25325 s,@prefix@,$prefix,;t t
25326 s,@program_transform_name@,$program_transform_name,;t t
25327 s,@bindir@,$bindir,;t t
25328 s,@sbindir@,$sbindir,;t t
25329 s,@libexecdir@,$libexecdir,;t t
25330 s,@datarootdir@,$datarootdir,;t t
25331 s,@datadir@,$datadir,;t t
25332 s,@sysconfdir@,$sysconfdir,;t t
25333 s,@sharedstatedir@,$sharedstatedir,;t t
25334 s,@localstatedir@,$localstatedir,;t t
25335 s,@runstatedir@,$runstatedir,;t t
25336 s,@libdir@,$libdir,;t t
25337 s,@includedir@,$includedir,;t t
25338 s,@oldincludedir@,$oldincludedir,;t t
25339 s,@infodir@,$infodir,;t t
25340 s,@mandir@,$mandir,;t t
25341 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25342 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25343 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25344 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25345 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25346 s,@build_alias@,$build_alias,;t t
25347 s,@host_alias@,$host_alias,;t t
25348 s,@target_alias@,$target_alias,;t t
25349 s,@ECHO_C@,$ECHO_C,;t t
25350 s,@ECHO_N@,$ECHO_N,;t t
25351 s,@ECHO_T@,$ECHO_T,;t t
25352 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25353 s,@DEFS@,$DEFS,;t t
25354 s,@LIBS@,$LIBS,;t t
25355 s,@top_builddir@,$top_builddir,;t t
25356 s,@EGREP@,$EGREP,;t t
25357 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25358 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25359 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25360 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25361 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25362 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25363 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25364 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25365 s,@VERSION@,$VERSION,;t t
25366 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25367 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25368 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25369 s,@PACKAGE@,$PACKAGE,;t t
25370 s,@build@,$build,;t t
25371 s,@build_cpu@,$build_cpu,;t t
25372 s,@build_vendor@,$build_vendor,;t t
25373 s,@build_os@,$build_os,;t t
25374 s,@host@,$host,;t t
25375 s,@host_cpu@,$host_cpu,;t t
25376 s,@host_vendor@,$host_vendor,;t t
25377 s,@host_os@,$host_os,;t t
25378 s,@target@,$target,;t t
25379 s,@target_cpu@,$target_cpu,;t t
25380 s,@target_vendor@,$target_vendor,;t t
25381 s,@target_os@,$target_os,;t t
25382 s,@CC@,$CC,;t t
25383 s,@CFLAGS@,$CFLAGS,;t t
25384 s,@LDFLAGS@,$LDFLAGS,;t t
25385 s,@CPPFLAGS@,$CPPFLAGS,;t t
25386 s,@ac_ct_CC@,$ac_ct_CC,;t t
25387 s,@EXEEXT@,$EXEEXT,;t t
25388 s,@OBJEXT@,$OBJEXT,;t t
25389 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25390 s,@CPP@,$CPP,;t t
25391 s,@LDCONFIG@,$LDCONFIG,;t t
25392 s,@CXX@,$CXX,;t t
25393 s,@CXXFLAGS@,$CXXFLAGS,;t t
25394 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25395 s,@AWK@,$AWK,;t t
25396 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25397 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25398 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25399 s,@LINT@,$LINT,;t t
25400 s,@LINT_OPTS@,$LINT_OPTS,;t t
25401 s,@LN_S@,$LN_S,;t t
25402 s,@cf_config_suffix@,$cf_config_suffix,;t t
25403 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25404 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25405 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25406 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25407 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25408 s,@SET_MAKE@,$SET_MAKE,;t t
25409 s,@CTAGS@,$CTAGS,;t t
25410 s,@ETAGS@,$ETAGS,;t t
25411 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25412 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25413 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25414 s,@RANLIB@,$RANLIB,;t t
25415 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25416 s,@LD@,$LD,;t t
25417 s,@ac_ct_LD@,$ac_ct_LD,;t t
25418 s,@AR@,$AR,;t t
25419 s,@ac_ct_AR@,$ac_ct_AR,;t t
25420 s,@NM@,$NM,;t t
25421 s,@ac_ct_NM@,$ac_ct_NM,;t t
25422 s,@ARFLAGS@,$ARFLAGS,;t t
25423 s,@DESTDIR@,$DESTDIR,;t t
25424 s,@BUILD_CC@,$BUILD_CC,;t t
25425 s,@BUILD_CPP@,$BUILD_CPP,;t t
25426 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25427 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25428 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25429 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25430 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25431 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25432 s,@cf_list_models@,$cf_list_models,;t t
25433 s,@ABI_VERSION@,$ABI_VERSION,;t t
25434 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25435 s,@LIBTOOL@,$LIBTOOL,;t t
25436 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25437 s,@LT_UNDEF@,$LT_UNDEF,;t t
25438 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25439 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25440 s,@LIB_CREATE@,$LIB_CREATE,;t t
25441 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25442 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25443 s,@LIB_PREP@,$LIB_PREP,;t t
25444 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25445 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25446 s,@LIB_LINK@,$LIB_LINK,;t t
25447 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25448 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25449 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25450 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25451 s,@TICS_NAME@,$TICS_NAME,;t t
25452 s,@TINFO_NAME@,$TINFO_NAME,;t t
25453 s,@LIB_NAME@,$LIB_NAME,;t t
25454 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25455 s,@CC_G_OPT@,$CC_G_OPT,;t t
25456 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25457 s,@LD_MODEL@,$LD_MODEL,;t t
25458 s,@shlibdir@,$shlibdir,;t t
25459 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25460 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25461 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25462 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25463 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25464 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25465 s,@LINK_PROGS@,$LINK_PROGS,;t t
25466 s,@LINK_TESTS@,$LINK_TESTS,;t t
25467 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25468 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25469 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25470 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25471 s,@RPATH_LIST@,$RPATH_LIST,;t t
25472 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25473 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25474 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25475 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25476 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25477 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25478 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25479 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25480 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25481 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25482 s,@XTERM_KBS@,$XTERM_KBS,;t t
25483 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25484 s,@TERMINFO@,$TERMINFO,;t t
25485 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25486 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25487 s,@TERMPATH@,$TERMPATH,;t t
25488 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25489 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25490 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25491 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25492 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25493 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25494 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25495 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25496 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25497 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25498 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25499 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25500 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25501 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25502 s,@RGB_PATH@,$RGB_PATH,;t t
25503 s,@no_x11_rgb@,$no_x11_rgb,;t t
25504 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25505 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25506 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25507 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25508 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25509 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25510 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25511 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25512 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25513 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25514 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25515 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25516 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25517 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25518 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25519 s,@PTHREAD@,$PTHREAD,;t t
25520 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25521 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25522 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25523 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25524 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25525 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25526 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25527 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25528 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25529 s,@ECHO_LT@,$ECHO_LT,;t t
25530 s,@ECHO_LD@,$ECHO_LD,;t t
25531 s,@RULE_CC@,$RULE_CC,;t t
25532 s,@SHOW_CC@,$SHOW_CC,;t t
25533 s,@ECHO_CC@,$ECHO_CC,;t t
25534 s,@ECHO_LINK@,$ECHO_LINK,;t t
25535 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25536 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25537 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25538 s,@ADAFLAGS@,$ADAFLAGS,;t t
25539 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25540 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25541 s,@ADA_TRACE@,$ADA_TRACE,;t t
25542 s,@MATH_LIB@,$MATH_LIB,;t t
25543 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25544 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25545 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25546 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25547 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25548 s,@TEST_LIBS@,$TEST_LIBS,;t t
25549 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25550 s,@CXXCPP@,$CXXCPP,;t t
25551 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25552 s,@CXX_AR@,$CXX_AR,;t t
25553 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25554 s,@CXXLIBS@,$CXXLIBS,;t t
25555 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25556 s,@gnatmake_exists@,$gnatmake_exists,;t t
25557 s,@gprconfig_exists@,$gprconfig_exists,;t t
25558 s,@M4_exists@,$M4_exists,;t t
25559 s,@cf_ada_make@,$cf_ada_make,;t t
25560 s,@cf_ada_config@,$cf_ada_config,;t t
25561 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25562 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25563 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25564 s,@cf_compile_generics@,$cf_compile_generics,;t t
25565 s,@cf_generic_objects@,$cf_generic_objects,;t t
25566 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25567 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25568 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25569 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25570 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25571 s,@cf_ada_package@,$cf_ada_package,;t t
25572 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25573 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25574 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25575 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25576 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25577 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25578 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25579 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25580 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25581 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25582 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25583 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25584 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25585 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25586 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25587 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25588 s,@TICS_LIBS@,$TICS_LIBS,;t t
25589 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25590 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25591 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25592 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25593 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25594 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25595 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25596 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25597 s,@includesubdir@,$includesubdir,;t t
25598 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25599 s,@TICS_LIST@,$TICS_LIST,;t t
25600 s,@TINFO_LIST@,$TINFO_LIST,;t t
25601 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25602 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25603 s,@TEST_ARGS@,$TEST_ARGS,;t t
25604 s,@TEST_DEPS@,$TEST_DEPS,;t t
25605 s,@TEST_ARG2@,$TEST_ARG2,;t t
25606 s,@TEST_DEP2@,$TEST_DEP2,;t t
25607 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25608 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25609 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25610 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25611 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25612 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25613 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25614 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25615 s,@cross_compiling@,$cross_compiling,;t t
25616 s,@TIC_PATH@,$TIC_PATH,;t t
25617 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25618 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25619 s,@PANEL_NAME@,$PANEL_NAME,;t t
25620 s,@MENU_NAME@,$MENU_NAME,;t t
25621 s,@FORM_NAME@,$FORM_NAME,;t t
25622 s,@CXX_NAME@,$CXX_NAME,;t t
25623 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25624 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25625 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25626 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25627 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25628 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25629 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25630 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25631 CEOF
25632
25633 EOF
25634
25635   cat >>$CONFIG_STATUS <<\EOF
25636   # Split the substitutions into bite-sized pieces for seds with
25637   # small command number limits, like on Digital OSF/1 and HP-UX.
25638   ac_max_sed_lines=48
25639   ac_sed_frag=1 # Number of current file.
25640   ac_beg=1 # First line for current file.
25641   ac_end=$ac_max_sed_lines # Line after last line for current file.
25642   ac_more_lines=:
25643   ac_sed_cmds=
25644   while $ac_more_lines; do
25645     if test $ac_beg -gt 1; then
25646       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25647     else
25648       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25649     fi
25650     if test ! -s $tmp/subs.frag; then
25651       ac_more_lines=false
25652     else
25653       # The purpose of the label and of the branching condition is to
25654       # speed up the sed processing (if there are no `@' at all, there
25655       # is no need to browse any of the substitutions).
25656       # These are the two extra sed commands mentioned above.
25657       (echo ':t
25658   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25659       # It is possible to make a multiline substitution using escaped newlines.
25660       # Ensure that we do not split the substitution between script fragments.
25661       ac_BEG=$ac_end
25662       ac_END=`expr $ac_end + $ac_max_sed_lines`
25663       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25664       if test -s $tmp/subs.next; then
25665         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25666         if test ! -s $tmp/subs.edit; then
25667           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25668           if test ! -s $tmp/subs.edit; then
25669             if test $ac_beg -gt 1; then
25670               ac_end=`expr $ac_end - 1`
25671               continue
25672             fi
25673           fi
25674         fi
25675       fi
25676
25677       if test -z "$ac_sed_cmds"; then
25678         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25679       else
25680         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25681       fi
25682       ac_sed_frag=`expr $ac_sed_frag + 1`
25683       ac_beg=$ac_end
25684       ac_end=`expr $ac_end + $ac_max_sed_lines`
25685     fi
25686   done
25687   if test -z "$ac_sed_cmds"; then
25688     ac_sed_cmds=cat
25689   fi
25690 fi # test -n "$CONFIG_FILES"
25691
25692 EOF
25693 cat >>$CONFIG_STATUS <<\EOF
25694 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25695   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25696   case $ac_file in
25697   - | *:- | *:-:* ) # input from stdin
25698         cat >$tmp/stdin
25699         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25700         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25701   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25702         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25703   * )   ac_file_in=$ac_file.in ;;
25704   esac
25705
25706   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25707   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25708          X"$ac_file" : 'X\(//\)[^/]' \| \
25709          X"$ac_file" : 'X\(//\)$' \| \
25710          X"$ac_file" : 'X\(/\)' \| \
25711          .     : '\(.\)' 2>/dev/null ||
25712 echo X"$ac_file" |
25713     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25714           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25715           /^X\(\/\/\)$/{ s//\1/; q; }
25716           /^X\(\/\).*/{ s//\1/; q; }
25717           s/.*/./; q'`
25718   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25719     { case "$ac_dir" in
25720   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25721   *)                      as_incr_dir=.;;
25722 esac
25723 as_dummy="$ac_dir"
25724 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25725   case $as_mkdir_dir in
25726     # Skip DOS drivespec
25727     ?:) as_incr_dir=$as_mkdir_dir ;;
25728     *)
25729       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25730       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25731     ;;
25732   esac
25733 done; }
25734
25735     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25736     # A "../" for each directory in $ac_dir_suffix.
25737     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25738   else
25739     ac_dir_suffix= ac_dots=
25740   fi
25741
25742   case $srcdir in
25743   .)  ac_srcdir=.
25744       if test -z "$ac_dots"; then
25745          ac_top_srcdir=.
25746       else
25747          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25748       fi ;;
25749   [\\/]* | ?:[\\/]* )
25750       ac_srcdir=$srcdir$ac_dir_suffix;
25751       ac_top_srcdir=$srcdir ;;
25752   *) # Relative path.
25753     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25754     ac_top_srcdir=$ac_dots$srcdir ;;
25755   esac
25756
25757   case $INSTALL in
25758   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25759   *) ac_INSTALL=$ac_dots$INSTALL ;;
25760   esac
25761
25762   if test x"$ac_file" != x-; then
25763     { echo "$as_me:25763: creating $ac_file" >&5
25764 echo "$as_me: creating $ac_file" >&6;}
25765     rm -f "$ac_file"
25766   fi
25767   # Let's still pretend it is `configure' which instantiates (i.e., don't
25768   # use $as_me), people would be surprised to read:
25769   #    /* config.h.  Generated automatically by config.status.  */
25770   configure_input="Generated automatically from `echo $ac_file_in |
25771                                                  sed 's,.*/,,'` by configure."
25772
25773   # First look for the input files in the build tree, otherwise in the
25774   # src tree.
25775   ac_file_inputs=`IFS=:
25776     for f in $ac_file_in; do
25777       case $f in
25778       -) echo $tmp/stdin ;;
25779       [\\/$]*)
25780          # Absolute (can't be DOS-style, as IFS=:)
25781          test -f "$f" || { { echo "$as_me:25781: error: cannot find input file: $f" >&5
25782 echo "$as_me: error: cannot find input file: $f" >&2;}
25783    { (exit 1); exit 1; }; }
25784          echo $f;;
25785       *) # Relative
25786          if test -f "$f"; then
25787            # Build tree
25788            echo $f
25789          elif test -f "$srcdir/$f"; then
25790            # Source tree
25791            echo $srcdir/$f
25792          else
25793            # /dev/null tree
25794            { { echo "$as_me:25794: error: cannot find input file: $f" >&5
25795 echo "$as_me: error: cannot find input file: $f" >&2;}
25796    { (exit 1); exit 1; }; }
25797          fi;;
25798       esac
25799     done` || { (exit 1); exit 1; }
25800 EOF
25801 cat >>$CONFIG_STATUS <<\EOF
25802   ac_warn_datarootdir=no
25803   if test x"$ac_file" != x-; then
25804     for ac_item in $ac_file_inputs
25805     do
25806       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25807       if test -n "$ac_seen"; then
25808         ac_used=`grep '@datarootdir@' $ac_item`
25809         if test -z "$ac_used"; then
25810           { echo "$as_me:25810: WARNING: datarootdir was used implicitly but not set:
25811 $ac_seen" >&5
25812 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25813 $ac_seen" >&2;}
25814           ac_warn_datarootdir=yes
25815         fi
25816       fi
25817       ac_seen=`grep '${datarootdir}' $ac_item`
25818       if test -n "$ac_seen"; then
25819         { echo "$as_me:25819: WARNING: datarootdir was used explicitly but not set:
25820 $ac_seen" >&5
25821 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25822 $ac_seen" >&2;}
25823         ac_warn_datarootdir=yes
25824       fi
25825     done
25826   fi
25827
25828 if test "x$ac_warn_datarootdir" = xyes; then
25829   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25830 fi
25831
25832 EOF
25833 cat >>$CONFIG_STATUS <<EOF
25834   sed "$ac_vpsub
25835 $extrasub
25836 EOF
25837 cat >>$CONFIG_STATUS <<\EOF
25838 :t
25839 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25840 s,@configure_input@,$configure_input,;t t
25841 s,@srcdir@,$ac_srcdir,;t t
25842 s,@top_srcdir@,$ac_top_srcdir,;t t
25843 s,@INSTALL@,$ac_INSTALL,;t t
25844 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25845   rm -f $tmp/stdin
25846   if test x"$ac_file" != x-; then
25847     cp $tmp/out $ac_file
25848
25849     for ac_name in prefix exec_prefix datarootdir
25850     do
25851         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25852         if test -n "$ac_seen"; then
25853             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25854             if test -z "$ac_init"; then
25855               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25856               { echo "$as_me:25856: WARNING: Variable $ac_name is used but was not set:
25857 $ac_seen" >&5
25858 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25859 $ac_seen" >&2;}
25860             fi
25861         fi
25862     done
25863     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25864     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25865     if test -s $tmp/out; then
25866       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25867       { echo "$as_me:25867: WARNING: Some variables may not be substituted:
25868 $ac_seen" >&5
25869 echo "$as_me: WARNING: Some variables may not be substituted:
25870 $ac_seen" >&2;}
25871     fi
25872   else
25873     cat $tmp/out
25874   fi
25875   rm -f $tmp/out
25876
25877 done
25878 EOF
25879 cat >>$CONFIG_STATUS <<\EOF
25880
25881 #
25882 # CONFIG_HEADER section.
25883 #
25884
25885 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25886 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25887 #
25888 # ac_d sets the value in "#define NAME VALUE" lines.
25889 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25890 ac_dB='[        ].*$,\1#\2'
25891 ac_dC=' '
25892 ac_dD=',;t'
25893 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25894 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25895 ac_iB='\([      ]\),\1#\2define\3'
25896 ac_iC=' '
25897 ac_iD='\4,;t'
25898 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25899 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25900 ac_uB='$,\1#\2define\3'
25901 ac_uC=' '
25902 ac_uD=',;t'
25903
25904 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25905   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25906   case $ac_file in
25907   - | *:- | *:-:* ) # input from stdin
25908         cat >$tmp/stdin
25909         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25910         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25911   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25912         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25913   * )   ac_file_in=$ac_file.in ;;
25914   esac
25915
25916   test x"$ac_file" != x- && { echo "$as_me:25916: creating $ac_file" >&5
25917 echo "$as_me: creating $ac_file" >&6;}
25918
25919   # First look for the input files in the build tree, otherwise in the
25920   # src tree.
25921   ac_file_inputs=`IFS=:
25922     for f in $ac_file_in; do
25923       case $f in
25924       -) echo $tmp/stdin ;;
25925       [\\/$]*)
25926          # Absolute (can't be DOS-style, as IFS=:)
25927          test -f "$f" || { { echo "$as_me:25927: error: cannot find input file: $f" >&5
25928 echo "$as_me: error: cannot find input file: $f" >&2;}
25929    { (exit 1); exit 1; }; }
25930          echo $f;;
25931       *) # Relative
25932          if test -f "$f"; then
25933            # Build tree
25934            echo $f
25935          elif test -f "$srcdir/$f"; then
25936            # Source tree
25937            echo $srcdir/$f
25938          else
25939            # /dev/null tree
25940            { { echo "$as_me:25940: error: cannot find input file: $f" >&5
25941 echo "$as_me: error: cannot find input file: $f" >&2;}
25942    { (exit 1); exit 1; }; }
25943          fi;;
25944       esac
25945     done` || { (exit 1); exit 1; }
25946   # Remove the trailing spaces.
25947   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25948
25949 EOF
25950
25951 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25952 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25953 # be either 'cat' or 'sort'.
25954 cat confdefs.h | uniq >conftest.vals
25955
25956 # Break up conftest.vals because some shells have a limit on
25957 # the size of here documents, and old seds have small limits too.
25958
25959 rm -f conftest.tail
25960 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25961 while grep . conftest.vals >/dev/null
25962 do
25963   # Write chunks of a limited-size here document to conftest.frag.
25964   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25965   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25966   echo 'CEOF' >> $CONFIG_STATUS
25967   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25968   rm -f conftest.vals
25969   mv conftest.tail conftest.vals
25970 done
25971 rm -f conftest.vals
25972
25973 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25974 # marker @DEFS@.
25975 echo '  cat >> conftest.edit <<CEOF
25976 /@DEFS@/r conftest.frag
25977 /@DEFS@/d
25978 CEOF
25979 sed -f conftest.edit $tmp/in > $tmp/out
25980 rm -f $tmp/in
25981 mv $tmp/out $tmp/in
25982 rm -f conftest.edit conftest.frag
25983 ' >> $CONFIG_STATUS
25984
25985 cat >>$CONFIG_STATUS <<\EOF
25986   # Let's still pretend it is `configure' which instantiates (i.e., don't
25987   # use $as_me), people would be surprised to read:
25988   #    /* config.h.  Generated automatically by config.status.  */
25989   if test x"$ac_file" = x-; then
25990     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25991   else
25992     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25993   fi
25994   cat $tmp/in >>$tmp/config.h
25995   rm -f $tmp/in
25996   if test x"$ac_file" != x-; then
25997     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25998       { echo "$as_me:25998: $ac_file is unchanged" >&5
25999 echo "$as_me: $ac_file is unchanged" >&6;}
26000     else
26001       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26002          X"$ac_file" : 'X\(//\)[^/]' \| \
26003          X"$ac_file" : 'X\(//\)$' \| \
26004          X"$ac_file" : 'X\(/\)' \| \
26005          .     : '\(.\)' 2>/dev/null ||
26006 echo X"$ac_file" |
26007     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26008           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26009           /^X\(\/\/\)$/{ s//\1/; q; }
26010           /^X\(\/\).*/{ s//\1/; q; }
26011           s/.*/./; q'`
26012       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26013         { case "$ac_dir" in
26014   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26015   *)                      as_incr_dir=.;;
26016 esac
26017 as_dummy="$ac_dir"
26018 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26019   case $as_mkdir_dir in
26020     # Skip DOS drivespec
26021     ?:) as_incr_dir=$as_mkdir_dir ;;
26022     *)
26023       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26024       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26025     ;;
26026   esac
26027 done; }
26028
26029       fi
26030       rm -f $ac_file
26031       mv $tmp/config.h $ac_file
26032     fi
26033   else
26034     cat $tmp/config.h
26035     rm -f $tmp/config.h
26036   fi
26037 done
26038 EOF
26039 cat >>$CONFIG_STATUS <<\EOF
26040 #
26041 # CONFIG_COMMANDS section.
26042 #
26043 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26044   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26045   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26046
26047   case $ac_dest in
26048     default )
26049 if test "x$cf_with_tests" != xno ; then
26050
26051 for cf_dir in test
26052 do
26053         if test ! -d $srcdir/$cf_dir; then
26054                 continue
26055         elif test -f $srcdir/$cf_dir/programs; then
26056                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26057         fi
26058 done
26059
26060 fi
26061
26062 cf_prefix=$LIB_PREFIX
26063
26064 case $cf_cv_shlib_version in
26065 (cygdll|msysdll|mingw)
26066         TINFO_NAME=$TINFO_ARG_SUFFIX
26067         TINFO_SUFFIX=.dll
26068         ;;
26069 esac
26070
26071 if test -n "$TINFO_SUFFIX" ; then
26072         case $TINFO_SUFFIX in
26073         (tw*)
26074                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26075                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26076                 ;;
26077         (t*)
26078                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26079                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26080                 ;;
26081         (w*)
26082                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26083                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26084                 ;;
26085         esac
26086 fi
26087
26088 for cf_dir in $SRC_SUBDIRS
26089 do
26090         if test ! -d $srcdir/$cf_dir ; then
26091                 continue
26092         elif test -f $srcdir/$cf_dir/modules; then
26093
26094                 SHARED_LIB=
26095                 Libs_To_Make=
26096                 cf_awk_program=
26097                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26098                 then
26099                         cf_awk_program="$cf_awk_program\
26100 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26101 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26102 "
26103                 fi
26104
26105                 if test "x$WILDCARD_SYMS" = xno
26106                 then
26107                         cf_awk_program="$cf_awk_program\
26108 /[      ]_\\*;/ { skip=1; next; }\
26109 "
26110                 fi
26111
26112                 if test "x$cf_awk_program" != "x"
26113                 then
26114                         cat >>$cf_dir/Makefile <<CF_EOF
26115
26116 # Generated by CF_LIB_RULES
26117 resulting.map: $UNALTERED_SYMS
26118         $AWK 'BEGIN { skip = 1; last=""; } \
26119 $cf_awk_program \
26120 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26121  skip = 0; last = \$\$0; } \
26122 END { print last; }' < $UNALTERED_SYMS >\$@
26123
26124 distclean::
26125         rm -f resulting.map
26126 CF_EOF
26127                 fi
26128
26129                 for cf_item in $cf_LIST_MODELS
26130                 do
26131
26132         case X$cf_item in
26133         (Xlibtool)
26134                 cf_suffix='.la'
26135                 cf_depsuf=$cf_suffix
26136                 ;;
26137         (Xdebug)
26138                 cf_suffix='_g.a'
26139                 cf_depsuf=$cf_suffix
26140                 ;;
26141         (Xprofile)
26142                 cf_suffix='_p.a'
26143                 cf_depsuf=$cf_suffix
26144                 ;;
26145         (Xshared)
26146                 case $cf_cv_system_name in
26147                 (aix[5-7]*)
26148                         cf_suffix='.so'
26149                         cf_depsuf=$cf_suffix
26150                         ;;
26151                 (cygwin*|msys*|mingw*)
26152                         cf_suffix='.dll'
26153                         cf_depsuf='.dll.a'
26154                         ;;
26155                 (darwin*)
26156                         cf_suffix='.dylib'
26157                         cf_depsuf=$cf_suffix
26158                         ;;
26159                 (hpux*)
26160                         case $target in
26161                         (ia64*)
26162                                 cf_suffix='.so'
26163                                 cf_depsuf=$cf_suffix
26164                                 ;;
26165                         (*)
26166                                 cf_suffix='.sl'
26167                                 cf_depsuf=$cf_suffix
26168                                 ;;
26169                         esac
26170                         ;;
26171                 (*)
26172                         cf_suffix='.so'
26173                         cf_depsuf=$cf_suffix
26174                         ;;
26175                 esac
26176                 ;;
26177         (*)
26178                 cf_suffix='.a'
26179                 cf_depsuf=$cf_suffix
26180                 ;;
26181         esac
26182         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26183         then
26184                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26185                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26186         fi
26187
26188                         cf_libname=$cf_dir
26189                         test "$cf_dir" = c++ && cf_libname=ncurses++
26190                         if test $cf_item = shared ; then
26191                                 if test -n "${LIB_SUFFIX}"
26192                                 then
26193                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26194                                 else
26195                                         cf_shared_suffix="$cf_suffix"
26196                                 fi
26197                                 if test "$cf_cv_do_symlinks" = yes ; then
26198                                         cf_version_name=
26199
26200                                         case "$cf_cv_shlib_version" in
26201                                         (rel)
26202                                                 cf_version_name=REL_VERSION
26203                                                 ;;
26204                                         (abi)
26205                                                 cf_version_name=ABI_VERSION
26206                                                 ;;
26207                                         esac
26208
26209                                         if test -n "$cf_version_name"
26210                                         then
26211                                                 case "$cf_cv_system_name" in
26212                                                 (darwin*)
26213                                                         # "w", etc?
26214                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26215                                                         ;;
26216                                                 (*)
26217                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26218                                                         ;;
26219                                                 esac
26220                                         fi
26221                                         if test -n "${USE_LIB_SUFFIX}"
26222                                         then
26223                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26224                                         else
26225                                                 cf_shared_suffix="$cf_suffix"
26226                                         fi
26227                                 fi
26228                                 # cygwin needs import library, and has unique naming convention
26229                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26230                                 # use 'cyg' prefix for shared lib.
26231                                 case $cf_cv_shlib_version in
26232                                 (cygdll)
26233                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26234                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26235                                         ;;
26236                                 (msysdll)
26237                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26238                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26239                                         ;;
26240                                 (mingw)
26241                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26242                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26243                                         ;;
26244                                 (*)
26245                                         cf_add_lib=
26246                                         ;;
26247                                 esac
26248                                 if test -n "$cf_add_lib"
26249                                 then
26250                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26251                                         continue
26252                                 fi
26253                         fi
26254                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26255                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26256                 done
26257
26258                 if test $cf_dir = ncurses ; then
26259                         cf_subsets="$LIB_SUBSETS"
26260                         cf_r_parts="$cf_subsets"
26261                         cf_liblist="$Libs_To_Make"
26262
26263                         while test -n "$cf_r_parts"
26264                         do
26265                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26266                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26267                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26268                                         cf_add_lib=
26269                                         case $cf_l_parts in
26270                                         (*termlib*)
26271                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26272                                                 ;;
26273                                         (*ticlib*)
26274                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26275                                                 ;;
26276                                         (*)
26277                                                 break
26278                                                 ;;
26279                                         esac
26280                                         if test -n "$cf_add_lib"; then
26281                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26282                                         fi
26283                                 else
26284                                         break
26285                                 fi
26286                         done
26287                 else
26288                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26289                 fi
26290
26291                 if test $cf_dir = c++; then
26292                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26293                                 cf_list=
26294                                 for cf_item in $Libs_To_Make
26295                                 do
26296                                         case $cf_item in
26297                                         (*.a)
26298                                                 ;;
26299                                         (*)
26300                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26301                                                 ;;
26302                                         esac
26303                                         for cf_test in $cf_list
26304                                         do
26305                                                 if test "$cf_test" = "$cf_item"
26306                                                 then
26307                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26308                                                         cf_item=
26309                                                         break
26310                                                 fi
26311                                         done
26312                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26313                                 done
26314                                 Libs_To_Make="$cf_list"
26315                         fi
26316                 fi
26317
26318                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26319                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26320                         $cf_dir/Makefile >$cf_dir/Makefile.out
26321                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26322
26323                 $AWK -f $srcdir/mk-0th.awk \
26324                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26325                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26326
26327                 for cf_subset in $cf_subsets
26328                 do
26329                         cf_subdirs=
26330                         for cf_item in $cf_LIST_MODELS
26331                         do
26332
26333                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26334
26335 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26336
26337                         CXX_MODEL=$cf_ITEM
26338                         if test "$CXX_MODEL" = SHARED; then
26339                                 case $cf_cv_shlib_version in
26340                                 (cygdll|msysdll|mingw)
26341                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26342
26343 echo "${as_me:-configure}:26343: testing overriding CXX_MODEL to SHARED ..." 1>&5
26344
26345                                         with_shared_cxx=yes
26346                                         ;;
26347                                 (*)
26348                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26349                                         ;;
26350                                 esac
26351                         fi
26352
26353         case X$cf_item in
26354         (Xlibtool)
26355                 cf_suffix='.la'
26356                 cf_depsuf=$cf_suffix
26357                 ;;
26358         (Xdebug)
26359                 cf_suffix='_g.a'
26360                 cf_depsuf=$cf_suffix
26361                 ;;
26362         (Xprofile)
26363                 cf_suffix='_p.a'
26364                 cf_depsuf=$cf_suffix
26365                 ;;
26366         (Xshared)
26367                 case $cf_cv_system_name in
26368                 (aix[5-7]*)
26369                         cf_suffix='.so'
26370                         cf_depsuf=$cf_suffix
26371                         ;;
26372                 (cygwin*|msys*|mingw*)
26373                         cf_suffix='.dll'
26374                         cf_depsuf='.dll.a'
26375                         ;;
26376                 (darwin*)
26377                         cf_suffix='.dylib'
26378                         cf_depsuf=$cf_suffix
26379                         ;;
26380                 (hpux*)
26381                         case $target in
26382                         (ia64*)
26383                                 cf_suffix='.so'
26384                                 cf_depsuf=$cf_suffix
26385                                 ;;
26386                         (*)
26387                                 cf_suffix='.sl'
26388                                 cf_depsuf=$cf_suffix
26389                                 ;;
26390                         esac
26391                         ;;
26392                 (*)
26393                         cf_suffix='.so'
26394                         cf_depsuf=$cf_suffix
26395                         ;;
26396                 esac
26397                 ;;
26398         (*)
26399                 cf_suffix='.a'
26400                 cf_depsuf=$cf_suffix
26401                 ;;
26402         esac
26403         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26404         then
26405                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26406                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26407         fi
26408
26409         case $cf_item in
26410         (libtool) cf_subdir='obj_lo'  ;;
26411         (normal)  cf_subdir='objects' ;;
26412         (debug)   cf_subdir='obj_g' ;;
26413         (profile) cf_subdir='obj_p' ;;
26414         (shared)
26415                 case $cf_cv_system_name in
26416                 (cygwin|msys)
26417                         cf_subdir='objects' ;;
26418                 (*)
26419                         cf_subdir='obj_s' ;;
26420                 esac
26421         esac
26422
26423                         # Test for case where we build libtinfo with a different name.
26424                         cf_libname=$cf_dir
26425                         if test $cf_dir = ncurses ; then
26426                                 case $cf_subset in
26427                                 (*base*)
26428                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26429                                         ;;
26430                                 (*termlib*)
26431                                         cf_libname=$TINFO_LIB_SUFFIX
26432                                         ;;
26433                                 (ticlib*)
26434                                         cf_libname=$TICS_LIB_SUFFIX
26435                                         ;;
26436                                 esac
26437                         elif test $cf_dir = c++ ; then
26438                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26439                         else
26440                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26441                         fi
26442                         if test -n "${USE_ARG_SUFFIX}" ; then
26443                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26444                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26445                         fi
26446
26447                         # These dependencies really are for development, not
26448                         # builds, but they are useful in porting, too.
26449                         cf_depend="../include/ncurses_cfg.h"
26450                         if test "$srcdir" = "."; then
26451                                 cf_reldir="."
26452                         else
26453                                 cf_reldir="\${srcdir}"
26454                         fi
26455
26456                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26457                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26458                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26459                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26460                         fi
26461
26462                         cf_dir_suffix=
26463                         old_cf_suffix="$cf_suffix"
26464                         if test "$cf_cv_shlib_version_infix" = yes ; then
26465                         if test -n "$USE_LIB_SUFFIX" ; then
26466                                 case $USE_LIB_SUFFIX in
26467                                 (tw*)
26468                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26469                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26470                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26471                                         ;;
26472                                 (t*)
26473                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26474                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26475                                         cf_dir_suffix=t$EXTRA_SUFFIX
26476                                         ;;
26477                                 (w*)
26478                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26479                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26480                                         cf_dir_suffix=w$EXTRA_SUFFIX
26481                                         ;;
26482                                 (*)
26483                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26484                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26485                                         cf_dir_suffix=$EXTRA_SUFFIX
26486                                         ;;
26487                                 esac
26488                         fi
26489                         fi
26490
26491                         $AWK -f $srcdir/mk-1st.awk \
26492                                 name=${cf_libname}${cf_dir_suffix} \
26493                                 traces=$LIB_TRACING \
26494                                 MODEL=$cf_ITEM \
26495                                 CXX_MODEL=$CXX_MODEL \
26496                                 model=$cf_subdir \
26497                                 prefix=$cf_prefix \
26498                                 suffix=$cf_suffix \
26499                                 subset=$cf_subset \
26500                                 driver=$cf_cv_term_driver \
26501                                 SymLink="$LN_S" \
26502                                 TermlibRoot=$TINFO_NAME \
26503                                 TermlibSuffix=$TINFO_SUFFIX \
26504                                 ShlibVer=$cf_cv_shlib_version \
26505                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26506                                 ReLink=${cf_cv_do_relink:-no} \
26507                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26508                                 DoLinks=$cf_cv_do_symlinks \
26509                                 rmSoLocs=$cf_cv_rm_so_locs \
26510                                 ldconfig="$LDCONFIG" \
26511                                 overwrite=$WITH_OVERWRITE \
26512                                 depend="$cf_depend" \
26513                                 host="$host" \
26514                                 libtool_version="$LIBTOOL_VERSION" \
26515                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26516
26517                         cf_suffix="$old_cf_suffix"
26518
26519                         for cf_subdir2 in $cf_subdirs lib
26520                         do
26521                                 test $cf_subdir = $cf_subdir2 && break
26522                         done
26523                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26524                         $AWK -f $srcdir/mk-2nd.awk \
26525                                 name=$cf_dir \
26526                                 traces=$LIB_TRACING \
26527                                 MODEL=$cf_ITEM \
26528                                 model=$cf_subdir \
26529                                 subset=$cf_subset \
26530                                 srcdir=$srcdir \
26531                                 echo=$WITH_ECHO \
26532                                 crenames=$cf_cv_prog_CC_c_o \
26533                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26534                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26535                         cf_subdirs="$cf_subdirs $cf_subdir"
26536                         done
26537                 done
26538         fi
26539
26540         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26541 done
26542
26543 for cf_dir in $SRC_SUBDIRS
26544 do
26545         if test ! -d $srcdir/$cf_dir ; then
26546                 continue
26547         fi
26548
26549         if test -f $cf_dir/Makefile ; then
26550                 case "$cf_dir" in
26551                 (Ada95)
26552                         echo 'libs \' >> Makefile
26553                         echo 'install.libs \' >> Makefile
26554                         echo 'uninstall.libs ::' >> Makefile
26555                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26556                         ;;
26557                 esac
26558         fi
26559
26560         if test -f $srcdir/$cf_dir/modules; then
26561                 echo >> Makefile
26562                 if test -f $srcdir/$cf_dir/headers; then
26563 cat >> Makefile <<CF_EOF
26564 install.includes \\
26565 uninstall.includes \\
26566 CF_EOF
26567                 fi
26568 if test "$cf_dir" != "c++" ; then
26569 echo 'lint \' >> Makefile
26570 fi
26571 cat >> Makefile <<CF_EOF
26572 libs \\
26573 lintlib \\
26574 install.libs \\
26575 uninstall.libs \\
26576 install.$cf_dir \\
26577 uninstall.$cf_dir ::
26578         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26579 CF_EOF
26580         elif test -f $srcdir/$cf_dir/headers; then
26581 cat >> Makefile <<CF_EOF
26582
26583 libs \\
26584 install.libs \\
26585 uninstall.libs \\
26586 install.includes \\
26587 uninstall.includes ::
26588         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26589 CF_EOF
26590 fi
26591 done
26592
26593 if test "x$cf_with_db_install" = xyes; then
26594 cat >> Makefile <<CF_EOF
26595
26596 install.libs uninstall.libs \\
26597 install.data uninstall.data ::
26598 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26599 CF_EOF
26600 else
26601 cat >> Makefile <<CF_EOF
26602
26603 install.libs uninstall.libs ::
26604         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26605 CF_EOF
26606 fi
26607
26608 if test "x$cf_with_manpages" = xyes; then
26609 cat >> Makefile <<CF_EOF
26610
26611 install.man \\
26612 uninstall.man ::
26613         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26614 CF_EOF
26615 fi
26616
26617 cat >> Makefile <<CF_EOF
26618
26619 distclean ::
26620         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26621         rm -f headers.sh headers.sed mk_shared_lib.sh
26622         rm -f edit_man.* man_alias.*
26623         rm -rf \${DIRS_TO_MAKE}
26624 CF_EOF
26625
26626 # Special case: tack's manpage lives in its own directory.
26627 if test "x$cf_with_manpages" = xyes; then
26628 if test "x$cf_with_tack" = "xyes"; then
26629 cat >> Makefile <<CF_EOF
26630
26631 install.man \\
26632 uninstall.man ::
26633         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26634 CF_EOF
26635 fi
26636 fi
26637
26638 rm -f headers.sed headers.sh
26639
26640 echo creating headers.sh
26641 cat >headers.sh <<CF_EOF
26642 #! $SHELL
26643 # This shell script is generated by the 'configure' script.  It is invoked in a
26644 # subdirectory of the build tree.  It generates a sed-script in the parent
26645 # directory that is used to adjust includes for header files that reside in a
26646 # subdirectory of /usr/include, etc.
26647 PRG=""
26648 while test \$# != 3
26649 do
26650 PRG="\$PRG \$1"; shift
26651 done
26652 DST=\$1
26653 REF=\$2
26654 SRC=\$3
26655 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26656 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26657 echo installing \$SRC in \$DST
26658 CF_EOF
26659
26660 if test $WITH_CURSES_H = yes; then
26661         cat >>headers.sh <<CF_EOF
26662 case \$DST in
26663 (/*/include/*)
26664         END=\`basename \$DST\`
26665         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26666         do
26667                 NAME=\`basename \$i\`
26668                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26669         done
26670         ;;
26671 (*)
26672         echo "" >> \$TMPSED
26673         ;;
26674 esac
26675 CF_EOF
26676
26677 else
26678         cat >>headers.sh <<CF_EOF
26679 case \$DST in
26680 (/*/include/*)
26681         END=\`basename \$DST\`
26682         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26683         do
26684                 NAME=\`basename \$i\`
26685                 if test "\$NAME" = "curses.h"
26686                 then
26687                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26688                         NAME=ncurses.h
26689                 fi
26690                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26691         done
26692         ;;
26693 (*)
26694         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26695         ;;
26696 esac
26697 CF_EOF
26698 fi
26699 cat >>headers.sh <<CF_EOF
26700 rm -f \$TMPSRC
26701 sed -f \$TMPSED \$SRC > \$TMPSRC
26702 NAME=\`basename \$SRC\`
26703 CF_EOF
26704 if test $WITH_CURSES_H != yes; then
26705         cat >>headers.sh <<CF_EOF
26706 test "\$NAME" = "curses.h" && NAME=ncurses.h
26707 CF_EOF
26708 fi
26709 cat >>headers.sh <<CF_EOF
26710 # Just in case someone gzip'd manpages, remove the conflicting copy.
26711 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26712
26713 eval \$PRG \$TMPSRC \$DST/\$NAME
26714 rm -f \$TMPSRC \$TMPSED
26715 CF_EOF
26716
26717 chmod 0755 headers.sh
26718
26719 for cf_dir in $SRC_SUBDIRS
26720 do
26721         if test ! -d $srcdir/$cf_dir ; then
26722                 continue
26723         fi
26724
26725         if test -f $srcdir/$cf_dir/headers; then
26726                 $AWK -f $srcdir/mk-hdr.awk \
26727                         subset="$LIB_SUBSETS" \
26728                         compat="$WITH_CURSES_H" \
26729                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26730         fi
26731
26732         if test -f $srcdir/$cf_dir/modules; then
26733                 if test "$cf_dir" != "c++" ; then
26734                         cat >>$cf_dir/Makefile <<"CF_EOF"
26735 depend : ${AUTO_SRC}
26736         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26737
26738 # DO NOT DELETE THIS LINE -- make depend depends on it.
26739 CF_EOF
26740                 fi
26741         fi
26742 done
26743
26744 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26745 if test -z "$USE_OLD_MAKERULES" ; then
26746         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26747 fi
26748 fi
26749  ;;
26750   esac
26751 done
26752 EOF
26753
26754 cat >>$CONFIG_STATUS <<\EOF
26755
26756 { (exit 0); exit 0; }
26757 EOF
26758 chmod +x $CONFIG_STATUS
26759 ac_clean_files=$ac_clean_files_save
26760
26761 # configure is writing to config.log, and then calls config.status.
26762 # config.status does its own redirection, appending to config.log.
26763 # Unfortunately, on DOS this fails, as config.log is still kept open
26764 # by configure, so config.status won't be able to write to it; its
26765 # output is simply discarded.  So we exec the FD to /dev/null,
26766 # effectively closing config.log, so it can be properly (re)opened and
26767 # appended to by config.status.  When coming back to configure, we
26768 # need to make the FD available again.
26769 if test "$no_create" != yes; then
26770   ac_cs_success=:
26771   exec 5>/dev/null
26772   $SHELL $CONFIG_STATUS || ac_cs_success=false
26773   exec 5>>config.log
26774   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26775   # would make configure fail if this is the last instruction.
26776   $ac_cs_success || { (exit 1); exit 1; }
26777 fi
26778 ${MAKE:-make} preinstall