]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20181201
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.672 .
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
1600 if test "x$cf_with_ada" = xyes
1601 then
1602         cf_prog_cc="gnatgcc gcc cc"
1603 else
1604         cf_prog_cc="gcc cc"
1605 fi
1606
1607 ac_ext=c
1608 ac_cpp='$CPP $CPPFLAGS'
1609 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1610 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1611 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1612 ac_main_return=return
1613 if test -n "$ac_tool_prefix"; then
1614   for ac_prog in $cf_prog_cc
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in $cf_prog_cc
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 test -z "$CC" && { { echo "$as_me:1693: error: no acceptable cc found in \$PATH" >&5
1694 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1695    { (exit 1); exit 1; }; }
1696
1697 # Provide some information about the compiler.
1698 echo "$as_me:1698:" \
1699      "checking for C compiler version" >&5
1700 ac_compiler=`set X $ac_compile; echo $2`
1701 { (eval echo "$as_me:1701: \"$ac_compiler --version </dev/null >&5\"") >&5
1702   (eval $ac_compiler --version </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706 { (eval echo "$as_me:1706: \"$ac_compiler -v </dev/null >&5\"") >&5
1707   (eval $ac_compiler -v </dev/null >&5) 2>&5
1708   ac_status=$?
1709   echo "$as_me:1709: \$? = $ac_status" >&5
1710   (exit $ac_status); }
1711 { (eval echo "$as_me:1711: \"$ac_compiler -V </dev/null >&5\"") >&5
1712   (eval $ac_compiler -V </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716
1717 cat >conftest.$ac_ext <<_ACEOF
1718 #line 1718 "configure"
1719 #include "confdefs.h"
1720
1721 int
1722 main (void)
1723 {
1724
1725   ;
1726   return 0;
1727 }
1728 _ACEOF
1729 ac_clean_files_save=$ac_clean_files
1730 ac_clean_files="$ac_clean_files a.out a.exe"
1731 # Try to create an executable without -o first, disregard a.out.
1732 # It will help us diagnose broken compilers, and finding out an intuition
1733 # of exeext.
1734 echo "$as_me:1734: checking for C compiler default output" >&5
1735 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1736 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1737 if { (eval echo "$as_me:1737: \"$ac_link_default\"") >&5
1738   (eval $ac_link_default) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); }; then
1742   # Find the output, starting from the most likely.  This scheme is
1743 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1744 # resort.
1745 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1746                 ls a.out conftest 2>/dev/null;
1747                 ls a.* conftest.* 2>/dev/null`; do
1748   case $ac_file in
1749     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1750     a.out ) # We found the default executable, but exeext='' is most
1751             # certainly right.
1752             break;;
1753     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1754           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1755           export ac_cv_exeext
1756           break;;
1757     * ) break;;
1758   esac
1759 done
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 { { echo "$as_me:1763: error: C compiler cannot create executables" >&5
1764 echo "$as_me: error: C compiler cannot create executables" >&2;}
1765    { (exit 77); exit 77; }; }
1766 fi
1767
1768 ac_exeext=$ac_cv_exeext
1769 echo "$as_me:1769: result: $ac_file" >&5
1770 echo "${ECHO_T}$ac_file" >&6
1771
1772 # Check the compiler produces executables we can run.  If not, either
1773 # the compiler is broken, or we cross compile.
1774 echo "$as_me:1774: checking whether the C compiler works" >&5
1775 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1776 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1777 # If not cross compiling, check that we can run a simple program.
1778 if test "$cross_compiling" != yes; then
1779   if { ac_try='./$ac_file'
1780   { (eval echo "$as_me:1780: \"$ac_try\"") >&5
1781   (eval $ac_try) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); }; }; then
1785     cross_compiling=no
1786   else
1787     if test "$cross_compiling" = maybe; then
1788         cross_compiling=yes
1789     else
1790         { { echo "$as_me:1790: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&5
1792 echo "$as_me: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&2;}
1794    { (exit 1); exit 1; }; }
1795     fi
1796   fi
1797 fi
1798 echo "$as_me:1798: result: yes" >&5
1799 echo "${ECHO_T}yes" >&6
1800
1801 rm -f a.out a.exe conftest$ac_cv_exeext
1802 ac_clean_files=$ac_clean_files_save
1803 # Check the compiler produces executables we can run.  If not, either
1804 # the compiler is broken, or we cross compile.
1805 echo "$as_me:1805: checking whether we are cross compiling" >&5
1806 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1807 echo "$as_me:1807: result: $cross_compiling" >&5
1808 echo "${ECHO_T}$cross_compiling" >&6
1809
1810 echo "$as_me:1810: checking for executable suffix" >&5
1811 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1812 if { (eval echo "$as_me:1812: \"$ac_link\"") >&5
1813   (eval $ac_link) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); }; then
1817   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1818 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1819 # work properly (i.e., refer to `conftest.exe'), while it won't with
1820 # `rm'.
1821 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1822   case $ac_file in
1823     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1824     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1825           export ac_cv_exeext
1826           break;;
1827     * ) break;;
1828   esac
1829 done
1830 else
1831   { { echo "$as_me:1831: error: cannot compute EXEEXT: cannot compile and link" >&5
1832 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1833    { (exit 1); exit 1; }; }
1834 fi
1835
1836 rm -f conftest$ac_cv_exeext
1837 echo "$as_me:1837: result: $ac_cv_exeext" >&5
1838 echo "${ECHO_T}$ac_cv_exeext" >&6
1839
1840 rm -f conftest.$ac_ext
1841 EXEEXT=$ac_cv_exeext
1842 ac_exeext=$EXEEXT
1843 echo "$as_me:1843: checking for object suffix" >&5
1844 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1845 if test "${ac_cv_objext+set}" = set; then
1846   echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851
1852 int
1853 main (void)
1854 {
1855
1856   ;
1857   return 0;
1858 }
1859 _ACEOF
1860 rm -f conftest.o conftest.obj
1861 if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
1862   (eval $ac_compile) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit $ac_status); }; then
1866   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1867   case $ac_file in
1868     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1869     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1870        break;;
1871   esac
1872 done
1873 else
1874   echo "$as_me: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 { { echo "$as_me:1876: error: cannot compute OBJEXT: cannot compile" >&5
1877 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1878    { (exit 1); exit 1; }; }
1879 fi
1880
1881 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1882 fi
1883 echo "$as_me:1883: result: $ac_cv_objext" >&5
1884 echo "${ECHO_T}$ac_cv_objext" >&6
1885 OBJEXT=$ac_cv_objext
1886 ac_objext=$OBJEXT
1887 echo "$as_me:1887: checking whether we are using the GNU C compiler" >&5
1888 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1889 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1890   echo $ECHO_N "(cached) $ECHO_C" >&6
1891 else
1892   cat >conftest.$ac_ext <<_ACEOF
1893 #line 1893 "configure"
1894 #include "confdefs.h"
1895
1896 int
1897 main (void)
1898 {
1899 #ifndef __GNUC__
1900        choke me
1901 #endif
1902
1903   ;
1904   return 0;
1905 }
1906 _ACEOF
1907 rm -f conftest.$ac_objext
1908 if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5
1909   (eval $ac_compile) 2>&5
1910   ac_status=$?
1911   echo "$as_me:1911: \$? = $ac_status" >&5
1912   (exit $ac_status); } &&
1913          { ac_try='test -s conftest.$ac_objext'
1914   { (eval echo "$as_me:1914: \"$ac_try\"") >&5
1915   (eval $ac_try) 2>&5
1916   ac_status=$?
1917   echo "$as_me:1917: \$? = $ac_status" >&5
1918   (exit $ac_status); }; }; then
1919   ac_compiler_gnu=yes
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat conftest.$ac_ext >&5
1923 ac_compiler_gnu=no
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1927
1928 fi
1929 echo "$as_me:1929: result: $ac_cv_c_compiler_gnu" >&5
1930 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1931 GCC=`test $ac_compiler_gnu = yes && echo yes`
1932 ac_test_CFLAGS=${CFLAGS+set}
1933 ac_save_CFLAGS=$CFLAGS
1934 CFLAGS="-g"
1935 echo "$as_me:1935: checking whether $CC accepts -g" >&5
1936 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1937 if test "${ac_cv_prog_cc_g+set}" = set; then
1938   echo $ECHO_N "(cached) $ECHO_C" >&6
1939 else
1940   cat >conftest.$ac_ext <<_ACEOF
1941 #line 1941 "configure"
1942 #include "confdefs.h"
1943
1944 int
1945 main (void)
1946 {
1947
1948   ;
1949   return 0;
1950 }
1951 _ACEOF
1952 rm -f conftest.$ac_objext
1953 if { (eval echo "$as_me:1953: \"$ac_compile\"") >&5
1954   (eval $ac_compile) 2>&5
1955   ac_status=$?
1956   echo "$as_me:1956: \$? = $ac_status" >&5
1957   (exit $ac_status); } &&
1958          { ac_try='test -s conftest.$ac_objext'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit $ac_status); }; }; then
1964   ac_cv_prog_cc_g=yes
1965 else
1966   echo "$as_me: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 ac_cv_prog_cc_g=no
1969 fi
1970 rm -f conftest.$ac_objext conftest.$ac_ext
1971 fi
1972 echo "$as_me:1972: result: $ac_cv_prog_cc_g" >&5
1973 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1974 if test "$ac_test_CFLAGS" = set; then
1975   CFLAGS=$ac_save_CFLAGS
1976 elif test $ac_cv_prog_cc_g = yes; then
1977   if test "$GCC" = yes; then
1978     CFLAGS="-g -O2"
1979   else
1980     CFLAGS="-g"
1981   fi
1982 else
1983   if test "$GCC" = yes; then
1984     CFLAGS="-O2"
1985   else
1986     CFLAGS=
1987   fi
1988 fi
1989 # Some people use a C++ compiler to compile C.  Since we use `exit',
1990 # in C++ we need to declare it.  In case someone uses the same compiler
1991 # for both compiling C and C++ we need to have the C++ compiler decide
1992 # the declaration of exit, since it's the most demanding environment.
1993 cat >conftest.$ac_ext <<_ACEOF
1994 #ifndef __cplusplus
1995   choke me
1996 #endif
1997 _ACEOF
1998 rm -f conftest.$ac_objext
1999 if { (eval echo "$as_me:1999: \"$ac_compile\"") >&5
2000   (eval $ac_compile) 2>&5
2001   ac_status=$?
2002   echo "$as_me:2002: \$? = $ac_status" >&5
2003   (exit $ac_status); } &&
2004          { ac_try='test -s conftest.$ac_objext'
2005   { (eval echo "$as_me:2005: \"$ac_try\"") >&5
2006   (eval $ac_try) 2>&5
2007   ac_status=$?
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); }; }; then
2010   for ac_declaration in \
2011    ''\
2012    '#include <stdlib.h>' \
2013    'extern "C" void std::exit (int) throw (); using std::exit;' \
2014    'extern "C" void std::exit (int); using std::exit;' \
2015    'extern "C" void exit (int) throw ();' \
2016    'extern "C" void exit (int);' \
2017    'void exit (int);'
2018 do
2019   cat >conftest.$ac_ext <<_ACEOF
2020 #line 2020 "configure"
2021 #include "confdefs.h"
2022 #include <stdlib.h>
2023 $ac_declaration
2024 int
2025 main (void)
2026 {
2027 exit (42);
2028   ;
2029   return 0;
2030 }
2031 _ACEOF
2032 rm -f conftest.$ac_objext
2033 if { (eval echo "$as_me:2033: \"$ac_compile\"") >&5
2034   (eval $ac_compile) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit $ac_status); } &&
2038          { ac_try='test -s conftest.$ac_objext'
2039   { (eval echo "$as_me:2039: \"$ac_try\"") >&5
2040   (eval $ac_try) 2>&5
2041   ac_status=$?
2042   echo "$as_me:2042: \$? = $ac_status" >&5
2043   (exit $ac_status); }; }; then
2044   :
2045 else
2046   echo "$as_me: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
2048 continue
2049 fi
2050 rm -f conftest.$ac_objext conftest.$ac_ext
2051   cat >conftest.$ac_ext <<_ACEOF
2052 #line 2052 "configure"
2053 #include "confdefs.h"
2054 $ac_declaration
2055 int
2056 main (void)
2057 {
2058 exit (42);
2059   ;
2060   return 0;
2061 }
2062 _ACEOF
2063 rm -f conftest.$ac_objext
2064 if { (eval echo "$as_me:2064: \"$ac_compile\"") >&5
2065   (eval $ac_compile) 2>&5
2066   ac_status=$?
2067   echo "$as_me:2067: \$? = $ac_status" >&5
2068   (exit $ac_status); } &&
2069          { ac_try='test -s conftest.$ac_objext'
2070   { (eval echo "$as_me:2070: \"$ac_try\"") >&5
2071   (eval $ac_try) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit $ac_status); }; }; then
2075   break
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 done
2082 rm -rf conftest*
2083 if test -n "$ac_declaration"; then
2084   echo '#ifdef __cplusplus' >>confdefs.h
2085   echo $ac_declaration      >>confdefs.h
2086   echo '#endif'             >>confdefs.h
2087 fi
2088
2089 else
2090   echo "$as_me: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
2092 fi
2093 rm -f conftest.$ac_objext conftest.$ac_ext
2094 ac_ext=c
2095 ac_cpp='$CPP $CPPFLAGS'
2096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2099 ac_main_return=return
2100
2101 GCC_VERSION=none
2102 if test "$GCC" = yes ; then
2103         echo "$as_me:2103: checking version of $CC" >&5
2104 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2105         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.].*//'`"
2106         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2107         echo "$as_me:2107: result: $GCC_VERSION" >&5
2108 echo "${ECHO_T}$GCC_VERSION" >&6
2109 fi
2110
2111 echo "$as_me:2111: checking for $CC option to accept ANSI C" >&5
2112 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2113 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116   ac_cv_prog_cc_stdc=no
2117 ac_save_CC=$CC
2118 cat >conftest.$ac_ext <<_ACEOF
2119 #line 2119 "configure"
2120 #include "confdefs.h"
2121 #include <stdarg.h>
2122 #include <stdio.h>
2123 #include <sys/types.h>
2124 #include <sys/stat.h>
2125 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2126 struct buf { int x; };
2127 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2128 static char *e (p, i)
2129      char **p;
2130      int i;
2131 {
2132   return p[i];
2133 }
2134 static char *f (char * (*g) (char **, int), char **p, ...)
2135 {
2136   char *s;
2137   va_list v;
2138   va_start (v,p);
2139   s = g (p, va_arg (v,int));
2140   va_end (v);
2141   return s;
2142 }
2143 int test (int i, double x);
2144 struct s1 {int (*f) (int a);};
2145 struct s2 {int (*f) (double a);};
2146 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2147 int argc;
2148 char **argv;
2149 int
2150 main (void)
2151 {
2152 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2153   ;
2154   return 0;
2155 }
2156 _ACEOF
2157 # Don't try gcc -ansi; that turns off useful extensions and
2158 # breaks some systems' header files.
2159 # AIX                   -qlanglvl=ansi
2160 # Ultrix and OSF/1      -std1
2161 # HP-UX 10.20 and later -Ae
2162 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2163 # SVR4                  -Xc -D__EXTENSIONS__
2164 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2165 do
2166   CC="$ac_save_CC $ac_arg"
2167   rm -f conftest.$ac_objext
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } &&
2173          { ac_try='test -s conftest.$ac_objext'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit $ac_status); }; }; then
2179   ac_cv_prog_cc_stdc=$ac_arg
2180 break
2181 else
2182   echo "$as_me: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 fi
2185 rm -f conftest.$ac_objext
2186 done
2187 rm -f conftest.$ac_ext conftest.$ac_objext
2188 CC=$ac_save_CC
2189
2190 fi
2191
2192 case "x$ac_cv_prog_cc_stdc" in
2193   x|xno)
2194     echo "$as_me:2194: result: none needed" >&5
2195 echo "${ECHO_T}none needed" >&6 ;;
2196   *)
2197     echo "$as_me:2197: result: $ac_cv_prog_cc_stdc" >&5
2198 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2199     CC="$CC $ac_cv_prog_cc_stdc" ;;
2200 esac
2201
2202 # This should have been defined by AC_PROG_CC
2203 : ${CC:=cc}
2204
2205 echo "$as_me:2205: checking \$CFLAGS variable" >&5
2206 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2207 case "x$CFLAGS" in
2208 (*-[IUD]*)
2209         echo "$as_me:2209: result: broken" >&5
2210 echo "${ECHO_T}broken" >&6
2211         { echo "$as_me:2211: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2212 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2213         cf_flags="$CFLAGS"
2214         CFLAGS=
2215         for cf_arg in $cf_flags
2216         do
2217
2218 cf_fix_cppflags=no
2219 cf_new_cflags=
2220 cf_new_cppflags=
2221 cf_new_extra_cppflags=
2222
2223 for cf_add_cflags in $cf_arg
2224 do
2225 case $cf_fix_cppflags in
2226 (no)
2227         case $cf_add_cflags in
2228         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2229                 case $cf_add_cflags in
2230                 (-D*)
2231                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2232
2233                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2234                                 && test -z "${cf_tst_cflags}" \
2235                                 && cf_fix_cppflags=yes
2236
2237                         if test $cf_fix_cppflags = yes ; then
2238
2239         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2240         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2241
2242                                 continue
2243                         elif test "${cf_tst_cflags}" = "\"'" ; then
2244
2245         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2246         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2247
2248                                 continue
2249                         fi
2250                         ;;
2251                 esac
2252                 case "$CPPFLAGS" in
2253                 (*$cf_add_cflags)
2254                         ;;
2255                 (*)
2256                         case $cf_add_cflags in
2257                         (-D*)
2258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2259
2260 CPPFLAGS=`echo "$CPPFLAGS" | \
2261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2263
2264                                 ;;
2265                         esac
2266
2267         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2268         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2269
2270                         ;;
2271                 esac
2272                 ;;
2273         (*)
2274
2275         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2276         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2277
2278                 ;;
2279         esac
2280         ;;
2281 (yes)
2282
2283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2285
2286         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2287
2288         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2289                 && test -z "${cf_tst_cflags}" \
2290                 && cf_fix_cppflags=no
2291         ;;
2292 esac
2293 done
2294
2295 if test -n "$cf_new_cflags" ; then
2296
2297         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2298         CFLAGS="${CFLAGS}$cf_new_cflags"
2299
2300 fi
2301
2302 if test -n "$cf_new_cppflags" ; then
2303
2304         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2305         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2306
2307 fi
2308
2309 if test -n "$cf_new_extra_cppflags" ; then
2310
2311         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2312         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2313
2314 fi
2315
2316         done
2317         ;;
2318 (*)
2319         echo "$as_me:2319: result: ok" >&5
2320 echo "${ECHO_T}ok" >&6
2321         ;;
2322 esac
2323
2324 echo "$as_me:2324: checking \$CC variable" >&5
2325 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2326 case "$CC" in
2327 (*[\ \  ]-*)
2328         echo "$as_me:2328: result: broken" >&5
2329 echo "${ECHO_T}broken" >&6
2330         { echo "$as_me:2330: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2331 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2332         # humor him...
2333         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2334         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2335         CC="$cf_prog"
2336         for cf_arg in $cf_flags
2337         do
2338                 case "x$cf_arg" in
2339                 (x-[IUDfgOW]*)
2340
2341 cf_fix_cppflags=no
2342 cf_new_cflags=
2343 cf_new_cppflags=
2344 cf_new_extra_cppflags=
2345
2346 for cf_add_cflags in $cf_arg
2347 do
2348 case $cf_fix_cppflags in
2349 (no)
2350         case $cf_add_cflags in
2351         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2352                 case $cf_add_cflags in
2353                 (-D*)
2354                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2355
2356                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2357                                 && test -z "${cf_tst_cflags}" \
2358                                 && cf_fix_cppflags=yes
2359
2360                         if test $cf_fix_cppflags = yes ; then
2361
2362         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2363         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2364
2365                                 continue
2366                         elif test "${cf_tst_cflags}" = "\"'" ; then
2367
2368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2370
2371                                 continue
2372                         fi
2373                         ;;
2374                 esac
2375                 case "$CPPFLAGS" in
2376                 (*$cf_add_cflags)
2377                         ;;
2378                 (*)
2379                         case $cf_add_cflags in
2380                         (-D*)
2381                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2382
2383 CPPFLAGS=`echo "$CPPFLAGS" | \
2384         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2385                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2386
2387                                 ;;
2388                         esac
2389
2390         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2391         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2392
2393                         ;;
2394                 esac
2395                 ;;
2396         (*)
2397
2398         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2399         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2400
2401                 ;;
2402         esac
2403         ;;
2404 (yes)
2405
2406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2408
2409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2410
2411         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2412                 && test -z "${cf_tst_cflags}" \
2413                 && cf_fix_cppflags=no
2414         ;;
2415 esac
2416 done
2417
2418 if test -n "$cf_new_cflags" ; then
2419
2420         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2421         CFLAGS="${CFLAGS}$cf_new_cflags"
2422
2423 fi
2424
2425 if test -n "$cf_new_cppflags" ; then
2426
2427         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2428         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2429
2430 fi
2431
2432 if test -n "$cf_new_extra_cppflags" ; then
2433
2434         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2435         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2436
2437 fi
2438
2439                         ;;
2440                 (*)
2441                         CC="$CC $cf_arg"
2442                         ;;
2443                 esac
2444         done
2445         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2446
2447 echo "${as_me:-configure}:2447: testing resulting CC: '$CC' ..." 1>&5
2448
2449         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2450
2451 echo "${as_me:-configure}:2451: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2452
2453         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2454
2455 echo "${as_me:-configure}:2455: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2456
2457         ;;
2458 (*)
2459         echo "$as_me:2459: result: ok" >&5
2460 echo "${ECHO_T}ok" >&6
2461         ;;
2462 esac
2463
2464 ac_ext=c
2465 ac_cpp='$CPP $CPPFLAGS'
2466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2469 ac_main_return=return
2470 echo "$as_me:2470: checking how to run the C preprocessor" >&5
2471 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2472 # On Suns, sometimes $CPP names a directory.
2473 if test -n "$CPP" && test -d "$CPP"; then
2474   CPP=
2475 fi
2476 if test -z "$CPP"; then
2477   if test "${ac_cv_prog_CPP+set}" = set; then
2478   echo $ECHO_N "(cached) $ECHO_C" >&6
2479 else
2480       # Double quotes because CPP needs to be expanded
2481     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2482     do
2483       ac_preproc_ok=false
2484 for ac_c_preproc_warn_flag in '' yes
2485 do
2486   # Use a header file that comes with gcc, so configuring glibc
2487   # with a fresh cross-compiler works.
2488   # On the NeXT, cc -E runs the code through the compiler's parser,
2489   # not just through cpp. "Syntax error" is here to catch this case.
2490   cat >conftest.$ac_ext <<_ACEOF
2491 #line 2491 "configure"
2492 #include "confdefs.h"
2493 #include <assert.h>
2494                      Syntax error
2495 _ACEOF
2496 if { (eval echo "$as_me:2496: \"$ac_cpp conftest.$ac_ext\"") >&5
2497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2498   ac_status=$?
2499   egrep -v '^ *\+' conftest.er1 >conftest.err
2500   rm -f conftest.er1
2501   cat conftest.err >&5
2502   echo "$as_me:2502: \$? = $ac_status" >&5
2503   (exit $ac_status); } >/dev/null; then
2504   if test -s conftest.err; then
2505     ac_cpp_err=$ac_c_preproc_warn_flag
2506   else
2507     ac_cpp_err=
2508   fi
2509 else
2510   ac_cpp_err=yes
2511 fi
2512 if test -z "$ac_cpp_err"; then
2513   :
2514 else
2515   echo "$as_me: failed program was:" >&5
2516   cat conftest.$ac_ext >&5
2517   # Broken: fails on valid input.
2518 continue
2519 fi
2520 rm -f conftest.err conftest.$ac_ext
2521
2522   # OK, works on sane cases.  Now check whether non-existent headers
2523   # can be detected and how.
2524   cat >conftest.$ac_ext <<_ACEOF
2525 #line 2525 "configure"
2526 #include "confdefs.h"
2527 #include <ac_nonexistent.h>
2528 _ACEOF
2529 if { (eval echo "$as_me:2529: \"$ac_cpp conftest.$ac_ext\"") >&5
2530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531   ac_status=$?
2532   egrep -v '^ *\+' conftest.er1 >conftest.err
2533   rm -f conftest.er1
2534   cat conftest.err >&5
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); } >/dev/null; then
2537   if test -s conftest.err; then
2538     ac_cpp_err=$ac_c_preproc_warn_flag
2539   else
2540     ac_cpp_err=
2541   fi
2542 else
2543   ac_cpp_err=yes
2544 fi
2545 if test -z "$ac_cpp_err"; then
2546   # Broken: success on invalid input.
2547 continue
2548 else
2549   echo "$as_me: failed program was:" >&5
2550   cat conftest.$ac_ext >&5
2551   # Passes both tests.
2552 ac_preproc_ok=:
2553 break
2554 fi
2555 rm -f conftest.err conftest.$ac_ext
2556
2557 done
2558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559 rm -f conftest.err conftest.$ac_ext
2560 if $ac_preproc_ok; then
2561   break
2562 fi
2563
2564     done
2565     ac_cv_prog_CPP=$CPP
2566
2567 fi
2568   CPP=$ac_cv_prog_CPP
2569 else
2570   ac_cv_prog_CPP=$CPP
2571 fi
2572 echo "$as_me:2572: result: $CPP" >&5
2573 echo "${ECHO_T}$CPP" >&6
2574 ac_preproc_ok=false
2575 for ac_c_preproc_warn_flag in '' yes
2576 do
2577   # Use a header file that comes with gcc, so configuring glibc
2578   # with a fresh cross-compiler works.
2579   # On the NeXT, cc -E runs the code through the compiler's parser,
2580   # not just through cpp. "Syntax error" is here to catch this case.
2581   cat >conftest.$ac_ext <<_ACEOF
2582 #line 2582 "configure"
2583 #include "confdefs.h"
2584 #include <assert.h>
2585                      Syntax error
2586 _ACEOF
2587 if { (eval echo "$as_me:2587: \"$ac_cpp conftest.$ac_ext\"") >&5
2588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2589   ac_status=$?
2590   egrep -v '^ *\+' conftest.er1 >conftest.err
2591   rm -f conftest.er1
2592   cat conftest.err >&5
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); } >/dev/null; then
2595   if test -s conftest.err; then
2596     ac_cpp_err=$ac_c_preproc_warn_flag
2597   else
2598     ac_cpp_err=
2599   fi
2600 else
2601   ac_cpp_err=yes
2602 fi
2603 if test -z "$ac_cpp_err"; then
2604   :
2605 else
2606   echo "$as_me: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   # Broken: fails on valid input.
2609 continue
2610 fi
2611 rm -f conftest.err conftest.$ac_ext
2612
2613   # OK, works on sane cases.  Now check whether non-existent headers
2614   # can be detected and how.
2615   cat >conftest.$ac_ext <<_ACEOF
2616 #line 2616 "configure"
2617 #include "confdefs.h"
2618 #include <ac_nonexistent.h>
2619 _ACEOF
2620 if { (eval echo "$as_me:2620: \"$ac_cpp conftest.$ac_ext\"") >&5
2621   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622   ac_status=$?
2623   egrep -v '^ *\+' conftest.er1 >conftest.err
2624   rm -f conftest.er1
2625   cat conftest.err >&5
2626   echo "$as_me:2626: \$? = $ac_status" >&5
2627   (exit $ac_status); } >/dev/null; then
2628   if test -s conftest.err; then
2629     ac_cpp_err=$ac_c_preproc_warn_flag
2630   else
2631     ac_cpp_err=
2632   fi
2633 else
2634   ac_cpp_err=yes
2635 fi
2636 if test -z "$ac_cpp_err"; then
2637   # Broken: success on invalid input.
2638 continue
2639 else
2640   echo "$as_me: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   # Passes both tests.
2643 ac_preproc_ok=:
2644 break
2645 fi
2646 rm -f conftest.err conftest.$ac_ext
2647
2648 done
2649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2650 rm -f conftest.err conftest.$ac_ext
2651 if $ac_preproc_ok; then
2652   :
2653 else
2654   { { echo "$as_me:2654: error: C preprocessor \"$CPP\" fails sanity check" >&5
2655 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2656    { (exit 1); exit 1; }; }
2657 fi
2658
2659 ac_ext=c
2660 ac_cpp='$CPP $CPPFLAGS'
2661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2664 ac_main_return=return
2665
2666 if test $ac_cv_c_compiler_gnu = yes; then
2667     echo "$as_me:2667: checking whether $CC needs -traditional" >&5
2668 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2669 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672     ac_pattern="Autoconf.*'x'"
2673   cat >conftest.$ac_ext <<_ACEOF
2674 #line 2674 "configure"
2675 #include "confdefs.h"
2676 #include <sgtty.h>
2677 int Autoconf = TIOCGETP;
2678 _ACEOF
2679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2680   egrep "$ac_pattern" >/dev/null 2>&1; then
2681   ac_cv_prog_gcc_traditional=yes
2682 else
2683   ac_cv_prog_gcc_traditional=no
2684 fi
2685 rm -rf conftest*
2686
2687   if test $ac_cv_prog_gcc_traditional = no; then
2688     cat >conftest.$ac_ext <<_ACEOF
2689 #line 2689 "configure"
2690 #include "confdefs.h"
2691 #include <termio.h>
2692 int Autoconf = TCGETA;
2693 _ACEOF
2694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2695   egrep "$ac_pattern" >/dev/null 2>&1; then
2696   ac_cv_prog_gcc_traditional=yes
2697 fi
2698 rm -rf conftest*
2699
2700   fi
2701 fi
2702 echo "$as_me:2702: result: $ac_cv_prog_gcc_traditional" >&5
2703 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2704   if test $ac_cv_prog_gcc_traditional = yes; then
2705     CC="$CC -traditional"
2706   fi
2707 fi
2708
2709 echo "$as_me:2709: checking whether $CC understands -c and -o together" >&5
2710 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2711 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2712   echo $ECHO_N "(cached) $ECHO_C" >&6
2713 else
2714
2715 cat > conftest.$ac_ext <<CF_EOF
2716 int main(void)
2717 {
2718         ${cf_cv_main_return:-return}(0);
2719 }
2720 CF_EOF
2721 # We do the test twice because some compilers refuse to overwrite an
2722 # existing .o file with -o, though they will create one.
2723 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2724 if { (eval echo "$as_me:2724: \"$ac_try\"") >&5
2725   (eval $ac_try) 2>&5
2726   ac_status=$?
2727   echo "$as_me:2727: \$? = $ac_status" >&5
2728   (exit $ac_status); } &&
2729   test -f conftest2.$ac_objext && { (eval echo "$as_me:2729: \"$ac_try\"") >&5
2730   (eval $ac_try) 2>&5
2731   ac_status=$?
2732   echo "$as_me:2732: \$? = $ac_status" >&5
2733   (exit $ac_status); };
2734 then
2735   eval cf_cv_prog_CC_c_o=yes
2736 else
2737   eval cf_cv_prog_CC_c_o=no
2738 fi
2739 rm -rf conftest*
2740
2741 fi
2742 if test $cf_cv_prog_CC_c_o = yes; then
2743   echo "$as_me:2743: result: yes" >&5
2744 echo "${ECHO_T}yes" >&6
2745 else
2746   echo "$as_me:2746: result: no" >&5
2747 echo "${ECHO_T}no" >&6
2748 fi
2749
2750 if test "$cross_compiling" = yes ; then
2751         LDCONFIG=:
2752 else
2753         case "$cf_cv_system_name" in
2754         (dragonfly*|mirbsd*|freebsd*)
2755                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2756                 ;;
2757         (*) LDPATH=$PATH:/sbin:/usr/sbin
2758                 # Extract the first word of "ldconfig", so it can be a program name with args.
2759 set dummy ldconfig; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2763   echo $ECHO_N "(cached) $ECHO_C" >&6
2764 else
2765   case $LDCONFIG in
2766   [\\/]* | ?:[\\/]*)
2767   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2768   ;;
2769   *)
2770   ac_save_IFS=$IFS; IFS=$ac_path_separator
2771 ac_dummy="$LDPATH"
2772 for ac_dir in $ac_dummy; do
2773   IFS=$ac_save_IFS
2774   test -z "$ac_dir" && ac_dir=.
2775   if $as_executable_p "$ac_dir/$ac_word"; then
2776    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2777    echo "$as_me:2777: found $ac_dir/$ac_word" >&5
2778    break
2779 fi
2780 done
2781
2782   ;;
2783 esac
2784 fi
2785 LDCONFIG=$ac_cv_path_LDCONFIG
2786
2787 if test -n "$LDCONFIG"; then
2788   echo "$as_me:2788: result: $LDCONFIG" >&5
2789 echo "${ECHO_T}$LDCONFIG" >&6
2790 else
2791   echo "$as_me:2791: result: no" >&5
2792 echo "${ECHO_T}no" >&6
2793 fi
2794
2795                 ;;
2796         esac
2797 fi
2798
2799 echo "$as_me:2799: checking if you want to ensure bool is consistent with C++" >&5
2800 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2801
2802 # Check whether --with-cxx or --without-cxx was given.
2803 if test "${with_cxx+set}" = set; then
2804   withval="$with_cxx"
2805   cf_with_cxx=$withval
2806 else
2807   cf_with_cxx=yes
2808 fi;
2809 echo "$as_me:2809: result: $cf_with_cxx" >&5
2810 echo "${ECHO_T}$cf_with_cxx" >&6
2811 if test "X$cf_with_cxx" = Xno ; then
2812         CXX=""
2813         GXX=""
2814 else
2815         # with autoconf 2.13, we can change the error to a warning:
2816                 ac_ext=cc
2817 ac_cpp='$CXXCPP $CPPFLAGS'
2818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2821 ac_main_return=return
2822 if test -n "$ac_tool_prefix"; then
2823   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2824   do
2825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2827 echo "$as_me:2827: checking for $ac_word" >&5
2828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2829 if test "${ac_cv_prog_CXX+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832   if test -n "$CXX"; then
2833   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2834 else
2835   ac_save_IFS=$IFS; IFS=$ac_path_separator
2836 ac_dummy="$PATH"
2837 for ac_dir in $ac_dummy; do
2838   IFS=$ac_save_IFS
2839   test -z "$ac_dir" && ac_dir=.
2840   $as_executable_p "$ac_dir/$ac_word" || continue
2841 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2842 echo "$as_me:2842: found $ac_dir/$ac_word" >&5
2843 break
2844 done
2845
2846 fi
2847 fi
2848 CXX=$ac_cv_prog_CXX
2849 if test -n "$CXX"; then
2850   echo "$as_me:2850: result: $CXX" >&5
2851 echo "${ECHO_T}$CXX" >&6
2852 else
2853   echo "$as_me:2853: result: no" >&5
2854 echo "${ECHO_T}no" >&6
2855 fi
2856
2857     test -n "$CXX" && break
2858   done
2859 fi
2860 if test -z "$CXX"; then
2861   ac_ct_CXX=$CXX
2862   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2863 do
2864   # Extract the first word of "$ac_prog", so it can be a program name with args.
2865 set dummy $ac_prog; ac_word=$2
2866 echo "$as_me:2866: checking for $ac_word" >&5
2867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2868 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   if test -n "$ac_ct_CXX"; then
2872   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2873 else
2874   ac_save_IFS=$IFS; IFS=$ac_path_separator
2875 ac_dummy="$PATH"
2876 for ac_dir in $ac_dummy; do
2877   IFS=$ac_save_IFS
2878   test -z "$ac_dir" && ac_dir=.
2879   $as_executable_p "$ac_dir/$ac_word" || continue
2880 ac_cv_prog_ac_ct_CXX="$ac_prog"
2881 echo "$as_me:2881: found $ac_dir/$ac_word" >&5
2882 break
2883 done
2884
2885 fi
2886 fi
2887 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2888 if test -n "$ac_ct_CXX"; then
2889   echo "$as_me:2889: result: $ac_ct_CXX" >&5
2890 echo "${ECHO_T}$ac_ct_CXX" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896   test -n "$ac_ct_CXX" && break
2897 done
2898 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2899
2900   CXX=$ac_ct_CXX
2901 fi
2902
2903 # Provide some information about the compiler.
2904 echo "$as_me:2904:" \
2905      "checking for C++ compiler version" >&5
2906 ac_compiler=`set X $ac_compile; echo $2`
2907 { (eval echo "$as_me:2907: \"$ac_compiler --version </dev/null >&5\"") >&5
2908   (eval $ac_compiler --version </dev/null >&5) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }
2912 { (eval echo "$as_me:2912: \"$ac_compiler -v </dev/null >&5\"") >&5
2913   (eval $ac_compiler -v </dev/null >&5) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }
2917 { (eval echo "$as_me:2917: \"$ac_compiler -V </dev/null >&5\"") >&5
2918   (eval $ac_compiler -V </dev/null >&5) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); }
2922
2923 echo "$as_me:2923: checking whether we are using the GNU C++ compiler" >&5
2924 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2925 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2926   echo $ECHO_N "(cached) $ECHO_C" >&6
2927 else
2928   cat >conftest.$ac_ext <<_ACEOF
2929 #line 2929 "configure"
2930 #include "confdefs.h"
2931
2932 int
2933 main (void)
2934 {
2935 #ifndef __GNUC__
2936        choke me
2937 #endif
2938
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); } &&
2949          { ac_try='test -s conftest.$ac_objext'
2950   { (eval echo "$as_me:2950: \"$ac_try\"") >&5
2951   (eval $ac_try) 2>&5
2952   ac_status=$?
2953   echo "$as_me:2953: \$? = $ac_status" >&5
2954   (exit $ac_status); }; }; then
2955   ac_compiler_gnu=yes
2956 else
2957   echo "$as_me: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 ac_compiler_gnu=no
2960 fi
2961 rm -f conftest.$ac_objext conftest.$ac_ext
2962 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2963
2964 fi
2965 echo "$as_me:2965: result: $ac_cv_cxx_compiler_gnu" >&5
2966 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2967 GXX=`test $ac_compiler_gnu = yes && echo yes`
2968 ac_test_CXXFLAGS=${CXXFLAGS+set}
2969 ac_save_CXXFLAGS=$CXXFLAGS
2970 CXXFLAGS="-g"
2971 echo "$as_me:2971: checking whether $CXX accepts -g" >&5
2972 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2973 if test "${ac_cv_prog_cxx_g+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main (void)
2982 {
2983
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   ac_cv_prog_cxx_g=yes
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 ac_cv_prog_cxx_g=no
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 fi
3008 echo "$as_me:3008: result: $ac_cv_prog_cxx_g" >&5
3009 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3010 if test "$ac_test_CXXFLAGS" = set; then
3011   CXXFLAGS=$ac_save_CXXFLAGS
3012 elif test $ac_cv_prog_cxx_g = yes; then
3013   if test "$GXX" = yes; then
3014     CXXFLAGS="-g -O2"
3015   else
3016     CXXFLAGS="-g"
3017   fi
3018 else
3019   if test "$GXX" = yes; then
3020     CXXFLAGS="-O2"
3021   else
3022     CXXFLAGS=
3023   fi
3024 fi
3025 for ac_declaration in \
3026    ''\
3027    '#include <stdlib.h>' \
3028    'extern "C" void std::exit (int) throw (); using std::exit;' \
3029    'extern "C" void std::exit (int); using std::exit;' \
3030    'extern "C" void exit (int) throw ();' \
3031    'extern "C" void exit (int);' \
3032    'void exit (int);'
3033 do
3034   cat >conftest.$ac_ext <<_ACEOF
3035 #line 3035 "configure"
3036 #include "confdefs.h"
3037 #include <stdlib.h>
3038 $ac_declaration
3039 int
3040 main (void)
3041 {
3042 exit (42);
3043   ;
3044   return 0;
3045 }
3046 _ACEOF
3047 rm -f conftest.$ac_objext
3048 if { (eval echo "$as_me:3048: \"$ac_compile\"") >&5
3049   (eval $ac_compile) 2>&5
3050   ac_status=$?
3051   echo "$as_me:3051: \$? = $ac_status" >&5
3052   (exit $ac_status); } &&
3053          { ac_try='test -s conftest.$ac_objext'
3054   { (eval echo "$as_me:3054: \"$ac_try\"") >&5
3055   (eval $ac_try) 2>&5
3056   ac_status=$?
3057   echo "$as_me:3057: \$? = $ac_status" >&5
3058   (exit $ac_status); }; }; then
3059   :
3060 else
3061   echo "$as_me: failed program was:" >&5
3062 cat conftest.$ac_ext >&5
3063 continue
3064 fi
3065 rm -f conftest.$ac_objext conftest.$ac_ext
3066   cat >conftest.$ac_ext <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3069 $ac_declaration
3070 int
3071 main (void)
3072 {
3073 exit (42);
3074   ;
3075   return 0;
3076 }
3077 _ACEOF
3078 rm -f conftest.$ac_objext
3079 if { (eval echo "$as_me:3079: \"$ac_compile\"") >&5
3080   (eval $ac_compile) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); } &&
3084          { ac_try='test -s conftest.$ac_objext'
3085   { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit $ac_status); }; }; then
3090   break
3091 else
3092   echo "$as_me: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 fi
3095 rm -f conftest.$ac_objext conftest.$ac_ext
3096 done
3097 rm -rf conftest*
3098 if test -n "$ac_declaration"; then
3099   echo '#ifdef __cplusplus' >>confdefs.h
3100   echo $ac_declaration      >>confdefs.h
3101   echo '#endif'             >>confdefs.h
3102 fi
3103
3104 ac_ext=c
3105 ac_cpp='$CPP $CPPFLAGS'
3106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3109 ac_main_return=return
3110
3111         ac_ext=cc
3112 ac_cpp='$CXXCPP $CPPFLAGS'
3113 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3114 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3115 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3116 ac_main_return=return
3117
3118         if test "x$cf_with_cxx" != xno
3119         then
3120                 # Several of the C++ configurations do not work, particularly when
3121                 # cross-compiling (20140913 -TD)
3122                 echo "$as_me:3122: checking if $CXX works" >&5
3123 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3124
3125                 save_CPPFLAGS="$CPPFLAGS"
3126                 eval cf_includedir=${includedir}
3127                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3128
3129 cat >conftest.$ac_ext <<_ACEOF
3130 #line 3130 "configure"
3131 #include "confdefs.h"
3132
3133 #include <stdlib.h>
3134 #include <stdio.h>
3135
3136 int
3137 main (void)
3138 {
3139
3140                 printf("Hello world!\n")
3141
3142   ;
3143   return 0;
3144 }
3145 _ACEOF
3146 rm -f conftest.$ac_objext
3147 if { (eval echo "$as_me:3147: \"$ac_compile\"") >&5
3148   (eval $ac_compile) 2>&5
3149   ac_status=$?
3150   echo "$as_me:3150: \$? = $ac_status" >&5
3151   (exit $ac_status); } &&
3152          { ac_try='test -s conftest.$ac_objext'
3153   { (eval echo "$as_me:3153: \"$ac_try\"") >&5
3154   (eval $ac_try) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); }; }; then
3158   cf_cxx_works=yes
3159 else
3160   echo "$as_me: failed program was:" >&5
3161 cat conftest.$ac_ext >&5
3162 cf_cxx_works=no
3163 fi
3164 rm -f conftest.$ac_objext conftest.$ac_ext
3165                 CPPFLAGS="$save_CPPFLAGS"
3166
3167                 echo "$as_me:3167: result: $cf_cxx_works" >&5
3168 echo "${ECHO_T}$cf_cxx_works" >&6
3169                 if test "x$cf_cxx_works" = xno
3170                 then
3171                         { echo "$as_me:3171: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3172 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3173                         cf_with_cxx=no; CXX=""; GXX="";
3174                 fi
3175         fi
3176         ac_ext=c
3177 ac_cpp='$CPP $CPPFLAGS'
3178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181 ac_main_return=return
3182
3183         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3184         if test "$CXX" = "g++" ; then
3185                 # Extract the first word of "g++", so it can be a program name with args.
3186 set dummy g++; ac_word=$2
3187 echo "$as_me:3187: checking for $ac_word" >&5
3188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189 if test "${ac_cv_path_CXX+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192   case $CXX in
3193   [\\/]* | ?:[\\/]*)
3194   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195   ;;
3196   *)
3197   ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 ac_dummy="$PATH"
3199 for ac_dir in $ac_dummy; do
3200   IFS=$ac_save_IFS
3201   test -z "$ac_dir" && ac_dir=.
3202   if $as_executable_p "$ac_dir/$ac_word"; then
3203    ac_cv_path_CXX="$ac_dir/$ac_word"
3204    echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3205    break
3206 fi
3207 done
3208
3209   ;;
3210 esac
3211 fi
3212 CXX=$ac_cv_path_CXX
3213
3214 if test -n "$CXX"; then
3215   echo "$as_me:3215: result: $CXX" >&5
3216 echo "${ECHO_T}$CXX" >&6
3217 else
3218   echo "$as_me:3218: result: no" >&5
3219 echo "${ECHO_T}no" >&6
3220 fi
3221
3222         fi
3223         case "x$CXX" in
3224         (x|xg++)
3225                 { echo "$as_me:3225: WARNING: You don't have any C++ compiler, too bad" >&5
3226 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3227                 cf_with_cxx=no; CXX=""; GXX="";
3228                 ;;
3229         esac
3230 fi
3231
3232 GXX_VERSION=none
3233 if test "$GXX" = yes; then
3234         echo "$as_me:3234: checking version of ${CXX:-g++}" >&5
3235 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3236         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3237         if test -z "$GXX_VERSION"
3238         then
3239                 GXX_VERSION=unknown
3240                 GXX=no
3241         fi
3242         echo "$as_me:3242: result: $GXX_VERSION" >&5
3243 echo "${ECHO_T}$GXX_VERSION" >&6
3244 fi
3245
3246 case $GXX_VERSION in
3247 (1*|2.[0-6]*)
3248         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3249         # cf_cxx_library=no
3250         { echo "$as_me:3250: WARNING: templates do not work" >&5
3251 echo "$as_me: WARNING: templates do not work" >&2;}
3252         ;;
3253 esac
3254
3255 echo "$as_me:3255: checking if you want to build C++ binding and demo" >&5
3256 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3257
3258 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3259 if test "${with_cxx_binding+set}" = set; then
3260   withval="$with_cxx_binding"
3261   cf_with_cxx_binding=$withval
3262 else
3263   cf_with_cxx_binding=$cf_with_cxx
3264 fi;
3265 echo "$as_me:3265: result: $cf_with_cxx_binding" >&5
3266 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3267
3268 echo "$as_me:3268: checking if you want to build with Ada95" >&5
3269 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3270 echo "$as_me:3270: result: $cf_with_ada" >&5
3271 echo "${ECHO_T}$cf_with_ada" >&6
3272
3273 echo "$as_me:3273: checking if you want to install terminal database" >&5
3274 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3275
3276 # Check whether --enable-db-install or --disable-db-install was given.
3277 if test "${enable_db_install+set}" = set; then
3278   enableval="$enable_db_install"
3279   cf_with_db_install=$enableval
3280 else
3281   cf_with_db_install=yes
3282 fi;
3283 echo "$as_me:3283: result: $cf_with_db_install" >&5
3284 echo "${ECHO_T}$cf_with_db_install" >&6
3285
3286 echo "$as_me:3286: checking if you want to install manpages" >&5
3287 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3288
3289 # Check whether --with-manpages or --without-manpages was given.
3290 if test "${with_manpages+set}" = set; then
3291   withval="$with_manpages"
3292   cf_with_manpages=$withval
3293 else
3294   cf_with_manpages=yes
3295 fi;
3296 echo "$as_me:3296: result: $cf_with_manpages" >&5
3297 echo "${ECHO_T}$cf_with_manpages" >&6
3298
3299 echo "$as_me:3299: checking if you want to build programs such as tic" >&5
3300 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3301
3302 # Check whether --with-progs or --without-progs was given.
3303 if test "${with_progs+set}" = set; then
3304   withval="$with_progs"
3305   cf_with_progs=$withval
3306 else
3307   cf_with_progs=yes
3308 fi;
3309 echo "$as_me:3309: result: $cf_with_progs" >&5
3310 echo "${ECHO_T}$cf_with_progs" >&6
3311
3312 if test -f $srcdir/tack/tack.h; then
3313         if test "x$cross_compiling" = xyes ; then
3314                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3315
3316 echo "${as_me:-configure}:3316: testing ignoring tack because we are cross-compiling ..." 1>&5
3317
3318                 cf_with_tack=no
3319         else
3320                 echo "$as_me:3320: checking if you want to build the tack program" >&5
3321 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3322
3323 # Check whether --with-tack or --without-tack was given.
3324 if test "${with_tack+set}" = set; then
3325   withval="$with_tack"
3326   cf_with_tack=$withval
3327 else
3328   cf_with_tack=$cf_with_progs
3329 fi;
3330                 echo "$as_me:3330: result: $cf_with_tack" >&5
3331 echo "${ECHO_T}$cf_with_tack" >&6
3332         fi
3333 else
3334         cf_with_tack=no
3335 fi
3336
3337 echo "$as_me:3337: checking if you want to build test-programs" >&5
3338 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3339
3340 # Check whether --with-tests or --without-tests was given.
3341 if test "${with_tests+set}" = set; then
3342   withval="$with_tests"
3343   cf_with_tests=$withval
3344 else
3345   cf_with_tests=yes
3346 fi;
3347 echo "$as_me:3347: result: $cf_with_tests" >&5
3348 echo "${ECHO_T}$cf_with_tests" >&6
3349
3350 echo "$as_me:3350: checking if you wish to install curses.h" >&5
3351 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3352
3353 # Check whether --with-curses-h or --without-curses-h was given.
3354 if test "${with_curses_h+set}" = set; then
3355   withval="$with_curses_h"
3356   with_curses_h=$withval
3357 else
3358   with_curses_h=yes
3359 fi;
3360 echo "$as_me:3360: result: $with_curses_h" >&5
3361 echo "${ECHO_T}$with_curses_h" >&6
3362
3363 modules_to_build="ncurses"
3364 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3365 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3366 modules_to_build="$modules_to_build panel menu form"
3367
3368 test "$program_prefix" != NONE &&
3369   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3370 # Use a double $ so make ignores it.
3371 test "$program_suffix" != NONE &&
3372   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3373 # Double any \ or $.  echo might interpret backslashes.
3374 # By default was `s,x,x', remove it if useless.
3375 cat <<\_ACEOF >conftest.sed
3376 s/[\\$]/&&/g;s/;s,x,x,$//
3377 _ACEOF
3378 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3379 rm conftest.sed
3380
3381 for ac_prog in mawk gawk nawk awk
3382 do
3383   # Extract the first word of "$ac_prog", so it can be a program name with args.
3384 set dummy $ac_prog; ac_word=$2
3385 echo "$as_me:3385: checking for $ac_word" >&5
3386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387 if test "${ac_cv_prog_AWK+set}" = set; then
3388   echo $ECHO_N "(cached) $ECHO_C" >&6
3389 else
3390   if test -n "$AWK"; then
3391   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3392 else
3393   ac_save_IFS=$IFS; IFS=$ac_path_separator
3394 ac_dummy="$PATH"
3395 for ac_dir in $ac_dummy; do
3396   IFS=$ac_save_IFS
3397   test -z "$ac_dir" && ac_dir=.
3398   $as_executable_p "$ac_dir/$ac_word" || continue
3399 ac_cv_prog_AWK="$ac_prog"
3400 echo "$as_me:3400: found $ac_dir/$ac_word" >&5
3401 break
3402 done
3403
3404 fi
3405 fi
3406 AWK=$ac_cv_prog_AWK
3407 if test -n "$AWK"; then
3408   echo "$as_me:3408: result: $AWK" >&5
3409 echo "${ECHO_T}$AWK" >&6
3410 else
3411   echo "$as_me:3411: result: no" >&5
3412 echo "${ECHO_T}no" >&6
3413 fi
3414
3415   test -n "$AWK" && break
3416 done
3417
3418 test -z "$AWK" && { { echo "$as_me:3418: error: No awk program found" >&5
3419 echo "$as_me: error: No awk program found" >&2;}
3420    { (exit 1); exit 1; }; }
3421
3422 echo "$as_me:3422: checking for egrep" >&5
3423 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3424 if test "${ac_cv_prog_egrep+set}" = set; then
3425   echo $ECHO_N "(cached) $ECHO_C" >&6
3426 else
3427   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3428                 then ac_cv_prog_egrep='grep -E'
3429                 else ac_cv_prog_egrep='egrep'
3430         fi
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_prog_egrep" >&5
3433 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3434         EGREP=$ac_cv_prog_egrep
3435
3436         test -z "$EGREP" && { { echo "$as_me:3436: error: No egrep program found" >&5
3437 echo "$as_me: error: No egrep program found" >&2;}
3438    { (exit 1); exit 1; }; }
3439
3440 # Find a good install program.  We prefer a C program (faster),
3441 # so one script is as good as another.  But avoid the broken or
3442 # incompatible versions:
3443 # SysV /etc/install, /usr/sbin/install
3444 # SunOS /usr/etc/install
3445 # IRIX /sbin/install
3446 # AIX /bin/install
3447 # AmigaOS /C/install, which installs bootblocks on floppy discs
3448 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3449 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3450 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3451 # ./install, which can be erroneously created by make from ./install.sh.
3452 echo "$as_me:3452: checking for a BSD compatible install" >&5
3453 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3454 if test -z "$INSTALL"; then
3455 if test "${ac_cv_path_install+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458     ac_save_IFS=$IFS; IFS=$ac_path_separator
3459   for ac_dir in $PATH; do
3460     IFS=$ac_save_IFS
3461     # Account for people who put trailing slashes in PATH elements.
3462     case $ac_dir/ in
3463     / | ./ | .// | /cC/* \
3464     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3465     | /usr/ucb/* ) ;;
3466     *)
3467       # OSF1 and SCO ODT 3.0 have their own names for install.
3468       # Don't use installbsd from OSF since it installs stuff as root
3469       # by default.
3470       for ac_prog in ginstall scoinst install; do
3471         if $as_executable_p "$ac_dir/$ac_prog"; then
3472           if test $ac_prog = install &&
3473             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3474             # AIX install.  It has an incompatible calling convention.
3475             :
3476           elif test $ac_prog = install &&
3477             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3478             # program-specific install script used by HP pwplus--don't use.
3479             :
3480           else
3481             ac_cv_path_install="$ac_dir/$ac_prog -c"
3482             break 2
3483           fi
3484         fi
3485       done
3486       ;;
3487     esac
3488   done
3489
3490 fi
3491   if test "${ac_cv_path_install+set}" = set; then
3492     INSTALL=$ac_cv_path_install
3493   else
3494     # As a last resort, use the slow shell script.  We don't cache a
3495     # path for INSTALL within a source directory, because that will
3496     # break other packages using the cache if that directory is
3497     # removed, or if the path is relative.
3498     INSTALL=$ac_install_sh
3499   fi
3500 fi
3501 echo "$as_me:3501: result: $INSTALL" >&5
3502 echo "${ECHO_T}$INSTALL" >&6
3503
3504 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3505 # It thinks the first close brace ends the variable substitution.
3506 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3507
3508 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3509
3510 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3511
3512 case $INSTALL in
3513 (/*)
3514         ;;
3515 (*)
3516         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3517         test -z "$cf_dir" && cf_dir=.
3518         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3519         ;;
3520 esac
3521
3522 for ac_prog in lint cppcheck splint
3523 do
3524   # Extract the first word of "$ac_prog", so it can be a program name with args.
3525 set dummy $ac_prog; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_prog_LINT+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   if test -n "$LINT"; then
3532   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3533 else
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   $as_executable_p "$ac_dir/$ac_word" || continue
3540 ac_cv_prog_LINT="$ac_prog"
3541 echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542 break
3543 done
3544
3545 fi
3546 fi
3547 LINT=$ac_cv_prog_LINT
3548 if test -n "$LINT"; then
3549   echo "$as_me:3549: result: $LINT" >&5
3550 echo "${ECHO_T}$LINT" >&6
3551 else
3552   echo "$as_me:3552: result: no" >&5
3553 echo "${ECHO_T}no" >&6
3554 fi
3555
3556   test -n "$LINT" && break
3557 done
3558
3559 echo "$as_me:3559: checking whether ln -s works" >&5
3560 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3561 LN_S=$as_ln_s
3562 if test "$LN_S" = "ln -s"; then
3563   echo "$as_me:3563: result: yes" >&5
3564 echo "${ECHO_T}yes" >&6
3565 else
3566   echo "$as_me:3566: result: no, using $LN_S" >&5
3567 echo "${ECHO_T}no, using $LN_S" >&6
3568 fi
3569
3570 echo "$as_me:3570: checking if $LN_S -f options work" >&5
3571 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3572
3573 rm -f conf$$.src conf$$dst
3574 echo >conf$$.dst
3575 echo first >conf$$.src
3576 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3577         cf_prog_ln_sf=yes
3578 else
3579         cf_prog_ln_sf=no
3580 fi
3581 rm -f conf$$.dst conf$$src
3582 echo "$as_me:3582: result: $cf_prog_ln_sf" >&5
3583 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3584
3585 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3586
3587 echo "$as_me:3587: checking for long file names" >&5
3588 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3589 if test "${ac_cv_sys_long_file_names+set}" = set; then
3590   echo $ECHO_N "(cached) $ECHO_C" >&6
3591 else
3592   ac_cv_sys_long_file_names=yes
3593 # Test for long file names in all the places we know might matter:
3594 #      .                the current directory, where building will happen
3595 #      $prefix/lib      where we will be installing things
3596 #      $exec_prefix/lib likewise
3597 # eval it to expand exec_prefix.
3598 #      $TMPDIR          if set, where it might want to write temporary files
3599 # if $TMPDIR is not set:
3600 #      /tmp             where it might want to write temporary files
3601 #      /var/tmp         likewise
3602 #      /usr/tmp         likewise
3603 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3604   ac_tmpdirs=$TMPDIR
3605 else
3606   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3607 fi
3608 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3609   test -d $ac_dir || continue
3610   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3611   ac_xdir=$ac_dir/cf$$
3612   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3613   ac_tf1=$ac_xdir/conftest9012345
3614   ac_tf2=$ac_xdir/conftest9012346
3615   (echo 1 >$ac_tf1) 2>/dev/null
3616   (echo 2 >$ac_tf2) 2>/dev/null
3617   ac_val=`cat $ac_tf1 2>/dev/null`
3618   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3619     ac_cv_sys_long_file_names=no
3620     rm -rf $ac_xdir 2>/dev/null
3621     break
3622   fi
3623   rm -rf $ac_xdir 2>/dev/null
3624 done
3625 fi
3626 echo "$as_me:3626: result: $ac_cv_sys_long_file_names" >&5
3627 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3628 if test $ac_cv_sys_long_file_names = yes; then
3629
3630 cat >>confdefs.h <<\EOF
3631 #define HAVE_LONG_FILE_NAMES 1
3632 EOF
3633
3634 fi
3635
3636 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3637 # of package conflict.
3638 cf_config_suffix=
3639
3640 # Check whether --with-config-suffix or --without-config-suffix was given.
3641 if test "${with_config_suffix+set}" = set; then
3642   withval="$with_config_suffix"
3643   case "x$withval" in
3644         (xyes|xno)
3645                 { echo "$as_me:3645: WARNING: expected a value for config-suffix option" >&5
3646 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3647                 ;;
3648         (*)     cf_config_suffix="$withval"
3649                 ;;
3650         esac
3651 fi;
3652
3653 # If we find pkg-config, check if we should install the ".pc" files.
3654
3655 echo "$as_me:3655: checking if you want to use pkg-config" >&5
3656 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3657
3658 # Check whether --with-pkg-config or --without-pkg-config was given.
3659 if test "${with_pkg_config+set}" = set; then
3660   withval="$with_pkg_config"
3661   cf_pkg_config=$withval
3662 else
3663   cf_pkg_config=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_pkg_config" >&5
3666 echo "${ECHO_T}$cf_pkg_config" >&6
3667
3668 case $cf_pkg_config in
3669 (no)
3670         PKG_CONFIG=none
3671         ;;
3672 (yes)
3673
3674 if test -n "$ac_tool_prefix"; then
3675   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3676 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3677 echo "$as_me:3677: checking for $ac_word" >&5
3678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3679 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3680   echo $ECHO_N "(cached) $ECHO_C" >&6
3681 else
3682   case $PKG_CONFIG in
3683   [\\/]* | ?:[\\/]*)
3684   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3685   ;;
3686   *)
3687   ac_save_IFS=$IFS; IFS=$ac_path_separator
3688 ac_dummy="$PATH"
3689 for ac_dir in $ac_dummy; do
3690   IFS=$ac_save_IFS
3691   test -z "$ac_dir" && ac_dir=.
3692   if $as_executable_p "$ac_dir/$ac_word"; then
3693    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3694    echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3695    break
3696 fi
3697 done
3698
3699   ;;
3700 esac
3701 fi
3702 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3703
3704 if test -n "$PKG_CONFIG"; then
3705   echo "$as_me:3705: result: $PKG_CONFIG" >&5
3706 echo "${ECHO_T}$PKG_CONFIG" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_path_PKG_CONFIG"; then
3714   ac_pt_PKG_CONFIG=$PKG_CONFIG
3715   # Extract the first word of "pkg-config", so it can be a program name with args.
3716 set dummy pkg-config; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   case $ac_pt_PKG_CONFIG in
3723   [\\/]* | ?:[\\/]*)
3724   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3725   ;;
3726   *)
3727   ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 ac_dummy="$PATH"
3729 for ac_dir in $ac_dummy; do
3730   IFS=$ac_save_IFS
3731   test -z "$ac_dir" && ac_dir=.
3732   if $as_executable_p "$ac_dir/$ac_word"; then
3733    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3734    echo "$as_me:3734: found $ac_dir/$ac_word" >&5
3735    break
3736 fi
3737 done
3738
3739   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3740   ;;
3741 esac
3742 fi
3743 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3744
3745 if test -n "$ac_pt_PKG_CONFIG"; then
3746   echo "$as_me:3746: result: $ac_pt_PKG_CONFIG" >&5
3747 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   PKG_CONFIG=$ac_pt_PKG_CONFIG
3754 else
3755   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3756 fi
3757
3758         ;;
3759 (*)
3760         PKG_CONFIG=$withval
3761         ;;
3762 esac
3763
3764 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3765 if test "$PKG_CONFIG" != none ; then
3766
3767 if test "x$prefix" != xNONE; then
3768         cf_path_syntax="$prefix"
3769 else
3770         cf_path_syntax="$ac_default_prefix"
3771 fi
3772
3773 case ".$PKG_CONFIG" in
3774 (.\$\(*\)*|.\'*\'*)
3775         ;;
3776 (..|./*|.\\*)
3777         ;;
3778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3779         ;;
3780 (.\${*prefix}*|.\${*dir}*)
3781         eval PKG_CONFIG="$PKG_CONFIG"
3782         case ".$PKG_CONFIG" in
3783         (.NONE/*)
3784                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3785                 ;;
3786         esac
3787         ;;
3788 (.no|.NONE/*)
3789         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3790         ;;
3791 (*)
3792         { { echo "$as_me:3792: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3793 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3794    { (exit 1); exit 1; }; }
3795         ;;
3796 esac
3797
3798 elif test "x$cf_pkg_config" != xno ; then
3799         { echo "$as_me:3799: WARNING: pkg-config is not installed" >&5
3800 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3801 fi
3802
3803 case $PKG_CONFIG in
3804 (no|none|yes)
3805         echo "$as_me:3805: checking for pkg-config library directory" >&5
3806 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3807         ;;
3808 (*)
3809         echo "$as_me:3809: checking for $PKG_CONFIG library directory" >&5
3810 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3811         ;;
3812 esac
3813
3814 PKG_CONFIG_LIBDIR=no
3815
3816 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3817 if test "${with_pkg_config_libdir+set}" = set; then
3818   withval="$with_pkg_config_libdir"
3819   PKG_CONFIG_LIBDIR=$withval
3820 else
3821   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3822 fi;
3823
3824 case x$PKG_CONFIG_LIBDIR in
3825 (x/*)
3826         ;;
3827 (xyes)
3828         # Look for the library directory using the same prefix as the executable
3829         if test "x$PKG_CONFIG" = xnone
3830         then
3831                 cf_path=$prefix
3832         else
3833                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3834         fi
3835
3836         # If you don't like using the default architecture, you have to specify the
3837         # intended library directory and corresponding compiler/linker options.
3838         #
3839         # This case allows for Debian's 2014-flavor of multiarch, along with the
3840         # most common variations before that point.  Some other variants spell the
3841         # directory differently, e.g., "pkg-config", and put it in unusual places.
3842         # pkg-config has always been poorly standardized, which is ironic...
3843         case x`(arch) 2>/dev/null` in
3844         (*64)
3845                 cf_search_path="\
3846                         $cf_path/lib/*64-linux-gnu \
3847                         $cf_path/share \
3848                         $cf_path/lib64 \
3849                         $cf_path/lib32 \
3850                         $cf_path/lib"
3851                 ;;
3852         (*)
3853                 cf_search_path="\
3854                         $cf_path/lib/*-linux-gnu \
3855                         $cf_path/share \
3856                         $cf_path/lib32 \
3857                         $cf_path/lib \
3858                         $cf_path/libdata"
3859                 ;;
3860         esac
3861
3862         test -n "$verbose" && echo "    list..." 1>&6
3863
3864 echo "${as_me:-configure}:3864: testing list... ..." 1>&5
3865
3866         for cf_config in $cf_search_path
3867         do
3868                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3869
3870 echo "${as_me:-configure}:3870: testing checking $cf_config/pkgconfig ..." 1>&5
3871
3872                 if test -d $cf_config/pkgconfig
3873                 then
3874                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3875                         echo "$as_me:3875: checking done" >&5
3876 echo $ECHO_N "checking done... $ECHO_C" >&6
3877                         break
3878                 fi
3879         done
3880         ;;
3881 (*)
3882         ;;
3883 esac
3884
3885 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3886         echo "$as_me:3886: result: $PKG_CONFIG_LIBDIR" >&5
3887 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3888 fi
3889
3890 if test "x$PKG_CONFIG" != xnone
3891 then
3892         echo "$as_me:3892: checking if we should install .pc files for $PKG_CONFIG" >&5
3893 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3894 else
3895         echo "$as_me:3895: checking if we should install .pc files" >&5
3896 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3897 fi
3898
3899 # Check whether --enable-pc-files or --disable-pc-files was given.
3900 if test "${enable_pc_files+set}" = set; then
3901   enableval="$enable_pc_files"
3902   enable_pc_files=$enableval
3903 else
3904   enable_pc_files=no
3905 fi;
3906 echo "$as_me:3906: result: $enable_pc_files" >&5
3907 echo "${ECHO_T}$enable_pc_files" >&6
3908
3909 if test "x$enable_pc_files" != xno
3910 then
3911         MAKE_PC_FILES=
3912         case "x$PKG_CONFIG_LIBDIR" in
3913         (xno|xyes)
3914                 { echo "$as_me:3914: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3915 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3916                 ;;
3917         (*)
3918
3919 if test "x$prefix" != xNONE; then
3920         cf_path_syntax="$prefix"
3921 else
3922         cf_path_syntax="$ac_default_prefix"
3923 fi
3924
3925 case ".$PKG_CONFIG_LIBDIR" in
3926 (.\$\(*\)*|.\'*\'*)
3927         ;;
3928 (..|./*|.\\*)
3929         ;;
3930 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3931         ;;
3932 (.\${*prefix}*|.\${*dir}*)
3933         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3934         case ".$PKG_CONFIG_LIBDIR" in
3935         (.NONE/*)
3936                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3937                 ;;
3938         esac
3939         ;;
3940 (.no|.NONE/*)
3941         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3942         ;;
3943 (*)
3944         { { echo "$as_me:3944: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3945 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3946    { (exit 1); exit 1; }; }
3947         ;;
3948 esac
3949
3950                 ;;
3951         esac
3952 else
3953         MAKE_PC_FILES="#"
3954 fi
3955
3956 if test -z "$MAKE_PC_FILES"
3957 then
3958         echo "$as_me:3958: checking for suffix to add to pc-files" >&5
3959 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3960
3961 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3962 if test "${with_pc_suffix+set}" = set; then
3963   withval="$with_pc_suffix"
3964   case "x$withval" in
3965         (xyes|xno)
3966                 PC_MODULE_SUFFIX=
3967                 ;;
3968         (*)     PC_MODULE_SUFFIX="$withval"
3969                 ;;
3970         esac
3971 fi;
3972         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3973         echo "$as_me:3973: result: $PC_MODULE_SUFFIX" >&5
3974 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3975         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3976
3977 fi
3978
3979 echo "$as_me:3979: checking if we should assume mixed-case filenames" >&5
3980 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3981
3982 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3983 if test "${enable_mixed_case+set}" = set; then
3984   enableval="$enable_mixed_case"
3985   enable_mixedcase=$enableval
3986 else
3987   enable_mixedcase=auto
3988 fi;
3989 echo "$as_me:3989: result: $enable_mixedcase" >&5
3990 echo "${ECHO_T}$enable_mixedcase" >&6
3991 if test "$enable_mixedcase" = "auto" ; then
3992
3993 echo "$as_me:3993: checking if filesystem supports mixed-case filenames" >&5
3994 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3995 if test "${cf_cv_mixedcase+set}" = set; then
3996   echo $ECHO_N "(cached) $ECHO_C" >&6
3997 else
3998
3999 if test "$cross_compiling" = yes ; then
4000         case $target_alias in
4001         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4002                 cf_cv_mixedcase=no
4003                 ;;
4004         (*)
4005                 cf_cv_mixedcase=yes
4006                 ;;
4007         esac
4008 else
4009         rm -f conftest CONFTEST
4010         echo test >conftest
4011         if test -f CONFTEST ; then
4012                 cf_cv_mixedcase=no
4013         else
4014                 cf_cv_mixedcase=yes
4015         fi
4016         rm -f conftest CONFTEST
4017 fi
4018
4019 fi
4020 echo "$as_me:4020: result: $cf_cv_mixedcase" >&5
4021 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4022 test "$cf_cv_mixedcase" = yes &&
4023 cat >>confdefs.h <<\EOF
4024 #define MIXEDCASE_FILENAMES 1
4025 EOF
4026
4027 else
4028         cf_cv_mixedcase=$enable_mixedcase
4029         if test "x$enable_mixedcase" = "xyes" ; then
4030
4031 cat >>confdefs.h <<\EOF
4032 #define MIXEDCASE_FILENAMES 1
4033 EOF
4034
4035         fi
4036 fi
4037
4038 # do this after mixed-case option (tags/TAGS is not as important as tic).
4039 echo "$as_me:4039: checking whether ${MAKE-make} sets \${MAKE}" >&5
4040 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4041 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4042 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4043   echo $ECHO_N "(cached) $ECHO_C" >&6
4044 else
4045   cat >conftest.make <<\EOF
4046 all:
4047         @echo 'ac_maketemp="${MAKE}"'
4048 EOF
4049 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4050 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4051 if test -n "$ac_maketemp"; then
4052   eval ac_cv_prog_make_${ac_make}_set=yes
4053 else
4054   eval ac_cv_prog_make_${ac_make}_set=no
4055 fi
4056 rm -f conftest.make
4057 fi
4058 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4059   echo "$as_me:4059: result: yes" >&5
4060 echo "${ECHO_T}yes" >&6
4061   SET_MAKE=
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065   SET_MAKE="MAKE=${MAKE-make}"
4066 fi
4067
4068 for ac_prog in exctags ctags
4069 do
4070   # Extract the first word of "$ac_prog", so it can be a program name with args.
4071 set dummy $ac_prog; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_CTAGS+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$CTAGS"; then
4078   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_CTAGS="$ac_prog"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091 fi
4092 fi
4093 CTAGS=$ac_cv_prog_CTAGS
4094 if test -n "$CTAGS"; then
4095   echo "$as_me:4095: result: $CTAGS" >&5
4096 echo "${ECHO_T}$CTAGS" >&6
4097 else
4098   echo "$as_me:4098: result: no" >&5
4099 echo "${ECHO_T}no" >&6
4100 fi
4101
4102   test -n "$CTAGS" && break
4103 done
4104
4105 for ac_prog in exetags etags
4106 do
4107   # Extract the first word of "$ac_prog", so it can be a program name with args.
4108 set dummy $ac_prog; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ETAGS+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ETAGS"; then
4115   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ETAGS="$ac_prog"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128 fi
4129 fi
4130 ETAGS=$ac_cv_prog_ETAGS
4131 if test -n "$ETAGS"; then
4132   echo "$as_me:4132: result: $ETAGS" >&5
4133 echo "${ECHO_T}$ETAGS" >&6
4134 else
4135   echo "$as_me:4135: result: no" >&5
4136 echo "${ECHO_T}no" >&6
4137 fi
4138
4139   test -n "$ETAGS" && break
4140 done
4141
4142 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4143 set dummy ${CTAGS:-ctags}; ac_word=$2
4144 echo "$as_me:4144: checking for $ac_word" >&5
4145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4146 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   if test -n "$MAKE_LOWER_TAGS"; then
4150   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4151 else
4152   ac_save_IFS=$IFS; IFS=$ac_path_separator
4153 ac_dummy="$PATH"
4154 for ac_dir in $ac_dummy; do
4155   IFS=$ac_save_IFS
4156   test -z "$ac_dir" && ac_dir=.
4157   $as_executable_p "$ac_dir/$ac_word" || continue
4158 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4159 echo "$as_me:4159: found $ac_dir/$ac_word" >&5
4160 break
4161 done
4162
4163   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4164 fi
4165 fi
4166 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4167 if test -n "$MAKE_LOWER_TAGS"; then
4168   echo "$as_me:4168: result: $MAKE_LOWER_TAGS" >&5
4169 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4170 else
4171   echo "$as_me:4171: result: no" >&5
4172 echo "${ECHO_T}no" >&6
4173 fi
4174
4175 if test "$cf_cv_mixedcase" = yes ; then
4176         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4177 set dummy ${ETAGS:-etags}; ac_word=$2
4178 echo "$as_me:4178: checking for $ac_word" >&5
4179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4180 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4181   echo $ECHO_N "(cached) $ECHO_C" >&6
4182 else
4183   if test -n "$MAKE_UPPER_TAGS"; then
4184   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4185 else
4186   ac_save_IFS=$IFS; IFS=$ac_path_separator
4187 ac_dummy="$PATH"
4188 for ac_dir in $ac_dummy; do
4189   IFS=$ac_save_IFS
4190   test -z "$ac_dir" && ac_dir=.
4191   $as_executable_p "$ac_dir/$ac_word" || continue
4192 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4193 echo "$as_me:4193: found $ac_dir/$ac_word" >&5
4194 break
4195 done
4196
4197   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4198 fi
4199 fi
4200 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4201 if test -n "$MAKE_UPPER_TAGS"; then
4202   echo "$as_me:4202: result: $MAKE_UPPER_TAGS" >&5
4203 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4204 else
4205   echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4207 fi
4208
4209 else
4210         MAKE_UPPER_TAGS=no
4211 fi
4212
4213 if test "$MAKE_UPPER_TAGS" = yes ; then
4214         MAKE_UPPER_TAGS=
4215 else
4216         MAKE_UPPER_TAGS="#"
4217 fi
4218
4219 if test "$MAKE_LOWER_TAGS" = yes ; then
4220         MAKE_LOWER_TAGS=
4221 else
4222         MAKE_LOWER_TAGS="#"
4223 fi
4224
4225 echo "$as_me:4225: checking for makeflags variable" >&5
4226 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4227 if test "${cf_cv_makeflags+set}" = set; then
4228   echo $ECHO_N "(cached) $ECHO_C" >&6
4229 else
4230
4231         cf_cv_makeflags=''
4232         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4233         do
4234                 cat >cf_makeflags.tmp <<CF_EOF
4235 SHELL = $SHELL
4236 all :
4237         @ echo '.$cf_option'
4238 CF_EOF
4239                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4240                 case "$cf_result" in
4241                 (.*k|.*kw)
4242                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4243                         case "$cf_result" in
4244                         (.*CC=*)        cf_cv_makeflags=
4245                                 ;;
4246                         (*)     cf_cv_makeflags=$cf_option
4247                                 ;;
4248                         esac
4249                         break
4250                         ;;
4251                 (.-)
4252                         ;;
4253                 (*)
4254
4255 echo "${as_me:-configure}:4255: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4256
4257                         ;;
4258                 esac
4259         done
4260         rm -f cf_makeflags.tmp
4261
4262 fi
4263 echo "$as_me:4263: result: $cf_cv_makeflags" >&5
4264 echo "${ECHO_T}$cf_cv_makeflags" >&6
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_RANLIB+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$RANLIB"; then
4275   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 RANLIB=$ac_cv_prog_RANLIB
4291 if test -n "$RANLIB"; then
4292   echo "$as_me:4292: result: $RANLIB" >&5
4293 echo "${ECHO_T}$RANLIB" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_RANLIB"; then
4301   ac_ct_RANLIB=$RANLIB
4302   # Extract the first word of "ranlib", so it can be a program name with args.
4303 set dummy ranlib; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_RANLIB"; then
4310   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_RANLIB="ranlib"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4324 fi
4325 fi
4326 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4327 if test -n "$ac_ct_RANLIB"; then
4328   echo "$as_me:4328: result: $ac_ct_RANLIB" >&5
4329 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   RANLIB=$ac_ct_RANLIB
4336 else
4337   RANLIB="$ac_cv_prog_RANLIB"
4338 fi
4339
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ld; ac_word=$2
4343 echo "$as_me:4343: checking for $ac_word" >&5
4344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4345 if test "${ac_cv_prog_LD+set}" = set; then
4346   echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348   if test -n "$LD"; then
4349   ac_cv_prog_LD="$LD" # Let the user override the test.
4350 else
4351   ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354   IFS=$ac_save_IFS
4355   test -z "$ac_dir" && ac_dir=.
4356   $as_executable_p "$ac_dir/$ac_word" || continue
4357 ac_cv_prog_LD="${ac_tool_prefix}ld"
4358 echo "$as_me:4358: found $ac_dir/$ac_word" >&5
4359 break
4360 done
4361
4362 fi
4363 fi
4364 LD=$ac_cv_prog_LD
4365 if test -n "$LD"; then
4366   echo "$as_me:4366: result: $LD" >&5
4367 echo "${ECHO_T}$LD" >&6
4368 else
4369   echo "$as_me:4369: result: no" >&5
4370 echo "${ECHO_T}no" >&6
4371 fi
4372
4373 fi
4374 if test -z "$ac_cv_prog_LD"; then
4375   ac_ct_LD=$LD
4376   # Extract the first word of "ld", so it can be a program name with args.
4377 set dummy ld; ac_word=$2
4378 echo "$as_me:4378: checking for $ac_word" >&5
4379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4380 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   if test -n "$ac_ct_LD"; then
4384   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4385 else
4386   ac_save_IFS=$IFS; IFS=$ac_path_separator
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389   IFS=$ac_save_IFS
4390   test -z "$ac_dir" && ac_dir=.
4391   $as_executable_p "$ac_dir/$ac_word" || continue
4392 ac_cv_prog_ac_ct_LD="ld"
4393 echo "$as_me:4393: found $ac_dir/$ac_word" >&5
4394 break
4395 done
4396
4397   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4398 fi
4399 fi
4400 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4401 if test -n "$ac_ct_LD"; then
4402   echo "$as_me:4402: result: $ac_ct_LD" >&5
4403 echo "${ECHO_T}$ac_ct_LD" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   LD=$ac_ct_LD
4410 else
4411   LD="$ac_cv_prog_LD"
4412 fi
4413
4414 if test -n "$ac_tool_prefix"; then
4415   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4416 set dummy ${ac_tool_prefix}ar; ac_word=$2
4417 echo "$as_me:4417: checking for $ac_word" >&5
4418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4419 if test "${ac_cv_prog_AR+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -n "$AR"; then
4423   ac_cv_prog_AR="$AR" # Let the user override the test.
4424 else
4425   ac_save_IFS=$IFS; IFS=$ac_path_separator
4426 ac_dummy="$PATH"
4427 for ac_dir in $ac_dummy; do
4428   IFS=$ac_save_IFS
4429   test -z "$ac_dir" && ac_dir=.
4430   $as_executable_p "$ac_dir/$ac_word" || continue
4431 ac_cv_prog_AR="${ac_tool_prefix}ar"
4432 echo "$as_me:4432: found $ac_dir/$ac_word" >&5
4433 break
4434 done
4435
4436 fi
4437 fi
4438 AR=$ac_cv_prog_AR
4439 if test -n "$AR"; then
4440   echo "$as_me:4440: result: $AR" >&5
4441 echo "${ECHO_T}$AR" >&6
4442 else
4443   echo "$as_me:4443: result: no" >&5
4444 echo "${ECHO_T}no" >&6
4445 fi
4446
4447 fi
4448 if test -z "$ac_cv_prog_AR"; then
4449   ac_ct_AR=$AR
4450   # Extract the first word of "ar", so it can be a program name with args.
4451 set dummy ar; ac_word=$2
4452 echo "$as_me:4452: checking for $ac_word" >&5
4453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4454 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   if test -n "$ac_ct_AR"; then
4458   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4459 else
4460   ac_save_IFS=$IFS; IFS=$ac_path_separator
4461 ac_dummy="$PATH"
4462 for ac_dir in $ac_dummy; do
4463   IFS=$ac_save_IFS
4464   test -z "$ac_dir" && ac_dir=.
4465   $as_executable_p "$ac_dir/$ac_word" || continue
4466 ac_cv_prog_ac_ct_AR="ar"
4467 echo "$as_me:4467: found $ac_dir/$ac_word" >&5
4468 break
4469 done
4470
4471   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4472 fi
4473 fi
4474 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4475 if test -n "$ac_ct_AR"; then
4476   echo "$as_me:4476: result: $ac_ct_AR" >&5
4477 echo "${ECHO_T}$ac_ct_AR" >&6
4478 else
4479   echo "$as_me:4479: result: no" >&5
4480 echo "${ECHO_T}no" >&6
4481 fi
4482
4483   AR=$ac_ct_AR
4484 else
4485   AR="$ac_cv_prog_AR"
4486 fi
4487
4488 if test -n "$ac_tool_prefix"; then
4489   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4490 set dummy ${ac_tool_prefix}nm; ac_word=$2
4491 echo "$as_me:4491: checking for $ac_word" >&5
4492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4493 if test "${ac_cv_prog_NM+set}" = set; then
4494   echo $ECHO_N "(cached) $ECHO_C" >&6
4495 else
4496   if test -n "$NM"; then
4497   ac_cv_prog_NM="$NM" # Let the user override the test.
4498 else
4499   ac_save_IFS=$IFS; IFS=$ac_path_separator
4500 ac_dummy="$PATH"
4501 for ac_dir in $ac_dummy; do
4502   IFS=$ac_save_IFS
4503   test -z "$ac_dir" && ac_dir=.
4504   $as_executable_p "$ac_dir/$ac_word" || continue
4505 ac_cv_prog_NM="${ac_tool_prefix}nm"
4506 echo "$as_me:4506: found $ac_dir/$ac_word" >&5
4507 break
4508 done
4509
4510 fi
4511 fi
4512 NM=$ac_cv_prog_NM
4513 if test -n "$NM"; then
4514   echo "$as_me:4514: result: $NM" >&5
4515 echo "${ECHO_T}$NM" >&6
4516 else
4517   echo "$as_me:4517: result: no" >&5
4518 echo "${ECHO_T}no" >&6
4519 fi
4520
4521 fi
4522 if test -z "$ac_cv_prog_NM"; then
4523   ac_ct_NM=$NM
4524   # Extract the first word of "nm", so it can be a program name with args.
4525 set dummy nm; ac_word=$2
4526 echo "$as_me:4526: checking for $ac_word" >&5
4527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4528 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   if test -n "$ac_ct_NM"; then
4532   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4533 else
4534   ac_save_IFS=$IFS; IFS=$ac_path_separator
4535 ac_dummy="$PATH"
4536 for ac_dir in $ac_dummy; do
4537   IFS=$ac_save_IFS
4538   test -z "$ac_dir" && ac_dir=.
4539   $as_executable_p "$ac_dir/$ac_word" || continue
4540 ac_cv_prog_ac_ct_NM="nm"
4541 echo "$as_me:4541: found $ac_dir/$ac_word" >&5
4542 break
4543 done
4544
4545   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4546 fi
4547 fi
4548 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4549 if test -n "$ac_ct_NM"; then
4550   echo "$as_me:4550: result: $ac_ct_NM" >&5
4551 echo "${ECHO_T}$ac_ct_NM" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   NM=$ac_ct_NM
4558 else
4559   NM="$ac_cv_prog_NM"
4560 fi
4561
4562 if test -n "$ac_tool_prefix"; then
4563   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4564 set dummy ${ac_tool_prefix}ar; ac_word=$2
4565 echo "$as_me:4565: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_prog_AR+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   if test -n "$AR"; then
4571   ac_cv_prog_AR="$AR" # Let the user override the test.
4572 else
4573   ac_save_IFS=$IFS; IFS=$ac_path_separator
4574 ac_dummy="$PATH"
4575 for ac_dir in $ac_dummy; do
4576   IFS=$ac_save_IFS
4577   test -z "$ac_dir" && ac_dir=.
4578   $as_executable_p "$ac_dir/$ac_word" || continue
4579 ac_cv_prog_AR="${ac_tool_prefix}ar"
4580 echo "$as_me:4580: found $ac_dir/$ac_word" >&5
4581 break
4582 done
4583
4584 fi
4585 fi
4586 AR=$ac_cv_prog_AR
4587 if test -n "$AR"; then
4588   echo "$as_me:4588: result: $AR" >&5
4589 echo "${ECHO_T}$AR" >&6
4590 else
4591   echo "$as_me:4591: result: no" >&5
4592 echo "${ECHO_T}no" >&6
4593 fi
4594
4595 fi
4596 if test -z "$ac_cv_prog_AR"; then
4597   ac_ct_AR=$AR
4598   # Extract the first word of "ar", so it can be a program name with args.
4599 set dummy ar; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$ac_ct_AR"; then
4606   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_ac_ct_AR="ar"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4620 fi
4621 fi
4622 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4623 if test -n "$ac_ct_AR"; then
4624   echo "$as_me:4624: result: $ac_ct_AR" >&5
4625 echo "${ECHO_T}$ac_ct_AR" >&6
4626 else
4627   echo "$as_me:4627: result: no" >&5
4628 echo "${ECHO_T}no" >&6
4629 fi
4630
4631   AR=$ac_ct_AR
4632 else
4633   AR="$ac_cv_prog_AR"
4634 fi
4635
4636 echo "$as_me:4636: checking for options to update archives" >&5
4637 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4638 if test "${cf_cv_ar_flags+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642         cf_cv_ar_flags=unknown
4643         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4644         do
4645
4646                 # check if $ARFLAGS already contains this choice
4647                 if test "x$ARFLAGS" != "x" ; then
4648                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4649                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4650                                 cf_cv_ar_flags=
4651                                 break
4652                         fi
4653                 fi
4654
4655                 rm -f conftest.$ac_cv_objext
4656                 rm -f conftest.a
4657
4658                 cat >conftest.$ac_ext <<EOF
4659 #line 4659 "configure"
4660 int     testdata[3] = { 123, 456, 789 };
4661 EOF
4662                 if { (eval echo "$as_me:4662: \"$ac_compile\"") >&5
4663   (eval $ac_compile) 2>&5
4664   ac_status=$?
4665   echo "$as_me:4665: \$? = $ac_status" >&5
4666   (exit $ac_status); } ; then
4667                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4668                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4669                         if test -f conftest.a ; then
4670                                 cf_cv_ar_flags=$cf_ar_flags
4671                                 break
4672                         fi
4673                 else
4674                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4675
4676 echo "${as_me:-configure}:4676: testing cannot compile test-program ..." 1>&5
4677
4678                         break
4679                 fi
4680         done
4681         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4682
4683 fi
4684 echo "$as_me:4684: result: $cf_cv_ar_flags" >&5
4685 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4686
4687 if test -n "$ARFLAGS" ; then
4688         if test -n "$cf_cv_ar_flags" ; then
4689                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4690         fi
4691 else
4692         ARFLAGS=$cf_cv_ar_flags
4693 fi
4694
4695 echo "$as_me:4695: checking if you have specified an install-prefix" >&5
4696 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-install-prefix or --without-install-prefix was given.
4699 if test "${with_install_prefix+set}" = set; then
4700   withval="$with_install_prefix"
4701   case "x$withval" in
4702         (xyes|xno)
4703                 ;;
4704         (*)     DESTDIR="$withval"
4705                 ;;
4706         esac
4707 fi;
4708 echo "$as_me:4708: result: $DESTDIR" >&5
4709 echo "${ECHO_T}$DESTDIR" >&6
4710
4711 ###############################################################################
4712
4713 # If we're cross-compiling, allow the user to override the tools and their
4714 # options.  The configure script is oriented toward identifying the host
4715 # compiler, etc., but we need a build compiler to generate parts of the source.
4716
4717 if test "$cross_compiling" = yes ; then
4718
4719         # defaults that we might want to override
4720         : ${BUILD_CFLAGS:=''}
4721         : ${BUILD_CPPFLAGS:=''}
4722         : ${BUILD_LDFLAGS:=''}
4723         : ${BUILD_LIBS:=''}
4724         : ${BUILD_EXEEXT:='$x'}
4725         : ${BUILD_OBJEXT:='o'}
4726
4727 # Check whether --with-build-cc or --without-build-cc was given.
4728 if test "${with_build_cc+set}" = set; then
4729   withval="$with_build_cc"
4730   BUILD_CC="$withval"
4731 else
4732   for ac_prog in gcc clang c99 c89 cc cl
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 echo "$as_me:4736: checking for $ac_word" >&5
4737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4738 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4739   echo $ECHO_N "(cached) $ECHO_C" >&6
4740 else
4741   if test -n "$BUILD_CC"; then
4742   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4743 else
4744   ac_save_IFS=$IFS; IFS=$ac_path_separator
4745 ac_dummy="$PATH"
4746 for ac_dir in $ac_dummy; do
4747   IFS=$ac_save_IFS
4748   test -z "$ac_dir" && ac_dir=.
4749   $as_executable_p "$ac_dir/$ac_word" || continue
4750 ac_cv_prog_BUILD_CC="$ac_prog"
4751 echo "$as_me:4751: found $ac_dir/$ac_word" >&5
4752 break
4753 done
4754
4755 fi
4756 fi
4757 BUILD_CC=$ac_cv_prog_BUILD_CC
4758 if test -n "$BUILD_CC"; then
4759   echo "$as_me:4759: result: $BUILD_CC" >&5
4760 echo "${ECHO_T}$BUILD_CC" >&6
4761 else
4762   echo "$as_me:4762: result: no" >&5
4763 echo "${ECHO_T}no" >&6
4764 fi
4765
4766   test -n "$BUILD_CC" && break
4767 done
4768 test -n "$BUILD_CC" || BUILD_CC="none"
4769
4770 fi;
4771         echo "$as_me:4771: checking for native build C compiler" >&5
4772 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4773         echo "$as_me:4773: result: $BUILD_CC" >&5
4774 echo "${ECHO_T}$BUILD_CC" >&6
4775
4776         echo "$as_me:4776: checking for native build C preprocessor" >&5
4777 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4778
4779 # Check whether --with-build-cpp or --without-build-cpp was given.
4780 if test "${with_build_cpp+set}" = set; then
4781   withval="$with_build_cpp"
4782   BUILD_CPP="$withval"
4783 else
4784   BUILD_CPP='${BUILD_CC} -E'
4785 fi;
4786         echo "$as_me:4786: result: $BUILD_CPP" >&5
4787 echo "${ECHO_T}$BUILD_CPP" >&6
4788
4789         echo "$as_me:4789: checking for native build C flags" >&5
4790 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4791
4792 # Check whether --with-build-cflags or --without-build-cflags was given.
4793 if test "${with_build_cflags+set}" = set; then
4794   withval="$with_build_cflags"
4795   BUILD_CFLAGS="$withval"
4796 fi;
4797         echo "$as_me:4797: result: $BUILD_CFLAGS" >&5
4798 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4799
4800         echo "$as_me:4800: checking for native build C preprocessor-flags" >&5
4801 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4802
4803 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4804 if test "${with_build_cppflags+set}" = set; then
4805   withval="$with_build_cppflags"
4806   BUILD_CPPFLAGS="$withval"
4807 fi;
4808         echo "$as_me:4808: result: $BUILD_CPPFLAGS" >&5
4809 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4810
4811         echo "$as_me:4811: checking for native build linker-flags" >&5
4812 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4813
4814 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4815 if test "${with_build_ldflags+set}" = set; then
4816   withval="$with_build_ldflags"
4817   BUILD_LDFLAGS="$withval"
4818 fi;
4819         echo "$as_me:4819: result: $BUILD_LDFLAGS" >&5
4820 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4821
4822         echo "$as_me:4822: checking for native build linker-libraries" >&5
4823 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4824
4825 # Check whether --with-build-libs or --without-build-libs was given.
4826 if test "${with_build_libs+set}" = set; then
4827   withval="$with_build_libs"
4828   BUILD_LIBS="$withval"
4829 fi;
4830         echo "$as_me:4830: result: $BUILD_LIBS" >&5
4831 echo "${ECHO_T}$BUILD_LIBS" >&6
4832
4833         # this assumes we're on Unix.
4834         BUILD_EXEEXT=
4835         BUILD_OBJEXT=o
4836
4837         : ${BUILD_CC:='${CC}'}
4838
4839         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4840                 { { echo "$as_me:4840: error: Cross-build requires two compilers.
4841 Use --with-build-cc to specify the native compiler." >&5
4842 echo "$as_me: error: Cross-build requires two compilers.
4843 Use --with-build-cc to specify the native compiler." >&2;}
4844    { (exit 1); exit 1; }; }
4845         fi
4846
4847 else
4848         : ${BUILD_CC:='${CC}'}
4849         : ${BUILD_CPP:='${CPP}'}
4850         : ${BUILD_CFLAGS:='${CFLAGS}'}
4851         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4852         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4853         : ${BUILD_LIBS:='${LIBS}'}
4854         : ${BUILD_EXEEXT:='$x'}
4855         : ${BUILD_OBJEXT:='o'}
4856 fi
4857
4858 ###############################################################################
4859
4860 ### Options to allow the user to specify the set of libraries which are used.
4861 ### Use "--without-normal --with-shared" to allow the default model to be
4862 ### shared, for example.
4863 cf_list_models=""
4864
4865 echo "$as_me:4865: checking if libtool -version-number should be used" >&5
4866 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4867
4868 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4869 if test "${enable_libtool_version+set}" = set; then
4870   enableval="$enable_libtool_version"
4871   test "$enableval" != no && enableval=yes
4872         if test "$enableval" != "yes" ; then
4873     cf_libtool_version=no
4874         else
4875                 cf_libtool_version=yes
4876         fi
4877 else
4878   enableval=yes
4879         cf_libtool_version=yes
4880
4881 fi;
4882 echo "$as_me:4882: result: $cf_libtool_version" >&5
4883 echo "${ECHO_T}$cf_libtool_version" >&6
4884
4885 if test "$cf_libtool_version" = yes ; then
4886         LIBTOOL_VERSION="-version-number"
4887 else
4888         LIBTOOL_VERSION="-version-info"
4889         case "x$VERSION" in
4890         (x)
4891                 { echo "$as_me:4891: WARNING: VERSION was not set" >&5
4892 echo "$as_me: WARNING: VERSION was not set" >&2;}
4893                 ;;
4894         (x*.*.*)
4895                 ABI_VERSION="$VERSION"
4896                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4897
4898 echo "${as_me:-configure}:4898: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4899
4900                 ;;
4901         (x*:*:*)
4902                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4903                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4904
4905 echo "${as_me:-configure}:4905: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4906
4907                 ;;
4908         (*)
4909                 { echo "$as_me:4909: WARNING: unexpected VERSION value: $VERSION" >&5
4910 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4911                 ;;
4912         esac
4913 fi
4914
4915 LIBTOOL=
4916
4917 # common library maintenance symbols that are convenient for libtool scripts:
4918 LIB_CREATE='${AR} -cr'
4919 LIB_OBJECT='${OBJECTS}'
4920 LIB_SUFFIX=.a
4921 LIB_PREP="$RANLIB"
4922
4923 # symbols used to prop libtool up to enable it to determine what it should be
4924 # doing:
4925 LIB_CLEAN=
4926 LIB_COMPILE=
4927 LIB_LINK='${CC}'
4928 LIB_INSTALL=
4929 LIB_UNINSTALL=
4930
4931 echo "$as_me:4931: checking if you want to build libraries with libtool" >&5
4932 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4933
4934 # Check whether --with-libtool or --without-libtool was given.
4935 if test "${with_libtool+set}" = set; then
4936   withval="$with_libtool"
4937   with_libtool=$withval
4938 else
4939   with_libtool=no
4940 fi;
4941 echo "$as_me:4941: result: $with_libtool" >&5
4942 echo "${ECHO_T}$with_libtool" >&6
4943 if test "$with_libtool" != "no"; then
4944
4945         if test "$with_libtool" != "yes" ; then
4946
4947 if test "x$prefix" != xNONE; then
4948         cf_path_syntax="$prefix"
4949 else
4950         cf_path_syntax="$ac_default_prefix"
4951 fi
4952
4953 case ".$with_libtool" in
4954 (.\$\(*\)*|.\'*\'*)
4955         ;;
4956 (..|./*|.\\*)
4957         ;;
4958 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4959         ;;
4960 (.\${*prefix}*|.\${*dir}*)
4961         eval with_libtool="$with_libtool"
4962         case ".$with_libtool" in
4963         (.NONE/*)
4964                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4965                 ;;
4966         esac
4967         ;;
4968 (.no|.NONE/*)
4969         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4970         ;;
4971 (*)
4972         { { echo "$as_me:4972: error: expected a pathname, not \"$with_libtool\"" >&5
4973 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4974    { (exit 1); exit 1; }; }
4975         ;;
4976 esac
4977
4978                 LIBTOOL=$with_libtool
4979         else
4980                 if test -n "$ac_tool_prefix"; then
4981   for ac_prog in libtool glibtool
4982   do
4983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4985 echo "$as_me:4985: checking for $ac_word" >&5
4986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4987 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4988   echo $ECHO_N "(cached) $ECHO_C" >&6
4989 else
4990   if test -n "$LIBTOOL"; then
4991   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4992 else
4993   ac_save_IFS=$IFS; IFS=$ac_path_separator
4994 ac_dummy="$PATH"
4995 for ac_dir in $ac_dummy; do
4996   IFS=$ac_save_IFS
4997   test -z "$ac_dir" && ac_dir=.
4998   $as_executable_p "$ac_dir/$ac_word" || continue
4999 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5000 echo "$as_me:5000: found $ac_dir/$ac_word" >&5
5001 break
5002 done
5003
5004 fi
5005 fi
5006 LIBTOOL=$ac_cv_prog_LIBTOOL
5007 if test -n "$LIBTOOL"; then
5008   echo "$as_me:5008: result: $LIBTOOL" >&5
5009 echo "${ECHO_T}$LIBTOOL" >&6
5010 else
5011   echo "$as_me:5011: result: no" >&5
5012 echo "${ECHO_T}no" >&6
5013 fi
5014
5015     test -n "$LIBTOOL" && break
5016   done
5017 fi
5018 if test -z "$LIBTOOL"; then
5019   ac_ct_LIBTOOL=$LIBTOOL
5020   for ac_prog in libtool glibtool
5021 do
5022   # Extract the first word of "$ac_prog", so it can be a program name with args.
5023 set dummy $ac_prog; ac_word=$2
5024 echo "$as_me:5024: checking for $ac_word" >&5
5025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5026 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029   if test -n "$ac_ct_LIBTOOL"; then
5030   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5031 else
5032   ac_save_IFS=$IFS; IFS=$ac_path_separator
5033 ac_dummy="$PATH"
5034 for ac_dir in $ac_dummy; do
5035   IFS=$ac_save_IFS
5036   test -z "$ac_dir" && ac_dir=.
5037   $as_executable_p "$ac_dir/$ac_word" || continue
5038 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5039 echo "$as_me:5039: found $ac_dir/$ac_word" >&5
5040 break
5041 done
5042
5043 fi
5044 fi
5045 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5046 if test -n "$ac_ct_LIBTOOL"; then
5047   echo "$as_me:5047: result: $ac_ct_LIBTOOL" >&5
5048 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5049 else
5050   echo "$as_me:5050: result: no" >&5
5051 echo "${ECHO_T}no" >&6
5052 fi
5053
5054   test -n "$ac_ct_LIBTOOL" && break
5055 done
5056 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5057
5058   LIBTOOL=$ac_ct_LIBTOOL
5059 fi
5060
5061 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5062 then
5063         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.].*//'`
5064 else
5065         cf_cv_libtool_version=
5066 fi
5067 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5068
5069                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5070                 then
5071
5072 unset ac_cv_prog_ac_ct_LIBTOOL
5073 unset ac_ct_LIBTOOL
5074 unset LIBTOOL
5075
5076                         if test -n "$ac_tool_prefix"; then
5077   for ac_prog in glibtool
5078   do
5079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5081 echo "$as_me:5081: checking for $ac_word" >&5
5082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5083 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5084   echo $ECHO_N "(cached) $ECHO_C" >&6
5085 else
5086   if test -n "$LIBTOOL"; then
5087   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5088 else
5089   ac_save_IFS=$IFS; IFS=$ac_path_separator
5090 ac_dummy="$PATH"
5091 for ac_dir in $ac_dummy; do
5092   IFS=$ac_save_IFS
5093   test -z "$ac_dir" && ac_dir=.
5094   $as_executable_p "$ac_dir/$ac_word" || continue
5095 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5096 echo "$as_me:5096: found $ac_dir/$ac_word" >&5
5097 break
5098 done
5099
5100 fi
5101 fi
5102 LIBTOOL=$ac_cv_prog_LIBTOOL
5103 if test -n "$LIBTOOL"; then
5104   echo "$as_me:5104: result: $LIBTOOL" >&5
5105 echo "${ECHO_T}$LIBTOOL" >&6
5106 else
5107   echo "$as_me:5107: result: no" >&5
5108 echo "${ECHO_T}no" >&6
5109 fi
5110
5111     test -n "$LIBTOOL" && break
5112   done
5113 fi
5114 if test -z "$LIBTOOL"; then
5115   ac_ct_LIBTOOL=$LIBTOOL
5116   for ac_prog in glibtool
5117 do
5118   # Extract the first word of "$ac_prog", so it can be a program name with args.
5119 set dummy $ac_prog; ac_word=$2
5120 echo "$as_me:5120: checking for $ac_word" >&5
5121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5122 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5123   echo $ECHO_N "(cached) $ECHO_C" >&6
5124 else
5125   if test -n "$ac_ct_LIBTOOL"; then
5126   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5127 else
5128   ac_save_IFS=$IFS; IFS=$ac_path_separator
5129 ac_dummy="$PATH"
5130 for ac_dir in $ac_dummy; do
5131   IFS=$ac_save_IFS
5132   test -z "$ac_dir" && ac_dir=.
5133   $as_executable_p "$ac_dir/$ac_word" || continue
5134 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5135 echo "$as_me:5135: found $ac_dir/$ac_word" >&5
5136 break
5137 done
5138
5139 fi
5140 fi
5141 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5142 if test -n "$ac_ct_LIBTOOL"; then
5143   echo "$as_me:5143: result: $ac_ct_LIBTOOL" >&5
5144 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5145 else
5146   echo "$as_me:5146: result: no" >&5
5147 echo "${ECHO_T}no" >&6
5148 fi
5149
5150   test -n "$ac_ct_LIBTOOL" && break
5151 done
5152 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5153
5154   LIBTOOL=$ac_ct_LIBTOOL
5155 fi
5156
5157 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5158 then
5159         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.].*//'`
5160 else
5161         cf_cv_libtool_version=
5162 fi
5163 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5164
5165                 fi
5166         fi
5167         if test -z "$LIBTOOL" ; then
5168                 { { echo "$as_me:5168: error: Cannot find libtool" >&5
5169 echo "$as_me: error: Cannot find libtool" >&2;}
5170    { (exit 1); exit 1; }; }
5171         fi
5172         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5173         LIB_OBJECT='${OBJECTS:.o=.lo}'
5174         LIB_SUFFIX=.la
5175         LIB_CLEAN='${LIBTOOL} --mode=clean'
5176         LIB_COMPILE='${LIBTOOL} --mode=compile'
5177         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5178         LIB_INSTALL='${LIBTOOL} --mode=install'
5179         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5180         LIB_PREP=:
5181
5182 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5183 then
5184         echo "$as_me:5184: checking version of $LIBTOOL" >&5
5185 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5186
5187 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5188 then
5189         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.].*//'`
5190 else
5191         cf_cv_libtool_version=
5192 fi
5193 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5194
5195         echo "$as_me:5195: result: $cf_cv_libtool_version" >&5
5196 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5197         if test -z "$cf_cv_libtool_version" ; then
5198                 { { echo "$as_me:5198: error: This is not GNU libtool" >&5
5199 echo "$as_me: error: This is not GNU libtool" >&2;}
5200    { (exit 1); exit 1; }; }
5201         fi
5202 else
5203         { { echo "$as_me:5203: error: GNU libtool has not been found" >&5
5204 echo "$as_me: error: GNU libtool has not been found" >&2;}
5205    { (exit 1); exit 1; }; }
5206 fi
5207
5208         # special hack to add -no-undefined (which libtool should do for itself)
5209         LT_UNDEF=
5210         case "$cf_cv_system_name" in
5211         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5212                 LT_UNDEF=-no-undefined
5213                 ;;
5214         esac
5215
5216         # special hack to add --tag option for C++ compiler
5217         case $cf_cv_libtool_version in
5218         (1.[5-9]*|[2-9].[0-9.a-z]*)
5219                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5220                 LIBTOOL="$LIBTOOL --tag=CC"
5221                 ;;
5222         (*)
5223                 LIBTOOL_CXX="$LIBTOOL"
5224                 ;;
5225         esac
5226 else
5227         LIBTOOL=""
5228         LIBTOOL_CXX=""
5229 fi
5230
5231 test -z "$LIBTOOL" && ECHO_LT=
5232
5233 if test "$with_libtool" != "no" ; then
5234
5235 cf_list_models="$cf_list_models libtool"
5236
5237 else
5238
5239 echo "$as_me:5239: checking if you want to build shared libraries" >&5
5240 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5241
5242 # Check whether --with-shared or --without-shared was given.
5243 if test "${with_shared+set}" = set; then
5244   withval="$with_shared"
5245   with_shared=$withval
5246 else
5247   with_shared=no
5248 fi;
5249 echo "$as_me:5249: result: $with_shared" >&5
5250 echo "${ECHO_T}$with_shared" >&6
5251 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5252
5253 echo "$as_me:5253: checking if you want to build static libraries" >&5
5254 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5255
5256 # Check whether --with-normal or --without-normal was given.
5257 if test "${with_normal+set}" = set; then
5258   withval="$with_normal"
5259   with_normal=$withval
5260 else
5261   with_normal=yes
5262 fi;
5263 echo "$as_me:5263: result: $with_normal" >&5
5264 echo "${ECHO_T}$with_normal" >&6
5265 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5266
5267 echo "$as_me:5267: checking if you want to build debug libraries" >&5
5268 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5269
5270 # Check whether --with-debug or --without-debug was given.
5271 if test "${with_debug+set}" = set; then
5272   withval="$with_debug"
5273   with_debug=$withval
5274 else
5275   with_debug=yes
5276 fi;
5277 echo "$as_me:5277: result: $with_debug" >&5
5278 echo "${ECHO_T}$with_debug" >&6
5279 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5280
5281 echo "$as_me:5281: checking if you want to build profiling libraries" >&5
5282 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5283
5284 # Check whether --with-profile or --without-profile was given.
5285 if test "${with_profile+set}" = set; then
5286   withval="$with_profile"
5287   with_profile=$withval
5288 else
5289   with_profile=no
5290 fi;
5291 echo "$as_me:5291: result: $with_profile" >&5
5292 echo "${ECHO_T}$with_profile" >&6
5293 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5294
5295 fi
5296
5297 if test "X$cf_with_cxx_binding" != Xno; then
5298 if test "x$with_shared" = "xyes"; then
5299 echo "$as_me:5299: checking if you want to build C++ shared libraries" >&5
5300 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5301
5302 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5303 if test "${with_cxx_shared+set}" = set; then
5304   withval="$with_cxx_shared"
5305   with_shared_cxx=$withval
5306 else
5307   with_shared_cxx=no
5308 fi;
5309 echo "$as_me:5309: result: $with_shared_cxx" >&5
5310 echo "${ECHO_T}$with_shared_cxx" >&6
5311 fi
5312 fi
5313
5314 ###############################################################################
5315
5316 echo "$as_me:5316: checking for specified models" >&5
5317 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5318 test -z "$cf_list_models" && cf_list_models=normal
5319 test "$with_libtool" != "no" && cf_list_models=libtool
5320 echo "$as_me:5320: result: $cf_list_models" >&5
5321 echo "${ECHO_T}$cf_list_models" >&6
5322
5323 ### Use the first model as the default, and save its suffix for use in building
5324 ### up test-applications.
5325 echo "$as_me:5325: checking for default model" >&5
5326 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5327 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5328 echo "$as_me:5328: result: $DFT_LWR_MODEL" >&5
5329 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5330
5331 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5332
5333 TICS_NAME=tic
5334
5335 TINFO_NAME=tinfo
5336
5337 LIB_NAME=ncurses
5338
5339 LIB_DIR=../lib
5340 LIB_2ND=../../lib
5341
5342 echo "$as_me:5342: checking if you want to have a library-prefix" >&5
5343 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5344
5345 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5346 if test "${with_lib_prefix+set}" = set; then
5347   withval="$with_lib_prefix"
5348   with_lib_prefix=$withval
5349 else
5350   with_lib_prefix=auto
5351 fi;
5352 echo "$as_me:5352: result: $with_lib_prefix" >&5
5353 echo "${ECHO_T}$with_lib_prefix" >&6
5354
5355 if test $with_lib_prefix = auto
5356 then
5357
5358         case $cf_cv_system_name in
5359         (OS/2*|os2*)
5360                 if test "$DFT_LWR_MODEL" = libtool; then
5361                         LIB_PREFIX='lib'
5362                 else
5363                         LIB_PREFIX=''
5364                 fi
5365                 ;;
5366         (*)     LIB_PREFIX='lib'
5367                 ;;
5368         esac
5369 cf_prefix=$LIB_PREFIX
5370
5371 elif test $with_lib_prefix = no
5372 then
5373         LIB_PREFIX=
5374 else
5375         LIB_PREFIX=$with_lib_prefix
5376 fi
5377
5378 LIB_SUFFIX=
5379
5380         echo "$as_me:5380: checking for PATH separator" >&5
5381 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5382         case $cf_cv_system_name in
5383         (os2*)  PATH_SEPARATOR=';'  ;;
5384         (*)     ${PATH_SEPARATOR:=':'}  ;;
5385         esac
5386
5387         echo "$as_me:5387: result: $PATH_SEPARATOR" >&5
5388 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5389
5390 ###############################################################################
5391
5392 echo "$as_me:5392: checking if you want to build a separate terminfo library" >&5
5393 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5394
5395 # Check whether --with-termlib or --without-termlib was given.
5396 if test "${with_termlib+set}" = set; then
5397   withval="$with_termlib"
5398   with_termlib=$withval
5399 else
5400   with_termlib=no
5401 fi;
5402 echo "$as_me:5402: result: $with_termlib" >&5
5403 echo "${ECHO_T}$with_termlib" >&6
5404
5405 echo "$as_me:5405: checking if you want to build a separate tic library" >&5
5406 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5407
5408 # Check whether --with-ticlib or --without-ticlib was given.
5409 if test "${with_ticlib+set}" = set; then
5410   withval="$with_ticlib"
5411   with_ticlib=$withval
5412 else
5413   with_ticlib=no
5414 fi;
5415 echo "$as_me:5415: result: $with_ticlib" >&5
5416 echo "${ECHO_T}$with_ticlib" >&6
5417
5418 if test X"$CC_G_OPT" = X"" ; then
5419         CC_G_OPT='-g'
5420         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5421 fi
5422
5423 if test X"$CXX_G_OPT" = X"" ; then
5424         CXX_G_OPT='-g'
5425         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5426 fi
5427
5428 echo "$as_me:5428: checking for default loader flags" >&5
5429 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5430 case $DFT_LWR_MODEL in
5431 (libtool) LD_MODEL=''   ;;
5432 (normal)  LD_MODEL=''   ;;
5433 (debug)   LD_MODEL=$CC_G_OPT ;;
5434 (profile) LD_MODEL='-pg';;
5435 (shared)  LD_MODEL=''   ;;
5436 esac
5437 echo "$as_me:5437: result: $LD_MODEL" >&5
5438 echo "${ECHO_T}$LD_MODEL" >&6
5439
5440 case $DFT_LWR_MODEL in
5441 (shared)
5442
5443 echo "$as_me:5443: checking if rpath option should be used" >&5
5444 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5445
5446 # Check whether --enable-rpath or --disable-rpath was given.
5447 if test "${enable_rpath+set}" = set; then
5448   enableval="$enable_rpath"
5449   cf_cv_enable_rpath=$enableval
5450 else
5451   cf_cv_enable_rpath=no
5452 fi;
5453 echo "$as_me:5453: result: $cf_cv_enable_rpath" >&5
5454 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5455
5456 echo "$as_me:5456: checking if shared libraries should be relinked during install" >&5
5457 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5458
5459 # Check whether --enable-relink or --disable-relink was given.
5460 if test "${enable_relink+set}" = set; then
5461   enableval="$enable_relink"
5462   cf_cv_do_relink=$enableval
5463 else
5464   cf_cv_do_relink=yes
5465 fi;
5466 echo "$as_me:5466: result: $cf_cv_do_relink" >&5
5467 echo "${ECHO_T}$cf_cv_do_relink" >&6
5468         ;;
5469 esac
5470
5471 # we will build libraries one-level down.
5472 rel_builddir=..
5473
5474 LD_RPATH_OPT=
5475 if test "x$cf_cv_enable_rpath" != xno
5476 then
5477         echo "$as_me:5477: checking for an rpath option" >&5
5478 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5479         case $cf_cv_system_name in
5480         (irix*)
5481                 if test "$GCC" = yes; then
5482                         LD_RPATH_OPT="-Wl,-rpath,"
5483                 else
5484                         LD_RPATH_OPT="-rpath "
5485                 fi
5486                 ;;
5487         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5488                 LD_RPATH_OPT="-Wl,-rpath,"
5489                 ;;
5490         (openbsd[2-9].*|mirbsd*)
5491                 LD_RPATH_OPT="-Wl,-rpath,"
5492                 ;;
5493         (dragonfly*)
5494                 LD_RPATH_OPT="-rpath "
5495                 ;;
5496         (netbsd*)
5497                 LD_RPATH_OPT="-Wl,-rpath,"
5498                 ;;
5499         (osf*|mls+*)
5500                 LD_RPATH_OPT="-rpath "
5501                 ;;
5502         (solaris2*)
5503                 LD_RPATH_OPT="-R"
5504                 ;;
5505         (*)
5506                 ;;
5507         esac
5508         echo "$as_me:5508: result: $LD_RPATH_OPT" >&5
5509 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5510
5511         case "x$LD_RPATH_OPT" in
5512         (x-R*)
5513                 echo "$as_me:5513: checking if we need a space after rpath option" >&5
5514 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5515                 cf_save_LIBS="$LIBS"
5516
5517 cf_add_libs="${LD_RPATH_OPT}$libdir"
5518 # Filter out duplicates - this happens with badly-designed ".pc" files...
5519 for cf_add_1lib in $LIBS
5520 do
5521         for cf_add_2lib in $cf_add_libs
5522         do
5523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5524                 then
5525                         cf_add_1lib=
5526                         break
5527                 fi
5528         done
5529         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5530 done
5531 LIBS="$cf_add_libs"
5532
5533                 cat >conftest.$ac_ext <<_ACEOF
5534 #line 5534 "configure"
5535 #include "confdefs.h"
5536
5537 int
5538 main (void)
5539 {
5540
5541   ;
5542   return 0;
5543 }
5544 _ACEOF
5545 rm -f conftest.$ac_objext conftest$ac_exeext
5546 if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); } &&
5551          { ac_try='test -s conftest$ac_exeext'
5552   { (eval echo "$as_me:5552: \"$ac_try\"") >&5
5553   (eval $ac_try) 2>&5
5554   ac_status=$?
5555   echo "$as_me:5555: \$? = $ac_status" >&5
5556   (exit $ac_status); }; }; then
5557   cf_rpath_space=no
5558 else
5559   echo "$as_me: failed program was:" >&5
5560 cat conftest.$ac_ext >&5
5561 cf_rpath_space=yes
5562 fi
5563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5564                 LIBS="$cf_save_LIBS"
5565                 echo "$as_me:5565: result: $cf_rpath_space" >&5
5566 echo "${ECHO_T}$cf_rpath_space" >&6
5567                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5568                 ;;
5569         esac
5570 fi
5571
5572         RM_SHARED_OPTS=
5573         LOCAL_LDFLAGS=
5574         LOCAL_LDFLAGS2=
5575         LD_SHARED_OPTS=
5576         INSTALL_LIB="-m 644"
5577         : ${rel_builddir:=.}
5578
5579         shlibdir=$libdir
5580
5581         MAKE_DLLS="#"
5582
5583         cf_cv_do_symlinks=no
5584         cf_ld_rpath_opt=
5585         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5586
5587         echo "$as_me:5587: checking if release/abi version should be used for shared libs" >&5
5588 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5589
5590 # Check whether --with-shlib-version or --without-shlib-version was given.
5591 if test "${with_shlib_version+set}" = set; then
5592   withval="$with_shlib_version"
5593   test -z "$withval" && withval=auto
5594         case $withval in
5595         (yes)
5596                 cf_cv_shlib_version=auto
5597                 ;;
5598         (rel|abi|auto)
5599                 cf_cv_shlib_version=$withval
5600                 ;;
5601         (*)
5602                 echo "$as_me:5602: result: $withval" >&5
5603 echo "${ECHO_T}$withval" >&6
5604                 { { echo "$as_me:5604: error: option value must be one of: rel, abi, or auto" >&5
5605 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5606    { (exit 1); exit 1; }; }
5607                 ;;
5608         esac
5609
5610 else
5611   cf_cv_shlib_version=auto
5612 fi;
5613         echo "$as_me:5613: result: $cf_cv_shlib_version" >&5
5614 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5615
5616         cf_cv_rm_so_locs=no
5617         cf_try_cflags=
5618
5619         # Some less-capable ports of gcc support only -fpic
5620         CC_SHARED_OPTS=
5621
5622         cf_try_fPIC=no
5623         if test "$GCC" = yes
5624         then
5625                 cf_try_fPIC=yes
5626         else
5627                 case $cf_cv_system_name in
5628                 (*linux*)       # e.g., PGI compiler
5629                         cf_try_fPIC=yes
5630                         ;;
5631                 esac
5632         fi
5633
5634         if test "$cf_try_fPIC" = yes
5635         then
5636                 echo "$as_me:5636: checking which $CC option to use" >&5
5637 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5638                 cf_save_CFLAGS="$CFLAGS"
5639                 for CC_SHARED_OPTS in -fPIC -fpic ''
5640                 do
5641                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5642                         cat >conftest.$ac_ext <<_ACEOF
5643 #line 5643 "configure"
5644 #include "confdefs.h"
5645 #include <stdio.h>
5646 int
5647 main (void)
5648 {
5649 int x = 1
5650   ;
5651   return 0;
5652 }
5653 _ACEOF
5654 rm -f conftest.$ac_objext
5655 if { (eval echo "$as_me:5655: \"$ac_compile\"") >&5
5656   (eval $ac_compile) 2>&5
5657   ac_status=$?
5658   echo "$as_me:5658: \$? = $ac_status" >&5
5659   (exit $ac_status); } &&
5660          { ac_try='test -s conftest.$ac_objext'
5661   { (eval echo "$as_me:5661: \"$ac_try\"") >&5
5662   (eval $ac_try) 2>&5
5663   ac_status=$?
5664   echo "$as_me:5664: \$? = $ac_status" >&5
5665   (exit $ac_status); }; }; then
5666   break
5667 else
5668   echo "$as_me: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5670 fi
5671 rm -f conftest.$ac_objext conftest.$ac_ext
5672                 done
5673                 echo "$as_me:5673: result: $CC_SHARED_OPTS" >&5
5674 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5675                 CFLAGS="$cf_save_CFLAGS"
5676         fi
5677
5678         cf_cv_shlib_version_infix=no
5679
5680         case $cf_cv_system_name in
5681         (aix4.3-9*|aix[5-7]*)
5682                 if test "$GCC" = yes; then
5683                         CC_SHARED_OPTS='-Wl,-brtl'
5684                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5685                 else
5686                         CC_SHARED_OPTS='-brtl'
5687                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5688                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5689                 fi
5690                 ;;
5691         (beos*)
5692                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5693                 ;;
5694         (cygwin*)
5695                 CC_SHARED_OPTS=
5696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5698                 cf_cv_shlib_version=cygdll
5699                 cf_cv_shlib_version_infix=cygdll
5700                 shlibdir=$bindir
5701                 MAKE_DLLS=
5702                 cat >mk_shared_lib.sh <<-CF_EOF
5703                 #!$SHELL
5704                 SHARED_LIB=\$1
5705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5706                 shift
5707                 cat <<-EOF
5708                 Linking shared library
5709                 ** SHARED_LIB \$SHARED_LIB
5710                 ** IMPORT_LIB \$IMPORT_LIB
5711 EOF
5712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5713 CF_EOF
5714                 chmod +x mk_shared_lib.sh
5715                 ;;
5716         (msys*)
5717                 CC_SHARED_OPTS=
5718                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5719                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5720                 cf_cv_shlib_version=msysdll
5721                 cf_cv_shlib_version_infix=msysdll
5722                 shlibdir=$bindir
5723                 MAKE_DLLS=
5724                 cat >mk_shared_lib.sh <<-CF_EOF
5725                 #!$SHELL
5726                 SHARED_LIB=\$1
5727                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5728                 shift
5729                 cat <<-EOF
5730                 Linking shared library
5731                 ** SHARED_LIB \$SHARED_LIB
5732                 ** IMPORT_LIB \$IMPORT_LIB
5733 EOF
5734                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5735 CF_EOF
5736                 chmod +x mk_shared_lib.sh
5737                 ;;
5738         (darwin*)
5739                 cf_try_cflags="no-cpp-precomp"
5740                 CC_SHARED_OPTS="-dynamic"
5741                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5742                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5743                 cf_cv_shlib_version_infix=yes
5744                 echo "$as_me:5744: checking if ld -search_paths_first works" >&5
5745 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5746 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5747   echo $ECHO_N "(cached) $ECHO_C" >&6
5748 else
5749
5750                         cf_save_LDFLAGS=$LDFLAGS
5751                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5752                         cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755
5756 int
5757 main (void)
5758 {
5759 int i;
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext conftest$ac_exeext
5765 if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
5766   (eval $ac_link) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest$ac_exeext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   cf_cv_ldflags_search_paths_first=yes
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 cf_cv_ldflags_search_paths_first=no
5781 fi
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783                                 LDFLAGS=$cf_save_LDFLAGS
5784 fi
5785 echo "$as_me:5785: result: $cf_cv_ldflags_search_paths_first" >&5
5786 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5787                 if test $cf_cv_ldflags_search_paths_first = yes; then
5788                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5789                 fi
5790                 ;;
5791         (hpux[7-8]*)
5792                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5793                 if test "$GCC" != yes; then
5794                         CC_SHARED_OPTS='+Z'
5795                 fi
5796                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5797                 INSTALL_LIB="-m 555"
5798                 ;;
5799         (hpux*)
5800                 # (tested with gcc 2.7.2 -- I don't have c89)
5801                 if test "$GCC" = yes; then
5802                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5803                 else
5804                         CC_SHARED_OPTS='+Z'
5805                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5806                 fi
5807                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5808                 # HP-UX shared libraries must be executable, and should be
5809                 # readonly to exploit a quirk in the memory manager.
5810                 INSTALL_LIB="-m 555"
5811                 ;;
5812         (interix*)
5813                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5814                 if test "$cf_cv_shlib_version" = rel; then
5815                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5816                 else
5817                         cf_shared_soname='`basename $@`'
5818                 fi
5819                 CC_SHARED_OPTS=
5820                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5821                 ;;
5822         (irix*)
5823                 if test "$cf_cv_enable_rpath" = yes ; then
5824                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5825                 fi
5826                 # tested with IRIX 5.2 and 'cc'.
5827                 if test "$GCC" != yes; then
5828                         CC_SHARED_OPTS='-KPIC'
5829                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5830                 else
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5832                 fi
5833                 cf_cv_rm_so_locs=yes
5834                 ;;
5835         (linux*|gnu*|k*bsd*-gnu)
5836                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5837                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5839                 fi
5840                 if test "$cf_cv_enable_rpath" = yes ; then
5841                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5842                 fi
5843
5844         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5845         if test "$cf_cv_shlib_version" = rel; then
5846                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5847         else
5848                 cf_cv_shared_soname='`basename $@`'
5849         fi
5850
5851                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5852                 ;;
5853         (mingw*)
5854                 cf_cv_shlib_version=mingw
5855                 cf_cv_shlib_version_infix=mingw
5856                 shlibdir=$bindir
5857                 MAKE_DLLS=
5858                 if test "$DFT_LWR_MODEL" = "shared" ; then
5859                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5860                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5861                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5862                 fi
5863                 CC_SHARED_OPTS=
5864                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5865                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5866                 cat >mk_shared_lib.sh <<-CF_EOF
5867                 #!$SHELL
5868                 SHARED_LIB=\$1
5869                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5870                 shift
5871                 cat <<-EOF
5872                 Linking shared library
5873                 ** SHARED_LIB \$SHARED_LIB
5874                 ** IMPORT_LIB \$IMPORT_LIB
5875 EOF
5876                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5877 CF_EOF
5878                 chmod +x mk_shared_lib.sh
5879                 ;;
5880         (openbsd[2-9].*|mirbsd*)
5881                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5882                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                 fi
5885                 if test "$cf_cv_enable_rpath" = yes ; then
5886                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5887                 fi
5888                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5889
5890         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5891         if test "$cf_cv_shlib_version" = rel; then
5892                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5893         else
5894                 cf_cv_shared_soname='`basename $@`'
5895         fi
5896
5897                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5898                 ;;
5899         (nto-qnx*|openbsd*|freebsd[12].*)
5900                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5901                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5902                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5903                 ;;
5904         (dragonfly*|freebsd*)
5905                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5906                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5907                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5908                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5909                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5910                 fi
5911
5912         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5913         if test "$cf_cv_shlib_version" = rel; then
5914                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5915         else
5916                 cf_cv_shared_soname='`basename $@`'
5917         fi
5918
5919                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5920                 ;;
5921         (netbsd*)
5922                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5923                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5924                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5925                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5926                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5927                         if test "$cf_cv_shlib_version" = auto; then
5928                         if test -f /usr/libexec/ld.elf_so; then
5929                                 cf_cv_shlib_version=abi
5930                         else
5931                                 cf_cv_shlib_version=rel
5932                         fi
5933                         fi
5934
5935         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5936         if test "$cf_cv_shlib_version" = rel; then
5937                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5938         else
5939                 cf_cv_shared_soname='`basename $@`'
5940         fi
5941
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5943                 else
5944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5945                 fi
5946                 ;;
5947         (osf*|mls+*)
5948                 # tested with OSF/1 V3.2 and 'cc'
5949                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5950                 # link with shared libs).
5951                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5952                 case $host_os in
5953                 (osf4*)
5954                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5955                         ;;
5956                 esac
5957                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5958                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5959                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5960                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5961                 fi
5962                 cf_cv_rm_so_locs=yes
5963                 ;;
5964         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5965                 # tested with osr5.0.5
5966                 if test "$GCC" != yes; then
5967                         CC_SHARED_OPTS='-belf -KPIC'
5968                 fi
5969                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5970                 if test "$cf_cv_enable_rpath" = yes ; then
5971                         # only way is to set LD_RUN_PATH but no switch for it
5972                         RUN_PATH=$libdir
5973                 fi
5974                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5975                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5976                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5977                 ;;
5978         (sunos4*)
5979                 # tested with SunOS 4.1.1 and gcc 2.7.0
5980                 if test "$GCC" != yes; then
5981                         CC_SHARED_OPTS='-KPIC'
5982                 fi
5983                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5984                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5985                 ;;
5986         (solaris2*)
5987                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5988                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5989                 if test "$DFT_LWR_MODEL" = "shared" ; then
5990                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5991                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5992                 fi
5993                 if test "$cf_cv_enable_rpath" = yes ; then
5994                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5995                 fi
5996
5997         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5998         if test "$cf_cv_shlib_version" = rel; then
5999                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6000         else
6001                 cf_cv_shared_soname='`basename $@`'
6002         fi
6003
6004                 if test "$GCC" != yes; then
6005                         cf_save_CFLAGS="$CFLAGS"
6006                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6007                         do
6008                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6009                                 cat >conftest.$ac_ext <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6012 #include <stdio.h>
6013 int
6014 main (void)
6015 {
6016 printf("Hello\n");
6017   ;
6018   return 0;
6019 }
6020 _ACEOF
6021 rm -f conftest.$ac_objext
6022 if { (eval echo "$as_me:6022: \"$ac_compile\"") >&5
6023   (eval $ac_compile) 2>&5
6024   ac_status=$?
6025   echo "$as_me:6025: \$? = $ac_status" >&5
6026   (exit $ac_status); } &&
6027          { ac_try='test -s conftest.$ac_objext'
6028   { (eval echo "$as_me:6028: \"$ac_try\"") >&5
6029   (eval $ac_try) 2>&5
6030   ac_status=$?
6031   echo "$as_me:6031: \$? = $ac_status" >&5
6032   (exit $ac_status); }; }; then
6033   break
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 fi
6038 rm -f conftest.$ac_objext conftest.$ac_ext
6039                         done
6040                         CFLAGS="$cf_save_CFLAGS"
6041                         CC_SHARED_OPTS=$cf_shared_opts
6042                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6043                 else
6044                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6045                 fi
6046                 ;;
6047         (sysv5uw7*|unix_sv*)
6048                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6049                 if test "$GCC" != yes; then
6050                         CC_SHARED_OPTS='-KPIC'
6051                 fi
6052                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6053                 ;;
6054         (*)
6055                 CC_SHARED_OPTS='unknown'
6056                 MK_SHARED_LIB='echo unknown'
6057                 ;;
6058         esac
6059
6060         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6061         case "$cf_cv_shlib_version" in
6062         (rel|abi)
6063                 case "$MK_SHARED_LIB" in
6064                 (*'-o $@')
6065                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6066                         ;;
6067                 (*)
6068                         { echo "$as_me:6068: WARNING: ignored --with-shlib-version" >&5
6069 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6070                         ;;
6071                 esac
6072                 ;;
6073         esac
6074
6075         if test -n "$cf_try_cflags"
6076         then
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6078 "${as_me:-configure}"
6079 #include <stdio.h>
6080 int main(int argc, char *argv[])
6081 {
6082         printf("hello\n");
6083         return (argv[argc-1] == 0) ;
6084 }
6085 EOF
6086                 cf_save_CFLAGS="$CFLAGS"
6087                 for cf_opt in $cf_try_cflags
6088                 do
6089                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6090                         echo "$as_me:6090: checking if CFLAGS option -$cf_opt works" >&5
6091 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6092                         if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
6093   (eval $ac_compile) 2>&5
6094   ac_status=$?
6095   echo "$as_me:6095: \$? = $ac_status" >&5
6096   (exit $ac_status); }; then
6097                                 echo "$as_me:6097: result: yes" >&5
6098 echo "${ECHO_T}yes" >&6
6099                                 cf_save_CFLAGS="$CFLAGS"
6100                         else
6101                                 echo "$as_me:6101: result: no" >&5
6102 echo "${ECHO_T}no" >&6
6103                         fi
6104                 done
6105                 CFLAGS="$cf_save_CFLAGS"
6106         fi
6107
6108         # RPATH_LIST is a colon-separated list of directories
6109         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6110         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6111
6112         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6113
6114         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6115
6116 echo "${as_me:-configure}:6116: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6117
6118         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6119
6120 echo "${as_me:-configure}:6120: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6121
6122 for model in $cf_list_models; do
6123         case $model in
6124         (libtool)
6125
6126 echo "$as_me:6126: checking for additional libtool options" >&5
6127 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6128
6129 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6130 if test "${with_libtool_opts+set}" = set; then
6131   withval="$with_libtool_opts"
6132   with_libtool_opts=$withval
6133 else
6134   with_libtool_opts=no
6135 fi;
6136 echo "$as_me:6136: result: $with_libtool_opts" >&5
6137 echo "${ECHO_T}$with_libtool_opts" >&6
6138
6139 case .$with_libtool_opts in
6140 (.yes|.no|.)
6141         ;;
6142 (*)
6143         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6144         ;;
6145 esac
6146
6147 echo "$as_me:6147: checking if exported-symbols file should be used" >&5
6148 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6149
6150 # Check whether --with-export-syms or --without-export-syms was given.
6151 if test "${with_export_syms+set}" = set; then
6152   withval="$with_export_syms"
6153   with_export_syms=$withval
6154 else
6155   with_export_syms=no
6156 fi;
6157 if test "x$with_export_syms" = xyes
6158 then
6159         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6160
6161 fi
6162 echo "$as_me:6162: result: $with_export_syms" >&5
6163 echo "${ECHO_T}$with_export_syms" >&6
6164 if test "x$with_export_syms" != xno
6165 then
6166         EXPORT_SYMS="-export-symbols $with_export_syms"
6167
6168 fi
6169
6170                 ;;
6171         (shared)
6172                 if test "$CC_SHARED_OPTS" = "unknown"; then
6173                         { { echo "$as_me:6173: error: Shared libraries are not supported in this version" >&5
6174 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6175    { (exit 1); exit 1; }; }
6176                 fi
6177                 # workaround for inept transition to PIE vs PIC...
6178                 echo "$as_me:6178: checking if current CFLAGS link properly" >&5
6179 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6180                 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6183 #include <stdio.h>
6184 int
6185 main (void)
6186 {
6187 printf("Hello work\n");
6188   ;
6189   return 0;
6190 }
6191 _ACEOF
6192 rm -f conftest.$ac_objext conftest$ac_exeext
6193 if { (eval echo "$as_me:6193: \"$ac_link\"") >&5
6194   (eval $ac_link) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); } &&
6198          { ac_try='test -s conftest$ac_exeext'
6199   { (eval echo "$as_me:6199: \"$ac_try\"") >&5
6200   (eval $ac_try) 2>&5
6201   ac_status=$?
6202   echo "$as_me:6202: \$? = $ac_status" >&5
6203   (exit $ac_status); }; }; then
6204   cf_cflags_work=yes
6205 else
6206   echo "$as_me: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 cf_cflags_work=no
6209 fi
6210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6211                 echo "$as_me:6211: result: $cf_cflags_work" >&5
6212 echo "${ECHO_T}$cf_cflags_work" >&6
6213                 if test "$cf_cflags_work" = no
6214                 then
6215                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6216
6217 echo "${as_me:-configure}:6217: testing try to work around by appending shared-options ..." 1>&5
6218
6219                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6220                 fi
6221
6222 echo "$as_me:6222: checking if versioned-symbols file should be used" >&5
6223 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6224
6225 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6226 if test "${with_versioned_syms+set}" = set; then
6227   withval="$with_versioned_syms"
6228   with_versioned_syms=$withval
6229 else
6230   with_versioned_syms=no
6231 fi;
6232 case "x$with_versioned_syms" in
6233 (xyes)
6234         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6235
6236         ;;
6237 (xno)
6238         ;;
6239 (x/*)
6240         test -f "$with_versioned_syms" || { { echo "$as_me:6240: error: expected a filename: $with_versioned_syms" >&5
6241 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6242    { (exit 1); exit 1; }; }
6243         ;;
6244 (*)
6245         test -f "$with_versioned_syms" || { { echo "$as_me:6245: error: expected a filename: $with_versioned_syms" >&5
6246 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6247    { (exit 1); exit 1; }; }
6248         with_versioned_syms=`pwd`/"$with_versioned_syms"
6249         ;;
6250 esac
6251 echo "$as_me:6251: result: $with_versioned_syms" >&5
6252 echo "${ECHO_T}$with_versioned_syms" >&6
6253
6254 RESULTING_SYMS=
6255 VERSIONED_SYMS=
6256 WILDCARD_SYMS=
6257
6258 if test "x$with_versioned_syms" != xno
6259 then
6260         RESULTING_SYMS=$with_versioned_syms
6261         case "x$MK_SHARED_LIB" in
6262         (*-Wl,*)
6263                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6264                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6265                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6266
6267 echo "${as_me:-configure}:6267: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6268
6269                 ;;
6270         (*-dy\ *)
6271                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6272                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6273                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6274
6275 echo "${as_me:-configure}:6275: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6276
6277                 ;;
6278         (*)
6279                 { echo "$as_me:6279: WARNING: this system does not support versioned-symbols" >&5
6280 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6281                 ;;
6282         esac
6283
6284         # Linux ld can selectively override scope, e.g., of symbols beginning with
6285         # "_" by first declaring some as global, and then using a wildcard to
6286         # declare the others as local.  Some other loaders cannot do this.  Check
6287         # by constructing a (very) simple shared library and inspecting its
6288         # symbols.
6289         if test "x$VERSIONED_SYMS" != "x"
6290         then
6291                 echo "$as_me:6291: checking if wildcards can be used to selectively omit symbols" >&5
6292 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6293                 WILDCARD_SYMS=no
6294
6295                 # make sources
6296                 rm -f conftest.*
6297
6298                 cat >conftest.ver <<EOF
6299 module_1.0 {
6300 global:
6301         globalf1;
6302 local:
6303         localf1;
6304 };
6305 module_2.0 {
6306 global:
6307         globalf2;
6308 local:
6309         localf2;
6310         _*;
6311 } module_1.0;
6312 submodule_1.0 {
6313 global:
6314         subglobalf1;
6315         _ismissing;
6316 local:
6317         sublocalf1;
6318 };
6319 submodule_2.0 {
6320 global:
6321         subglobalf2;
6322 local:
6323         sublocalf2;
6324         _*;
6325 } submodule_1.0;
6326 EOF
6327                 cat >conftest.$ac_ext <<EOF
6328 #line 6328 "configure"
6329 int     _ismissing(void) { return 1; }
6330 int     _localf1(void) { return 1; }
6331 int     _localf2(void) { return 2; }
6332 int     globalf1(void) { return 1; }
6333 int     globalf2(void) { return 2; }
6334 int     _sublocalf1(void) { return 1; }
6335 int     _sublocalf2(void) { return 2; }
6336 int     subglobalf1(void) { return 1; }
6337 int     subglobalf2(void) { return 2; }
6338 EOF
6339                 cat >conftest.mk <<EOF
6340 CC=${CC}
6341 CFLAGS=${CFLAGS}
6342 CPPFLAGS=${CPPFLAGS}
6343 LDFLAGS=${LDFLAGS}
6344 LIBS=${LIBS}
6345 VERSIONED_SYMS=${VERSIONED_SYMS}
6346 RESULTING_SYMS=conftest.ver
6347 MK_SHARED_LIB=${MK_SHARED_LIB}
6348 conftest.so: conftest.$ac_cv_objext
6349                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6350 EOF
6351
6352                 # compile source, make library
6353                 if make -f conftest.mk 2>&5 >/dev/null
6354                 then
6355                         # test for missing symbol in either Data or Text section
6356                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6357                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6358                 fi
6359                 echo "$as_me:6359: result: $WILDCARD_SYMS" >&5
6360 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6361                 rm -f conftest.*
6362         fi
6363 fi
6364
6365                 ;;
6366         esac
6367 done
6368
6369 ### Checks for special libraries, must be done up-front.
6370 SHLIB_LIST=""
6371
6372 echo "$as_me:6372: checking if you want to link with the GPM mouse library" >&5
6373 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6374
6375 # Check whether --with-gpm or --without-gpm was given.
6376 if test "${with_gpm+set}" = set; then
6377   withval="$with_gpm"
6378   with_gpm=$withval
6379 else
6380   with_gpm=maybe
6381 fi;
6382 echo "$as_me:6382: result: $with_gpm" >&5
6383 echo "${ECHO_T}$with_gpm" >&6
6384
6385 if test "$with_gpm" != no ; then
6386         echo "$as_me:6386: checking for gpm.h" >&5
6387 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6388 if test "${ac_cv_header_gpm_h+set}" = set; then
6389   echo $ECHO_N "(cached) $ECHO_C" >&6
6390 else
6391   cat >conftest.$ac_ext <<_ACEOF
6392 #line 6392 "configure"
6393 #include "confdefs.h"
6394 #include <gpm.h>
6395 _ACEOF
6396 if { (eval echo "$as_me:6396: \"$ac_cpp conftest.$ac_ext\"") >&5
6397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6398   ac_status=$?
6399   egrep -v '^ *\+' conftest.er1 >conftest.err
6400   rm -f conftest.er1
6401   cat conftest.err >&5
6402   echo "$as_me:6402: \$? = $ac_status" >&5
6403   (exit $ac_status); } >/dev/null; then
6404   if test -s conftest.err; then
6405     ac_cpp_err=$ac_c_preproc_warn_flag
6406   else
6407     ac_cpp_err=
6408   fi
6409 else
6410   ac_cpp_err=yes
6411 fi
6412 if test -z "$ac_cpp_err"; then
6413   ac_cv_header_gpm_h=yes
6414 else
6415   echo "$as_me: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   ac_cv_header_gpm_h=no
6418 fi
6419 rm -f conftest.err conftest.$ac_ext
6420 fi
6421 echo "$as_me:6421: result: $ac_cv_header_gpm_h" >&5
6422 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6423 if test $ac_cv_header_gpm_h = yes; then
6424
6425 cat >>confdefs.h <<\EOF
6426 #define HAVE_GPM_H 1
6427 EOF
6428
6429                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6430                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing assuming we really have GPM library ..." 1>&5
6433
6434 cat >>confdefs.h <<\EOF
6435 #define HAVE_LIBGPM 1
6436 EOF
6437
6438                         with_gpm=yes
6439                 else
6440                         echo "$as_me:6440: checking for Gpm_Open in -lgpm" >&5
6441 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6442 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6443   echo $ECHO_N "(cached) $ECHO_C" >&6
6444 else
6445   ac_check_lib_save_LIBS=$LIBS
6446 LIBS="-lgpm  $LIBS"
6447 cat >conftest.$ac_ext <<_ACEOF
6448 #line 6448 "configure"
6449 #include "confdefs.h"
6450
6451 /* Override any gcc2 internal prototype to avoid an error.  */
6452 #ifdef __cplusplus
6453 extern "C"
6454 #endif
6455 /* We use char because int might match the return type of a gcc2
6456    builtin and then its argument prototype would still apply.  */
6457 char Gpm_Open ();
6458 int
6459 main (void)
6460 {
6461 Gpm_Open ();
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext conftest$ac_exeext
6467 if { (eval echo "$as_me:6467: \"$ac_link\"") >&5
6468   (eval $ac_link) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest$ac_exeext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   ac_cv_lib_gpm_Gpm_Open=yes
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 ac_cv_lib_gpm_Gpm_Open=no
6483 fi
6484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6485 LIBS=$ac_check_lib_save_LIBS
6486 fi
6487 echo "$as_me:6487: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6488 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6489 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6490   with_gpm=yes
6491 else
6492
6493                                 if test "$with_gpm" = maybe; then
6494                                         { echo "$as_me:6494: WARNING: Cannot link with GPM library" >&5
6495 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6496                                         with_gpm=no
6497                                 else
6498                                         { { echo "$as_me:6498: error: Cannot link with GPM library" >&5
6499 echo "$as_me: error: Cannot link with GPM library" >&2;}
6500    { (exit 1); exit 1; }; }
6501                                 fi
6502
6503 fi
6504
6505                 fi
6506
6507 else
6508
6509                 test "$with_gpm" != maybe && { echo "$as_me:6509: WARNING: Cannot find GPM header" >&5
6510 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6511                 with_gpm=no
6512
6513 fi
6514
6515 fi
6516
6517 if test "$with_gpm" != no ; then
6518         echo "$as_me:6518: checking if you want to load GPM dynamically" >&5
6519 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6520
6521 # Check whether --with-dlsym or --without-dlsym was given.
6522 if test "${with_dlsym+set}" = set; then
6523   withval="$with_dlsym"
6524   with_dlsym=$withval
6525 else
6526   with_dlsym=yes
6527 fi;
6528         echo "$as_me:6528: result: $with_dlsym" >&5
6529 echo "${ECHO_T}$with_dlsym" >&6
6530         if test "x$with_dlsym" = xyes ; then
6531
6532 cf_have_dlsym=no
6533 echo "$as_me:6533: checking for dlsym" >&5
6534 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6535 if test "${ac_cv_func_dlsym+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538   cat >conftest.$ac_ext <<_ACEOF
6539 #line 6539 "configure"
6540 #include "confdefs.h"
6541 #define dlsym autoconf_temporary
6542 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6543 #undef dlsym
6544
6545 #ifdef __cplusplus
6546 extern "C"
6547 #endif
6548
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char dlsym (void);
6552
6553 int
6554 main (void)
6555 {
6556
6557 /* The GNU C library defines stubs for functions which it implements
6558     to always fail with ENOSYS.  Some functions are actually named
6559     something starting with __ and the normal name is an alias.  */
6560 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6561 #error found stub for dlsym
6562 #endif
6563
6564         return dlsym ();
6565   ;
6566   return 0;
6567 }
6568 _ACEOF
6569 rm -f conftest.$ac_objext conftest$ac_exeext
6570 if { (eval echo "$as_me:6570: \"$ac_link\"") >&5
6571   (eval $ac_link) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit $ac_status); } &&
6575          { ac_try='test -s conftest$ac_exeext'
6576   { (eval echo "$as_me:6576: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581   ac_cv_func_dlsym=yes
6582 else
6583   echo "$as_me: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 ac_cv_func_dlsym=no
6586 fi
6587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6588 fi
6589 echo "$as_me:6589: result: $ac_cv_func_dlsym" >&5
6590 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6591 if test $ac_cv_func_dlsym = yes; then
6592   cf_have_dlsym=yes
6593 else
6594
6595 cf_have_libdl=no
6596 echo "$as_me:6596: checking for dlsym in -ldl" >&5
6597 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6598 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6599   echo $ECHO_N "(cached) $ECHO_C" >&6
6600 else
6601   ac_check_lib_save_LIBS=$LIBS
6602 LIBS="-ldl  $LIBS"
6603 cat >conftest.$ac_ext <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6606
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 #ifdef __cplusplus
6609 extern "C"
6610 #endif
6611 /* We use char because int might match the return type of a gcc2
6612    builtin and then its argument prototype would still apply.  */
6613 char dlsym ();
6614 int
6615 main (void)
6616 {
6617 dlsym ();
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 rm -f conftest.$ac_objext conftest$ac_exeext
6623 if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
6624   (eval $ac_link) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); } &&
6628          { ac_try='test -s conftest$ac_exeext'
6629   { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   ac_cv_lib_dl_dlsym=yes
6635 else
6636   echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 ac_cv_lib_dl_dlsym=no
6639 fi
6640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6641 LIBS=$ac_check_lib_save_LIBS
6642 fi
6643 echo "$as_me:6643: result: $ac_cv_lib_dl_dlsym" >&5
6644 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6645 if test $ac_cv_lib_dl_dlsym = yes; then
6646
6647         cf_have_dlsym=yes
6648         cf_have_libdl=yes
6649 fi
6650
6651 fi
6652
6653 if test "$cf_have_dlsym" = yes ; then
6654         test "$cf_have_libdl" = yes && {
6655 cf_add_libs="-ldl"
6656 # Filter out duplicates - this happens with badly-designed ".pc" files...
6657 for cf_add_1lib in $LIBS
6658 do
6659         for cf_add_2lib in $cf_add_libs
6660         do
6661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6662                 then
6663                         cf_add_1lib=
6664                         break
6665                 fi
6666         done
6667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6668 done
6669 LIBS="$cf_add_libs"
6670  }
6671
6672         echo "$as_me:6672: checking whether able to link to dl*() functions" >&5
6673 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6674         cat >conftest.$ac_ext <<_ACEOF
6675 #line 6675 "configure"
6676 #include "confdefs.h"
6677 #include <dlfcn.h>
6678 int
6679 main (void)
6680 {
6681
6682                 void *obj;
6683                 if ((obj = dlopen("filename", 0)) != 0) {
6684                         if (dlsym(obj, "symbolname") == 0) {
6685                         dlclose(obj);
6686                         }
6687                 }
6688   ;
6689   return 0;
6690 }
6691 _ACEOF
6692 rm -f conftest.$ac_objext conftest$ac_exeext
6693 if { (eval echo "$as_me:6693: \"$ac_link\"") >&5
6694   (eval $ac_link) 2>&5
6695   ac_status=$?
6696   echo "$as_me:6696: \$? = $ac_status" >&5
6697   (exit $ac_status); } &&
6698          { ac_try='test -s conftest$ac_exeext'
6699   { (eval echo "$as_me:6699: \"$ac_try\"") >&5
6700   (eval $ac_try) 2>&5
6701   ac_status=$?
6702   echo "$as_me:6702: \$? = $ac_status" >&5
6703   (exit $ac_status); }; }; then
6704
6705 cat >>confdefs.h <<\EOF
6706 #define HAVE_LIBDL 1
6707 EOF
6708
6709 else
6710   echo "$as_me: failed program was:" >&5
6711 cat conftest.$ac_ext >&5
6712
6713                 { { echo "$as_me:6713: error: Cannot link test program for libdl" >&5
6714 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6715    { (exit 1); exit 1; }; }
6716 fi
6717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718         echo "$as_me:6718: result: ok" >&5
6719 echo "${ECHO_T}ok" >&6
6720 else
6721         { { echo "$as_me:6721: error: Cannot find dlsym function" >&5
6722 echo "$as_me: error: Cannot find dlsym function" >&2;}
6723    { (exit 1); exit 1; }; }
6724 fi
6725
6726                 if test "x$with_gpm" != xyes ; then
6727                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6728
6729 echo "${as_me:-configure}:6729: testing assuming soname for gpm is $with_gpm ..." 1>&5
6730
6731                         cf_cv_gpm_soname="$with_gpm"
6732                 else
6733
6734 echo "$as_me:6734: checking for soname of gpm library" >&5
6735 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6736 if test "${cf_cv_gpm_soname+set}" = set; then
6737   echo $ECHO_N "(cached) $ECHO_C" >&6
6738 else
6739
6740 cf_cv_gpm_soname=unknown
6741 if test "$cross_compiling" != yes ; then
6742 cat >conftest.$ac_ext <<CF_EOF
6743 #include <gpm.h>
6744 int main(void)
6745 {
6746 if (Gpm_Open(0,0)) Gpm_Close();
6747         ${cf_cv_main_return:-return}(0);
6748 }
6749 CF_EOF
6750 cf_save_LIBS="$LIBS"
6751
6752 cf_add_libs="-lgpm"
6753 # Filter out duplicates - this happens with badly-designed ".pc" files...
6754 for cf_add_1lib in $LIBS
6755 do
6756         for cf_add_2lib in $cf_add_libs
6757         do
6758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6759                 then
6760                         cf_add_1lib=
6761                         break
6762                 fi
6763         done
6764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6765 done
6766 LIBS="$cf_add_libs"
6767
6768         if { (eval echo "$as_me:6768: \"$ac_compile\"") >&5
6769   (eval $ac_compile) 2>&5
6770   ac_status=$?
6771   echo "$as_me:6771: \$? = $ac_status" >&5
6772   (exit $ac_status); } ; then
6773                 if { (eval echo "$as_me:6773: \"$ac_link\"") >&5
6774   (eval $ac_link) 2>&5
6775   ac_status=$?
6776   echo "$as_me:6776: \$? = $ac_status" >&5
6777   (exit $ac_status); } ; then
6778                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6779                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6780                 fi
6781         fi
6782 rm -rf conftest*
6783 LIBS="$cf_save_LIBS"
6784 fi
6785
6786 fi
6787 echo "$as_me:6787: result: $cf_cv_gpm_soname" >&5
6788 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6789
6790                 fi
6791                 test "$cf_cv_gpm_soname" != "unknown" &&
6792 cat >>confdefs.h <<EOF
6793 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6794 EOF
6795
6796                 SHLIB_LIST="-ldl $SHLIB_LIST"
6797
6798 cf_add_libs="-ldl"
6799 # Filter out duplicates - this happens with badly-designed ".pc" files...
6800 for cf_add_1lib in $PRIVATE_LIBS
6801 do
6802         for cf_add_2lib in $cf_add_libs
6803         do
6804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6805                 then
6806                         cf_add_1lib=
6807                         break
6808                 fi
6809         done
6810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6811 done
6812 PRIVATE_LIBS="$cf_add_libs"
6813
6814         else
6815                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6816
6817 cf_add_libs="-lgpm"
6818 # Filter out duplicates - this happens with badly-designed ".pc" files...
6819 for cf_add_1lib in $TEST_LIBS
6820 do
6821         for cf_add_2lib in $cf_add_libs
6822         do
6823                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6824                 then
6825                         cf_add_1lib=
6826                         break
6827                 fi
6828         done
6829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6830 done
6831 TEST_LIBS="$cf_add_libs"
6832
6833 cf_add_libs="-lgpm"
6834 # Filter out duplicates - this happens with badly-designed ".pc" files...
6835 for cf_add_1lib in $PRIVATE_LIBS
6836 do
6837         for cf_add_2lib in $cf_add_libs
6838         do
6839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6840                 then
6841                         cf_add_1lib=
6842                         break
6843                 fi
6844         done
6845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6846 done
6847 PRIVATE_LIBS="$cf_add_libs"
6848
6849         fi
6850
6851 cat >>confdefs.h <<\EOF
6852 #define HAVE_LIBGPM 1
6853 EOF
6854
6855 echo "$as_me:6855: checking for Gpm_Wgetch in -lgpm" >&5
6856 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6857 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6858   echo $ECHO_N "(cached) $ECHO_C" >&6
6859 else
6860   ac_check_lib_save_LIBS=$LIBS
6861 LIBS="-lgpm  $LIBS"
6862 cat >conftest.$ac_ext <<_ACEOF
6863 #line 6863 "configure"
6864 #include "confdefs.h"
6865
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char Gpm_Wgetch ();
6873 int
6874 main (void)
6875 {
6876 Gpm_Wgetch ();
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 rm -f conftest.$ac_objext conftest$ac_exeext
6882 if { (eval echo "$as_me:6882: \"$ac_link\"") >&5
6883   (eval $ac_link) 2>&5
6884   ac_status=$?
6885   echo "$as_me:6885: \$? = $ac_status" >&5
6886   (exit $ac_status); } &&
6887          { ac_try='test -s conftest$ac_exeext'
6888   { (eval echo "$as_me:6888: \"$ac_try\"") >&5
6889   (eval $ac_try) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); }; }; then
6893   ac_cv_lib_gpm_Gpm_Wgetch=yes
6894 else
6895   echo "$as_me: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6897 ac_cv_lib_gpm_Gpm_Wgetch=no
6898 fi
6899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6900 LIBS=$ac_check_lib_save_LIBS
6901 fi
6902 echo "$as_me:6902: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6903 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6904 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6905
6906 echo "$as_me:6906: checking if GPM is weakly bound to curses library" >&5
6907 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6908 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6909   echo $ECHO_N "(cached) $ECHO_C" >&6
6910 else
6911
6912 cf_cv_check_gpm_wgetch=unknown
6913 if test "$cross_compiling" != yes ; then
6914
6915 cat >conftest.$ac_ext <<CF_EOF
6916 #include <gpm.h>
6917 int main(void)
6918 {
6919         Gpm_Wgetch();
6920         ${cf_cv_main_return:-return}(0);
6921 }
6922 CF_EOF
6923
6924         cf_save_LIBS="$LIBS"
6925         # This only works if we can look at the symbol table.  If a shared
6926         # library is stripped for install, we cannot use that.  So we're forced
6927         # to rely on the static library, noting that some packagers may not
6928         # include it.
6929         LIBS="-static -lgpm -dynamic $LIBS"
6930         if { (eval echo "$as_me:6930: \"$ac_compile\"") >&5
6931   (eval $ac_compile) 2>&5
6932   ac_status=$?
6933   echo "$as_me:6933: \$? = $ac_status" >&5
6934   (exit $ac_status); } ; then
6935                 if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
6936   (eval $ac_link) 2>&5
6937   ac_status=$?
6938   echo "$as_me:6938: \$? = $ac_status" >&5
6939   (exit $ac_status); } ; then
6940                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6941                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6942                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6943                 fi
6944         fi
6945         rm -rf conftest*
6946         LIBS="$cf_save_LIBS"
6947 fi
6948
6949 fi
6950 echo "$as_me:6950: result: $cf_cv_check_gpm_wgetch" >&5
6951 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6952
6953 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6954         { echo "$as_me:6954: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6955 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6956 fi
6957
6958 fi
6959
6960 fi
6961
6962 echo "$as_me:6962: checking if you want to use PCRE2 for regular-expressions" >&5
6963 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6964
6965 # Check whether --with-pcre2 or --without-pcre2 was given.
6966 if test "${with_pcre2+set}" = set; then
6967   withval="$with_pcre2"
6968
6969 fi;
6970 test -z "$with_pcre2" && with_pcre2=no
6971 echo "$as_me:6971: result: $with_pcre2" >&5
6972 echo "${ECHO_T}$with_pcre2" >&6
6973
6974 if test "x$with_pcre2" != xno ; then
6975
6976 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6977         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6978
6979 echo "${as_me:-configure}:6979: testing found package libpcre2 ..." 1>&5
6980
6981         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6982         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6983         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6984
6985 echo "${as_me:-configure}:6985: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6986
6987         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6988
6989 echo "${as_me:-configure}:6989: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6990
6991 cf_fix_cppflags=no
6992 cf_new_cflags=
6993 cf_new_cppflags=
6994 cf_new_extra_cppflags=
6995
6996 for cf_add_cflags in $cf_pkgconfig_incs
6997 do
6998 case $cf_fix_cppflags in
6999 (no)
7000         case $cf_add_cflags in
7001         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7002                 case $cf_add_cflags in
7003                 (-D*)
7004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7005
7006                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7007                                 && test -z "${cf_tst_cflags}" \
7008                                 && cf_fix_cppflags=yes
7009
7010                         if test $cf_fix_cppflags = yes ; then
7011
7012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7014
7015                                 continue
7016                         elif test "${cf_tst_cflags}" = "\"'" ; then
7017
7018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7020
7021                                 continue
7022                         fi
7023                         ;;
7024                 esac
7025                 case "$CPPFLAGS" in
7026                 (*$cf_add_cflags)
7027                         ;;
7028                 (*)
7029                         case $cf_add_cflags in
7030                         (-D*)
7031                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7032
7033 CPPFLAGS=`echo "$CPPFLAGS" | \
7034         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7035                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7036
7037                                 ;;
7038                         esac
7039
7040         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7041         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7042
7043                         ;;
7044                 esac
7045                 ;;
7046         (*)
7047
7048         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7049         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7050
7051                 ;;
7052         esac
7053         ;;
7054 (yes)
7055
7056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7058
7059         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7060
7061         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7062                 && test -z "${cf_tst_cflags}" \
7063                 && cf_fix_cppflags=no
7064         ;;
7065 esac
7066 done
7067
7068 if test -n "$cf_new_cflags" ; then
7069
7070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7071         CFLAGS="${CFLAGS}$cf_new_cflags"
7072
7073 fi
7074
7075 if test -n "$cf_new_cppflags" ; then
7076
7077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7078         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7079
7080 fi
7081
7082 if test -n "$cf_new_extra_cppflags" ; then
7083
7084         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7085         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7086
7087 fi
7088
7089 cf_add_libs="$cf_pkgconfig_libs"
7090 # Filter out duplicates - this happens with badly-designed ".pc" files...
7091 for cf_add_1lib in $LIBS
7092 do
7093         for cf_add_2lib in $cf_add_libs
7094         do
7095                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7096                 then
7097                         cf_add_1lib=
7098                         break
7099                 fi
7100         done
7101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7102 done
7103 LIBS="$cf_add_libs"
7104
7105         :
7106 else
7107         cf_pkgconfig_incs=
7108         cf_pkgconfig_libs=
7109
7110 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7111         test -n "$verbose" && echo "    found package libpcre" 1>&6
7112
7113 echo "${as_me:-configure}:7113: testing found package libpcre ..." 1>&5
7114
7115         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7116         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7117         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7118
7119 echo "${as_me:-configure}:7119: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7120
7121         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7122
7123 echo "${as_me:-configure}:7123: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7124
7125 cf_fix_cppflags=no
7126 cf_new_cflags=
7127 cf_new_cppflags=
7128 cf_new_extra_cppflags=
7129
7130 for cf_add_cflags in $cf_pkgconfig_incs
7131 do
7132 case $cf_fix_cppflags in
7133 (no)
7134         case $cf_add_cflags in
7135         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7136                 case $cf_add_cflags in
7137                 (-D*)
7138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7139
7140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7141                                 && test -z "${cf_tst_cflags}" \
7142                                 && cf_fix_cppflags=yes
7143
7144                         if test $cf_fix_cppflags = yes ; then
7145
7146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7148
7149                                 continue
7150                         elif test "${cf_tst_cflags}" = "\"'" ; then
7151
7152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7154
7155                                 continue
7156                         fi
7157                         ;;
7158                 esac
7159                 case "$CPPFLAGS" in
7160                 (*$cf_add_cflags)
7161                         ;;
7162                 (*)
7163                         case $cf_add_cflags in
7164                         (-D*)
7165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7166
7167 CPPFLAGS=`echo "$CPPFLAGS" | \
7168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7170
7171                                 ;;
7172                         esac
7173
7174         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7175         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7176
7177                         ;;
7178                 esac
7179                 ;;
7180         (*)
7181
7182         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7183         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7184
7185                 ;;
7186         esac
7187         ;;
7188 (yes)
7189
7190         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7191         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7192
7193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7194
7195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7196                 && test -z "${cf_tst_cflags}" \
7197                 && cf_fix_cppflags=no
7198         ;;
7199 esac
7200 done
7201
7202 if test -n "$cf_new_cflags" ; then
7203
7204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7205         CFLAGS="${CFLAGS}$cf_new_cflags"
7206
7207 fi
7208
7209 if test -n "$cf_new_cppflags" ; then
7210
7211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7212         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7213
7214 fi
7215
7216 if test -n "$cf_new_extra_cppflags" ; then
7217
7218         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7219         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7220
7221 fi
7222
7223 cf_add_libs="$cf_pkgconfig_libs"
7224 # Filter out duplicates - this happens with badly-designed ".pc" files...
7225 for cf_add_1lib in $LIBS
7226 do
7227         for cf_add_2lib in $cf_add_libs
7228         do
7229                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7230                 then
7231                         cf_add_1lib=
7232                         break
7233                 fi
7234         done
7235         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7236 done
7237 LIBS="$cf_add_libs"
7238
7239         :
7240 else
7241         cf_pkgconfig_incs=
7242         cf_pkgconfig_libs=
7243
7244                         { { echo "$as_me:7244: error: Cannot find PCRE2 library" >&5
7245 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7246    { (exit 1); exit 1; }; }
7247 fi
7248
7249 fi
7250
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_LIB_PCRE2 1
7253 EOF
7254
7255         # if pkgconfig gave no results, look for the libraries directly
7256         case $LIBS in
7257         (*pcre2-posix*|*pcreposix*)
7258                 ;;
7259         (*)
7260                 echo "$as_me:7260: checking for regcomp in -lpcre2-posix" >&5
7261 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7262 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7263   echo $ECHO_N "(cached) $ECHO_C" >&6
7264 else
7265   ac_check_lib_save_LIBS=$LIBS
7266 LIBS="-lpcre2-posix  $LIBS"
7267 cat >conftest.$ac_ext <<_ACEOF
7268 #line 7268 "configure"
7269 #include "confdefs.h"
7270
7271 /* Override any gcc2 internal prototype to avoid an error.  */
7272 #ifdef __cplusplus
7273 extern "C"
7274 #endif
7275 /* We use char because int might match the return type of a gcc2
7276    builtin and then its argument prototype would still apply.  */
7277 char regcomp ();
7278 int
7279 main (void)
7280 {
7281 regcomp ();
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -f conftest.$ac_objext conftest$ac_exeext
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288   (eval $ac_link) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -s conftest$ac_exeext'
7293   { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); }; }; then
7298   ac_cv_lib_pcre2_posix_regcomp=yes
7299 else
7300   echo "$as_me: failed program was:" >&5
7301 cat conftest.$ac_ext >&5
7302 ac_cv_lib_pcre2_posix_regcomp=no
7303 fi
7304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7305 LIBS=$ac_check_lib_save_LIBS
7306 fi
7307 echo "$as_me:7307: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7308 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7309 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7310
7311 cf_add_libs="-lpcre2-posix"
7312 # Filter out duplicates - this happens with badly-designed ".pc" files...
7313 for cf_add_1lib in $LIBS
7314 do
7315         for cf_add_2lib in $cf_add_libs
7316         do
7317                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7318                 then
7319                         cf_add_1lib=
7320                         break
7321                 fi
7322         done
7323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7324 done
7325 LIBS="$cf_add_libs"
7326
7327 else
7328   echo "$as_me:7328: checking for regcomp in -lpcreposix" >&5
7329 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7330 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7331   echo $ECHO_N "(cached) $ECHO_C" >&6
7332 else
7333   ac_check_lib_save_LIBS=$LIBS
7334 LIBS="-lpcreposix  $LIBS"
7335 cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 /* Override any gcc2 internal prototype to avoid an error.  */
7340 #ifdef __cplusplus
7341 extern "C"
7342 #endif
7343 /* We use char because int might match the return type of a gcc2
7344    builtin and then its argument prototype would still apply.  */
7345 char regcomp ();
7346 int
7347 main (void)
7348 {
7349 regcomp ();
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356   (eval $ac_link) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest$ac_exeext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   ac_cv_lib_pcreposix_regcomp=yes
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 ac_cv_lib_pcreposix_regcomp=no
7371 fi
7372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7373 LIBS=$ac_check_lib_save_LIBS
7374 fi
7375 echo "$as_me:7375: result: $ac_cv_lib_pcreposix_regcomp" >&5
7376 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7377 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7378
7379 cf_add_libs="-lpcreposix"
7380 # Filter out duplicates - this happens with badly-designed ".pc" files...
7381 for cf_add_1lib in $LIBS
7382 do
7383         for cf_add_2lib in $cf_add_libs
7384         do
7385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7386                 then
7387                         cf_add_1lib=
7388                         break
7389                 fi
7390         done
7391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7392 done
7393 LIBS="$cf_add_libs"
7394
7395 else
7396   { { echo "$as_me:7396: error: Cannot find PCRE2 POSIX library" >&5
7397 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7398    { (exit 1); exit 1; }; }
7399 fi
7400
7401 fi
7402
7403                 ;;
7404         esac
7405
7406         # either way, check for the library header files
7407
7408 for ac_header in pcre2-posix.h pcreposix.h
7409 do
7410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7411 echo "$as_me:7411: checking for $ac_header" >&5
7412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7414   echo $ECHO_N "(cached) $ECHO_C" >&6
7415 else
7416   cat >conftest.$ac_ext <<_ACEOF
7417 #line 7417 "configure"
7418 #include "confdefs.h"
7419 #include <$ac_header>
7420 _ACEOF
7421 if { (eval echo "$as_me:7421: \"$ac_cpp conftest.$ac_ext\"") >&5
7422   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7423   ac_status=$?
7424   egrep -v '^ *\+' conftest.er1 >conftest.err
7425   rm -f conftest.er1
7426   cat conftest.err >&5
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } >/dev/null; then
7429   if test -s conftest.err; then
7430     ac_cpp_err=$ac_c_preproc_warn_flag
7431   else
7432     ac_cpp_err=
7433   fi
7434 else
7435   ac_cpp_err=yes
7436 fi
7437 if test -z "$ac_cpp_err"; then
7438   eval "$as_ac_Header=yes"
7439 else
7440   echo "$as_me: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   eval "$as_ac_Header=no"
7443 fi
7444 rm -f conftest.err conftest.$ac_ext
7445 fi
7446 echo "$as_me:7446: result: `eval echo '${'$as_ac_Header'}'`" >&5
7447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7448 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7449   cat >>confdefs.h <<EOF
7450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7451 EOF
7452
7453 fi
7454 done
7455
7456 fi
7457
7458 # not everyone has "test -c"
7459 if test -c /dev/sysmouse 2>/dev/null ; then
7460 echo "$as_me:7460: checking if you want to use sysmouse" >&5
7461 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7462
7463 # Check whether --with-sysmouse or --without-sysmouse was given.
7464 if test "${with_sysmouse+set}" = set; then
7465   withval="$with_sysmouse"
7466   cf_with_sysmouse=$withval
7467 else
7468   cf_with_sysmouse=maybe
7469 fi;
7470         if test "$cf_with_sysmouse" != no ; then
7471         cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474
7475 #include <osreldate.h>
7476 #if (__FreeBSD_version >= 400017)
7477 #include <sys/consio.h>
7478 #include <sys/fbio.h>
7479 #else
7480 #include <machine/console.h>
7481 #endif
7482
7483 int
7484 main (void)
7485 {
7486
7487         struct mouse_info the_mouse;
7488         ioctl(0, CONS_MOUSECTL, &the_mouse);
7489
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext
7495 if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
7496   (eval $ac_compile) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   cf_with_sysmouse=yes
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 cf_with_sysmouse=no
7511 fi
7512 rm -f conftest.$ac_objext conftest.$ac_ext
7513         fi
7514 echo "$as_me:7514: result: $cf_with_sysmouse" >&5
7515 echo "${ECHO_T}$cf_with_sysmouse" >&6
7516 test "$cf_with_sysmouse" = yes &&
7517 cat >>confdefs.h <<\EOF
7518 #define USE_SYSMOUSE 1
7519 EOF
7520
7521 fi
7522
7523 # pretend that ncurses==ncursesw==ncursest
7524 echo "$as_me:7524: checking if you want to disable library suffixes" >&5
7525 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7526
7527 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7528 if test "${enable_lib_suffixes+set}" = set; then
7529   enableval="$enable_lib_suffixes"
7530   test "$enableval" != no && enableval=yes
7531         if test "$enableval" != "yes" ; then
7532     disable_lib_suffixes=yes
7533         else
7534                 disable_lib_suffixes=no
7535         fi
7536 else
7537   enableval=yes
7538         disable_lib_suffixes=no
7539
7540 fi;
7541 echo "$as_me:7541: result: $disable_lib_suffixes" >&5
7542 echo "${ECHO_T}$disable_lib_suffixes" >&6
7543
7544 ### If we're building with rpath, try to link non-standard libs that way too.
7545 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7546
7547 echo "$as_me:7547: checking if rpath-hack should be disabled" >&5
7548 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7549
7550 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7551 if test "${enable_rpath_hack+set}" = set; then
7552   enableval="$enable_rpath_hack"
7553   test "$enableval" != no && enableval=yes
7554         if test "$enableval" != "yes" ; then
7555     cf_disable_rpath_hack=yes
7556         else
7557                 cf_disable_rpath_hack=no
7558         fi
7559 else
7560   enableval=yes
7561         cf_disable_rpath_hack=no
7562
7563 fi;
7564 echo "$as_me:7564: result: $cf_disable_rpath_hack" >&5
7565 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7566 if test "$cf_disable_rpath_hack" = no ; then
7567
7568 echo "$as_me:7568: checking for updated LDFLAGS" >&5
7569 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7570 if test -n "$LD_RPATH_OPT" ; then
7571         echo "$as_me:7571: result: maybe" >&5
7572 echo "${ECHO_T}maybe" >&6
7573
7574         for ac_prog in ldd
7575 do
7576   # Extract the first word of "$ac_prog", so it can be a program name with args.
7577 set dummy $ac_prog; ac_word=$2
7578 echo "$as_me:7578: checking for $ac_word" >&5
7579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7580 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7581   echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583   if test -n "$cf_ldd_prog"; then
7584   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7585 else
7586   ac_save_IFS=$IFS; IFS=$ac_path_separator
7587 ac_dummy="$PATH"
7588 for ac_dir in $ac_dummy; do
7589   IFS=$ac_save_IFS
7590   test -z "$ac_dir" && ac_dir=.
7591   $as_executable_p "$ac_dir/$ac_word" || continue
7592 ac_cv_prog_cf_ldd_prog="$ac_prog"
7593 echo "$as_me:7593: found $ac_dir/$ac_word" >&5
7594 break
7595 done
7596
7597 fi
7598 fi
7599 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7600 if test -n "$cf_ldd_prog"; then
7601   echo "$as_me:7601: result: $cf_ldd_prog" >&5
7602 echo "${ECHO_T}$cf_ldd_prog" >&6
7603 else
7604   echo "$as_me:7604: result: no" >&5
7605 echo "${ECHO_T}no" >&6
7606 fi
7607
7608   test -n "$cf_ldd_prog" && break
7609 done
7610 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7611
7612         cf_rpath_list="/usr/lib /lib"
7613         if test "$cf_ldd_prog" != no
7614         then
7615                 cf_rpath_oops=
7616
7617 cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620 #include <stdio.h>
7621 int
7622 main (void)
7623 {
7624 printf("Hello");
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 rm -f conftest.$ac_objext conftest$ac_exeext
7630 if { (eval echo "$as_me:7630: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); } &&
7635          { ac_try='test -s conftest$ac_exeext'
7636   { (eval echo "$as_me:7636: \"$ac_try\"") >&5
7637   (eval $ac_try) 2>&5
7638   ac_status=$?
7639   echo "$as_me:7639: \$? = $ac_status" >&5
7640   (exit $ac_status); }; }; then
7641   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7642                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7643 else
7644   echo "$as_me: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646 fi
7647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7648
7649                 # If we passed the link-test, but get a "not found" on a given library,
7650                 # this could be due to inept reconfiguration of gcc to make it only
7651                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7652                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7653                 # /usr/local libraries.
7654                 if test -n "$cf_rpath_oops"
7655                 then
7656                         for cf_rpath_src in $cf_rpath_oops
7657                         do
7658                                 for cf_rpath_dir in \
7659                                         /usr/local \
7660                                         /usr/pkg \
7661                                         /opt/sfw
7662                                 do
7663                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7664                                         then
7665                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7666
7667 echo "${as_me:-configure}:7667: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7668
7669                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7670                                                 break
7671                                         fi
7672                                 done
7673                         done
7674                 fi
7675         fi
7676
7677         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7678
7679 echo "${as_me:-configure}:7679: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7680
7681 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7682
7683 echo "${as_me:-configure}:7683: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7684
7685 cf_rpath_dst=
7686 for cf_rpath_src in $LDFLAGS
7687 do
7688         case $cf_rpath_src in
7689         (-L*)
7690
7691                 # check if this refers to a directory which we will ignore
7692                 cf_rpath_skip=no
7693                 if test -n "$cf_rpath_list"
7694                 then
7695                         for cf_rpath_item in $cf_rpath_list
7696                         do
7697                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7698                                 then
7699                                         cf_rpath_skip=yes
7700                                         break
7701                                 fi
7702                         done
7703                 fi
7704
7705                 if test "$cf_rpath_skip" = no
7706                 then
7707                         # transform the option
7708                         if test "$LD_RPATH_OPT" = "-R " ; then
7709                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7710                         else
7711                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7712                         fi
7713
7714                         # if we have not already added this, add it now
7715                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7716                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7717                         then
7718                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7719
7720 echo "${as_me:-configure}:7720: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7721
7722                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7723                         fi
7724                 fi
7725                 ;;
7726         esac
7727         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7728 done
7729 LDFLAGS=$cf_rpath_dst
7730
7731 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7732
7733 echo "${as_me:-configure}:7733: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7734
7735 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7736
7737 echo "${as_me:-configure}:7737: testing ...checking LIBS $LIBS ..." 1>&5
7738
7739 cf_rpath_dst=
7740 for cf_rpath_src in $LIBS
7741 do
7742         case $cf_rpath_src in
7743         (-L*)
7744
7745                 # check if this refers to a directory which we will ignore
7746                 cf_rpath_skip=no
7747                 if test -n "$cf_rpath_list"
7748                 then
7749                         for cf_rpath_item in $cf_rpath_list
7750                         do
7751                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7752                                 then
7753                                         cf_rpath_skip=yes
7754                                         break
7755                                 fi
7756                         done
7757                 fi
7758
7759                 if test "$cf_rpath_skip" = no
7760                 then
7761                         # transform the option
7762                         if test "$LD_RPATH_OPT" = "-R " ; then
7763                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7764                         else
7765                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7766                         fi
7767
7768                         # if we have not already added this, add it now
7769                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7770                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7771                         then
7772                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7773
7774 echo "${as_me:-configure}:7774: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7775
7776                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7777                         fi
7778                 fi
7779                 ;;
7780         esac
7781         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7782 done
7783 LIBS=$cf_rpath_dst
7784
7785 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7786
7787 echo "${as_me:-configure}:7787: testing ...checked LIBS $LIBS ..." 1>&5
7788
7789         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7790
7791 echo "${as_me:-configure}:7791: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7792
7793 else
7794         echo "$as_me:7794: result: no" >&5
7795 echo "${ECHO_T}no" >&6
7796 fi
7797
7798 fi
7799
7800 fi
7801
7802 ###############################################################################
7803
7804 ###     use option --with-extra-suffix to append suffix to headers and libraries
7805 echo "$as_me:7805: checking if you wish to append extra suffix to header/library paths" >&5
7806 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7807 EXTRA_SUFFIX=
7808
7809 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7810 if test "${with_extra_suffix+set}" = set; then
7811   withval="$with_extra_suffix"
7812   case x$withval in
7813         (no)
7814                 ;;
7815         (xyes|x)
7816                 EXTRA_SUFFIX=$cf_cv_abi_version
7817                 ;;
7818         (*)
7819                 EXTRA_SUFFIX=$withval
7820                 ;;
7821         esac
7822
7823 fi;
7824 echo "$as_me:7824: result: $EXTRA_SUFFIX" >&5
7825 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7826
7827 ###     use option --disable-overwrite to leave out the link to -lcurses
7828 echo "$as_me:7828: checking if you wish to install ncurses overwriting curses" >&5
7829 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7830
7831 # Check whether --enable-overwrite or --disable-overwrite was given.
7832 if test "${enable_overwrite+set}" = set; then
7833   enableval="$enable_overwrite"
7834   with_overwrite=$enableval
7835 else
7836   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7837 fi;
7838 echo "$as_me:7838: result: $with_overwrite" >&5
7839 echo "${ECHO_T}$with_overwrite" >&6
7840
7841 echo "$as_me:7841: checking if external terminfo-database is used" >&5
7842 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7843
7844 # Check whether --enable-database or --disable-database was given.
7845 if test "${enable_database+set}" = set; then
7846   enableval="$enable_database"
7847   use_database=$enableval
7848 else
7849   use_database=yes
7850 fi;
7851 echo "$as_me:7851: result: $use_database" >&5
7852 echo "${ECHO_T}$use_database" >&6
7853
7854 case $host_os in
7855 (os2*)
7856         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7857         ;;
7858 (*)
7859         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7860         ;;
7861 esac
7862
7863 NCURSES_USE_DATABASE=0
7864 if test "$use_database" != no ; then
7865         NCURSES_USE_DATABASE=1
7866
7867         echo "$as_me:7867: checking which terminfo source-file will be installed" >&5
7868 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7869
7870 # Check whether --with-database or --without-database was given.
7871 if test "${with_database+set}" = set; then
7872   withval="$with_database"
7873   TERMINFO_SRC=$withval
7874 fi;
7875         echo "$as_me:7875: result: $TERMINFO_SRC" >&5
7876 echo "${ECHO_T}$TERMINFO_SRC" >&6
7877
7878         echo "$as_me:7878: checking whether to use hashed database instead of directory/tree" >&5
7879 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7880
7881 # Check whether --with-hashed-db or --without-hashed-db was given.
7882 if test "${with_hashed_db+set}" = set; then
7883   withval="$with_hashed_db"
7884
7885 else
7886   with_hashed_db=no
7887 fi;
7888         echo "$as_me:7888: result: $with_hashed_db" >&5
7889 echo "${ECHO_T}$with_hashed_db" >&6
7890 else
7891         with_hashed_db=no
7892 fi
7893
7894 echo "$as_me:7894: checking for list of fallback descriptions" >&5
7895 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7896
7897 # Check whether --with-fallbacks or --without-fallbacks was given.
7898 if test "${with_fallbacks+set}" = set; then
7899   withval="$with_fallbacks"
7900   with_fallback=$withval
7901 else
7902   with_fallback=
7903 fi;
7904 echo "$as_me:7904: result: $with_fallback" >&5
7905 echo "${ECHO_T}$with_fallback" >&6
7906
7907 case ".$with_fallback" in
7908 (.|.no)
7909         FALLBACK_LIST=
7910         ;;
7911 (.yes)
7912         { echo "$as_me:7912: WARNING: expected a list of terminal descriptions" >&5
7913 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
7914         ;;
7915 (*)
7916         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7917         ;;
7918 esac
7919
7920 USE_FALLBACKS=
7921 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
7922
7923 echo "$as_me:7923: checking if you want modern xterm or antique" >&5
7924 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7925
7926 # Check whether --with-xterm-new or --without-xterm-new was given.
7927 if test "${with_xterm_new+set}" = set; then
7928   withval="$with_xterm_new"
7929   with_xterm_new=$withval
7930 else
7931   with_xterm_new=yes
7932 fi;
7933 case $with_xterm_new in
7934 (no) with_xterm_new=xterm-old;;
7935 (*)      with_xterm_new=xterm-new;;
7936 esac
7937 echo "$as_me:7937: result: $with_xterm_new" >&5
7938 echo "${ECHO_T}$with_xterm_new" >&6
7939 WHICH_XTERM=$with_xterm_new
7940
7941 echo "$as_me:7941: checking if xterm backspace sends BS or DEL" >&5
7942 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7943
7944 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7945 if test "${with_xterm_kbs+set}" = set; then
7946   withval="$with_xterm_kbs"
7947   with_xterm_kbs=$withval
7948 else
7949   with_xterm_kbs=BS
7950 fi;
7951 case x$with_xterm_kbs in
7952 (xyes|xno|xBS|xbs|x8)
7953         with_xterm_kbs=BS
7954         ;;
7955 (xDEL|xdel|x127)
7956         with_xterm_kbs=DEL
7957         ;;
7958 (*)
7959         with_xterm_kbs=$withval
7960         ;;
7961 esac
7962 echo "$as_me:7962: result: $with_xterm_kbs" >&5
7963 echo "${ECHO_T}$with_xterm_kbs" >&6
7964 XTERM_KBS=$with_xterm_kbs
7965
7966 MAKE_TERMINFO=
7967 if test "$use_database" = no ; then
7968         TERMINFO="${datadir}/terminfo"
7969         MAKE_TERMINFO="#"
7970 else
7971
7972 echo "$as_me:7972: checking for list of terminfo directories" >&5
7973 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7974
7975 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7976 if test "${with_terminfo_dirs+set}" = set; then
7977   withval="$with_terminfo_dirs"
7978
7979 else
7980   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7981 fi;
7982 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7983 cf_dst_path=
7984 for cf_src_path in $withval
7985 do
7986
7987 if test "x$prefix" != xNONE; then
7988         cf_path_syntax="$prefix"
7989 else
7990         cf_path_syntax="$ac_default_prefix"
7991 fi
7992
7993 case ".$cf_src_path" in
7994 (.\$\(*\)*|.\'*\'*)
7995         ;;
7996 (..|./*|.\\*)
7997         ;;
7998 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7999         ;;
8000 (.\${*prefix}*|.\${*dir}*)
8001         eval cf_src_path="$cf_src_path"
8002         case ".$cf_src_path" in
8003         (.NONE/*)
8004                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8005                 ;;
8006         esac
8007         ;;
8008 (.no|.NONE/*)
8009         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8010         ;;
8011 (*)
8012         { { echo "$as_me:8012: error: expected a pathname, not \"$cf_src_path\"" >&5
8013 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8014    { (exit 1); exit 1; }; }
8015         ;;
8016 esac
8017
8018   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8019   cf_dst_path="${cf_dst_path}${cf_src_path}"
8020 done
8021 IFS="$ac_save_ifs"
8022
8023 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8024 # so we have to check/work around.  We do prefer the result of "eval"...
8025 eval cf_dst_eval="$cf_dst_path"
8026 case "x$cf_dst_eval" in
8027 (xNONE*)
8028         TERMINFO_DIRS=$cf_dst_path
8029         ;;
8030 (*)
8031         TERMINFO_DIRS="$cf_dst_eval"
8032         ;;
8033 esac
8034
8035 echo "$as_me:8035: result: $TERMINFO_DIRS" >&5
8036 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8037 test -n "$TERMINFO_DIRS" &&
8038 cat >>confdefs.h <<EOF
8039 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8040 EOF
8041
8042 case "x$TERMINFO" in
8043 x???:*)
8044         { echo "$as_me:8044: WARNING: ignoring non-directory/file TERMINFO value" >&5
8045 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8046         unset TERMINFO
8047         ;;
8048 esac
8049
8050 echo "$as_me:8050: checking for default terminfo directory" >&5
8051 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8052
8053 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8054 if test "${with_default_terminfo_dir+set}" = set; then
8055   withval="$with_default_terminfo_dir"
8056
8057 else
8058   withval="${TERMINFO:-${datadir}/terminfo}"
8059 fi; if test -n "${datadir}/terminfo" ; then
8060
8061 if test "x$prefix" != xNONE; then
8062         cf_path_syntax="$prefix"
8063 else
8064         cf_path_syntax="$ac_default_prefix"
8065 fi
8066
8067 case ".$withval" in
8068 (.\$\(*\)*|.\'*\'*)
8069         ;;
8070 (..|./*|.\\*)
8071         ;;
8072 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8073         ;;
8074 (.\${*prefix}*|.\${*dir}*)
8075         eval withval="$withval"
8076         case ".$withval" in
8077         (.NONE/*)
8078                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8079                 ;;
8080         esac
8081         ;;
8082 (.no|.NONE/*)
8083         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8084         ;;
8085 (*)
8086         { { echo "$as_me:8086: error: expected a pathname, not \"$withval\"" >&5
8087 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8088    { (exit 1); exit 1; }; }
8089         ;;
8090 esac
8091
8092 fi
8093 eval TERMINFO="$withval"
8094
8095 echo "$as_me:8095: result: $TERMINFO" >&5
8096 echo "${ECHO_T}$TERMINFO" >&6
8097
8098 cat >>confdefs.h <<EOF
8099 #define TERMINFO "$TERMINFO"
8100 EOF
8101
8102 fi
8103
8104 ###     use option --disable-big-core to make tic run on small machines
8105 ###     We need 4Mb, check if we can allocate 50% more than that.
8106 echo "$as_me:8106: checking if big-core option selected" >&5
8107 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8108
8109 # Check whether --enable-big-core or --disable-big-core was given.
8110 if test "${enable_big_core+set}" = set; then
8111   enableval="$enable_big_core"
8112   with_big_core=$enableval
8113 else
8114   if test "$cross_compiling" = yes; then
8115   with_big_core=no
8116 else
8117   cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120
8121 #include <stdlib.h>
8122 #include <string.h>
8123 int main() {
8124         unsigned long n = 6000000L;
8125         char *s = malloc(n);
8126         if (s != 0)
8127                 s[0] = s[n-1] = 0;
8128         ${cf_cv_main_return:-return}(s == 0);
8129 }
8130 _ACEOF
8131 rm -f conftest$ac_exeext
8132 if { (eval echo "$as_me:8132: \"$ac_link\"") >&5
8133   (eval $ac_link) 2>&5
8134   ac_status=$?
8135   echo "$as_me:8135: \$? = $ac_status" >&5
8136   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   with_big_core=yes
8143 else
8144   echo "$as_me: program exited with status $ac_status" >&5
8145 echo "$as_me: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 with_big_core=no
8148 fi
8149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8150 fi
8151 fi;
8152 echo "$as_me:8152: result: $with_big_core" >&5
8153 echo "${ECHO_T}$with_big_core" >&6
8154 test "x$with_big_core" = "xyes" &&
8155 cat >>confdefs.h <<\EOF
8156 #define HAVE_BIG_CORE 1
8157 EOF
8158
8159 ### ISO C only guarantees 512-char strings, we have tables which load faster
8160 ### when constructed using "big" strings.  More than the C compiler, the awk
8161 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8162 echo "$as_me:8162: checking if big-strings option selected" >&5
8163 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8164
8165 # Check whether --enable-big-strings or --disable-big-strings was given.
8166 if test "${enable_big_strings+set}" = set; then
8167   enableval="$enable_big_strings"
8168   with_big_strings=$enableval
8169 else
8170
8171         case x$AWK in
8172         (x)
8173                 eval with_big_strings=no
8174                 ;;
8175         (*)
8176                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8177                         | $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
8178                         eval with_big_strings=yes
8179                 else
8180                         eval with_big_strings=no
8181                 fi
8182                 ;;
8183         esac
8184
8185 fi;
8186 echo "$as_me:8186: result: $with_big_strings" >&5
8187 echo "${ECHO_T}$with_big_strings" >&6
8188
8189 USE_BIG_STRINGS=0
8190 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8191
8192 ###     use option --enable-termcap to compile in the termcap fallback support
8193 echo "$as_me:8193: checking if you want termcap-fallback support" >&5
8194 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8195
8196 # Check whether --enable-termcap or --disable-termcap was given.
8197 if test "${enable_termcap+set}" = set; then
8198   enableval="$enable_termcap"
8199   with_termcap=$enableval
8200 else
8201   with_termcap=no
8202 fi;
8203 echo "$as_me:8203: result: $with_termcap" >&5
8204 echo "${ECHO_T}$with_termcap" >&6
8205
8206 NCURSES_USE_TERMCAP=0
8207 if test "x$with_termcap" != "xyes" ; then
8208         if test "$use_database" = no ; then
8209                 if test -z "$with_fallback" ; then
8210                         { { echo "$as_me:8210: error: You have disabled the database w/o specifying fallbacks" >&5
8211 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8212    { (exit 1); exit 1; }; }
8213                 fi
8214         fi
8215
8216 cat >>confdefs.h <<\EOF
8217 #define PURE_TERMINFO 1
8218 EOF
8219
8220 else
8221
8222         if test "$with_ticlib" != no ; then
8223                 { { echo "$as_me:8223: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8224 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8225    { (exit 1); exit 1; }; }
8226         fi
8227
8228         NCURSES_USE_TERMCAP=1
8229         echo "$as_me:8229: checking for list of termcap files" >&5
8230 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8231
8232 # Check whether --with-termpath or --without-termpath was given.
8233 if test "${with_termpath+set}" = set; then
8234   withval="$with_termpath"
8235
8236 else
8237   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8238 fi;
8239 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8240 cf_dst_path=
8241 for cf_src_path in $withval
8242 do
8243
8244 if test "x$prefix" != xNONE; then
8245         cf_path_syntax="$prefix"
8246 else
8247         cf_path_syntax="$ac_default_prefix"
8248 fi
8249
8250 case ".$cf_src_path" in
8251 (.\$\(*\)*|.\'*\'*)
8252         ;;
8253 (..|./*|.\\*)
8254         ;;
8255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8256         ;;
8257 (.\${*prefix}*|.\${*dir}*)
8258         eval cf_src_path="$cf_src_path"
8259         case ".$cf_src_path" in
8260         (.NONE/*)
8261                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8262                 ;;
8263         esac
8264         ;;
8265 (.no|.NONE/*)
8266         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8267         ;;
8268 (*)
8269         { { echo "$as_me:8269: error: expected a pathname, not \"$cf_src_path\"" >&5
8270 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8271    { (exit 1); exit 1; }; }
8272         ;;
8273 esac
8274
8275   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8276   cf_dst_path="${cf_dst_path}${cf_src_path}"
8277 done
8278 IFS="$ac_save_ifs"
8279
8280 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8281 # so we have to check/work around.  We do prefer the result of "eval"...
8282 eval cf_dst_eval="$cf_dst_path"
8283 case "x$cf_dst_eval" in
8284 (xNONE*)
8285         TERMPATH=$cf_dst_path
8286         ;;
8287 (*)
8288         TERMPATH="$cf_dst_eval"
8289         ;;
8290 esac
8291
8292         echo "$as_me:8292: result: $TERMPATH" >&5
8293 echo "${ECHO_T}$TERMPATH" >&6
8294         test -n "$TERMPATH" &&
8295 cat >>confdefs.h <<EOF
8296 #define TERMPATH "$TERMPATH"
8297 EOF
8298
8299         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8300         echo "$as_me:8300: checking if fast termcap-loader is needed" >&5
8301 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8302
8303 # Check whether --enable-getcap or --disable-getcap was given.
8304 if test "${enable_getcap+set}" = set; then
8305   enableval="$enable_getcap"
8306   with_getcap=$enableval
8307 else
8308   with_getcap=no
8309 fi;
8310         echo "$as_me:8310: result: $with_getcap" >&5
8311 echo "${ECHO_T}$with_getcap" >&6
8312         test "x$with_getcap" = "xyes" &&
8313 cat >>confdefs.h <<\EOF
8314 #define USE_GETCAP 1
8315 EOF
8316
8317         echo "$as_me:8317: checking if translated termcaps will be cached in ~/.terminfo" >&5
8318 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8319
8320 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8321 if test "${enable_getcap_cache+set}" = set; then
8322   enableval="$enable_getcap_cache"
8323   with_getcap_cache=$enableval
8324 else
8325   with_getcap_cache=no
8326 fi;
8327         echo "$as_me:8327: result: $with_getcap_cache" >&5
8328 echo "${ECHO_T}$with_getcap_cache" >&6
8329         test "x$with_getcap_cache" = "xyes" &&
8330 cat >>confdefs.h <<\EOF
8331 #define USE_GETCAP_CACHE 1
8332 EOF
8333
8334 fi
8335
8336 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8337 echo "$as_me:8337: checking if ~/.terminfo is wanted" >&5
8338 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8339
8340 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8341 if test "${enable_home_terminfo+set}" = set; then
8342   enableval="$enable_home_terminfo"
8343   with_home_terminfo=$enableval
8344 else
8345   with_home_terminfo=yes
8346 fi;
8347 echo "$as_me:8347: result: $with_home_terminfo" >&5
8348 echo "${ECHO_T}$with_home_terminfo" >&6
8349 test "x$with_home_terminfo" = "xyes" &&
8350 cat >>confdefs.h <<\EOF
8351 #define USE_HOME_TERMINFO 1
8352 EOF
8353
8354 echo "$as_me:8354: checking if you want to use restricted environment when running as root" >&5
8355 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8356
8357 # Check whether --enable-root-environ or --disable-root-environ was given.
8358 if test "${enable_root_environ+set}" = set; then
8359   enableval="$enable_root_environ"
8360   with_root_environ=$enableval
8361 else
8362   with_root_environ=yes
8363 fi;
8364 echo "$as_me:8364: result: $with_root_environ" >&5
8365 echo "${ECHO_T}$with_root_environ" >&6
8366 test "x$with_root_environ" = xyes &&
8367 cat >>confdefs.h <<\EOF
8368 #define USE_ROOT_ENVIRON 1
8369 EOF
8370
8371 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8372 ###   to reduce storage requirements for the terminfo database.
8373
8374 for ac_header in \
8375 unistd.h \
8376
8377 do
8378 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8379 echo "$as_me:8379: checking for $ac_header" >&5
8380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387 #include <$ac_header>
8388 _ACEOF
8389 if { (eval echo "$as_me:8389: \"$ac_cpp conftest.$ac_ext\"") >&5
8390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8391   ac_status=$?
8392   egrep -v '^ *\+' conftest.er1 >conftest.err
8393   rm -f conftest.er1
8394   cat conftest.err >&5
8395   echo "$as_me:8395: \$? = $ac_status" >&5
8396   (exit $ac_status); } >/dev/null; then
8397   if test -s conftest.err; then
8398     ac_cpp_err=$ac_c_preproc_warn_flag
8399   else
8400     ac_cpp_err=
8401   fi
8402 else
8403   ac_cpp_err=yes
8404 fi
8405 if test -z "$ac_cpp_err"; then
8406   eval "$as_ac_Header=yes"
8407 else
8408   echo "$as_me: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   eval "$as_ac_Header=no"
8411 fi
8412 rm -f conftest.err conftest.$ac_ext
8413 fi
8414 echo "$as_me:8414: result: `eval echo '${'$as_ac_Header'}'`" >&5
8415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8417   cat >>confdefs.h <<EOF
8418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8419 EOF
8420
8421 fi
8422 done
8423
8424 for ac_func in \
8425         remove \
8426         unlink
8427 do
8428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8429 echo "$as_me:8429: checking for $ac_func" >&5
8430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8431 if eval "test \"\${$as_ac_var+set}\" = set"; then
8432   echo $ECHO_N "(cached) $ECHO_C" >&6
8433 else
8434   cat >conftest.$ac_ext <<_ACEOF
8435 #line 8435 "configure"
8436 #include "confdefs.h"
8437 #define $ac_func autoconf_temporary
8438 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8439 #undef $ac_func
8440
8441 #ifdef __cplusplus
8442 extern "C"
8443 #endif
8444
8445 /* We use char because int might match the return type of a gcc2
8446    builtin and then its argument prototype would still apply.  */
8447 char $ac_func (void);
8448
8449 int
8450 main (void)
8451 {
8452
8453 /* The GNU C library defines stubs for functions which it implements
8454     to always fail with ENOSYS.  Some functions are actually named
8455     something starting with __ and the normal name is an alias.  */
8456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8457 #error found stub for $ac_func
8458 #endif
8459
8460         return $ac_func ();
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 rm -f conftest.$ac_objext conftest$ac_exeext
8466 if { (eval echo "$as_me:8466: \"$ac_link\"") >&5
8467   (eval $ac_link) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); } &&
8471          { ac_try='test -s conftest$ac_exeext'
8472   { (eval echo "$as_me:8472: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); }; }; then
8477   eval "$as_ac_var=yes"
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 eval "$as_ac_var=no"
8482 fi
8483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8484 fi
8485 echo "$as_me:8485: result: `eval echo '${'$as_ac_var'}'`" >&5
8486 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8487 if test `eval echo '${'$as_ac_var'}'` = yes; then
8488   cat >>confdefs.h <<EOF
8489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8490 EOF
8491
8492 fi
8493 done
8494
8495 if test "$cross_compiling" = yes ; then
8496
8497 for ac_func in \
8498                 link \
8499                 symlink
8500 do
8501 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8502 echo "$as_me:8502: checking for $ac_func" >&5
8503 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8504 if eval "test \"\${$as_ac_var+set}\" = set"; then
8505   echo $ECHO_N "(cached) $ECHO_C" >&6
8506 else
8507   cat >conftest.$ac_ext <<_ACEOF
8508 #line 8508 "configure"
8509 #include "confdefs.h"
8510 #define $ac_func autoconf_temporary
8511 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8512 #undef $ac_func
8513
8514 #ifdef __cplusplus
8515 extern "C"
8516 #endif
8517
8518 /* We use char because int might match the return type of a gcc2
8519    builtin and then its argument prototype would still apply.  */
8520 char $ac_func (void);
8521
8522 int
8523 main (void)
8524 {
8525
8526 /* The GNU C library defines stubs for functions which it implements
8527     to always fail with ENOSYS.  Some functions are actually named
8528     something starting with __ and the normal name is an alias.  */
8529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8530 #error found stub for $ac_func
8531 #endif
8532
8533         return $ac_func ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext conftest$ac_exeext
8539 if { (eval echo "$as_me:8539: \"$ac_link\"") >&5
8540   (eval $ac_link) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest$ac_exeext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   eval "$as_ac_var=yes"
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 eval "$as_ac_var=no"
8555 fi
8556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8557 fi
8558 echo "$as_me:8558: result: `eval echo '${'$as_ac_var'}'`" >&5
8559 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8560 if test `eval echo '${'$as_ac_var'}'` = yes; then
8561   cat >>confdefs.h <<EOF
8562 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8563 EOF
8564
8565 fi
8566 done
8567
8568 else
8569         echo "$as_me:8569: checking if link/symlink functions work" >&5
8570 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8571 if test "${cf_cv_link_funcs+set}" = set; then
8572   echo $ECHO_N "(cached) $ECHO_C" >&6
8573 else
8574
8575                 cf_cv_link_funcs=
8576                 for cf_func in link symlink ; do
8577                         if test "$cross_compiling" = yes; then
8578
8579                         eval 'ac_cv_func_'$cf_func'=error'
8580 else
8581   cat >conftest.$ac_ext <<_ACEOF
8582 #line 8582 "configure"
8583 #include "confdefs.h"
8584
8585 #include <sys/types.h>
8586 #include <sys/stat.h>
8587 #ifdef HAVE_UNISTD_H
8588 #include <unistd.h>
8589 #endif
8590 int main(void)
8591 {
8592         int fail = 0;
8593         char *src = "config.log";
8594         char *dst = "conftest.chk";
8595         struct stat src_sb;
8596         struct stat dst_sb;
8597
8598         stat(src, &src_sb);
8599         fail = ($cf_func("config.log", "conftest.chk") < 0)
8600             || (stat(dst, &dst_sb) < 0)
8601             || (dst_sb.st_mtime != src_sb.st_mtime);
8602 #ifdef HAVE_UNLINK
8603         unlink(dst);
8604 #else
8605         remove(dst);
8606 #endif
8607         ${cf_cv_main_return:-return} (fail);
8608 }
8609
8610 _ACEOF
8611 rm -f conftest$ac_exeext
8612 if { (eval echo "$as_me:8612: \"$ac_link\"") >&5
8613   (eval $ac_link) 2>&5
8614   ac_status=$?
8615   echo "$as_me:8615: \$? = $ac_status" >&5
8616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622
8623                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8624                         eval 'ac_cv_func_'$cf_func'=yes'
8625 else
8626   echo "$as_me: program exited with status $ac_status" >&5
8627 echo "$as_me: failed program was:" >&5
8628 cat conftest.$ac_ext >&5
8629
8630                         eval 'ac_cv_func_'$cf_func'=no'
8631 fi
8632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8633 fi
8634                 done
8635                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8636
8637 fi
8638 echo "$as_me:8638: result: $cf_cv_link_funcs" >&5
8639 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8640         test "$ac_cv_func_link"    = yes &&
8641 cat >>confdefs.h <<\EOF
8642 #define HAVE_LINK 1
8643 EOF
8644
8645         test "$ac_cv_func_symlink" = yes &&
8646 cat >>confdefs.h <<\EOF
8647 #define HAVE_SYMLINK 1
8648 EOF
8649
8650 fi
8651
8652 with_links=no
8653 with_symlinks=no
8654
8655 # soft links (symbolic links) are useful for some systems where hard links do
8656 # not work, or to make it simpler to copy terminfo trees around.
8657 if test "x$ac_cv_func_symlink" = xyes ; then
8658         echo "$as_me:8658: checking if tic should use symbolic links" >&5
8659 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8660
8661 # Check whether --enable-symlinks or --disable-symlinks was given.
8662 if test "${enable_symlinks+set}" = set; then
8663   enableval="$enable_symlinks"
8664   with_symlinks=$enableval
8665 else
8666   with_symlinks=no
8667 fi;
8668         echo "$as_me:8668: result: $with_symlinks" >&5
8669 echo "${ECHO_T}$with_symlinks" >&6
8670 fi
8671
8672 # If we have hard links and did not choose to use soft links instead, there is
8673 # no reason to make this choice optional - use the hard links.
8674 if test "$with_symlinks" = no ; then
8675         echo "$as_me:8675: checking if tic should use hard links" >&5
8676 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8677         if test "x$ac_cv_func_link" = xyes ; then
8678                 with_links=yes
8679         else
8680                 with_links=no
8681         fi
8682         echo "$as_me:8682: result: $with_links" >&5
8683 echo "${ECHO_T}$with_links" >&6
8684 fi
8685
8686 test "x$with_links" = xyes &&
8687 cat >>confdefs.h <<\EOF
8688 #define USE_LINKS 1
8689 EOF
8690
8691 test "x$with_symlinks" = xyes &&
8692 cat >>confdefs.h <<\EOF
8693 #define USE_SYMLINKS 1
8694 EOF
8695
8696 ###   use option --enable-broken-linker to force on use of broken-linker support
8697 echo "$as_me:8697: checking if you want broken-linker support code" >&5
8698 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8699
8700 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8701 if test "${enable_broken_linker+set}" = set; then
8702   enableval="$enable_broken_linker"
8703   with_broken_linker=$enableval
8704 else
8705   with_broken_linker=${BROKEN_LINKER:-no}
8706 fi;
8707 echo "$as_me:8707: result: $with_broken_linker" >&5
8708 echo "${ECHO_T}$with_broken_linker" >&6
8709
8710 BROKEN_LINKER=0
8711 if test "x$with_broken_linker" = xyes ; then
8712
8713 cat >>confdefs.h <<\EOF
8714 #define BROKEN_LINKER 1
8715 EOF
8716
8717         BROKEN_LINKER=1
8718 elif test "$DFT_LWR_MODEL" = shared ; then
8719         case $cf_cv_system_name in
8720         (cygwin*)
8721
8722 cat >>confdefs.h <<\EOF
8723 #define BROKEN_LINKER 1
8724 EOF
8725
8726                 BROKEN_LINKER=1
8727                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8728
8729 echo "${as_me:-configure}:8729: testing cygwin linker is broken anyway ..." 1>&5
8730
8731                 ;;
8732         esac
8733 fi
8734
8735 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8736 echo "$as_me:8736: checking if tputs should process BSD-style prefix padding" >&5
8737 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8738
8739 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8740 if test "${enable_bsdpad+set}" = set; then
8741   enableval="$enable_bsdpad"
8742   with_bsdpad=$enableval
8743 else
8744   with_bsdpad=no
8745 fi;
8746 echo "$as_me:8746: result: $with_bsdpad" >&5
8747 echo "${ECHO_T}$with_bsdpad" >&6
8748 test "x$with_bsdpad" = xyes &&
8749 cat >>confdefs.h <<\EOF
8750 #define BSD_TPUTS 1
8751 EOF
8752
8753 ###   use option --enable-widec to turn on use of wide-character support
8754 NCURSES_CH_T=chtype
8755 NCURSES_LIBUTF8=0
8756
8757 NEED_WCHAR_H=0
8758 NCURSES_MBSTATE_T=0
8759 NCURSES_WCHAR_T=0
8760 NCURSES_WINT_T=0
8761
8762 # Check to define _XOPEN_SOURCE "automatically"
8763 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8764
8765 cf_XOPEN_SOURCE=600
8766 cf_POSIX_C_SOURCE=199506L
8767 cf_xopen_source=
8768
8769 case $host_os in
8770 (aix[4-7]*)
8771         cf_xopen_source="-D_ALL_SOURCE"
8772         ;;
8773 (msys)
8774         cf_XOPEN_SOURCE=600
8775         ;;
8776 (darwin[0-8].*)
8777         cf_xopen_source="-D_APPLE_C_SOURCE"
8778         ;;
8779 (darwin*)
8780         cf_xopen_source="-D_DARWIN_C_SOURCE"
8781         cf_XOPEN_SOURCE=
8782         ;;
8783 (freebsd*|dragonfly*|midnightbsd*)
8784         # 5.x headers associate
8785         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8786         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8787         cf_POSIX_C_SOURCE=200112L
8788         cf_XOPEN_SOURCE=600
8789         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8790         ;;
8791 (hpux11*)
8792         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8793         ;;
8794 (hpux*)
8795         cf_xopen_source="-D_HPUX_SOURCE"
8796         ;;
8797 (irix[56].*)
8798         cf_xopen_source="-D_SGI_SOURCE"
8799         cf_XOPEN_SOURCE=
8800         ;;
8801 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8802
8803 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8804
8805 echo "$as_me:8805: checking if this is the GNU C library" >&5
8806 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8807 if test "${cf_cv_gnu_library+set}" = set; then
8808   echo $ECHO_N "(cached) $ECHO_C" >&6
8809 else
8810
8811 cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8814 #include <sys/types.h>
8815 int
8816 main (void)
8817 {
8818
8819         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8820                 return 0;
8821         #else
8822         #       error not GNU C library
8823         #endif
8824   ;
8825   return 0;
8826 }
8827 _ACEOF
8828 rm -f conftest.$ac_objext
8829 if { (eval echo "$as_me:8829: \"$ac_compile\"") >&5
8830   (eval $ac_compile) 2>&5
8831   ac_status=$?
8832   echo "$as_me:8832: \$? = $ac_status" >&5
8833   (exit $ac_status); } &&
8834          { ac_try='test -s conftest.$ac_objext'
8835   { (eval echo "$as_me:8835: \"$ac_try\"") >&5
8836   (eval $ac_try) 2>&5
8837   ac_status=$?
8838   echo "$as_me:8838: \$? = $ac_status" >&5
8839   (exit $ac_status); }; }; then
8840   cf_cv_gnu_library=yes
8841 else
8842   echo "$as_me: failed program was:" >&5
8843 cat conftest.$ac_ext >&5
8844 cf_cv_gnu_library=no
8845 fi
8846 rm -f conftest.$ac_objext conftest.$ac_ext
8847
8848 fi
8849 echo "$as_me:8849: result: $cf_cv_gnu_library" >&5
8850 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8851
8852 if test x$cf_cv_gnu_library = xyes; then
8853
8854         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8855         # was changed to help a little...
8856         echo "$as_me:8856: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8857 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8858 if test "${cf_cv_gnu_library_219+set}" = set; then
8859   echo $ECHO_N "(cached) $ECHO_C" >&6
8860 else
8861
8862                 cf_save="$CPPFLAGS"
8863
8864         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8865         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8866
8867                 cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8870 #include <sys/types.h>
8871 int
8872 main (void)
8873 {
8874
8875                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8876                                 return 0;
8877                         #else
8878                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8879                         #endif
8880   ;
8881   return 0;
8882 }
8883 _ACEOF
8884 rm -f conftest.$ac_objext
8885 if { (eval echo "$as_me:8885: \"$ac_compile\"") >&5
8886   (eval $ac_compile) 2>&5
8887   ac_status=$?
8888   echo "$as_me:8888: \$? = $ac_status" >&5
8889   (exit $ac_status); } &&
8890          { ac_try='test -s conftest.$ac_objext'
8891   { (eval echo "$as_me:8891: \"$ac_try\"") >&5
8892   (eval $ac_try) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); }; }; then
8896   cf_cv_gnu_library_219=yes
8897 else
8898   echo "$as_me: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 cf_cv_gnu_library_219=no
8901 fi
8902 rm -f conftest.$ac_objext conftest.$ac_ext
8903                 CPPFLAGS="$cf_save"
8904
8905 fi
8906 echo "$as_me:8906: result: $cf_cv_gnu_library_219" >&5
8907 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8908
8909         if test "x$cf_cv_gnu_library_219" = xyes; then
8910                 cf_save="$CPPFLAGS"
8911                 echo "$as_me:8911: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8912 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8913 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8914   echo $ECHO_N "(cached) $ECHO_C" >&6
8915 else
8916
8917 cf_fix_cppflags=no
8918 cf_new_cflags=
8919 cf_new_cppflags=
8920 cf_new_extra_cppflags=
8921
8922 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8923 do
8924 case $cf_fix_cppflags in
8925 (no)
8926         case $cf_add_cflags in
8927         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8928                 case $cf_add_cflags in
8929                 (-D*)
8930                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8931
8932                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8933                                 && test -z "${cf_tst_cflags}" \
8934                                 && cf_fix_cppflags=yes
8935
8936                         if test $cf_fix_cppflags = yes ; then
8937
8938         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8939         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8940
8941                                 continue
8942                         elif test "${cf_tst_cflags}" = "\"'" ; then
8943
8944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8946
8947                                 continue
8948                         fi
8949                         ;;
8950                 esac
8951                 case "$CPPFLAGS" in
8952                 (*$cf_add_cflags)
8953                         ;;
8954                 (*)
8955                         case $cf_add_cflags in
8956                         (-D*)
8957                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8958
8959 CPPFLAGS=`echo "$CPPFLAGS" | \
8960         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8961                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8962
8963                                 ;;
8964                         esac
8965
8966         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8967         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8968
8969                         ;;
8970                 esac
8971                 ;;
8972         (*)
8973
8974         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8975         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8976
8977                 ;;
8978         esac
8979         ;;
8980 (yes)
8981
8982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8984
8985         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8986
8987         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8988                 && test -z "${cf_tst_cflags}" \
8989                 && cf_fix_cppflags=no
8990         ;;
8991 esac
8992 done
8993
8994 if test -n "$cf_new_cflags" ; then
8995
8996         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8997         CFLAGS="${CFLAGS}$cf_new_cflags"
8998
8999 fi
9000
9001 if test -n "$cf_new_cppflags" ; then
9002
9003         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9004         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9005
9006 fi
9007
9008 if test -n "$cf_new_extra_cppflags" ; then
9009
9010         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9011         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9012
9013 fi
9014
9015                         cat >conftest.$ac_ext <<_ACEOF
9016 #line 9016 "configure"
9017 #include "confdefs.h"
9018
9019                                 #include <limits.h>
9020                                 #include <sys/types.h>
9021
9022 int
9023 main (void)
9024 {
9025
9026                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9027                                         return 0;
9028                                 #else
9029                                 #       error GNU C library is too old
9030                                 #endif
9031   ;
9032   return 0;
9033 }
9034 _ACEOF
9035 rm -f conftest.$ac_objext
9036 if { (eval echo "$as_me:9036: \"$ac_compile\"") >&5
9037   (eval $ac_compile) 2>&5
9038   ac_status=$?
9039   echo "$as_me:9039: \$? = $ac_status" >&5
9040   (exit $ac_status); } &&
9041          { ac_try='test -s conftest.$ac_objext'
9042   { (eval echo "$as_me:9042: \"$ac_try\"") >&5
9043   (eval $ac_try) 2>&5
9044   ac_status=$?
9045   echo "$as_me:9045: \$? = $ac_status" >&5
9046   (exit $ac_status); }; }; then
9047   cf_cv_gnu_dftsrc_219=yes
9048 else
9049   echo "$as_me: failed program was:" >&5
9050 cat conftest.$ac_ext >&5
9051 cf_cv_gnu_dftsrc_219=no
9052 fi
9053 rm -f conftest.$ac_objext conftest.$ac_ext
9054
9055 fi
9056 echo "$as_me:9056: result: $cf_cv_gnu_dftsrc_219" >&5
9057 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9058                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9059         else
9060                 cf_cv_gnu_dftsrc_219=maybe
9061         fi
9062
9063         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9064
9065                 echo "$as_me:9065: checking if we must define _GNU_SOURCE" >&5
9066 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9067 if test "${cf_cv_gnu_source+set}" = set; then
9068   echo $ECHO_N "(cached) $ECHO_C" >&6
9069 else
9070
9071                 cat >conftest.$ac_ext <<_ACEOF
9072 #line 9072 "configure"
9073 #include "confdefs.h"
9074 #include <sys/types.h>
9075 int
9076 main (void)
9077 {
9078
9079                         #ifndef _XOPEN_SOURCE
9080                         #error  expected _XOPEN_SOURCE to be defined
9081                         #endif
9082   ;
9083   return 0;
9084 }
9085 _ACEOF
9086 rm -f conftest.$ac_objext
9087 if { (eval echo "$as_me:9087: \"$ac_compile\"") >&5
9088   (eval $ac_compile) 2>&5
9089   ac_status=$?
9090   echo "$as_me:9090: \$? = $ac_status" >&5
9091   (exit $ac_status); } &&
9092          { ac_try='test -s conftest.$ac_objext'
9093   { (eval echo "$as_me:9093: \"$ac_try\"") >&5
9094   (eval $ac_try) 2>&5
9095   ac_status=$?
9096   echo "$as_me:9096: \$? = $ac_status" >&5
9097   (exit $ac_status); }; }; then
9098   cf_cv_gnu_source=no
9099 else
9100   echo "$as_me: failed program was:" >&5
9101 cat conftest.$ac_ext >&5
9102 cf_save="$CPPFLAGS"
9103
9104 cf_fix_cppflags=no
9105 cf_new_cflags=
9106 cf_new_cppflags=
9107 cf_new_extra_cppflags=
9108
9109 for cf_add_cflags in -D_GNU_SOURCE
9110 do
9111 case $cf_fix_cppflags in
9112 (no)
9113         case $cf_add_cflags in
9114         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9115                 case $cf_add_cflags in
9116                 (-D*)
9117                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9118
9119                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9120                                 && test -z "${cf_tst_cflags}" \
9121                                 && cf_fix_cppflags=yes
9122
9123                         if test $cf_fix_cppflags = yes ; then
9124
9125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9127
9128                                 continue
9129                         elif test "${cf_tst_cflags}" = "\"'" ; then
9130
9131         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9132         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9133
9134                                 continue
9135                         fi
9136                         ;;
9137                 esac
9138                 case "$CPPFLAGS" in
9139                 (*$cf_add_cflags)
9140                         ;;
9141                 (*)
9142                         case $cf_add_cflags in
9143                         (-D*)
9144                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9145
9146 CPPFLAGS=`echo "$CPPFLAGS" | \
9147         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9148                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9149
9150                                 ;;
9151                         esac
9152
9153         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9154         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9155
9156                         ;;
9157                 esac
9158                 ;;
9159         (*)
9160
9161         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9162         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9163
9164                 ;;
9165         esac
9166         ;;
9167 (yes)
9168
9169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9171
9172         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9173
9174         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9175                 && test -z "${cf_tst_cflags}" \
9176                 && cf_fix_cppflags=no
9177         ;;
9178 esac
9179 done
9180
9181 if test -n "$cf_new_cflags" ; then
9182
9183         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9184         CFLAGS="${CFLAGS}$cf_new_cflags"
9185
9186 fi
9187
9188 if test -n "$cf_new_cppflags" ; then
9189
9190         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9191         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9192
9193 fi
9194
9195 if test -n "$cf_new_extra_cppflags" ; then
9196
9197         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9198         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9199
9200 fi
9201
9202                          cat >conftest.$ac_ext <<_ACEOF
9203 #line 9203 "configure"
9204 #include "confdefs.h"
9205 #include <sys/types.h>
9206 int
9207 main (void)
9208 {
9209
9210                                 #ifdef _XOPEN_SOURCE
9211                                 #error  expected _XOPEN_SOURCE to be undefined
9212                                 #endif
9213   ;
9214   return 0;
9215 }
9216 _ACEOF
9217 rm -f conftest.$ac_objext
9218 if { (eval echo "$as_me:9218: \"$ac_compile\"") >&5
9219   (eval $ac_compile) 2>&5
9220   ac_status=$?
9221   echo "$as_me:9221: \$? = $ac_status" >&5
9222   (exit $ac_status); } &&
9223          { ac_try='test -s conftest.$ac_objext'
9224   { (eval echo "$as_me:9224: \"$ac_try\"") >&5
9225   (eval $ac_try) 2>&5
9226   ac_status=$?
9227   echo "$as_me:9227: \$? = $ac_status" >&5
9228   (exit $ac_status); }; }; then
9229   cf_cv_gnu_source=no
9230 else
9231   echo "$as_me: failed program was:" >&5
9232 cat conftest.$ac_ext >&5
9233 cf_cv_gnu_source=yes
9234 fi
9235 rm -f conftest.$ac_objext conftest.$ac_ext
9236                         CPPFLAGS="$cf_save"
9237
9238 fi
9239 rm -f conftest.$ac_objext conftest.$ac_ext
9240
9241 fi
9242 echo "$as_me:9242: result: $cf_cv_gnu_source" >&5
9243 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9244
9245                 if test "$cf_cv_gnu_source" = yes
9246                 then
9247                 echo "$as_me:9247: checking if we should also define _DEFAULT_SOURCE" >&5
9248 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9249 if test "${cf_cv_default_source+set}" = set; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 else
9252
9253         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9254         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9255
9256                         cat >conftest.$ac_ext <<_ACEOF
9257 #line 9257 "configure"
9258 #include "confdefs.h"
9259 #include <sys/types.h>
9260 int
9261 main (void)
9262 {
9263
9264                                 #ifdef _DEFAULT_SOURCE
9265                                 #error  expected _DEFAULT_SOURCE to be undefined
9266                                 #endif
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 rm -f conftest.$ac_objext
9272 if { (eval echo "$as_me:9272: \"$ac_compile\"") >&5
9273   (eval $ac_compile) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); } &&
9277          { ac_try='test -s conftest.$ac_objext'
9278   { (eval echo "$as_me:9278: \"$ac_try\"") >&5
9279   (eval $ac_try) 2>&5
9280   ac_status=$?
9281   echo "$as_me:9281: \$? = $ac_status" >&5
9282   (exit $ac_status); }; }; then
9283   cf_cv_default_source=no
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 cf_cv_default_source=yes
9288 fi
9289 rm -f conftest.$ac_objext conftest.$ac_ext
9290
9291 fi
9292 echo "$as_me:9292: result: $cf_cv_default_source" >&5
9293 echo "${ECHO_T}$cf_cv_default_source" >&6
9294                         if test "$cf_cv_default_source" = yes
9295                         then
9296
9297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9298         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9299
9300                         fi
9301                 fi
9302         fi
9303
9304 fi
9305
9306         ;;
9307 (minix*)
9308         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9309         ;;
9310 (mirbsd*)
9311         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9312         cf_XOPEN_SOURCE=
9313
9314 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9315
9316 cf_save_CFLAGS="$CFLAGS"
9317 cf_save_CPPFLAGS="$CPPFLAGS"
9318
9319 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9320         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9321                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9322
9323 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9324         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9325                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9326
9327 echo "$as_me:9327: checking if we should define _POSIX_C_SOURCE" >&5
9328 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9329 if test "${cf_cv_posix_c_source+set}" = set; then
9330   echo $ECHO_N "(cached) $ECHO_C" >&6
9331 else
9332
9333 echo "${as_me:-configure}:9333: testing if the symbol is already defined go no further ..." 1>&5
9334
9335         cat >conftest.$ac_ext <<_ACEOF
9336 #line 9336 "configure"
9337 #include "confdefs.h"
9338 #include <sys/types.h>
9339 int
9340 main (void)
9341 {
9342
9343 #ifndef _POSIX_C_SOURCE
9344 make an error
9345 #endif
9346   ;
9347   return 0;
9348 }
9349 _ACEOF
9350 rm -f conftest.$ac_objext
9351 if { (eval echo "$as_me:9351: \"$ac_compile\"") >&5
9352   (eval $ac_compile) 2>&5
9353   ac_status=$?
9354   echo "$as_me:9354: \$? = $ac_status" >&5
9355   (exit $ac_status); } &&
9356          { ac_try='test -s conftest.$ac_objext'
9357   { (eval echo "$as_me:9357: \"$ac_try\"") >&5
9358   (eval $ac_try) 2>&5
9359   ac_status=$?
9360   echo "$as_me:9360: \$? = $ac_status" >&5
9361   (exit $ac_status); }; }; then
9362   cf_cv_posix_c_source=no
9363 else
9364   echo "$as_me: failed program was:" >&5
9365 cat conftest.$ac_ext >&5
9366 cf_want_posix_source=no
9367          case .$cf_POSIX_C_SOURCE in
9368          (.[12]??*)
9369                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9370                 ;;
9371          (.2)
9372                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9373                 cf_want_posix_source=yes
9374                 ;;
9375          (.*)
9376                 cf_want_posix_source=yes
9377                 ;;
9378          esac
9379          if test "$cf_want_posix_source" = yes ; then
9380                 cat >conftest.$ac_ext <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9383 #include <sys/types.h>
9384 int
9385 main (void)
9386 {
9387
9388 #ifdef _POSIX_SOURCE
9389 make an error
9390 #endif
9391   ;
9392   return 0;
9393 }
9394 _ACEOF
9395 rm -f conftest.$ac_objext
9396 if { (eval echo "$as_me:9396: \"$ac_compile\"") >&5
9397   (eval $ac_compile) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); } &&
9401          { ac_try='test -s conftest.$ac_objext'
9402   { (eval echo "$as_me:9402: \"$ac_try\"") >&5
9403   (eval $ac_try) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); }; }; then
9407   :
9408 else
9409   echo "$as_me: failed program was:" >&5
9410 cat conftest.$ac_ext >&5
9411 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9412 fi
9413 rm -f conftest.$ac_objext conftest.$ac_ext
9414          fi
9415
9416 echo "${as_me:-configure}:9416: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9417
9418          CFLAGS="$cf_trim_CFLAGS"
9419          CPPFLAGS="$cf_trim_CPPFLAGS"
9420
9421         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9422         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9423
9424 echo "${as_me:-configure}:9424: testing if the second compile does not leave our definition intact error ..." 1>&5
9425
9426          cat >conftest.$ac_ext <<_ACEOF
9427 #line 9427 "configure"
9428 #include "confdefs.h"
9429 #include <sys/types.h>
9430 int
9431 main (void)
9432 {
9433
9434 #ifndef _POSIX_C_SOURCE
9435 make an error
9436 #endif
9437   ;
9438   return 0;
9439 }
9440 _ACEOF
9441 rm -f conftest.$ac_objext
9442 if { (eval echo "$as_me:9442: \"$ac_compile\"") >&5
9443   (eval $ac_compile) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); } &&
9447          { ac_try='test -s conftest.$ac_objext'
9448   { (eval echo "$as_me:9448: \"$ac_try\"") >&5
9449   (eval $ac_try) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); }; }; then
9453   :
9454 else
9455   echo "$as_me: failed program was:" >&5
9456 cat conftest.$ac_ext >&5
9457 cf_cv_posix_c_source=no
9458 fi
9459 rm -f conftest.$ac_objext conftest.$ac_ext
9460          CFLAGS="$cf_save_CFLAGS"
9461          CPPFLAGS="$cf_save_CPPFLAGS"
9462
9463 fi
9464 rm -f conftest.$ac_objext conftest.$ac_ext
9465
9466 fi
9467 echo "$as_me:9467: result: $cf_cv_posix_c_source" >&5
9468 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9469
9470 if test "$cf_cv_posix_c_source" != no ; then
9471         CFLAGS="$cf_trim_CFLAGS"
9472         CPPFLAGS="$cf_trim_CPPFLAGS"
9473
9474 cf_fix_cppflags=no
9475 cf_new_cflags=
9476 cf_new_cppflags=
9477 cf_new_extra_cppflags=
9478
9479 for cf_add_cflags in $cf_cv_posix_c_source
9480 do
9481 case $cf_fix_cppflags in
9482 (no)
9483         case $cf_add_cflags in
9484         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9485                 case $cf_add_cflags in
9486                 (-D*)
9487                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9488
9489                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9490                                 && test -z "${cf_tst_cflags}" \
9491                                 && cf_fix_cppflags=yes
9492
9493                         if test $cf_fix_cppflags = yes ; then
9494
9495         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9496         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9497
9498                                 continue
9499                         elif test "${cf_tst_cflags}" = "\"'" ; then
9500
9501         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9502         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9503
9504                                 continue
9505                         fi
9506                         ;;
9507                 esac
9508                 case "$CPPFLAGS" in
9509                 (*$cf_add_cflags)
9510                         ;;
9511                 (*)
9512                         case $cf_add_cflags in
9513                         (-D*)
9514                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9515
9516 CPPFLAGS=`echo "$CPPFLAGS" | \
9517         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9518                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9519
9520                                 ;;
9521                         esac
9522
9523         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9524         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9525
9526                         ;;
9527                 esac
9528                 ;;
9529         (*)
9530
9531         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9532         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9533
9534                 ;;
9535         esac
9536         ;;
9537 (yes)
9538
9539         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9540         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9541
9542         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9543
9544         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9545                 && test -z "${cf_tst_cflags}" \
9546                 && cf_fix_cppflags=no
9547         ;;
9548 esac
9549 done
9550
9551 if test -n "$cf_new_cflags" ; then
9552
9553         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9554         CFLAGS="${CFLAGS}$cf_new_cflags"
9555
9556 fi
9557
9558 if test -n "$cf_new_cppflags" ; then
9559
9560         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9561         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9562
9563 fi
9564
9565 if test -n "$cf_new_extra_cppflags" ; then
9566
9567         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9568         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9569
9570 fi
9571
9572 fi
9573
9574         ;;
9575 (netbsd*)
9576         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9577         ;;
9578 (openbsd[4-9]*)
9579         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9580         cf_xopen_source="-D_BSD_SOURCE"
9581         cf_XOPEN_SOURCE=600
9582         ;;
9583 (openbsd*)
9584         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9585         ;;
9586 (osf[45]*)
9587         cf_xopen_source="-D_OSF_SOURCE"
9588         ;;
9589 (nto-qnx*)
9590         cf_xopen_source="-D_QNX_SOURCE"
9591         ;;
9592 (sco*)
9593         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9594         ;;
9595 (solaris2.*)
9596         cf_xopen_source="-D__EXTENSIONS__"
9597         cf_cv_xopen_source=broken
9598         ;;
9599 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9600         cf_XOPEN_SOURCE=
9601         cf_POSIX_C_SOURCE=
9602         ;;
9603 (*)
9604
9605 echo "$as_me:9605: checking if we should define _XOPEN_SOURCE" >&5
9606 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9607 if test "${cf_cv_xopen_source+set}" = set; then
9608   echo $ECHO_N "(cached) $ECHO_C" >&6
9609 else
9610
9611         cat >conftest.$ac_ext <<_ACEOF
9612 #line 9612 "configure"
9613 #include "confdefs.h"
9614
9615 #include <stdlib.h>
9616 #include <string.h>
9617 #include <sys/types.h>
9618
9619 int
9620 main (void)
9621 {
9622
9623 #ifndef _XOPEN_SOURCE
9624 make an error
9625 #endif
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 rm -f conftest.$ac_objext
9631 if { (eval echo "$as_me:9631: \"$ac_compile\"") >&5
9632   (eval $ac_compile) 2>&5
9633   ac_status=$?
9634   echo "$as_me:9634: \$? = $ac_status" >&5
9635   (exit $ac_status); } &&
9636          { ac_try='test -s conftest.$ac_objext'
9637   { (eval echo "$as_me:9637: \"$ac_try\"") >&5
9638   (eval $ac_try) 2>&5
9639   ac_status=$?
9640   echo "$as_me:9640: \$? = $ac_status" >&5
9641   (exit $ac_status); }; }; then
9642   cf_cv_xopen_source=no
9643 else
9644   echo "$as_me: failed program was:" >&5
9645 cat conftest.$ac_ext >&5
9646 cf_save="$CPPFLAGS"
9647
9648         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9649         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9650
9651          cat >conftest.$ac_ext <<_ACEOF
9652 #line 9652 "configure"
9653 #include "confdefs.h"
9654
9655 #include <stdlib.h>
9656 #include <string.h>
9657 #include <sys/types.h>
9658
9659 int
9660 main (void)
9661 {
9662
9663 #ifdef _XOPEN_SOURCE
9664 make an error
9665 #endif
9666   ;
9667   return 0;
9668 }
9669 _ACEOF
9670 rm -f conftest.$ac_objext
9671 if { (eval echo "$as_me:9671: \"$ac_compile\"") >&5
9672   (eval $ac_compile) 2>&5
9673   ac_status=$?
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit $ac_status); } &&
9676          { ac_try='test -s conftest.$ac_objext'
9677   { (eval echo "$as_me:9677: \"$ac_try\"") >&5
9678   (eval $ac_try) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); }; }; then
9682   cf_cv_xopen_source=no
9683 else
9684   echo "$as_me: failed program was:" >&5
9685 cat conftest.$ac_ext >&5
9686 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9687 fi
9688 rm -f conftest.$ac_objext conftest.$ac_ext
9689         CPPFLAGS="$cf_save"
9690
9691 fi
9692 rm -f conftest.$ac_objext conftest.$ac_ext
9693
9694 fi
9695 echo "$as_me:9695: result: $cf_cv_xopen_source" >&5
9696 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9697
9698 if test "$cf_cv_xopen_source" != no ; then
9699
9700 CFLAGS=`echo "$CFLAGS" | \
9701         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9702                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9703
9704 CPPFLAGS=`echo "$CPPFLAGS" | \
9705         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9706                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9707
9708         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9709
9710 cf_fix_cppflags=no
9711 cf_new_cflags=
9712 cf_new_cppflags=
9713 cf_new_extra_cppflags=
9714
9715 for cf_add_cflags in $cf_temp_xopen_source
9716 do
9717 case $cf_fix_cppflags in
9718 (no)
9719         case $cf_add_cflags in
9720         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9721                 case $cf_add_cflags in
9722                 (-D*)
9723                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9724
9725                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9726                                 && test -z "${cf_tst_cflags}" \
9727                                 && cf_fix_cppflags=yes
9728
9729                         if test $cf_fix_cppflags = yes ; then
9730
9731         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9732         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9733
9734                                 continue
9735                         elif test "${cf_tst_cflags}" = "\"'" ; then
9736
9737         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9738         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9739
9740                                 continue
9741                         fi
9742                         ;;
9743                 esac
9744                 case "$CPPFLAGS" in
9745                 (*$cf_add_cflags)
9746                         ;;
9747                 (*)
9748                         case $cf_add_cflags in
9749                         (-D*)
9750                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9751
9752 CPPFLAGS=`echo "$CPPFLAGS" | \
9753         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9754                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9755
9756                                 ;;
9757                         esac
9758
9759         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9760         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9761
9762                         ;;
9763                 esac
9764                 ;;
9765         (*)
9766
9767         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9768         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9769
9770                 ;;
9771         esac
9772         ;;
9773 (yes)
9774
9775         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9776         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9777
9778         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9779
9780         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9781                 && test -z "${cf_tst_cflags}" \
9782                 && cf_fix_cppflags=no
9783         ;;
9784 esac
9785 done
9786
9787 if test -n "$cf_new_cflags" ; then
9788
9789         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9790         CFLAGS="${CFLAGS}$cf_new_cflags"
9791
9792 fi
9793
9794 if test -n "$cf_new_cppflags" ; then
9795
9796         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9797         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9798
9799 fi
9800
9801 if test -n "$cf_new_extra_cppflags" ; then
9802
9803         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9804         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9805
9806 fi
9807
9808 fi
9809
9810 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9811
9812 cf_save_CFLAGS="$CFLAGS"
9813 cf_save_CPPFLAGS="$CPPFLAGS"
9814
9815 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9816         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9817                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9818
9819 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9820         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9821                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9822
9823 echo "$as_me:9823: checking if we should define _POSIX_C_SOURCE" >&5
9824 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9825 if test "${cf_cv_posix_c_source+set}" = set; then
9826   echo $ECHO_N "(cached) $ECHO_C" >&6
9827 else
9828
9829 echo "${as_me:-configure}:9829: testing if the symbol is already defined go no further ..." 1>&5
9830
9831         cat >conftest.$ac_ext <<_ACEOF
9832 #line 9832 "configure"
9833 #include "confdefs.h"
9834 #include <sys/types.h>
9835 int
9836 main (void)
9837 {
9838
9839 #ifndef _POSIX_C_SOURCE
9840 make an error
9841 #endif
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 rm -f conftest.$ac_objext
9847 if { (eval echo "$as_me:9847: \"$ac_compile\"") >&5
9848   (eval $ac_compile) 2>&5
9849   ac_status=$?
9850   echo "$as_me:9850: \$? = $ac_status" >&5
9851   (exit $ac_status); } &&
9852          { ac_try='test -s conftest.$ac_objext'
9853   { (eval echo "$as_me:9853: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit $ac_status); }; }; then
9858   cf_cv_posix_c_source=no
9859 else
9860   echo "$as_me: failed program was:" >&5
9861 cat conftest.$ac_ext >&5
9862 cf_want_posix_source=no
9863          case .$cf_POSIX_C_SOURCE in
9864          (.[12]??*)
9865                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9866                 ;;
9867          (.2)
9868                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9869                 cf_want_posix_source=yes
9870                 ;;
9871          (.*)
9872                 cf_want_posix_source=yes
9873                 ;;
9874          esac
9875          if test "$cf_want_posix_source" = yes ; then
9876                 cat >conftest.$ac_ext <<_ACEOF
9877 #line 9877 "configure"
9878 #include "confdefs.h"
9879 #include <sys/types.h>
9880 int
9881 main (void)
9882 {
9883
9884 #ifdef _POSIX_SOURCE
9885 make an error
9886 #endif
9887   ;
9888   return 0;
9889 }
9890 _ACEOF
9891 rm -f conftest.$ac_objext
9892 if { (eval echo "$as_me:9892: \"$ac_compile\"") >&5
9893   (eval $ac_compile) 2>&5
9894   ac_status=$?
9895   echo "$as_me:9895: \$? = $ac_status" >&5
9896   (exit $ac_status); } &&
9897          { ac_try='test -s conftest.$ac_objext'
9898   { (eval echo "$as_me:9898: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit $ac_status); }; }; then
9903   :
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 cat conftest.$ac_ext >&5
9907 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9908 fi
9909 rm -f conftest.$ac_objext conftest.$ac_ext
9910          fi
9911
9912 echo "${as_me:-configure}:9912: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9913
9914          CFLAGS="$cf_trim_CFLAGS"
9915          CPPFLAGS="$cf_trim_CPPFLAGS"
9916
9917         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9918         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9919
9920 echo "${as_me:-configure}:9920: testing if the second compile does not leave our definition intact error ..." 1>&5
9921
9922          cat >conftest.$ac_ext <<_ACEOF
9923 #line 9923 "configure"
9924 #include "confdefs.h"
9925 #include <sys/types.h>
9926 int
9927 main (void)
9928 {
9929
9930 #ifndef _POSIX_C_SOURCE
9931 make an error
9932 #endif
9933   ;
9934   return 0;
9935 }
9936 _ACEOF
9937 rm -f conftest.$ac_objext
9938 if { (eval echo "$as_me:9938: \"$ac_compile\"") >&5
9939   (eval $ac_compile) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit $ac_status); } &&
9943          { ac_try='test -s conftest.$ac_objext'
9944   { (eval echo "$as_me:9944: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:9947: \$? = $ac_status" >&5
9948   (exit $ac_status); }; }; then
9949   :
9950 else
9951   echo "$as_me: failed program was:" >&5
9952 cat conftest.$ac_ext >&5
9953 cf_cv_posix_c_source=no
9954 fi
9955 rm -f conftest.$ac_objext conftest.$ac_ext
9956          CFLAGS="$cf_save_CFLAGS"
9957          CPPFLAGS="$cf_save_CPPFLAGS"
9958
9959 fi
9960 rm -f conftest.$ac_objext conftest.$ac_ext
9961
9962 fi
9963 echo "$as_me:9963: result: $cf_cv_posix_c_source" >&5
9964 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9965
9966 if test "$cf_cv_posix_c_source" != no ; then
9967         CFLAGS="$cf_trim_CFLAGS"
9968         CPPFLAGS="$cf_trim_CPPFLAGS"
9969
9970 cf_fix_cppflags=no
9971 cf_new_cflags=
9972 cf_new_cppflags=
9973 cf_new_extra_cppflags=
9974
9975 for cf_add_cflags in $cf_cv_posix_c_source
9976 do
9977 case $cf_fix_cppflags in
9978 (no)
9979         case $cf_add_cflags in
9980         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9981                 case $cf_add_cflags in
9982                 (-D*)
9983                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9984
9985                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9986                                 && test -z "${cf_tst_cflags}" \
9987                                 && cf_fix_cppflags=yes
9988
9989                         if test $cf_fix_cppflags = yes ; then
9990
9991         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9992         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9993
9994                                 continue
9995                         elif test "${cf_tst_cflags}" = "\"'" ; then
9996
9997         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9998         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9999
10000                                 continue
10001                         fi
10002                         ;;
10003                 esac
10004                 case "$CPPFLAGS" in
10005                 (*$cf_add_cflags)
10006                         ;;
10007                 (*)
10008                         case $cf_add_cflags in
10009                         (-D*)
10010                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10011
10012 CPPFLAGS=`echo "$CPPFLAGS" | \
10013         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10014                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10015
10016                                 ;;
10017                         esac
10018
10019         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10020         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10021
10022                         ;;
10023                 esac
10024                 ;;
10025         (*)
10026
10027         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10028         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10029
10030                 ;;
10031         esac
10032         ;;
10033 (yes)
10034
10035         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10036         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10037
10038         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10039
10040         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10041                 && test -z "${cf_tst_cflags}" \
10042                 && cf_fix_cppflags=no
10043         ;;
10044 esac
10045 done
10046
10047 if test -n "$cf_new_cflags" ; then
10048
10049         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10050         CFLAGS="${CFLAGS}$cf_new_cflags"
10051
10052 fi
10053
10054 if test -n "$cf_new_cppflags" ; then
10055
10056         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10057         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10058
10059 fi
10060
10061 if test -n "$cf_new_extra_cppflags" ; then
10062
10063         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10064         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10065
10066 fi
10067
10068 fi
10069
10070         ;;
10071 esac
10072
10073 if test -n "$cf_xopen_source" ; then
10074
10075 cf_fix_cppflags=no
10076 cf_new_cflags=
10077 cf_new_cppflags=
10078 cf_new_extra_cppflags=
10079
10080 for cf_add_cflags in $cf_xopen_source
10081 do
10082 case $cf_fix_cppflags in
10083 (no)
10084         case $cf_add_cflags in
10085         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10086                 case $cf_add_cflags in
10087                 (-D*)
10088                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10089
10090                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10091                                 && test -z "${cf_tst_cflags}" \
10092                                 && cf_fix_cppflags=yes
10093
10094                         if test $cf_fix_cppflags = yes ; then
10095
10096         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10097         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10098
10099                                 continue
10100                         elif test "${cf_tst_cflags}" = "\"'" ; then
10101
10102         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10103         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10104
10105                                 continue
10106                         fi
10107                         ;;
10108                 esac
10109                 case "$CPPFLAGS" in
10110                 (*$cf_add_cflags)
10111                         ;;
10112                 (*)
10113                         case $cf_add_cflags in
10114                         (-D*)
10115                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10116
10117 CPPFLAGS=`echo "$CPPFLAGS" | \
10118         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10119                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10120
10121                                 ;;
10122                         esac
10123
10124         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10125         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10126
10127                         ;;
10128                 esac
10129                 ;;
10130         (*)
10131
10132         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10133         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10134
10135                 ;;
10136         esac
10137         ;;
10138 (yes)
10139
10140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10142
10143         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10144
10145         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10146                 && test -z "${cf_tst_cflags}" \
10147                 && cf_fix_cppflags=no
10148         ;;
10149 esac
10150 done
10151
10152 if test -n "$cf_new_cflags" ; then
10153         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10154
10155 echo "${as_me:-configure}:10155: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10156
10157         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10158         CFLAGS="${CFLAGS}$cf_new_cflags"
10159
10160 fi
10161
10162 if test -n "$cf_new_cppflags" ; then
10163         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10164
10165 echo "${as_me:-configure}:10165: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10166
10167         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10168         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10169
10170 fi
10171
10172 if test -n "$cf_new_extra_cppflags" ; then
10173         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10174
10175 echo "${as_me:-configure}:10175: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10176
10177         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10178         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10179
10180 fi
10181
10182 fi
10183
10184 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10185         echo "$as_me:10185: checking if _XOPEN_SOURCE really is set" >&5
10186 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10187         cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190 #include <stdlib.h>
10191 int
10192 main (void)
10193 {
10194
10195 #ifndef _XOPEN_SOURCE
10196 make an error
10197 #endif
10198   ;
10199   return 0;
10200 }
10201 _ACEOF
10202 rm -f conftest.$ac_objext
10203 if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
10204   (eval $ac_compile) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit $ac_status); } &&
10208          { ac_try='test -s conftest.$ac_objext'
10209   { (eval echo "$as_me:10209: \"$ac_try\"") >&5
10210   (eval $ac_try) 2>&5
10211   ac_status=$?
10212   echo "$as_me:10212: \$? = $ac_status" >&5
10213   (exit $ac_status); }; }; then
10214   cf_XOPEN_SOURCE_set=yes
10215 else
10216   echo "$as_me: failed program was:" >&5
10217 cat conftest.$ac_ext >&5
10218 cf_XOPEN_SOURCE_set=no
10219 fi
10220 rm -f conftest.$ac_objext conftest.$ac_ext
10221         echo "$as_me:10221: result: $cf_XOPEN_SOURCE_set" >&5
10222 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10223         if test $cf_XOPEN_SOURCE_set = yes
10224         then
10225                 cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228 #include <stdlib.h>
10229 int
10230 main (void)
10231 {
10232
10233 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10234 make an error
10235 #endif
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 rm -f conftest.$ac_objext
10241 if { (eval echo "$as_me:10241: \"$ac_compile\"") >&5
10242   (eval $ac_compile) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); } &&
10246          { ac_try='test -s conftest.$ac_objext'
10247   { (eval echo "$as_me:10247: \"$ac_try\"") >&5
10248   (eval $ac_try) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); }; }; then
10252   cf_XOPEN_SOURCE_set_ok=yes
10253 else
10254   echo "$as_me: failed program was:" >&5
10255 cat conftest.$ac_ext >&5
10256 cf_XOPEN_SOURCE_set_ok=no
10257 fi
10258 rm -f conftest.$ac_objext conftest.$ac_ext
10259                 if test $cf_XOPEN_SOURCE_set_ok = no
10260                 then
10261                         { echo "$as_me:10261: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10262 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10263                 fi
10264         else
10265
10266 echo "$as_me:10266: checking if we should define _XOPEN_SOURCE" >&5
10267 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10268 if test "${cf_cv_xopen_source+set}" = set; then
10269   echo $ECHO_N "(cached) $ECHO_C" >&6
10270 else
10271
10272         cat >conftest.$ac_ext <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10275
10276 #include <stdlib.h>
10277 #include <string.h>
10278 #include <sys/types.h>
10279
10280 int
10281 main (void)
10282 {
10283
10284 #ifndef _XOPEN_SOURCE
10285 make an error
10286 #endif
10287   ;
10288   return 0;
10289 }
10290 _ACEOF
10291 rm -f conftest.$ac_objext
10292 if { (eval echo "$as_me:10292: \"$ac_compile\"") >&5
10293   (eval $ac_compile) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit $ac_status); } &&
10297          { ac_try='test -s conftest.$ac_objext'
10298   { (eval echo "$as_me:10298: \"$ac_try\"") >&5
10299   (eval $ac_try) 2>&5
10300   ac_status=$?
10301   echo "$as_me:10301: \$? = $ac_status" >&5
10302   (exit $ac_status); }; }; then
10303   cf_cv_xopen_source=no
10304 else
10305   echo "$as_me: failed program was:" >&5
10306 cat conftest.$ac_ext >&5
10307 cf_save="$CPPFLAGS"
10308
10309         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10310         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10311
10312          cat >conftest.$ac_ext <<_ACEOF
10313 #line 10313 "configure"
10314 #include "confdefs.h"
10315
10316 #include <stdlib.h>
10317 #include <string.h>
10318 #include <sys/types.h>
10319
10320 int
10321 main (void)
10322 {
10323
10324 #ifdef _XOPEN_SOURCE
10325 make an error
10326 #endif
10327   ;
10328   return 0;
10329 }
10330 _ACEOF
10331 rm -f conftest.$ac_objext
10332 if { (eval echo "$as_me:10332: \"$ac_compile\"") >&5
10333   (eval $ac_compile) 2>&5
10334   ac_status=$?
10335   echo "$as_me:10335: \$? = $ac_status" >&5
10336   (exit $ac_status); } &&
10337          { ac_try='test -s conftest.$ac_objext'
10338   { (eval echo "$as_me:10338: \"$ac_try\"") >&5
10339   (eval $ac_try) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit $ac_status); }; }; then
10343   cf_cv_xopen_source=no
10344 else
10345   echo "$as_me: failed program was:" >&5
10346 cat conftest.$ac_ext >&5
10347 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10348 fi
10349 rm -f conftest.$ac_objext conftest.$ac_ext
10350         CPPFLAGS="$cf_save"
10351
10352 fi
10353 rm -f conftest.$ac_objext conftest.$ac_ext
10354
10355 fi
10356 echo "$as_me:10356: result: $cf_cv_xopen_source" >&5
10357 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10358
10359 if test "$cf_cv_xopen_source" != no ; then
10360
10361 CFLAGS=`echo "$CFLAGS" | \
10362         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10363                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10364
10365 CPPFLAGS=`echo "$CPPFLAGS" | \
10366         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10367                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10368
10369         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10370
10371 cf_fix_cppflags=no
10372 cf_new_cflags=
10373 cf_new_cppflags=
10374 cf_new_extra_cppflags=
10375
10376 for cf_add_cflags in $cf_temp_xopen_source
10377 do
10378 case $cf_fix_cppflags in
10379 (no)
10380         case $cf_add_cflags in
10381         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10382                 case $cf_add_cflags in
10383                 (-D*)
10384                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10385
10386                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10387                                 && test -z "${cf_tst_cflags}" \
10388                                 && cf_fix_cppflags=yes
10389
10390                         if test $cf_fix_cppflags = yes ; then
10391
10392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10394
10395                                 continue
10396                         elif test "${cf_tst_cflags}" = "\"'" ; then
10397
10398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10400
10401                                 continue
10402                         fi
10403                         ;;
10404                 esac
10405                 case "$CPPFLAGS" in
10406                 (*$cf_add_cflags)
10407                         ;;
10408                 (*)
10409                         case $cf_add_cflags in
10410                         (-D*)
10411                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10412
10413 CPPFLAGS=`echo "$CPPFLAGS" | \
10414         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10415                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10416
10417                                 ;;
10418                         esac
10419
10420         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10421         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10422
10423                         ;;
10424                 esac
10425                 ;;
10426         (*)
10427
10428         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10429         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10430
10431                 ;;
10432         esac
10433         ;;
10434 (yes)
10435
10436         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10437         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10438
10439         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10440
10441         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10442                 && test -z "${cf_tst_cflags}" \
10443                 && cf_fix_cppflags=no
10444         ;;
10445 esac
10446 done
10447
10448 if test -n "$cf_new_cflags" ; then
10449
10450         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10451         CFLAGS="${CFLAGS}$cf_new_cflags"
10452
10453 fi
10454
10455 if test -n "$cf_new_cppflags" ; then
10456
10457         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10458         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10459
10460 fi
10461
10462 if test -n "$cf_new_extra_cppflags" ; then
10463
10464         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10465         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10466
10467 fi
10468
10469 fi
10470
10471         fi
10472 fi
10473
10474 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10475
10476 # Work around breakage on OS X
10477
10478 echo "$as_me:10478: checking if SIGWINCH is defined" >&5
10479 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10480 if test "${cf_cv_define_sigwinch+set}" = set; then
10481   echo $ECHO_N "(cached) $ECHO_C" >&6
10482 else
10483
10484         cat >conftest.$ac_ext <<_ACEOF
10485 #line 10485 "configure"
10486 #include "confdefs.h"
10487
10488 #include <sys/types.h>
10489 #include <sys/signal.h>
10490
10491 int
10492 main (void)
10493 {
10494 int x = SIGWINCH
10495   ;
10496   return 0;
10497 }
10498 _ACEOF
10499 rm -f conftest.$ac_objext
10500 if { (eval echo "$as_me:10500: \"$ac_compile\"") >&5
10501   (eval $ac_compile) 2>&5
10502   ac_status=$?
10503   echo "$as_me:10503: \$? = $ac_status" >&5
10504   (exit $ac_status); } &&
10505          { ac_try='test -s conftest.$ac_objext'
10506   { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit $ac_status); }; }; then
10511   cf_cv_define_sigwinch=yes
10512 else
10513   echo "$as_me: failed program was:" >&5
10514 cat conftest.$ac_ext >&5
10515 cat >conftest.$ac_ext <<_ACEOF
10516 #line 10516 "configure"
10517 #include "confdefs.h"
10518
10519 #undef _XOPEN_SOURCE
10520 #undef _POSIX_SOURCE
10521 #undef _POSIX_C_SOURCE
10522 #include <sys/types.h>
10523 #include <sys/signal.h>
10524
10525 int
10526 main (void)
10527 {
10528 int x = SIGWINCH
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 rm -f conftest.$ac_objext
10534 if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
10535   (eval $ac_compile) 2>&5
10536   ac_status=$?
10537   echo "$as_me:10537: \$? = $ac_status" >&5
10538   (exit $ac_status); } &&
10539          { ac_try='test -s conftest.$ac_objext'
10540   { (eval echo "$as_me:10540: \"$ac_try\"") >&5
10541   (eval $ac_try) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); }; }; then
10545   cf_cv_define_sigwinch=maybe
10546 else
10547   echo "$as_me: failed program was:" >&5
10548 cat conftest.$ac_ext >&5
10549 cf_cv_define_sigwinch=no
10550 fi
10551 rm -f conftest.$ac_objext conftest.$ac_ext
10552
10553 fi
10554 rm -f conftest.$ac_objext conftest.$ac_ext
10555
10556 fi
10557 echo "$as_me:10557: result: $cf_cv_define_sigwinch" >&5
10558 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10559
10560 if test "$cf_cv_define_sigwinch" = maybe ; then
10561 echo "$as_me:10561: checking for actual SIGWINCH definition" >&5
10562 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10563 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10564   echo $ECHO_N "(cached) $ECHO_C" >&6
10565 else
10566
10567 cf_cv_fixup_sigwinch=unknown
10568 cf_sigwinch=32
10569 while test $cf_sigwinch != 1
10570 do
10571         cat >conftest.$ac_ext <<_ACEOF
10572 #line 10572 "configure"
10573 #include "confdefs.h"
10574
10575 #undef _XOPEN_SOURCE
10576 #undef _POSIX_SOURCE
10577 #undef _POSIX_C_SOURCE
10578 #include <sys/types.h>
10579 #include <sys/signal.h>
10580
10581 int
10582 main (void)
10583 {
10584
10585 #if SIGWINCH != $cf_sigwinch
10586 make an error
10587 #endif
10588 int x = SIGWINCH
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 rm -f conftest.$ac_objext
10594 if { (eval echo "$as_me:10594: \"$ac_compile\"") >&5
10595   (eval $ac_compile) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); } &&
10599          { ac_try='test -s conftest.$ac_objext'
10600   { (eval echo "$as_me:10600: \"$ac_try\"") >&5
10601   (eval $ac_try) 2>&5
10602   ac_status=$?
10603   echo "$as_me:10603: \$? = $ac_status" >&5
10604   (exit $ac_status); }; }; then
10605   cf_cv_fixup_sigwinch=$cf_sigwinch
10606          break
10607 else
10608   echo "$as_me: failed program was:" >&5
10609 cat conftest.$ac_ext >&5
10610 fi
10611 rm -f conftest.$ac_objext conftest.$ac_ext
10612
10613 cf_sigwinch=`expr $cf_sigwinch - 1`
10614 done
10615
10616 fi
10617 echo "$as_me:10617: result: $cf_cv_fixup_sigwinch" >&5
10618 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10619
10620         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10621                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10622         fi
10623 fi
10624
10625 # Checks for CODESET support.
10626
10627 echo "$as_me:10627: checking for nl_langinfo and CODESET" >&5
10628 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10629 if test "${am_cv_langinfo_codeset+set}" = set; then
10630   echo $ECHO_N "(cached) $ECHO_C" >&6
10631 else
10632   cat >conftest.$ac_ext <<_ACEOF
10633 #line 10633 "configure"
10634 #include "confdefs.h"
10635 #include <langinfo.h>
10636 int
10637 main (void)
10638 {
10639 char* cs = nl_langinfo(CODESET);
10640   ;
10641   return 0;
10642 }
10643 _ACEOF
10644 rm -f conftest.$ac_objext conftest$ac_exeext
10645 if { (eval echo "$as_me:10645: \"$ac_link\"") >&5
10646   (eval $ac_link) 2>&5
10647   ac_status=$?
10648   echo "$as_me:10648: \$? = $ac_status" >&5
10649   (exit $ac_status); } &&
10650          { ac_try='test -s conftest$ac_exeext'
10651   { (eval echo "$as_me:10651: \"$ac_try\"") >&5
10652   (eval $ac_try) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); }; }; then
10656   am_cv_langinfo_codeset=yes
10657 else
10658   echo "$as_me: failed program was:" >&5
10659 cat conftest.$ac_ext >&5
10660 am_cv_langinfo_codeset=no
10661 fi
10662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10663
10664 fi
10665 echo "$as_me:10665: result: $am_cv_langinfo_codeset" >&5
10666 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10667         if test $am_cv_langinfo_codeset = yes; then
10668
10669 cat >>confdefs.h <<\EOF
10670 #define HAVE_LANGINFO_CODESET 1
10671 EOF
10672
10673         fi
10674
10675 # use these variables to work around a defect in gcc's fixincludes.
10676 NCURSES_OK_WCHAR_T=
10677 NCURSES_OK_WINT_T=
10678
10679 echo "$as_me:10679: checking if you want wide-character code" >&5
10680 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10681
10682 # Check whether --enable-widec or --disable-widec was given.
10683 if test "${enable_widec+set}" = set; then
10684   enableval="$enable_widec"
10685   with_widec=$enableval
10686 else
10687   with_widec=no
10688 fi;
10689 echo "$as_me:10689: result: $with_widec" >&5
10690 echo "${ECHO_T}$with_widec" >&6
10691
10692 NCURSES_WCWIDTH_GRAPHICS=1
10693
10694 if test "x$with_widec" = xyes ; then
10695         if test "x$disable_lib_suffixes" = xno ; then
10696                 LIB_SUFFIX="w${LIB_SUFFIX}"
10697         fi
10698
10699 cat >>confdefs.h <<\EOF
10700 #define USE_WIDEC_SUPPORT 1
10701 EOF
10702
10703 cat >>confdefs.h <<\EOF
10704 #define NCURSES_WIDECHAR 1
10705 EOF
10706
10707 for ac_header in \
10708 wchar.h \
10709 wctype.h \
10710
10711 do
10712 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10713 echo "$as_me:10713: checking for $ac_header" >&5
10714 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10715 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10716   echo $ECHO_N "(cached) $ECHO_C" >&6
10717 else
10718   cat >conftest.$ac_ext <<_ACEOF
10719 #line 10719 "configure"
10720 #include "confdefs.h"
10721 #include <$ac_header>
10722 _ACEOF
10723 if { (eval echo "$as_me:10723: \"$ac_cpp conftest.$ac_ext\"") >&5
10724   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10725   ac_status=$?
10726   egrep -v '^ *\+' conftest.er1 >conftest.err
10727   rm -f conftest.er1
10728   cat conftest.err >&5
10729   echo "$as_me:10729: \$? = $ac_status" >&5
10730   (exit $ac_status); } >/dev/null; then
10731   if test -s conftest.err; then
10732     ac_cpp_err=$ac_c_preproc_warn_flag
10733   else
10734     ac_cpp_err=
10735   fi
10736 else
10737   ac_cpp_err=yes
10738 fi
10739 if test -z "$ac_cpp_err"; then
10740   eval "$as_ac_Header=yes"
10741 else
10742   echo "$as_me: failed program was:" >&5
10743   cat conftest.$ac_ext >&5
10744   eval "$as_ac_Header=no"
10745 fi
10746 rm -f conftest.err conftest.$ac_ext
10747 fi
10748 echo "$as_me:10748: result: `eval echo '${'$as_ac_Header'}'`" >&5
10749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10750 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10751   cat >>confdefs.h <<EOF
10752 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10753 EOF
10754
10755 fi
10756 done
10757
10758 echo "$as_me:10758: checking if wchar.h can be used as is" >&5
10759 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10760 if test "${cf_cv_wchar_h_okay+set}" = set; then
10761   echo $ECHO_N "(cached) $ECHO_C" >&6
10762 else
10763
10764 cat >conftest.$ac_ext <<_ACEOF
10765 #line 10765 "configure"
10766 #include "confdefs.h"
10767
10768 #include <stdlib.h>
10769 #ifdef HAVE_WCHAR_H
10770 #include <wchar.h>
10771 #endif
10772 #ifdef HAVE_WCTYPE_H
10773 #include <wctype.h>
10774 #endif
10775
10776 int
10777 main (void)
10778 {
10779
10780         wint_t foo = 0;
10781         int bar = iswpunct(foo)
10782   ;
10783   return 0;
10784 }
10785 _ACEOF
10786 rm -f conftest.$ac_objext
10787 if { (eval echo "$as_me:10787: \"$ac_compile\"") >&5
10788   (eval $ac_compile) 2>&5
10789   ac_status=$?
10790   echo "$as_me:10790: \$? = $ac_status" >&5
10791   (exit $ac_status); } &&
10792          { ac_try='test -s conftest.$ac_objext'
10793   { (eval echo "$as_me:10793: \"$ac_try\"") >&5
10794   (eval $ac_try) 2>&5
10795   ac_status=$?
10796   echo "$as_me:10796: \$? = $ac_status" >&5
10797   (exit $ac_status); }; }; then
10798   cf_cv_wchar_h_okay=yes
10799 else
10800   echo "$as_me: failed program was:" >&5
10801 cat conftest.$ac_ext >&5
10802 cf_cv_wchar_h_okay=no
10803 fi
10804 rm -f conftest.$ac_objext conftest.$ac_ext
10805 fi
10806 echo "$as_me:10806: result: $cf_cv_wchar_h_okay" >&5
10807 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10808
10809 if test $cf_cv_wchar_h_okay = no
10810 then
10811
10812 echo "$as_me:10812: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10813 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10814 cat >conftest.$ac_ext <<_ACEOF
10815 #line 10815 "configure"
10816 #include "confdefs.h"
10817 #include <sys/types.h>
10818
10819 int
10820 main (void)
10821 {
10822
10823 #ifndef _XOPEN_SOURCE_EXTENDED
10824 make an error
10825 #endif
10826   ;
10827   return 0;
10828 }
10829 _ACEOF
10830 rm -f conftest.$ac_objext
10831 if { (eval echo "$as_me:10831: \"$ac_compile\"") >&5
10832   (eval $ac_compile) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); } &&
10836          { ac_try='test -s conftest.$ac_objext'
10837   { (eval echo "$as_me:10837: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); }; }; then
10842   cf_result=no
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 cat conftest.$ac_ext >&5
10846 cf_result=yes
10847 fi
10848 rm -f conftest.$ac_objext conftest.$ac_ext
10849 echo "$as_me:10849: result: $cf_result" >&5
10850 echo "${ECHO_T}$cf_result" >&6
10851
10852 if test "$cf_result" = yes ; then
10853         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10854 elif test "x" != "x" ; then
10855         echo "$as_me:10855: checking checking for compatible value versus " >&5
10856 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10857         cat >conftest.$ac_ext <<_ACEOF
10858 #line 10858 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861
10862 int
10863 main (void)
10864 {
10865
10866 #if _XOPEN_SOURCE_EXTENDED- < 0
10867 make an error
10868 #endif
10869   ;
10870   return 0;
10871 }
10872 _ACEOF
10873 rm -f conftest.$ac_objext
10874 if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5
10875   (eval $ac_compile) 2>&5
10876   ac_status=$?
10877   echo "$as_me:10877: \$? = $ac_status" >&5
10878   (exit $ac_status); } &&
10879          { ac_try='test -s conftest.$ac_objext'
10880   { (eval echo "$as_me:10880: \"$ac_try\"") >&5
10881   (eval $ac_try) 2>&5
10882   ac_status=$?
10883   echo "$as_me:10883: \$? = $ac_status" >&5
10884   (exit $ac_status); }; }; then
10885   cf_result=yes
10886 else
10887   echo "$as_me: failed program was:" >&5
10888 cat conftest.$ac_ext >&5
10889 cf_result=no
10890 fi
10891 rm -f conftest.$ac_objext conftest.$ac_ext
10892         echo "$as_me:10892: result: $cf_result" >&5
10893 echo "${ECHO_T}$cf_result" >&6
10894         if test "$cf_result" = no ; then
10895                 # perhaps we can override it - try...
10896                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10897         fi
10898 fi
10899
10900 fi
10901
10902 echo "$as_me:10902: checking if wcwidth agrees graphics are single-width" >&5
10903 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10904 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10905   echo $ECHO_N "(cached) $ECHO_C" >&6
10906 else
10907
10908 cat >conftest.in <<CF_EOF
10909 -       VT100 symbols
10910 0x250c  upper left corner
10911 0x2514  lower left corner
10912 0x2510  upper right corner
10913 0x2518  lower right corner
10914 0x251c  tee pointing left
10915 0x2524  tee pointing right
10916 0x2534  tee pointing up
10917 0x252c  tee pointing down
10918 0x2500  horizontal line
10919 0x2502  vertical line
10920 0x253c  large plus or crossover
10921 0x23ba  scan line 1
10922 0x23bd  scan line 9
10923 0x25c6  diamond
10924 0x2592  checker board (stipple)
10925 0x00b0  degree symbol
10926 0x00b1  plus/minus
10927 0x00b7  bullet
10928 -       Teletype 5410v1 symbols
10929 0x2190  arrow pointing left
10930 0x2192  arrow pointing right
10931 0x2193  arrow pointing down
10932 0x2191  arrow pointing up
10933 0x2592  board of squares
10934 0x2603  lantern symbol
10935 0x25ae  solid square block
10936 -       these defaults were invented for ncurses
10937 0x23bb  scan line 3
10938 0x23bc  scan line 7
10939 0x2264  less-than-or-equal-to
10940 0x2265  greater-than-or-equal-to
10941 0x03c0  greek pi
10942 0x2260  not-equal
10943 0x00a3  pound-sterling symbol
10944 -       thick-line-drawing
10945 0x250f  upper left corner
10946 0x2517  lower left corner
10947 0x2513  upper right corner
10948 0x251b  lower right corner
10949 0x2523  tee pointing left
10950 0x252b  tee pointing right
10951 0x253b  tee pointing up
10952 0x2533  tee pointing down
10953 0x2501  horizontal line
10954 0x2503  vertical line
10955 0x254b  large plus or crossover
10956 -       double-line-drawing
10957 0x2554  upper left corner
10958 0x255a  lower left corner
10959 0x2557  upper right corner
10960 0x255d  lower right corner
10961 0x2563  tee pointing left
10962 0x2560  tee pointing right
10963 0x2569  tee pointing up
10964 0x2566  tee pointing down
10965 0x2550  horizontal line
10966 0x2551  vertical line
10967 0x256c  large plus or crossover
10968 CF_EOF
10969 if test "$cross_compiling" = yes; then
10970   cf_cv_wcwidth_graphics=unknown
10971 else
10972   cat >conftest.$ac_ext <<_ACEOF
10973 #line 10973 "configure"
10974 #include "confdefs.h"
10975
10976 #include <locale.h>
10977 #include <stdio.h>
10978 #include <wchar.h>
10979
10980 #define MY_LEN 80
10981
10982 int
10983 main(void)
10984 {
10985         FILE *fp;
10986         int value;
10987         char buffer[MY_LEN + 1];
10988         char notes[MY_LEN + 1];
10989         int totals = 0;
10990         int passed = 0;
10991
10992         if (setlocale(LC_ALL, "en_US.UTF8") ||
10993                 setlocale(LC_ALL, "en_US.UTF-8") ||
10994                 setlocale(LC_ALL, "en_US.utf8") ||
10995                 setlocale(LC_ALL, "en_US.utf-8")) {
10996                 if ((fp = fopen("conftest.in", "r")) != 0) {
10997                         while (fgets(buffer, MY_LEN, fp) != 0) {
10998                                 if (*buffer == '-') {
10999                                         fprintf(stderr, "\t%s", buffer);
11000                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11001                                         ++totals;
11002                                         if (wcwidth(value) == 1)
11003                                                 ++passed;
11004                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11005                                 } else {
11006                                         fprintf(stderr, "?\t%s", buffer);
11007                                 }
11008                         }
11009                 }
11010         }
11011         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11012         return (totals == passed) ? 0 : 1;
11013 }
11014
11015 _ACEOF
11016 rm -f conftest$ac_exeext
11017 if { (eval echo "$as_me:11017: \"$ac_link\"") >&5
11018   (eval $ac_link) 2>&5
11019   ac_status=$?
11020   echo "$as_me:11020: \$? = $ac_status" >&5
11021   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11022   { (eval echo "$as_me:11022: \"$ac_try\"") >&5
11023   (eval $ac_try) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); }; }; then
11027   cf_cv_wcwidth_graphics=yes
11028 else
11029   echo "$as_me: program exited with status $ac_status" >&5
11030 echo "$as_me: failed program was:" >&5
11031 cat conftest.$ac_ext >&5
11032 cf_cv_wcwidth_graphics=no
11033 fi
11034 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11035 fi
11036
11037 fi
11038 echo "$as_me:11038: result: $cf_cv_wcwidth_graphics" >&5
11039 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11040
11041         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11042
11043         # with_overwrite=no
11044         NCURSES_CH_T=cchar_t
11045
11046 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11047 do
11048 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11049 echo "$as_me:11049: checking for $ac_func" >&5
11050 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11051 if eval "test \"\${$as_ac_var+set}\" = set"; then
11052   echo $ECHO_N "(cached) $ECHO_C" >&6
11053 else
11054   cat >conftest.$ac_ext <<_ACEOF
11055 #line 11055 "configure"
11056 #include "confdefs.h"
11057 #define $ac_func autoconf_temporary
11058 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11059 #undef $ac_func
11060
11061 #ifdef __cplusplus
11062 extern "C"
11063 #endif
11064
11065 /* We use char because int might match the return type of a gcc2
11066    builtin and then its argument prototype would still apply.  */
11067 char $ac_func (void);
11068
11069 int
11070 main (void)
11071 {
11072
11073 /* The GNU C library defines stubs for functions which it implements
11074     to always fail with ENOSYS.  Some functions are actually named
11075     something starting with __ and the normal name is an alias.  */
11076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11077 #error found stub for $ac_func
11078 #endif
11079
11080         return $ac_func ();
11081   ;
11082   return 0;
11083 }
11084 _ACEOF
11085 rm -f conftest.$ac_objext conftest$ac_exeext
11086 if { (eval echo "$as_me:11086: \"$ac_link\"") >&5
11087   (eval $ac_link) 2>&5
11088   ac_status=$?
11089   echo "$as_me:11089: \$? = $ac_status" >&5
11090   (exit $ac_status); } &&
11091          { ac_try='test -s conftest$ac_exeext'
11092   { (eval echo "$as_me:11092: \"$ac_try\"") >&5
11093   (eval $ac_try) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit $ac_status); }; }; then
11097   eval "$as_ac_var=yes"
11098 else
11099   echo "$as_me: failed program was:" >&5
11100 cat conftest.$ac_ext >&5
11101 eval "$as_ac_var=no"
11102 fi
11103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11104 fi
11105 echo "$as_me:11105: result: `eval echo '${'$as_ac_var'}'`" >&5
11106 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11107 if test `eval echo '${'$as_ac_var'}'` = yes; then
11108   cat >>confdefs.h <<EOF
11109 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11110 EOF
11111
11112 fi
11113 done
11114
11115         if test "x$ac_cv_func_putwc" != xyes ; then
11116
11117 echo "$as_me:11117: checking for multibyte character support" >&5
11118 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11119 if test "${cf_cv_utf8_lib+set}" = set; then
11120   echo $ECHO_N "(cached) $ECHO_C" >&6
11121 else
11122
11123         cf_save_LIBS="$LIBS"
11124         cat >conftest.$ac_ext <<_ACEOF
11125 #line 11125 "configure"
11126 #include "confdefs.h"
11127
11128 #include <stdlib.h>
11129 int
11130 main (void)
11131 {
11132 putwc(0,0);
11133   ;
11134   return 0;
11135 }
11136 _ACEOF
11137 rm -f conftest.$ac_objext conftest$ac_exeext
11138 if { (eval echo "$as_me:11138: \"$ac_link\"") >&5
11139   (eval $ac_link) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); } &&
11143          { ac_try='test -s conftest$ac_exeext'
11144   { (eval echo "$as_me:11144: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); }; }; then
11149   cf_cv_utf8_lib=yes
11150 else
11151   echo "$as_me: failed program was:" >&5
11152 cat conftest.$ac_ext >&5
11153
11154 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11155 # will be set on completion of the AC_TRY_LINK below.
11156 cf_cv_header_path_utf8=
11157 cf_cv_library_path_utf8=
11158
11159 echo "${as_me:-configure}:11159: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11160
11161 cf_save_LIBS="$LIBS"
11162
11163 cat >conftest.$ac_ext <<_ACEOF
11164 #line 11164 "configure"
11165 #include "confdefs.h"
11166
11167 #include <libutf8.h>
11168 int
11169 main (void)
11170 {
11171 putwc(0,0);
11172   ;
11173   return 0;
11174 }
11175 _ACEOF
11176 rm -f conftest.$ac_objext conftest$ac_exeext
11177 if { (eval echo "$as_me:11177: \"$ac_link\"") >&5
11178   (eval $ac_link) 2>&5
11179   ac_status=$?
11180   echo "$as_me:11180: \$? = $ac_status" >&5
11181   (exit $ac_status); } &&
11182          { ac_try='test -s conftest$ac_exeext'
11183   { (eval echo "$as_me:11183: \"$ac_try\"") >&5
11184   (eval $ac_try) 2>&5
11185   ac_status=$?
11186   echo "$as_me:11186: \$? = $ac_status" >&5
11187   (exit $ac_status); }; }; then
11188
11189         cf_cv_find_linkage_utf8=yes
11190         cf_cv_header_path_utf8=/usr/include
11191         cf_cv_library_path_utf8=/usr/lib
11192
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 cat conftest.$ac_ext >&5
11196
11197 LIBS="-lutf8  $cf_save_LIBS"
11198
11199 cat >conftest.$ac_ext <<_ACEOF
11200 #line 11200 "configure"
11201 #include "confdefs.h"
11202
11203 #include <libutf8.h>
11204 int
11205 main (void)
11206 {
11207 putwc(0,0);
11208   ;
11209   return 0;
11210 }
11211 _ACEOF
11212 rm -f conftest.$ac_objext conftest$ac_exeext
11213 if { (eval echo "$as_me:11213: \"$ac_link\"") >&5
11214   (eval $ac_link) 2>&5
11215   ac_status=$?
11216   echo "$as_me:11216: \$? = $ac_status" >&5
11217   (exit $ac_status); } &&
11218          { ac_try='test -s conftest$ac_exeext'
11219   { (eval echo "$as_me:11219: \"$ac_try\"") >&5
11220   (eval $ac_try) 2>&5
11221   ac_status=$?
11222   echo "$as_me:11222: \$? = $ac_status" >&5
11223   (exit $ac_status); }; }; then
11224
11225         cf_cv_find_linkage_utf8=yes
11226         cf_cv_header_path_utf8=/usr/include
11227         cf_cv_library_path_utf8=/usr/lib
11228         cf_cv_library_file_utf8="-lutf8"
11229
11230 else
11231   echo "$as_me: failed program was:" >&5
11232 cat conftest.$ac_ext >&5
11233
11234         cf_cv_find_linkage_utf8=no
11235         LIBS="$cf_save_LIBS"
11236
11237         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11238
11239 echo "${as_me:-configure}:11239: testing find linkage for utf8 library ..." 1>&5
11240
11241 echo "${as_me:-configure}:11241: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11242
11243         cf_save_CPPFLAGS="$CPPFLAGS"
11244         cf_test_CPPFLAGS="$CPPFLAGS"
11245
11246 cf_search=
11247
11248 # collect the current set of include-directories from compiler flags
11249 cf_header_path_list=""
11250 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11251         for cf_header_path in $CPPFLAGS $CFLAGS
11252         do
11253                 case $cf_header_path in
11254                 (-I*)
11255                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11256
11257 test "x$cf_header_path" != "xNONE" && \
11258 test -d "$cf_header_path" && \
11259  {
11260         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11261         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11262         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11263         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11264         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11265         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11266 }
11267
11268                         cf_header_path_list="$cf_header_path_list $cf_search"
11269                         ;;
11270                 esac
11271         done
11272 fi
11273
11274 # add the variations for the package we are looking for
11275
11276 cf_search=
11277
11278 test "x$prefix" != "xNONE" && \
11279 test -d "$prefix" && \
11280  {
11281         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11282         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11283         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11284         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11285         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11286         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11287 }
11288
11289 for cf_subdir_prefix in \
11290         /usr \
11291         /usr/local \
11292         /usr/pkg \
11293         /opt \
11294         /opt/local \
11295         $HOME
11296 do
11297
11298 test "x$cf_subdir_prefix" != "x$prefix" && \
11299 test -d "$cf_subdir_prefix" && \
11300 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11301         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11302         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11303         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11304         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11305         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11306         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11307 }
11308
11309 done
11310
11311 test "$includedir" != NONE && \
11312 test "$includedir" != "/usr/include" && \
11313 test -d "$includedir" && {
11314         test -d $includedir &&    cf_search="$cf_search $includedir"
11315         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11316 }
11317
11318 test "$oldincludedir" != NONE && \
11319 test "$oldincludedir" != "/usr/include" && \
11320 test -d "$oldincludedir" && {
11321         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11322         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11323 }
11324
11325 cf_search="$cf_search $cf_header_path_list"
11326
11327         for cf_cv_header_path_utf8 in $cf_search
11328         do
11329                 if test -d $cf_cv_header_path_utf8 ; then
11330                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11331
11332 echo "${as_me:-configure}:11332: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11333
11334                         CPPFLAGS="$cf_save_CPPFLAGS"
11335
11336         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11337         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11338
11339                         cat >conftest.$ac_ext <<_ACEOF
11340 #line 11340 "configure"
11341 #include "confdefs.h"
11342
11343 #include <libutf8.h>
11344 int
11345 main (void)
11346 {
11347 putwc(0,0);
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364
11365                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11366
11367 echo "${as_me:-configure}:11367: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11368
11369                                 cf_cv_find_linkage_utf8=maybe
11370                                 cf_test_CPPFLAGS="$CPPFLAGS"
11371                                 break
11372 else
11373   echo "$as_me: failed program was:" >&5
11374 cat conftest.$ac_ext >&5
11375
11376                                 CPPFLAGS="$cf_save_CPPFLAGS"
11377
11378 fi
11379 rm -f conftest.$ac_objext conftest.$ac_ext
11380                 fi
11381         done
11382
11383         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11384
11385 echo "${as_me:-configure}:11385: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11386
11387                 cf_save_LIBS="$LIBS"
11388                 cf_save_LDFLAGS="$LDFLAGS"
11389
11390                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11391
11392 cf_search=
11393 cf_library_path_list=""
11394 if test -n "${LDFLAGS}${LIBS}" ; then
11395         for cf_library_path in $LDFLAGS $LIBS
11396         do
11397                 case $cf_library_path in
11398                 (-L*)
11399                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11400
11401 test "x$cf_library_path" != "xNONE" && \
11402 test -d "$cf_library_path" && \
11403  {
11404         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11405         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11406         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11407         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11408         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11409         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11410 }
11411
11412                         cf_library_path_list="$cf_library_path_list $cf_search"
11413                         ;;
11414                 esac
11415         done
11416 fi
11417
11418 cf_search=
11419
11420 test "x$prefix" != "xNONE" && \
11421 test -d "$prefix" && \
11422  {
11423         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11424         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11425         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11426         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11427         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11428         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11429 }
11430
11431 for cf_subdir_prefix in \
11432         /usr \
11433         /usr/local \
11434         /usr/pkg \
11435         /opt \
11436         /opt/local \
11437         $HOME
11438 do
11439
11440 test "x$cf_subdir_prefix" != "x$prefix" && \
11441 test -d "$cf_subdir_prefix" && \
11442 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11443         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11444         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11445         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11446         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11447         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11448         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11449 }
11450
11451 done
11452
11453 cf_search="$cf_library_path_list $cf_search"
11454
11455                         for cf_cv_library_path_utf8 in $cf_search
11456                         do
11457                                 if test -d $cf_cv_library_path_utf8 ; then
11458                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11459
11460 echo "${as_me:-configure}:11460: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11461
11462                                         CPPFLAGS="$cf_test_CPPFLAGS"
11463                                         LIBS="-lutf8  $cf_save_LIBS"
11464                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11465                                         cat >conftest.$ac_ext <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11468
11469 #include <libutf8.h>
11470 int
11471 main (void)
11472 {
11473 putwc(0,0);
11474   ;
11475   return 0;
11476 }
11477 _ACEOF
11478 rm -f conftest.$ac_objext conftest$ac_exeext
11479 if { (eval echo "$as_me:11479: \"$ac_link\"") >&5
11480   (eval $ac_link) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); } &&
11484          { ac_try='test -s conftest$ac_exeext'
11485   { (eval echo "$as_me:11485: \"$ac_try\"") >&5
11486   (eval $ac_try) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); }; }; then
11490
11491                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11492
11493 echo "${as_me:-configure}:11493: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11494
11495                                         cf_cv_find_linkage_utf8=yes
11496                                         cf_cv_library_file_utf8="-lutf8"
11497                                         break
11498 else
11499   echo "$as_me: failed program was:" >&5
11500 cat conftest.$ac_ext >&5
11501
11502                                         CPPFLAGS="$cf_save_CPPFLAGS"
11503                                         LIBS="$cf_save_LIBS"
11504                                         LDFLAGS="$cf_save_LDFLAGS"
11505
11506 fi
11507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11508                                 fi
11509                         done
11510                         CPPFLAGS="$cf_save_CPPFLAGS"
11511                         LDFLAGS="$cf_save_LDFLAGS"
11512                 fi
11513
11514         else
11515                 cf_cv_find_linkage_utf8=no
11516         fi
11517
11518 fi
11519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11520
11521 fi
11522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11523
11524 LIBS="$cf_save_LIBS"
11525
11526 if test "$cf_cv_find_linkage_utf8" = yes ; then
11527 cf_cv_utf8_lib=add-on
11528 else
11529 cf_cv_utf8_lib=no
11530 fi
11531
11532 fi
11533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11534 fi
11535 echo "$as_me:11535: result: $cf_cv_utf8_lib" >&5
11536 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11537
11538 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11539 # ncurses/ncursesw:
11540 if test "$cf_cv_utf8_lib" = "add-on" ; then
11541
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_LIBUTF8_H 1
11544 EOF
11545
11546 if test -n "$cf_cv_header_path_utf8" ; then
11547   for cf_add_incdir in $cf_cv_header_path_utf8
11548   do
11549         while test $cf_add_incdir != /usr/include
11550         do
11551           if test -d $cf_add_incdir
11552           then
11553                 cf_have_incdir=no
11554                 if test -n "$CFLAGS$CPPFLAGS" ; then
11555                   # a loop is needed to ensure we can add subdirs of existing dirs
11556                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11557                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11558                           cf_have_incdir=yes; break
11559                         fi
11560                   done
11561                 fi
11562
11563                 if test "$cf_have_incdir" = no ; then
11564                   if test "$cf_add_incdir" = /usr/local/include ; then
11565                         if test "$GCC" = yes
11566                         then
11567                           cf_save_CPPFLAGS=$CPPFLAGS
11568
11569         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11570         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11571
11572                           cat >conftest.$ac_ext <<_ACEOF
11573 #line 11573 "configure"
11574 #include "confdefs.h"
11575 #include <stdio.h>
11576 int
11577 main (void)
11578 {
11579 printf("Hello")
11580   ;
11581   return 0;
11582 }
11583 _ACEOF
11584 rm -f conftest.$ac_objext
11585 if { (eval echo "$as_me:11585: \"$ac_compile\"") >&5
11586   (eval $ac_compile) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); } &&
11590          { ac_try='test -s conftest.$ac_objext'
11591   { (eval echo "$as_me:11591: \"$ac_try\"") >&5
11592   (eval $ac_try) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); }; }; then
11596   :
11597 else
11598   echo "$as_me: failed program was:" >&5
11599 cat conftest.$ac_ext >&5
11600 cf_have_incdir=yes
11601 fi
11602 rm -f conftest.$ac_objext conftest.$ac_ext
11603                           CPPFLAGS=$cf_save_CPPFLAGS
11604                         fi
11605                   fi
11606                 fi
11607
11608                 if test "$cf_have_incdir" = no ; then
11609                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11610
11611 echo "${as_me:-configure}:11611: testing adding $cf_add_incdir to include-path ..." 1>&5
11612
11613                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11614
11615                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11616                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11617                   cf_add_incdir="$cf_top_incdir"
11618                 else
11619                   break
11620                 fi
11621           else
11622                 break
11623           fi
11624         done
11625   done
11626 fi
11627
11628 if test -n "$cf_cv_library_path_utf8" ; then
11629         for cf_add_libdir in $cf_cv_library_path_utf8
11630         do
11631                 if test $cf_add_libdir = /usr/lib ; then
11632                         :
11633                 elif test -d $cf_add_libdir
11634                 then
11635                         cf_have_libdir=no
11636                         if test -n "$LDFLAGS$LIBS" ; then
11637                                 # a loop is needed to ensure we can add subdirs of existing dirs
11638                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11639                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11640                                                 cf_have_libdir=yes; break
11641                                         fi
11642                                 done
11643                         fi
11644                         if test "$cf_have_libdir" = no ; then
11645                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11646
11647 echo "${as_me:-configure}:11647: testing adding $cf_add_libdir to library-path ..." 1>&5
11648
11649                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11650                         fi
11651                 fi
11652         done
11653 fi
11654
11655 cf_add_libs="$cf_cv_library_file_utf8"
11656 # Filter out duplicates - this happens with badly-designed ".pc" files...
11657 for cf_add_1lib in $LIBS
11658 do
11659         for cf_add_2lib in $cf_add_libs
11660         do
11661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11662                 then
11663                         cf_add_1lib=
11664                         break
11665                 fi
11666         done
11667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11668 done
11669 LIBS="$cf_add_libs"
11670
11671 fi
11672
11673                 if test "$cf_cv_utf8_lib" != no ; then
11674                         NCURSES_LIBUTF8=1
11675                 fi
11676         fi
11677
11678 # This is needed on Tru64 5.0 to declare mbstate_t
11679 echo "$as_me:11679: checking if we must include wchar.h to declare mbstate_t" >&5
11680 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11681 if test "${cf_cv_mbstate_t+set}" = set; then
11682   echo $ECHO_N "(cached) $ECHO_C" >&6
11683 else
11684
11685 cat >conftest.$ac_ext <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688
11689 #include <stdlib.h>
11690 #include <stdarg.h>
11691 #include <stdio.h>
11692 #ifdef HAVE_LIBUTF8_H
11693 #include <libutf8.h>
11694 #endif
11695 int
11696 main (void)
11697 {
11698 mbstate_t state
11699   ;
11700   return 0;
11701 }
11702 _ACEOF
11703 rm -f conftest.$ac_objext
11704 if { (eval echo "$as_me:11704: \"$ac_compile\"") >&5
11705   (eval $ac_compile) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit $ac_status); } &&
11709          { ac_try='test -s conftest.$ac_objext'
11710   { (eval echo "$as_me:11710: \"$ac_try\"") >&5
11711   (eval $ac_try) 2>&5
11712   ac_status=$?
11713   echo "$as_me:11713: \$? = $ac_status" >&5
11714   (exit $ac_status); }; }; then
11715   cf_cv_mbstate_t=no
11716 else
11717   echo "$as_me: failed program was:" >&5
11718 cat conftest.$ac_ext >&5
11719 cat >conftest.$ac_ext <<_ACEOF
11720 #line 11720 "configure"
11721 #include "confdefs.h"
11722
11723 #include <stdlib.h>
11724 #include <stdarg.h>
11725 #include <stdio.h>
11726 #include <wchar.h>
11727 #ifdef HAVE_LIBUTF8_H
11728 #include <libutf8.h>
11729 #endif
11730 int
11731 main (void)
11732 {
11733 mbstate_t value
11734   ;
11735   return 0;
11736 }
11737 _ACEOF
11738 rm -f conftest.$ac_objext
11739 if { (eval echo "$as_me:11739: \"$ac_compile\"") >&5
11740   (eval $ac_compile) 2>&5
11741   ac_status=$?
11742   echo "$as_me:11742: \$? = $ac_status" >&5
11743   (exit $ac_status); } &&
11744          { ac_try='test -s conftest.$ac_objext'
11745   { (eval echo "$as_me:11745: \"$ac_try\"") >&5
11746   (eval $ac_try) 2>&5
11747   ac_status=$?
11748   echo "$as_me:11748: \$? = $ac_status" >&5
11749   (exit $ac_status); }; }; then
11750   cf_cv_mbstate_t=yes
11751 else
11752   echo "$as_me: failed program was:" >&5
11753 cat conftest.$ac_ext >&5
11754 cf_cv_mbstate_t=unknown
11755 fi
11756 rm -f conftest.$ac_objext conftest.$ac_ext
11757 fi
11758 rm -f conftest.$ac_objext conftest.$ac_ext
11759 fi
11760 echo "$as_me:11760: result: $cf_cv_mbstate_t" >&5
11761 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11762
11763 if test "$cf_cv_mbstate_t" = yes ; then
11764
11765 cat >>confdefs.h <<\EOF
11766 #define NEED_WCHAR_H 1
11767 EOF
11768
11769         NEED_WCHAR_H=1
11770 fi
11771
11772 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11773 if test "$cf_cv_mbstate_t" = unknown ; then
11774         NCURSES_MBSTATE_T=1
11775 fi
11776
11777 # This is needed on Tru64 5.0 to declare wchar_t
11778 echo "$as_me:11778: checking if we must include wchar.h to declare wchar_t" >&5
11779 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11780 if test "${cf_cv_wchar_t+set}" = set; then
11781   echo $ECHO_N "(cached) $ECHO_C" >&6
11782 else
11783
11784 cat >conftest.$ac_ext <<_ACEOF
11785 #line 11785 "configure"
11786 #include "confdefs.h"
11787
11788 #include <stdlib.h>
11789 #include <stdarg.h>
11790 #include <stdio.h>
11791 #ifdef HAVE_LIBUTF8_H
11792 #include <libutf8.h>
11793 #endif
11794 int
11795 main (void)
11796 {
11797 wchar_t state
11798   ;
11799   return 0;
11800 }
11801 _ACEOF
11802 rm -f conftest.$ac_objext
11803 if { (eval echo "$as_me:11803: \"$ac_compile\"") >&5
11804   (eval $ac_compile) 2>&5
11805   ac_status=$?
11806   echo "$as_me:11806: \$? = $ac_status" >&5
11807   (exit $ac_status); } &&
11808          { ac_try='test -s conftest.$ac_objext'
11809   { (eval echo "$as_me:11809: \"$ac_try\"") >&5
11810   (eval $ac_try) 2>&5
11811   ac_status=$?
11812   echo "$as_me:11812: \$? = $ac_status" >&5
11813   (exit $ac_status); }; }; then
11814   cf_cv_wchar_t=no
11815 else
11816   echo "$as_me: failed program was:" >&5
11817 cat conftest.$ac_ext >&5
11818 cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821
11822 #include <stdlib.h>
11823 #include <stdarg.h>
11824 #include <stdio.h>
11825 #include <wchar.h>
11826 #ifdef HAVE_LIBUTF8_H
11827 #include <libutf8.h>
11828 #endif
11829 int
11830 main (void)
11831 {
11832 wchar_t value
11833   ;
11834   return 0;
11835 }
11836 _ACEOF
11837 rm -f conftest.$ac_objext
11838 if { (eval echo "$as_me:11838: \"$ac_compile\"") >&5
11839   (eval $ac_compile) 2>&5
11840   ac_status=$?
11841   echo "$as_me:11841: \$? = $ac_status" >&5
11842   (exit $ac_status); } &&
11843          { ac_try='test -s conftest.$ac_objext'
11844   { (eval echo "$as_me:11844: \"$ac_try\"") >&5
11845   (eval $ac_try) 2>&5
11846   ac_status=$?
11847   echo "$as_me:11847: \$? = $ac_status" >&5
11848   (exit $ac_status); }; }; then
11849   cf_cv_wchar_t=yes
11850 else
11851   echo "$as_me: failed program was:" >&5
11852 cat conftest.$ac_ext >&5
11853 cf_cv_wchar_t=unknown
11854 fi
11855 rm -f conftest.$ac_objext conftest.$ac_ext
11856 fi
11857 rm -f conftest.$ac_objext conftest.$ac_ext
11858 fi
11859 echo "$as_me:11859: result: $cf_cv_wchar_t" >&5
11860 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11861
11862 if test "$cf_cv_wchar_t" = yes ; then
11863
11864 cat >>confdefs.h <<\EOF
11865 #define NEED_WCHAR_H 1
11866 EOF
11867
11868         NEED_WCHAR_H=1
11869 fi
11870
11871 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11872 if test "$cf_cv_wchar_t" = unknown ; then
11873         NCURSES_WCHAR_T=1
11874 fi
11875
11876 # if we find wchar_t in either place, use substitution to provide a fallback.
11877 if test "$cf_cv_wchar_t" != unknown ; then
11878         NCURSES_OK_WCHAR_T=1
11879 fi
11880
11881 # This is needed on Tru64 5.0 to declare wint_t
11882 echo "$as_me:11882: checking if we must include wchar.h to declare wint_t" >&5
11883 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11884 if test "${cf_cv_wint_t+set}" = set; then
11885   echo $ECHO_N "(cached) $ECHO_C" >&6
11886 else
11887
11888 cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891
11892 #include <stdlib.h>
11893 #include <stdarg.h>
11894 #include <stdio.h>
11895 #ifdef HAVE_LIBUTF8_H
11896 #include <libutf8.h>
11897 #endif
11898 int
11899 main (void)
11900 {
11901 wint_t state
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 rm -f conftest.$ac_objext
11907 if { (eval echo "$as_me:11907: \"$ac_compile\"") >&5
11908   (eval $ac_compile) 2>&5
11909   ac_status=$?
11910   echo "$as_me:11910: \$? = $ac_status" >&5
11911   (exit $ac_status); } &&
11912          { ac_try='test -s conftest.$ac_objext'
11913   { (eval echo "$as_me:11913: \"$ac_try\"") >&5
11914   (eval $ac_try) 2>&5
11915   ac_status=$?
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); }; }; then
11918   cf_cv_wint_t=no
11919 else
11920   echo "$as_me: failed program was:" >&5
11921 cat conftest.$ac_ext >&5
11922 cat >conftest.$ac_ext <<_ACEOF
11923 #line 11923 "configure"
11924 #include "confdefs.h"
11925
11926 #include <stdlib.h>
11927 #include <stdarg.h>
11928 #include <stdio.h>
11929 #include <wchar.h>
11930 #ifdef HAVE_LIBUTF8_H
11931 #include <libutf8.h>
11932 #endif
11933 int
11934 main (void)
11935 {
11936 wint_t value
11937   ;
11938   return 0;
11939 }
11940 _ACEOF
11941 rm -f conftest.$ac_objext
11942 if { (eval echo "$as_me:11942: \"$ac_compile\"") >&5
11943   (eval $ac_compile) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); } &&
11947          { ac_try='test -s conftest.$ac_objext'
11948   { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949   (eval $ac_try) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); }; }; then
11953   cf_cv_wint_t=yes
11954 else
11955   echo "$as_me: failed program was:" >&5
11956 cat conftest.$ac_ext >&5
11957 cf_cv_wint_t=unknown
11958 fi
11959 rm -f conftest.$ac_objext conftest.$ac_ext
11960 fi
11961 rm -f conftest.$ac_objext conftest.$ac_ext
11962 fi
11963 echo "$as_me:11963: result: $cf_cv_wint_t" >&5
11964 echo "${ECHO_T}$cf_cv_wint_t" >&6
11965
11966 if test "$cf_cv_wint_t" = yes ; then
11967
11968 cat >>confdefs.h <<\EOF
11969 #define NEED_WCHAR_H 1
11970 EOF
11971
11972         NEED_WCHAR_H=1
11973 fi
11974
11975 # if we do not find wint_t in either place, use substitution to provide a fallback.
11976 if test "$cf_cv_wint_t" = unknown ; then
11977         NCURSES_WINT_T=1
11978 fi
11979
11980 # if we find wint_t in either place, use substitution to provide a fallback.
11981 if test "$cf_cv_wint_t" != unknown ; then
11982         NCURSES_OK_WINT_T=1
11983 fi
11984
11985         if test "$NCURSES_MBSTATE_T" != 0; then
11986
11987 cat >>confdefs.h <<\EOF
11988 #define NEED_MBSTATE_T_DEF 1
11989 EOF
11990
11991         fi
11992 fi
11993
11994 ###   use option --disable-lp64 to allow long chtype
11995 echo "$as_me:11995: checking whether to enable _LP64 definition in curses.h" >&5
11996 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11997
11998 # Check whether --enable-lp64 or --disable-lp64 was given.
11999 if test "${enable_lp64+set}" = set; then
12000   enableval="$enable_lp64"
12001   with_lp64=$enableval
12002 else
12003   with_lp64=$cf_dft_with_lp64
12004 fi;
12005 echo "$as_me:12005: result: $with_lp64" >&5
12006 echo "${ECHO_T}$with_lp64" >&6
12007
12008 if test "x$with_lp64" = xyes ; then
12009         cf_cv_enable_lp64=1
12010 else
12011         cf_cv_enable_lp64=0
12012 fi
12013
12014 # Check whether --enable-largefile or --disable-largefile was given.
12015 if test "${enable_largefile+set}" = set; then
12016   enableval="$enable_largefile"
12017
12018 fi;
12019 if test "$enable_largefile" != no; then
12020
12021   echo "$as_me:12021: checking for special C compiler options needed for large files" >&5
12022 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12023 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12024   echo $ECHO_N "(cached) $ECHO_C" >&6
12025 else
12026   ac_cv_sys_largefile_CC=no
12027      if test "$GCC" != yes; then
12028        ac_save_CC=$CC
12029        while :; do
12030          # IRIX 6.2 and later do not support large files by default,
12031          # so use the C compiler's -n32 option if that helps.
12032          cat >conftest.$ac_ext <<_ACEOF
12033 #line 12033 "configure"
12034 #include "confdefs.h"
12035 #include <sys/types.h>
12036  /* Check that off_t can represent 2**63 - 1 correctly.
12037     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12038     since some C++ compilers masquerading as C compilers
12039     incorrectly reject 9223372036854775807.  */
12040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12041   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12042                        && LARGE_OFF_T % 2147483647 == 1)
12043                       ? 1 : -1];
12044 int
12045 main (void)
12046 {
12047
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052          rm -f conftest.$ac_objext
12053 if { (eval echo "$as_me:12053: \"$ac_compile\"") >&5
12054   (eval $ac_compile) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); } &&
12058          { ac_try='test -s conftest.$ac_objext'
12059   { (eval echo "$as_me:12059: \"$ac_try\"") >&5
12060   (eval $ac_try) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); }; }; then
12064   break
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 fi
12069 rm -f conftest.$ac_objext
12070          CC="$CC -n32"
12071          rm -f conftest.$ac_objext
12072 if { (eval echo "$as_me:12072: \"$ac_compile\"") >&5
12073   (eval $ac_compile) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); } &&
12077          { ac_try='test -s conftest.$ac_objext'
12078   { (eval echo "$as_me:12078: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit $ac_status); }; }; then
12083   ac_cv_sys_largefile_CC=' -n32'; break
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 cat conftest.$ac_ext >&5
12087 fi
12088 rm -f conftest.$ac_objext
12089          break
12090        done
12091        CC=$ac_save_CC
12092        rm -f conftest.$ac_ext
12093     fi
12094 fi
12095 echo "$as_me:12095: result: $ac_cv_sys_largefile_CC" >&5
12096 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12097   if test "$ac_cv_sys_largefile_CC" != no; then
12098     CC=$CC$ac_cv_sys_largefile_CC
12099   fi
12100
12101   echo "$as_me:12101: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12102 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12103 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12104   echo $ECHO_N "(cached) $ECHO_C" >&6
12105 else
12106   while :; do
12107   ac_cv_sys_file_offset_bits=no
12108   cat >conftest.$ac_ext <<_ACEOF
12109 #line 12109 "configure"
12110 #include "confdefs.h"
12111 #include <sys/types.h>
12112  /* Check that off_t can represent 2**63 - 1 correctly.
12113     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12114     since some C++ compilers masquerading as C compilers
12115     incorrectly reject 9223372036854775807.  */
12116 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12117   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12118                        && LARGE_OFF_T % 2147483647 == 1)
12119                       ? 1 : -1];
12120 int
12121 main (void)
12122 {
12123
12124   ;
12125   return 0;
12126 }
12127 _ACEOF
12128 rm -f conftest.$ac_objext
12129 if { (eval echo "$as_me:12129: \"$ac_compile\"") >&5
12130   (eval $ac_compile) 2>&5
12131   ac_status=$?
12132   echo "$as_me:12132: \$? = $ac_status" >&5
12133   (exit $ac_status); } &&
12134          { ac_try='test -s conftest.$ac_objext'
12135   { (eval echo "$as_me:12135: \"$ac_try\"") >&5
12136   (eval $ac_try) 2>&5
12137   ac_status=$?
12138   echo "$as_me:12138: \$? = $ac_status" >&5
12139   (exit $ac_status); }; }; then
12140   break
12141 else
12142   echo "$as_me: failed program was:" >&5
12143 cat conftest.$ac_ext >&5
12144 fi
12145 rm -f conftest.$ac_objext conftest.$ac_ext
12146   cat >conftest.$ac_ext <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149 #define _FILE_OFFSET_BITS 64
12150 #include <sys/types.h>
12151  /* Check that off_t can represent 2**63 - 1 correctly.
12152     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12153     since some C++ compilers masquerading as C compilers
12154     incorrectly reject 9223372036854775807.  */
12155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12156   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12157                        && LARGE_OFF_T % 2147483647 == 1)
12158                       ? 1 : -1];
12159 int
12160 main (void)
12161 {
12162
12163   ;
12164   return 0;
12165 }
12166 _ACEOF
12167 rm -f conftest.$ac_objext
12168 if { (eval echo "$as_me:12168: \"$ac_compile\"") >&5
12169   (eval $ac_compile) 2>&5
12170   ac_status=$?
12171   echo "$as_me:12171: \$? = $ac_status" >&5
12172   (exit $ac_status); } &&
12173          { ac_try='test -s conftest.$ac_objext'
12174   { (eval echo "$as_me:12174: \"$ac_try\"") >&5
12175   (eval $ac_try) 2>&5
12176   ac_status=$?
12177   echo "$as_me:12177: \$? = $ac_status" >&5
12178   (exit $ac_status); }; }; then
12179   ac_cv_sys_file_offset_bits=64; break
12180 else
12181   echo "$as_me: failed program was:" >&5
12182 cat conftest.$ac_ext >&5
12183 fi
12184 rm -f conftest.$ac_objext conftest.$ac_ext
12185   break
12186 done
12187 fi
12188 echo "$as_me:12188: result: $ac_cv_sys_file_offset_bits" >&5
12189 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12190 if test "$ac_cv_sys_file_offset_bits" != no; then
12191
12192 cat >>confdefs.h <<EOF
12193 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12194 EOF
12195
12196 fi
12197 rm -rf conftest*
12198   echo "$as_me:12198: checking for _LARGE_FILES value needed for large files" >&5
12199 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12200 if test "${ac_cv_sys_large_files+set}" = set; then
12201   echo $ECHO_N "(cached) $ECHO_C" >&6
12202 else
12203   while :; do
12204   ac_cv_sys_large_files=no
12205   cat >conftest.$ac_ext <<_ACEOF
12206 #line 12206 "configure"
12207 #include "confdefs.h"
12208 #include <sys/types.h>
12209  /* Check that off_t can represent 2**63 - 1 correctly.
12210     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12211     since some C++ compilers masquerading as C compilers
12212     incorrectly reject 9223372036854775807.  */
12213 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12214   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12215                        && LARGE_OFF_T % 2147483647 == 1)
12216                       ? 1 : -1];
12217 int
12218 main (void)
12219 {
12220
12221   ;
12222   return 0;
12223 }
12224 _ACEOF
12225 rm -f conftest.$ac_objext
12226 if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227   (eval $ac_compile) 2>&5
12228   ac_status=$?
12229   echo "$as_me:12229: \$? = $ac_status" >&5
12230   (exit $ac_status); } &&
12231          { ac_try='test -s conftest.$ac_objext'
12232   { (eval echo "$as_me:12232: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:12235: \$? = $ac_status" >&5
12236   (exit $ac_status); }; }; then
12237   break
12238 else
12239   echo "$as_me: failed program was:" >&5
12240 cat conftest.$ac_ext >&5
12241 fi
12242 rm -f conftest.$ac_objext conftest.$ac_ext
12243   cat >conftest.$ac_ext <<_ACEOF
12244 #line 12244 "configure"
12245 #include "confdefs.h"
12246 #define _LARGE_FILES 1
12247 #include <sys/types.h>
12248  /* Check that off_t can represent 2**63 - 1 correctly.
12249     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12250     since some C++ compilers masquerading as C compilers
12251     incorrectly reject 9223372036854775807.  */
12252 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12253   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12254                        && LARGE_OFF_T % 2147483647 == 1)
12255                       ? 1 : -1];
12256 int
12257 main (void)
12258 {
12259
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 rm -f conftest.$ac_objext
12265 if { (eval echo "$as_me:12265: \"$ac_compile\"") >&5
12266   (eval $ac_compile) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); } &&
12270          { ac_try='test -s conftest.$ac_objext'
12271   { (eval echo "$as_me:12271: \"$ac_try\"") >&5
12272   (eval $ac_try) 2>&5
12273   ac_status=$?
12274   echo "$as_me:12274: \$? = $ac_status" >&5
12275   (exit $ac_status); }; }; then
12276   ac_cv_sys_large_files=1; break
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 fi
12281 rm -f conftest.$ac_objext conftest.$ac_ext
12282   break
12283 done
12284 fi
12285 echo "$as_me:12285: result: $ac_cv_sys_large_files" >&5
12286 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12287 if test "$ac_cv_sys_large_files" != no; then
12288
12289 cat >>confdefs.h <<EOF
12290 #define _LARGE_FILES $ac_cv_sys_large_files
12291 EOF
12292
12293 fi
12294 rm -rf conftest*
12295 fi
12296
12297         if test "$enable_largefile" != no ; then
12298         echo "$as_me:12298: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12299 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12300 if test "${ac_cv_sys_largefile_source+set}" = set; then
12301   echo $ECHO_N "(cached) $ECHO_C" >&6
12302 else
12303   while :; do
12304   ac_cv_sys_largefile_source=no
12305   cat >conftest.$ac_ext <<_ACEOF
12306 #line 12306 "configure"
12307 #include "confdefs.h"
12308 #include <stdio.h>
12309 int
12310 main (void)
12311 {
12312 return !fseeko;
12313   ;
12314   return 0;
12315 }
12316 _ACEOF
12317 rm -f conftest.$ac_objext
12318 if { (eval echo "$as_me:12318: \"$ac_compile\"") >&5
12319   (eval $ac_compile) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit $ac_status); } &&
12323          { ac_try='test -s conftest.$ac_objext'
12324   { (eval echo "$as_me:12324: \"$ac_try\"") >&5
12325   (eval $ac_try) 2>&5
12326   ac_status=$?
12327   echo "$as_me:12327: \$? = $ac_status" >&5
12328   (exit $ac_status); }; }; then
12329   break
12330 else
12331   echo "$as_me: failed program was:" >&5
12332 cat conftest.$ac_ext >&5
12333 fi
12334 rm -f conftest.$ac_objext conftest.$ac_ext
12335   cat >conftest.$ac_ext <<_ACEOF
12336 #line 12336 "configure"
12337 #include "confdefs.h"
12338 #define _LARGEFILE_SOURCE 1
12339 #include <stdio.h>
12340 int
12341 main (void)
12342 {
12343 return !fseeko;
12344   ;
12345   return 0;
12346 }
12347 _ACEOF
12348 rm -f conftest.$ac_objext
12349 if { (eval echo "$as_me:12349: \"$ac_compile\"") >&5
12350   (eval $ac_compile) 2>&5
12351   ac_status=$?
12352   echo "$as_me:12352: \$? = $ac_status" >&5
12353   (exit $ac_status); } &&
12354          { ac_try='test -s conftest.$ac_objext'
12355   { (eval echo "$as_me:12355: \"$ac_try\"") >&5
12356   (eval $ac_try) 2>&5
12357   ac_status=$?
12358   echo "$as_me:12358: \$? = $ac_status" >&5
12359   (exit $ac_status); }; }; then
12360   ac_cv_sys_largefile_source=1; break
12361 else
12362   echo "$as_me: failed program was:" >&5
12363 cat conftest.$ac_ext >&5
12364 fi
12365 rm -f conftest.$ac_objext conftest.$ac_ext
12366   break
12367 done
12368 fi
12369 echo "$as_me:12369: result: $ac_cv_sys_largefile_source" >&5
12370 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12371 if test "$ac_cv_sys_largefile_source" != no; then
12372
12373 cat >>confdefs.h <<EOF
12374 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12375 EOF
12376
12377 fi
12378 rm -rf conftest*
12379
12380 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12381 # in glibc 2.1.3, but that breaks too many other things.
12382 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12383 echo "$as_me:12383: checking for fseeko" >&5
12384 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12385 if test "${ac_cv_func_fseeko+set}" = set; then
12386   echo $ECHO_N "(cached) $ECHO_C" >&6
12387 else
12388   cat >conftest.$ac_ext <<_ACEOF
12389 #line 12389 "configure"
12390 #include "confdefs.h"
12391 #include <stdio.h>
12392 int
12393 main (void)
12394 {
12395 return fseeko && fseeko (stdin, 0, 0);
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 rm -f conftest.$ac_objext conftest$ac_exeext
12401 if { (eval echo "$as_me:12401: \"$ac_link\"") >&5
12402   (eval $ac_link) 2>&5
12403   ac_status=$?
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); } &&
12406          { ac_try='test -s conftest$ac_exeext'
12407   { (eval echo "$as_me:12407: \"$ac_try\"") >&5
12408   (eval $ac_try) 2>&5
12409   ac_status=$?
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); }; }; then
12412   ac_cv_func_fseeko=yes
12413 else
12414   echo "$as_me: failed program was:" >&5
12415 cat conftest.$ac_ext >&5
12416 ac_cv_func_fseeko=no
12417 fi
12418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12419 fi
12420 echo "$as_me:12420: result: $ac_cv_func_fseeko" >&5
12421 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12422 if test $ac_cv_func_fseeko = yes; then
12423
12424 cat >>confdefs.h <<\EOF
12425 #define HAVE_FSEEKO 1
12426 EOF
12427
12428 fi
12429
12430         # Normally we would collect these definitions in the config.h,
12431         # but (like _XOPEN_SOURCE), some environments rely on having these
12432         # defined before any of the system headers are included.  Another
12433         # case comes up with C++, e.g., on AIX the compiler compiles the
12434         # header files by themselves before looking at the body files it is
12435         # told to compile.  For ncurses, those header files do not include
12436         # the config.h
12437         if test "$ac_cv_sys_large_files" != no
12438         then
12439
12440         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12441         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12442
12443         fi
12444         if test "$ac_cv_sys_largefile_source" != no
12445         then
12446
12447         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12448         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12449
12450         fi
12451         if test "$ac_cv_sys_file_offset_bits" != no
12452         then
12453
12454         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12455         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12456
12457         fi
12458
12459         echo "$as_me:12459: checking whether to use struct dirent64" >&5
12460 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12461 if test "${cf_cv_struct_dirent64+set}" = set; then
12462   echo $ECHO_N "(cached) $ECHO_C" >&6
12463 else
12464
12465                 cat >conftest.$ac_ext <<_ACEOF
12466 #line 12466 "configure"
12467 #include "confdefs.h"
12468
12469 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12470 #include <sys/types.h>
12471 #include <dirent.h>
12472
12473 int
12474 main (void)
12475 {
12476
12477                 /* if transitional largefile support is setup, this is true */
12478                 extern struct dirent64 * readdir(DIR *);
12479                 struct dirent64 *x = readdir((DIR *)0);
12480                 struct dirent *y = readdir((DIR *)0);
12481                 int z = x - y;
12482
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 rm -f conftest.$ac_objext
12488 if { (eval echo "$as_me:12488: \"$ac_compile\"") >&5
12489   (eval $ac_compile) 2>&5
12490   ac_status=$?
12491   echo "$as_me:12491: \$? = $ac_status" >&5
12492   (exit $ac_status); } &&
12493          { ac_try='test -s conftest.$ac_objext'
12494   { (eval echo "$as_me:12494: \"$ac_try\"") >&5
12495   (eval $ac_try) 2>&5
12496   ac_status=$?
12497   echo "$as_me:12497: \$? = $ac_status" >&5
12498   (exit $ac_status); }; }; then
12499   cf_cv_struct_dirent64=yes
12500 else
12501   echo "$as_me: failed program was:" >&5
12502 cat conftest.$ac_ext >&5
12503 cf_cv_struct_dirent64=no
12504 fi
12505 rm -f conftest.$ac_objext conftest.$ac_ext
12506
12507 fi
12508 echo "$as_me:12508: result: $cf_cv_struct_dirent64" >&5
12509 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12510         test "$cf_cv_struct_dirent64" = yes &&
12511 cat >>confdefs.h <<\EOF
12512 #define HAVE_STRUCT_DIRENT64 1
12513 EOF
12514
12515         fi
12516
12517 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12518 echo "$as_me:12518: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12519 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12520
12521 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12522 if test "${enable_tparm_varargs+set}" = set; then
12523   enableval="$enable_tparm_varargs"
12524   with_tparm_varargs=$enableval
12525 else
12526   with_tparm_varargs=yes
12527 fi;
12528 echo "$as_me:12528: result: $with_tparm_varargs" >&5
12529 echo "${ECHO_T}$with_tparm_varargs" >&6
12530 NCURSES_TPARM_VARARGS=0
12531 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12532
12533 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12534 if test "$with_ticlib" != no ; then
12535 echo "$as_me:12535: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12536 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12537
12538 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12539 if test "${enable_tic_depends+set}" = set; then
12540   enableval="$enable_tic_depends"
12541   with_tic_depends=$enableval
12542 else
12543   with_tic_depends=yes
12544 fi;
12545 echo "$as_me:12545: result: $with_tic_depends" >&5
12546 echo "${ECHO_T}$with_tic_depends" >&6
12547 else
12548         with_tic_depends=no
12549 fi
12550
12551 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12552 echo "$as_me:12552: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12553 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12554
12555 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12556 if test "${enable_wattr_macros+set}" = set; then
12557   enableval="$enable_wattr_macros"
12558   with_wattr_macros=$enableval
12559 else
12560   with_wattr_macros=yes
12561 fi;
12562 if [ "x$with_wattr_macros" != xyes ]; then
12563         NCURSES_WATTR_MACROS=0
12564         echo "$as_me:12564: result: yes" >&5
12565 echo "${ECHO_T}yes" >&6
12566 else
12567         NCURSES_WATTR_MACROS=1
12568         echo "$as_me:12568: result: no" >&5
12569 echo "${ECHO_T}no" >&6
12570 fi
12571
12572 echo "$as_me:12572: checking for X11 rgb file" >&5
12573 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12574
12575 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12576 if test "${with_x11_rgb+set}" = set; then
12577   withval="$with_x11_rgb"
12578   RGB_PATH=$withval
12579 else
12580   RGB_PATH=auto
12581 fi;
12582
12583 if test "x$RGB_PATH" = xauto
12584 then
12585         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12586         for cf_path in \
12587                 /opt/local/share/X11/rgb.txt \
12588                 /opt/X11/share/X11/rgb.txt \
12589                 /usr/share/X11/rgb.txt \
12590                 /usr/X11/share/X11/rgb.txt \
12591                 /usr/X11/lib/X11/rgb.txt \
12592                 /usr/lib/X11/rgb.txt \
12593                 /etc/X11/rgb.txt \
12594                 /usr/pkg/lib/X11/rgb.txt \
12595                 /usr/X11R7/lib/X11/rgb.txt \
12596                 /usr/X11R6/lib/X11/rgb.txt \
12597                 /usr/X11R5/lib/X11/rgb.txt \
12598                 /usr/X11R4/lib/X11/rgb.txt \
12599                 /usr/local/lib/X11/rgb.txt \
12600                 /usr/local/share/X11/rgb.txt \
12601                 /usr/lib64/X11/rgb.txt
12602         do
12603                 if test -f "$cf_path" ; then
12604                         RGB_PATH="$cf_path"
12605                         break
12606                 fi
12607         done
12608 else
12609         cf_path=$RGB_PATH
12610
12611 if test "x$prefix" != xNONE; then
12612         cf_path_syntax="$prefix"
12613 else
12614         cf_path_syntax="$ac_default_prefix"
12615 fi
12616
12617 case ".$cf_path" in
12618 (.\$\(*\)*|.\'*\'*)
12619         ;;
12620 (..|./*|.\\*)
12621         ;;
12622 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12623         ;;
12624 (.\${*prefix}*|.\${*dir}*)
12625         eval cf_path="$cf_path"
12626         case ".$cf_path" in
12627         (.NONE/*)
12628                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12629                 ;;
12630         esac
12631         ;;
12632 (.no|.NONE/*)
12633         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12634         ;;
12635 (*)
12636         { { echo "$as_me:12636: error: expected a pathname, not \"$cf_path\"" >&5
12637 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12638    { (exit 1); exit 1; }; }
12639         ;;
12640 esac
12641
12642 fi
12643
12644 echo "$as_me:12644: result: $RGB_PATH" >&5
12645 echo "${ECHO_T}$RGB_PATH" >&6
12646
12647 cat >>confdefs.h <<EOF
12648 #define RGB_PATH "$cf_path"
12649 EOF
12650
12651 no_x11_rgb=
12652 if test "$RGB_PATH" = no
12653 then
12654         no_x11_rgb="#"
12655 fi
12656
12657 ###   use option --with-bool to override bool's type
12658 echo "$as_me:12658: checking for type of bool" >&5
12659 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12660
12661 # Check whether --with-bool or --without-bool was given.
12662 if test "${with_bool+set}" = set; then
12663   withval="$with_bool"
12664   NCURSES_BOOL="$withval"
12665 else
12666   NCURSES_BOOL=auto
12667 fi;
12668 echo "$as_me:12668: result: $NCURSES_BOOL" >&5
12669 echo "${ECHO_T}$NCURSES_BOOL" >&6
12670
12671 echo "$as_me:12671: checking for alternate terminal capabilities file" >&5
12672 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12673
12674 # Check whether --with-caps or --without-caps was given.
12675 if test "${with_caps+set}" = set; then
12676   withval="$with_caps"
12677   TERMINFO_CAPS=Caps.$withval
12678 else
12679   TERMINFO_CAPS=Caps
12680 fi;
12681 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12682 echo "$as_me:12682: result: $TERMINFO_CAPS" >&5
12683 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12684
12685 ###   use option --with-chtype to override chtype's type
12686 echo "$as_me:12686: checking for type of chtype" >&5
12687 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12688
12689 # Check whether --with-chtype or --without-chtype was given.
12690 if test "${with_chtype+set}" = set; then
12691   withval="$with_chtype"
12692   NCURSES_CHTYPE="$withval"
12693 else
12694   NCURSES_CHTYPE=$cf_dft_chtype
12695 fi;
12696 echo "$as_me:12696: result: $NCURSES_CHTYPE" >&5
12697 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12698
12699 ###   use option --with-ospeed to override ospeed's type
12700 echo "$as_me:12700: checking for type of ospeed" >&5
12701 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12702
12703 # Check whether --with-ospeed or --without-ospeed was given.
12704 if test "${with_ospeed+set}" = set; then
12705   withval="$with_ospeed"
12706   NCURSES_OSPEED="$withval"
12707 else
12708   NCURSES_OSPEED=short
12709 fi;
12710 echo "$as_me:12710: result: $NCURSES_OSPEED" >&5
12711 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12712
12713 ###   use option --with-mmask-t to override mmask_t's type
12714 echo "$as_me:12714: checking for type of mmask_t" >&5
12715 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12716
12717 # Check whether --with-mmask-t or --without-mmask-t was given.
12718 if test "${with_mmask_t+set}" = set; then
12719   withval="$with_mmask_t"
12720   NCURSES_MMASK_T="$withval"
12721 else
12722   NCURSES_MMASK_T=$cf_dft_mmask_t
12723 fi;
12724 echo "$as_me:12724: result: $NCURSES_MMASK_T" >&5
12725 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12726
12727 ###   use option --with-ccharw-max to override CCHARW_MAX size
12728 echo "$as_me:12728: checking for size CCHARW_MAX" >&5
12729 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12730
12731 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12732 if test "${with_ccharw_max+set}" = set; then
12733   withval="$with_ccharw_max"
12734   NCURSES_CCHARW_MAX="$withval"
12735 else
12736   NCURSES_CCHARW_MAX=5
12737 fi;
12738 echo "$as_me:12738: result: $NCURSES_CCHARW_MAX" >&5
12739 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12740
12741 echo "$as_me:12741: checking for ANSI C header files" >&5
12742 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12743 if test "${ac_cv_header_stdc+set}" = set; then
12744   echo $ECHO_N "(cached) $ECHO_C" >&6
12745 else
12746   cat >conftest.$ac_ext <<_ACEOF
12747 #line 12747 "configure"
12748 #include "confdefs.h"
12749 #include <stdlib.h>
12750 #include <stdarg.h>
12751 #include <string.h>
12752 #include <float.h>
12753
12754 _ACEOF
12755 if { (eval echo "$as_me:12755: \"$ac_cpp conftest.$ac_ext\"") >&5
12756   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12757   ac_status=$?
12758   egrep -v '^ *\+' conftest.er1 >conftest.err
12759   rm -f conftest.er1
12760   cat conftest.err >&5
12761   echo "$as_me:12761: \$? = $ac_status" >&5
12762   (exit $ac_status); } >/dev/null; then
12763   if test -s conftest.err; then
12764     ac_cpp_err=$ac_c_preproc_warn_flag
12765   else
12766     ac_cpp_err=
12767   fi
12768 else
12769   ac_cpp_err=yes
12770 fi
12771 if test -z "$ac_cpp_err"; then
12772   ac_cv_header_stdc=yes
12773 else
12774   echo "$as_me: failed program was:" >&5
12775   cat conftest.$ac_ext >&5
12776   ac_cv_header_stdc=no
12777 fi
12778 rm -f conftest.err conftest.$ac_ext
12779
12780 if test $ac_cv_header_stdc = yes; then
12781   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12782   cat >conftest.$ac_ext <<_ACEOF
12783 #line 12783 "configure"
12784 #include "confdefs.h"
12785 #include <string.h>
12786
12787 _ACEOF
12788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12789   egrep "memchr" >/dev/null 2>&1; then
12790   :
12791 else
12792   ac_cv_header_stdc=no
12793 fi
12794 rm -rf conftest*
12795
12796 fi
12797
12798 if test $ac_cv_header_stdc = yes; then
12799   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12800   cat >conftest.$ac_ext <<_ACEOF
12801 #line 12801 "configure"
12802 #include "confdefs.h"
12803 #include <stdlib.h>
12804
12805 _ACEOF
12806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12807   egrep "free" >/dev/null 2>&1; then
12808   :
12809 else
12810   ac_cv_header_stdc=no
12811 fi
12812 rm -rf conftest*
12813
12814 fi
12815
12816 if test $ac_cv_header_stdc = yes; then
12817   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12818   if test "$cross_compiling" = yes; then
12819   :
12820 else
12821   cat >conftest.$ac_ext <<_ACEOF
12822 #line 12822 "configure"
12823 #include "confdefs.h"
12824 #include <ctype.h>
12825 #if ((' ' & 0x0FF) == 0x020)
12826 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12827 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12828 #else
12829 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12830                      || ('j' <= (c) && (c) <= 'r') \
12831                      || ('s' <= (c) && (c) <= 'z'))
12832 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12833 #endif
12834
12835 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12836 int
12837 main (void)
12838 {
12839   int i;
12840   for (i = 0; i < 256; i++)
12841     if (XOR (islower (i), ISLOWER (i))
12842         || toupper (i) != TOUPPER (i))
12843       $ac_main_return(2);
12844   $ac_main_return (0);
12845 }
12846 _ACEOF
12847 rm -f conftest$ac_exeext
12848 if { (eval echo "$as_me:12848: \"$ac_link\"") >&5
12849   (eval $ac_link) 2>&5
12850   ac_status=$?
12851   echo "$as_me:12851: \$? = $ac_status" >&5
12852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12853   { (eval echo "$as_me:12853: \"$ac_try\"") >&5
12854   (eval $ac_try) 2>&5
12855   ac_status=$?
12856   echo "$as_me:12856: \$? = $ac_status" >&5
12857   (exit $ac_status); }; }; then
12858   :
12859 else
12860   echo "$as_me: program exited with status $ac_status" >&5
12861 echo "$as_me: failed program was:" >&5
12862 cat conftest.$ac_ext >&5
12863 ac_cv_header_stdc=no
12864 fi
12865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12866 fi
12867 fi
12868 fi
12869 echo "$as_me:12869: result: $ac_cv_header_stdc" >&5
12870 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12871 if test $ac_cv_header_stdc = yes; then
12872
12873 cat >>confdefs.h <<\EOF
12874 #define STDC_HEADERS 1
12875 EOF
12876
12877 fi
12878
12879 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12880
12881 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12882                   inttypes.h stdint.h unistd.h
12883 do
12884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12885 echo "$as_me:12885: checking for $ac_header" >&5
12886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12888   echo $ECHO_N "(cached) $ECHO_C" >&6
12889 else
12890   cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893 $ac_includes_default
12894 #include <$ac_header>
12895 _ACEOF
12896 rm -f conftest.$ac_objext
12897 if { (eval echo "$as_me:12897: \"$ac_compile\"") >&5
12898   (eval $ac_compile) 2>&5
12899   ac_status=$?
12900   echo "$as_me:12900: \$? = $ac_status" >&5
12901   (exit $ac_status); } &&
12902          { ac_try='test -s conftest.$ac_objext'
12903   { (eval echo "$as_me:12903: \"$ac_try\"") >&5
12904   (eval $ac_try) 2>&5
12905   ac_status=$?
12906   echo "$as_me:12906: \$? = $ac_status" >&5
12907   (exit $ac_status); }; }; then
12908   eval "$as_ac_Header=yes"
12909 else
12910   echo "$as_me: failed program was:" >&5
12911 cat conftest.$ac_ext >&5
12912 eval "$as_ac_Header=no"
12913 fi
12914 rm -f conftest.$ac_objext conftest.$ac_ext
12915 fi
12916 echo "$as_me:12916: result: `eval echo '${'$as_ac_Header'}'`" >&5
12917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12918 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12919   cat >>confdefs.h <<EOF
12920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12921 EOF
12922
12923 fi
12924 done
12925
12926 echo "$as_me:12926: checking for signed char" >&5
12927 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12928 if test "${ac_cv_type_signed_char+set}" = set; then
12929   echo $ECHO_N "(cached) $ECHO_C" >&6
12930 else
12931   cat >conftest.$ac_ext <<_ACEOF
12932 #line 12932 "configure"
12933 #include "confdefs.h"
12934 $ac_includes_default
12935 int
12936 main (void)
12937 {
12938 if ((signed char *) 0)
12939   return 0;
12940 if (sizeof (signed char))
12941   return 0;
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext
12947 if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5
12948   (eval $ac_compile) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit $ac_status); } &&
12952          { ac_try='test -s conftest.$ac_objext'
12953   { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954   (eval $ac_try) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); }; }; then
12958   ac_cv_type_signed_char=yes
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat conftest.$ac_ext >&5
12962 ac_cv_type_signed_char=no
12963 fi
12964 rm -f conftest.$ac_objext conftest.$ac_ext
12965 fi
12966 echo "$as_me:12966: result: $ac_cv_type_signed_char" >&5
12967 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12968
12969 echo "$as_me:12969: checking size of signed char" >&5
12970 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12971 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12972   echo $ECHO_N "(cached) $ECHO_C" >&6
12973 else
12974   if test "$ac_cv_type_signed_char" = yes; then
12975   if test "$cross_compiling" = yes; then
12976   # Depending upon the size, compute the lo and hi bounds.
12977 cat >conftest.$ac_ext <<_ACEOF
12978 #line 12978 "configure"
12979 #include "confdefs.h"
12980 $ac_includes_default
12981 int
12982 main (void)
12983 {
12984 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12985   ;
12986   return 0;
12987 }
12988 _ACEOF
12989 rm -f conftest.$ac_objext
12990 if { (eval echo "$as_me:12990: \"$ac_compile\"") >&5
12991   (eval $ac_compile) 2>&5
12992   ac_status=$?
12993   echo "$as_me:12993: \$? = $ac_status" >&5
12994   (exit $ac_status); } &&
12995          { ac_try='test -s conftest.$ac_objext'
12996   { (eval echo "$as_me:12996: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit $ac_status); }; }; then
13001   ac_lo=0 ac_mid=0
13002   while :; do
13003     cat >conftest.$ac_ext <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006 $ac_includes_default
13007 int
13008 main (void)
13009 {
13010 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13011   ;
13012   return 0;
13013 }
13014 _ACEOF
13015 rm -f conftest.$ac_objext
13016 if { (eval echo "$as_me:13016: \"$ac_compile\"") >&5
13017   (eval $ac_compile) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit $ac_status); } &&
13021          { ac_try='test -s conftest.$ac_objext'
13022   { (eval echo "$as_me:13022: \"$ac_try\"") >&5
13023   (eval $ac_try) 2>&5
13024   ac_status=$?
13025   echo "$as_me:13025: \$? = $ac_status" >&5
13026   (exit $ac_status); }; }; then
13027   ac_hi=$ac_mid; break
13028 else
13029   echo "$as_me: failed program was:" >&5
13030 cat conftest.$ac_ext >&5
13031 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13032 fi
13033 rm -f conftest.$ac_objext conftest.$ac_ext
13034   done
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat conftest.$ac_ext >&5
13038 ac_hi=-1 ac_mid=-1
13039   while :; do
13040     cat >conftest.$ac_ext <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043 $ac_includes_default
13044 int
13045 main (void)
13046 {
13047 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f conftest.$ac_objext
13053 if { (eval echo "$as_me:13053: \"$ac_compile\"") >&5
13054   (eval $ac_compile) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); } &&
13058          { ac_try='test -s conftest.$ac_objext'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit $ac_status); }; }; then
13064   ac_lo=$ac_mid; break
13065 else
13066   echo "$as_me: failed program was:" >&5
13067 cat conftest.$ac_ext >&5
13068 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13069 fi
13070 rm -f conftest.$ac_objext conftest.$ac_ext
13071   done
13072 fi
13073 rm -f conftest.$ac_objext conftest.$ac_ext
13074 # Binary search between lo and hi bounds.
13075 while test "x$ac_lo" != "x$ac_hi"; do
13076   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13077   cat >conftest.$ac_ext <<_ACEOF
13078 #line 13078 "configure"
13079 #include "confdefs.h"
13080 $ac_includes_default
13081 int
13082 main (void)
13083 {
13084 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 rm -f conftest.$ac_objext
13090 if { (eval echo "$as_me:13090: \"$ac_compile\"") >&5
13091   (eval $ac_compile) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); } &&
13095          { ac_try='test -s conftest.$ac_objext'
13096   { (eval echo "$as_me:13096: \"$ac_try\"") >&5
13097   (eval $ac_try) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; }; then
13101   ac_hi=$ac_mid
13102 else
13103   echo "$as_me: failed program was:" >&5
13104 cat conftest.$ac_ext >&5
13105 ac_lo=`expr $ac_mid + 1`
13106 fi
13107 rm -f conftest.$ac_objext conftest.$ac_ext
13108 done
13109 ac_cv_sizeof_signed_char=$ac_lo
13110 else
13111   if test "$cross_compiling" = yes; then
13112   { { echo "$as_me:13112: error: cannot run test program while cross compiling" >&5
13113 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13114    { (exit 1); exit 1; }; }
13115 else
13116   cat >conftest.$ac_ext <<_ACEOF
13117 #line 13117 "configure"
13118 #include "confdefs.h"
13119 $ac_includes_default
13120 int
13121 main (void)
13122 {
13123 FILE *f = fopen ("conftest.val", "w");
13124 if (!f)
13125   $ac_main_return (1);
13126 fprintf (f, "%d", (sizeof (signed char)));
13127 fclose (f);
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 rm -f conftest$ac_exeext
13133 if { (eval echo "$as_me:13133: \"$ac_link\"") >&5
13134   (eval $ac_link) 2>&5
13135   ac_status=$?
13136   echo "$as_me:13136: \$? = $ac_status" >&5
13137   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13138   { (eval echo "$as_me:13138: \"$ac_try\"") >&5
13139   (eval $ac_try) 2>&5
13140   ac_status=$?
13141   echo "$as_me:13141: \$? = $ac_status" >&5
13142   (exit $ac_status); }; }; then
13143   ac_cv_sizeof_signed_char=`cat conftest.val`
13144 else
13145   echo "$as_me: program exited with status $ac_status" >&5
13146 echo "$as_me: failed program was:" >&5
13147 cat conftest.$ac_ext >&5
13148 fi
13149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13150 fi
13151 fi
13152 rm -f conftest.val
13153 else
13154   ac_cv_sizeof_signed_char=0
13155 fi
13156 fi
13157 echo "$as_me:13157: result: $ac_cv_sizeof_signed_char" >&5
13158 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13159 cat >>confdefs.h <<EOF
13160 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13161 EOF
13162
13163 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13164         NCURSES_SBOOL="signed char"
13165 else
13166         NCURSES_SBOOL="char"
13167 fi
13168 echo "$as_me:13168: checking if you want to use signed Boolean array in term.h" >&5
13169 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13170
13171 # Check whether --enable-signed-char or --disable-signed-char was given.
13172 if test "${enable_signed_char+set}" = set; then
13173   enableval="$enable_signed_char"
13174   with_signed_char=$enableval
13175 else
13176   with_signed_char=no
13177 fi;
13178 echo "$as_me:13178: result: $with_signed_char" >&5
13179 echo "${ECHO_T}$with_signed_char" >&6
13180 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13181
13182 ###   use option --with-tparm-arg to override tparm's argument type
13183 echo "$as_me:13183: checking for type of tparm args" >&5
13184 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13185
13186 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13187 if test "${with_tparm_arg+set}" = set; then
13188   withval="$with_tparm_arg"
13189   NCURSES_TPARM_ARG="$withval"
13190 else
13191   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13192 fi;
13193 echo "$as_me:13193: result: $NCURSES_TPARM_ARG" >&5
13194 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13195
13196 ### Enable compiling-in rcs id's
13197 echo "$as_me:13197: checking if RCS identifiers should be compiled-in" >&5
13198 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13199
13200 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13201 if test "${with_rcs_ids+set}" = set; then
13202   withval="$with_rcs_ids"
13203   with_rcs_ids=$withval
13204 else
13205   with_rcs_ids=no
13206 fi;
13207 echo "$as_me:13207: result: $with_rcs_ids" >&5
13208 echo "${ECHO_T}$with_rcs_ids" >&6
13209 test "x$with_rcs_ids" = xyes &&
13210 cat >>confdefs.h <<\EOF
13211 #define USE_RCS_IDS 1
13212 EOF
13213
13214 ###############################################################################
13215
13216 echo "$as_me:13216: checking format of man-pages" >&5
13217 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13218
13219 # Check whether --with-manpage-format or --without-manpage-format was given.
13220 if test "${with_manpage_format+set}" = set; then
13221   withval="$with_manpage_format"
13222   MANPAGE_FORMAT=$withval
13223 else
13224   MANPAGE_FORMAT=unknown
13225 fi;
13226
13227 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13228 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13229
13230 cf_unknown=
13231
13232 case $MANPAGE_FORMAT in
13233 (unknown)
13234         if test -z "$MANPATH" ; then
13235                 MANPATH="/usr/man:/usr/share/man"
13236         fi
13237
13238         # look for the 'date' man-page (it's most likely to be installed!)
13239         MANPAGE_FORMAT=
13240         cf_preform=no
13241         cf_catonly=yes
13242         cf_example=date
13243
13244         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13245         for cf_dir in $MANPATH; do
13246                 test -z "$cf_dir" && cf_dir=/usr/man
13247                 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
13248                 do
13249                         cf_test=`echo $cf_name | sed -e 's/*//'`
13250                         if test "x$cf_test" = "x$cf_name" ; then
13251
13252                                 case "$cf_name" in
13253                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13254                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13255                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13256                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13257                                 esac
13258
13259                                 case "$cf_name" in
13260                                 ($cf_dir/man*)
13261                                         cf_catonly=no
13262                                         ;;
13263                                 ($cf_dir/cat*)
13264                                         cf_preform=yes
13265                                         ;;
13266                                 esac
13267                                 break
13268                         fi
13269
13270                         # if we found a match in either man* or cat*, stop looking
13271                         if test -n "$MANPAGE_FORMAT" ; then
13272                                 cf_found=no
13273                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13274                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13275                                 case "$cf_name" in
13276                                 ($cf_dir/cat*)
13277                                         cf_found=yes
13278                                         ;;
13279                                 esac
13280                                 test $cf_found=yes && break
13281                         fi
13282                 done
13283                 # only check the first directory in $MANPATH where we find manpages
13284                 if test -n "$MANPAGE_FORMAT" ; then
13285                         break
13286                 fi
13287         done
13288         # if we did not find the example, just assume it is normal
13289         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13290         IFS="$ac_save_ifs"
13291         ;;
13292 (*)
13293         for cf_option in $MANPAGE_FORMAT; do
13294         case $cf_option in
13295         (gzip|compress|BSDI|normal|formatted|catonly)
13296                 ;;
13297         (*)
13298                 cf_unknown="$cf_unknown $cf_option"
13299                 ;;
13300         esac
13301         done
13302         ;;
13303 esac
13304
13305 echo "$as_me:13305: result: $MANPAGE_FORMAT" >&5
13306 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13307 if test -n "$cf_unknown" ; then
13308         { echo "$as_me:13308: WARNING: Unexpected manpage-format $cf_unknown" >&5
13309 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13310 fi
13311
13312 echo "$as_me:13312: checking for manpage renaming" >&5
13313 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13314
13315 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13316 if test "${with_manpage_renames+set}" = set; then
13317   withval="$with_manpage_renames"
13318   MANPAGE_RENAMES=$withval
13319 else
13320   MANPAGE_RENAMES=yes
13321 fi;
13322
13323 case ".$MANPAGE_RENAMES" in
13324 (.no)
13325         ;;
13326 (.|.yes)
13327         # Debian 'man' program?
13328         if test -f /etc/debian_version ; then
13329                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13330         else
13331                 MANPAGE_RENAMES=no
13332         fi
13333         ;;
13334 esac
13335
13336 if test "$MANPAGE_RENAMES" != no ; then
13337         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13338                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13339         elif test ! -f $MANPAGE_RENAMES ; then
13340                 { { echo "$as_me:13340: error: not a filename: $MANPAGE_RENAMES" >&5
13341 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13342    { (exit 1); exit 1; }; }
13343         fi
13344
13345         test ! -d man && mkdir man
13346
13347         # Construct a sed-script to perform renaming within man-pages
13348         if test -n "$MANPAGE_RENAMES" ; then
13349                 test ! -d man && mkdir man
13350                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13351         fi
13352 fi
13353
13354 echo "$as_me:13354: result: $MANPAGE_RENAMES" >&5
13355 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13356
13357 echo "$as_me:13357: checking if manpage aliases will be installed" >&5
13358 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13359
13360 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13361 if test "${with_manpage_aliases+set}" = set; then
13362   withval="$with_manpage_aliases"
13363   MANPAGE_ALIASES=$withval
13364 else
13365   MANPAGE_ALIASES=yes
13366 fi;
13367
13368 echo "$as_me:13368: result: $MANPAGE_ALIASES" >&5
13369 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13370
13371 case "x$LN_S" in
13372 (xln*)
13373         cf_use_symlinks=yes
13374         ;;
13375 (*)
13376         cf_use_symlinks=no
13377         ;;
13378 esac
13379
13380 MANPAGE_SYMLINKS=no
13381 if test "$MANPAGE_ALIASES" = yes ; then
13382 echo "$as_me:13382: checking if manpage symlinks should be used" >&5
13383 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13384
13385 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13386 if test "${with_manpage_symlinks+set}" = set; then
13387   withval="$with_manpage_symlinks"
13388   MANPAGE_SYMLINKS=$withval
13389 else
13390   MANPAGE_SYMLINKS=$cf_use_symlinks
13391 fi;
13392
13393 if test "$$cf_use_symlinks" = no; then
13394 if test "$MANPAGE_SYMLINKS" = yes ; then
13395         { echo "$as_me:13395: WARNING: cannot make symlinks" >&5
13396 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13397         MANPAGE_SYMLINKS=no
13398 fi
13399 fi
13400
13401 echo "$as_me:13401: result: $MANPAGE_SYMLINKS" >&5
13402 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13403 fi
13404
13405 echo "$as_me:13405: checking for manpage tbl" >&5
13406 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13407
13408 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13409 if test "${with_manpage_tbl+set}" = set; then
13410   withval="$with_manpage_tbl"
13411   MANPAGE_TBL=$withval
13412 else
13413   MANPAGE_TBL=no
13414 fi;
13415
13416 echo "$as_me:13416: result: $MANPAGE_TBL" >&5
13417 echo "${ECHO_T}$MANPAGE_TBL" >&6
13418
13419 if test "$prefix" = "NONE" ; then
13420         cf_prefix="$ac_default_prefix"
13421 else
13422         cf_prefix="$prefix"
13423 fi
13424
13425 case "$MANPAGE_FORMAT" in
13426 (*catonly*)
13427         cf_format=yes
13428         cf_inboth=no
13429         ;;
13430 (*formatted*)
13431         cf_format=yes
13432         cf_inboth=yes
13433         ;;
13434 (*)
13435         cf_format=no
13436         cf_inboth=no
13437         ;;
13438 esac
13439
13440 test ! -d man && mkdir man
13441
13442 cf_so_strip=
13443 cf_compress=
13444 case "$MANPAGE_FORMAT" in
13445 (*compress*)
13446         cf_so_strip="Z"
13447         cf_compress=compress
13448         ;;
13449 (*gzip*)
13450         cf_so_strip="gz"
13451         cf_compress=gzip
13452         ;;
13453 esac
13454
13455 cf_edit_man=./edit_man.sh
13456 cf_man_alias=`pwd`/man_alias.sed
13457
13458 cat >$cf_edit_man <<CF_EOF
13459 #! $SHELL
13460 # this script is generated by the configure-script CF_MAN_PAGES macro.
13461
13462 prefix="$cf_prefix"
13463 datarootdir="$datarootdir"
13464 datadir="$datadir"
13465
13466 NCURSES_MAJOR="$NCURSES_MAJOR"
13467 NCURSES_MINOR="$NCURSES_MINOR"
13468 NCURSES_PATCH="$NCURSES_PATCH"
13469
13470 NCURSES_OSPEED="$NCURSES_OSPEED"
13471 TERMINFO="$TERMINFO"
13472
13473 INSTALL="$INSTALL"
13474 INSTALL_DATA="$INSTALL_DATA"
13475
13476 transform="$program_transform_name"
13477
13478 TMP=\${TMPDIR:=/tmp}/man\$\$
13479 trap "rm -f \$TMP" 0 1 2 3 15
13480
13481 form=\$1
13482 shift || exit 1
13483
13484 verb=\$1
13485 shift || exit 1
13486
13487 mandir=\$1
13488 shift || exit 1
13489
13490 srcdir=\$1
13491 top_srcdir=\$srcdir/..
13492 shift || exit 1
13493
13494 if test "\$form" = normal ; then
13495         if test "$cf_format" = yes ; then
13496         if test "$cf_inboth" = no ; then
13497                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13498                 exit $?
13499         fi
13500         fi
13501         cf_subdir=\$mandir/man
13502         cf_tables=$MANPAGE_TBL
13503 else
13504         cf_subdir=\$mandir/cat
13505         cf_tables=yes
13506 fi
13507
13508 # process the list of source-files
13509 for i in \$* ; do
13510 case \$i in
13511 (*.orig|*.rej) ;;
13512 (*.[0-9]*)
13513         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13514         if test \$verb = installing ; then
13515         if test ! -d \$cf_subdir\${section} ; then
13516                 mkdir -p \$cf_subdir\$section
13517         fi
13518         fi
13519
13520         # replace variables in man page
13521         if test ! -f $cf_man_alias ; then
13522 cat >>$cf_man_alias <<-CF_EOF2
13523                 s,@DATADIR@,\$datadir,g
13524                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13525                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13526                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13527                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13528                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13529                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13530 CF_EOF
13531
13532         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13533         do
13534                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13535                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13536 cat >>$cf_edit_man <<-CF_EOF
13537                 s,@$cf_NAME@,$cf_name,g
13538 CF_EOF
13539         done
13540
13541 cat >>$cf_edit_man <<CF_EOF
13542 CF_EOF2
13543                 echo "...made $cf_man_alias"
13544         fi
13545
13546         aliases=
13547         cf_source=\`basename \$i\`
13548         inalias=\$cf_source
13549         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13550         if test ! -f \$inalias ; then
13551                 echo .. skipped \$cf_source
13552                 continue
13553         fi
13554 CF_EOF
13555
13556 if test "$MANPAGE_ALIASES" != no ; then
13557 cat >>$cf_edit_man <<CF_EOF
13558         nCurses=ignore.3x
13559         test $with_curses_h = yes && nCurses=ncurses.3x
13560         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13561 CF_EOF
13562 fi
13563
13564 if test "$MANPAGE_RENAMES" = no ; then
13565 cat >>$cf_edit_man <<CF_EOF
13566         # perform program transformations for section 1 man pages
13567         if test \$section = 1 ; then
13568                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13569         else
13570                 cf_target=\$cf_subdir\${section}/\$cf_source
13571         fi
13572 CF_EOF
13573 else
13574 cat >>$cf_edit_man <<CF_EOF
13575         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13576         if test -z "\$cf_target" ; then
13577                 echo '? missing rename for '\$cf_source
13578                 cf_target="\$cf_source"
13579         fi
13580         cf_target="\$cf_subdir\${section}/\${cf_target}"
13581
13582 CF_EOF
13583 fi
13584
13585 cat >>$cf_edit_man <<CF_EOF
13586         sed     -f $cf_man_alias \\
13587 CF_EOF
13588
13589 if test -f $MANPAGE_RENAMES ; then
13590 cat >>$cf_edit_man <<CF_EOF
13591                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13592 CF_EOF
13593 else
13594 cat >>$cf_edit_man <<CF_EOF
13595                 < \$i >\$TMP
13596 CF_EOF
13597 fi
13598
13599 cat >>$cf_edit_man <<CF_EOF
13600 if test \$cf_tables = yes ; then
13601         tbl \$TMP >\$TMP.out
13602         mv \$TMP.out \$TMP
13603 fi
13604 CF_EOF
13605
13606 if test $with_overwrite != yes ; then
13607 cat >>$cf_edit_man <<CF_EOF
13608         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13609         mv \$TMP.out \$TMP
13610 CF_EOF
13611 fi
13612
13613 if test $with_curses_h != yes ; then
13614 cat >>$cf_edit_man <<CF_EOF
13615         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13616         mv \$TMP.out \$TMP
13617 CF_EOF
13618 fi
13619
13620 cat >>$cf_edit_man <<CF_EOF
13621         if test \$form = format ; then
13622                 nroff -man \$TMP >\$TMP.out
13623                 mv \$TMP.out \$TMP
13624         fi
13625 CF_EOF
13626
13627 if test -n "$cf_compress" ; then
13628 cat >>$cf_edit_man <<CF_EOF
13629         if test \$verb = installing ; then
13630         if ( $cf_compress -f \$TMP )
13631         then
13632                 mv \$TMP.$cf_so_strip \$TMP
13633         fi
13634         fi
13635         cf_target="\$cf_target.$cf_so_strip"
13636 CF_EOF
13637 fi
13638
13639 case "$MANPAGE_FORMAT" in
13640 (*BSDI*)
13641 cat >>$cf_edit_man <<CF_EOF
13642         if test \$form = format ; then
13643                 # BSDI installs only .0 suffixes in the cat directories
13644                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13645         fi
13646 CF_EOF
13647   ;;
13648 esac
13649
13650 cat >>$cf_edit_man <<CF_EOF
13651         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13652         if test \$verb = installing ; then
13653                 echo \$verb \$cf_target
13654                 \$INSTALL_DATA \$TMP \$cf_target
13655                 test -d \$cf_subdir\${section} &&
13656                 test -n "\$aliases" && (
13657                         cd \$cf_subdir\${section} && (
13658                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13659                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13660                                 cf_target=\`basename \$cf_target\`
13661                                 for cf_alias in \$aliases
13662                                 do
13663                                         if test \$section = 1 ; then
13664                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13665                                         fi
13666
13667                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13668                                                 if test -f \$cf_alias\${suffix} ; then
13669                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13670                                                         then
13671                                                                 continue
13672                                                         fi
13673                                                 fi
13674                                                 echo .. \$verb alias \$cf_alias\${suffix}
13675 CF_EOF
13676 case "x$LN_S" in
13677 (*-f)
13678 cat >>$cf_edit_man <<CF_EOF
13679                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13680 CF_EOF
13681         ;;
13682 (*)
13683 cat >>$cf_edit_man <<CF_EOF
13684                                                 rm -f \$cf_alias\${suffix}
13685                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13686 CF_EOF
13687         ;;
13688 esac
13689 cat >>$cf_edit_man <<CF_EOF
13690                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13691                                                 echo ".so \$cf_source" >\$TMP
13692 CF_EOF
13693 if test -n "$cf_compress" ; then
13694 cat >>$cf_edit_man <<CF_EOF
13695                                                 if test -n "$cf_so_strip" ; then
13696                                                         $cf_compress -f \$TMP
13697                                                         mv \$TMP.$cf_so_strip \$TMP
13698                                                 fi
13699 CF_EOF
13700 fi
13701 cat >>$cf_edit_man <<CF_EOF
13702                                                 echo .. \$verb alias \$cf_alias\${suffix}
13703                                                 rm -f \$cf_alias\${suffix}
13704                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13705                                         fi
13706                                 done
13707                         )
13708                 )
13709         elif test \$verb = removing ; then
13710                 test -f \$cf_target && (
13711                         echo \$verb \$cf_target
13712                         rm -f \$cf_target
13713                 )
13714                 test -d \$cf_subdir\${section} &&
13715                 test -n "\$aliases" && (
13716                         cd \$cf_subdir\${section} && (
13717                                 for cf_alias in \$aliases
13718                                 do
13719                                         if test \$section = 1 ; then
13720                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13721                                         fi
13722
13723                                         echo .. \$verb alias \$cf_alias\${suffix}
13724                                         rm -f \$cf_alias\${suffix}
13725                                 done
13726                         )
13727                 )
13728         else
13729 #               echo ".hy 0"
13730                 cat \$TMP
13731         fi
13732         ;;
13733 esac
13734 done
13735
13736 if test $cf_inboth = yes ; then
13737 if test \$form != format ; then
13738         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13739 fi
13740 fi
13741
13742 exit 0
13743 CF_EOF
13744 chmod 755 $cf_edit_man
13745
13746 ###############################################################################
13747
13748 ### Note that some functions (such as const) are normally disabled anyway.
13749 echo "$as_me:13749: checking if you want to build with function extensions" >&5
13750 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13751
13752 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13753 if test "${enable_ext_funcs+set}" = set; then
13754   enableval="$enable_ext_funcs"
13755   with_ext_funcs=$enableval
13756 else
13757   with_ext_funcs=yes
13758 fi;
13759 echo "$as_me:13759: result: $with_ext_funcs" >&5
13760 echo "${ECHO_T}$with_ext_funcs" >&6
13761 if test "x$with_ext_funcs" = xyes ; then
13762         NCURSES_EXT_FUNCS=1
13763
13764 cat >>confdefs.h <<\EOF
13765 #define NCURSES_EXT_FUNCS 1
13766 EOF
13767
13768 cat >>confdefs.h <<\EOF
13769 #define HAVE_ASSUME_DEFAULT_COLORS 1
13770 EOF
13771
13772 cat >>confdefs.h <<\EOF
13773 #define HAVE_CURSES_VERSION 1
13774 EOF
13775
13776 cat >>confdefs.h <<\EOF
13777 #define HAVE_HAS_KEY 1
13778 EOF
13779
13780 cat >>confdefs.h <<\EOF
13781 #define HAVE_RESIZETERM 1
13782 EOF
13783
13784 cat >>confdefs.h <<\EOF
13785 #define HAVE_RESIZE_TERM 1
13786 EOF
13787
13788 cat >>confdefs.h <<\EOF
13789 #define HAVE_TERM_ENTRY_H 1
13790 EOF
13791
13792 cat >>confdefs.h <<\EOF
13793 #define HAVE_USE_DEFAULT_COLORS 1
13794 EOF
13795
13796 cat >>confdefs.h <<\EOF
13797 #define HAVE_USE_EXTENDED_NAMES 1
13798 EOF
13799
13800 cat >>confdefs.h <<\EOF
13801 #define HAVE_USE_SCREEN 1
13802 EOF
13803
13804 cat >>confdefs.h <<\EOF
13805 #define HAVE_USE_WINDOW 1
13806 EOF
13807
13808 cat >>confdefs.h <<\EOF
13809 #define HAVE_WRESIZE 1
13810 EOF
13811
13812         GENERATED_EXT_FUNCS=generated
13813         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13814 else
13815         NCURSES_EXT_FUNCS=0
13816         GENERATED_EXT_FUNCS=
13817 fi
13818
13819 echo "$as_me:13819: checking if you want to build with SCREEN extensions" >&5
13820 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13821
13822 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13823 if test "${enable_sp_funcs+set}" = set; then
13824   enableval="$enable_sp_funcs"
13825   with_sp_funcs=$enableval
13826 else
13827   with_sp_funcs=$cf_dft_ext_spfuncs
13828 fi;
13829 echo "$as_me:13829: result: $with_sp_funcs" >&5
13830 echo "${ECHO_T}$with_sp_funcs" >&6
13831 if test "x$with_sp_funcs" = xyes ; then
13832         NCURSES_SP_FUNCS=1
13833
13834 cat >>confdefs.h <<\EOF
13835 #define NCURSES_SP_FUNCS 1
13836 EOF
13837
13838 cat >>confdefs.h <<\EOF
13839 #define HAVE_TPUTS_SP 1
13840 EOF
13841
13842         GENERATED_SP_FUNCS=generated
13843 else
13844         NCURSES_SP_FUNCS=0
13845         GENERATED_SP_FUNCS=
13846 fi
13847
13848 echo "$as_me:13848: checking if you want to build with terminal-driver" >&5
13849 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13850
13851 # Check whether --enable-term-driver or --disable-term-driver was given.
13852 if test "${enable_term_driver+set}" = set; then
13853   enableval="$enable_term_driver"
13854   with_term_driver=$enableval
13855 else
13856   with_term_driver=no
13857 fi;
13858 echo "$as_me:13858: result: $with_term_driver" >&5
13859 echo "${ECHO_T}$with_term_driver" >&6
13860 if test "x$with_term_driver" = xyes ; then
13861
13862 cat >>confdefs.h <<\EOF
13863 #define USE_TERM_DRIVER 1
13864 EOF
13865
13866         if test "x$with_termlib" != xno ; then
13867                 { { echo "$as_me:13867: error: The term-driver option conflicts with the termlib option" >&5
13868 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13869    { (exit 1); exit 1; }; }
13870         fi
13871         if test "x$with_sp_funcs" != xyes ; then
13872                 { { echo "$as_me:13872: error: The term-driver option relies upon sp-funcs" >&5
13873 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13874    { (exit 1); exit 1; }; }
13875         fi
13876 fi
13877
13878 ###   use option --enable-const to turn on use of const beyond that in XSI.
13879 echo "$as_me:13879: checking for extended use of const keyword" >&5
13880 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13881
13882 # Check whether --enable-const or --disable-const was given.
13883 if test "${enable_const+set}" = set; then
13884   enableval="$enable_const"
13885   with_ext_const=$enableval
13886 else
13887   with_ext_const=$cf_dft_ext_const
13888 fi;
13889 echo "$as_me:13889: result: $with_ext_const" >&5
13890 echo "${ECHO_T}$with_ext_const" >&6
13891 NCURSES_CONST='/*nothing*/'
13892 if test "x$with_ext_const" = xyes ; then
13893         NCURSES_CONST=const
13894 fi
13895
13896 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13897 echo "$as_me:13897: checking if you want to use extended colors" >&5
13898 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13899
13900 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13901 if test "${enable_ext_colors+set}" = set; then
13902   enableval="$enable_ext_colors"
13903   with_ext_colors=$enableval
13904 else
13905   with_ext_colors=$cf_dft_ext_colors
13906 fi;
13907 echo "$as_me:13907: result: $with_ext_colors" >&5
13908 echo "${ECHO_T}$with_ext_colors" >&6
13909 NCURSES_EXT_COLORS=0
13910 if test "x$with_ext_colors" = xyes ; then
13911         if test "x$with_widec" != xyes ; then
13912                 { echo "$as_me:13912: WARNING: This option applies only to wide-character library" >&5
13913 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13914         else
13915                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13916
13917 if test "${with_abi_version+set}" != set; then
13918         case $cf_cv_rel_version in
13919         (5.*)
13920                 cf_cv_rel_version=6.0
13921                 cf_cv_abi_version=6
13922                 { echo "$as_me:13922: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13923 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13924                 ;;
13925         esac
13926 fi
13927
13928                 NCURSES_EXT_COLORS=1
13929
13930 cat >>confdefs.h <<\EOF
13931 #define NCURSES_EXT_COLORS 1
13932 EOF
13933
13934 cat >>confdefs.h <<\EOF
13935 #define HAVE_ALLOC_PAIR 1
13936 EOF
13937
13938 cat >>confdefs.h <<\EOF
13939 #define HAVE_INIT_EXTENDED_COLOR 1
13940 EOF
13941
13942 cat >>confdefs.h <<\EOF
13943 #define HAVE_RESET_COLOR_PAIRS 1
13944 EOF
13945
13946         fi
13947 fi
13948
13949 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13950 echo "$as_me:13950: checking if you want to use extended mouse encoding" >&5
13951 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13952
13953 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13954 if test "${enable_ext_mouse+set}" = set; then
13955   enableval="$enable_ext_mouse"
13956   with_ext_mouse=$enableval
13957 else
13958   with_ext_mouse=$cf_dft_ext_mouse
13959 fi;
13960 echo "$as_me:13960: result: $with_ext_mouse" >&5
13961 echo "${ECHO_T}$with_ext_mouse" >&6
13962 NCURSES_MOUSE_VERSION=1
13963 if test "x$with_ext_mouse" = xyes ; then
13964         NCURSES_MOUSE_VERSION=2
13965
13966 if test "${with_abi_version+set}" != set; then
13967         case $cf_cv_rel_version in
13968         (5.*)
13969                 cf_cv_rel_version=6.0
13970                 cf_cv_abi_version=6
13971                 { echo "$as_me:13971: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13972 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13973                 ;;
13974         esac
13975 fi
13976
13977 fi
13978
13979 ###   use option --enable-ext-putwin to turn on extended screendumps
13980 echo "$as_me:13980: checking if you want to use extended putwin/screendump" >&5
13981 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13982
13983 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13984 if test "${enable_ext_putwin+set}" = set; then
13985   enableval="$enable_ext_putwin"
13986   with_ext_putwin=$enableval
13987 else
13988   with_ext_putwin=$cf_dft_ext_putwin
13989 fi;
13990 echo "$as_me:13990: result: $with_ext_putwin" >&5
13991 echo "${ECHO_T}$with_ext_putwin" >&6
13992 if test "x$with_ext_putwin" = xyes ; then
13993
13994 cat >>confdefs.h <<\EOF
13995 #define NCURSES_EXT_PUTWIN 1
13996 EOF
13997
13998 fi
13999
14000 echo "$as_me:14000: checking if you want \$NCURSES_NO_PADDING code" >&5
14001 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14002
14003 # Check whether --enable-no-padding or --disable-no-padding was given.
14004 if test "${enable_no_padding+set}" = set; then
14005   enableval="$enable_no_padding"
14006   with_no_padding=$enableval
14007 else
14008   with_no_padding=$with_ext_funcs
14009 fi;
14010 echo "$as_me:14010: result: $with_no_padding" >&5
14011 echo "${ECHO_T}$with_no_padding" >&6
14012 test "x$with_no_padding" = xyes &&
14013 cat >>confdefs.h <<\EOF
14014 #define NCURSES_NO_PADDING 1
14015 EOF
14016
14017 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14018 echo "$as_me:14018: checking if you want SIGWINCH handler" >&5
14019 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14020
14021 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14022 if test "${enable_sigwinch+set}" = set; then
14023   enableval="$enable_sigwinch"
14024   with_sigwinch=$enableval
14025 else
14026   with_sigwinch=$with_ext_funcs
14027 fi;
14028 echo "$as_me:14028: result: $with_sigwinch" >&5
14029 echo "${ECHO_T}$with_sigwinch" >&6
14030 test "x$with_sigwinch" = xyes &&
14031 cat >>confdefs.h <<\EOF
14032 #define USE_SIGWINCH 1
14033 EOF
14034
14035 ###   use option --enable-tcap-names to allow user to define new capabilities
14036 echo "$as_me:14036: checking if you want user-definable terminal capabilities like termcap" >&5
14037 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14038
14039 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14040 if test "${enable_tcap_names+set}" = set; then
14041   enableval="$enable_tcap_names"
14042   with_tcap_names=$enableval
14043 else
14044   with_tcap_names=$with_ext_funcs
14045 fi;
14046 echo "$as_me:14046: result: $with_tcap_names" >&5
14047 echo "${ECHO_T}$with_tcap_names" >&6
14048 NCURSES_XNAMES=0
14049 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14050
14051 ##############################################################################
14052
14053 echo "$as_me:14053: checking if you want to link with the pthread library" >&5
14054 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14055
14056 # Check whether --with-pthread or --without-pthread was given.
14057 if test "${with_pthread+set}" = set; then
14058   withval="$with_pthread"
14059   with_pthread=$withval
14060 else
14061   with_pthread=no
14062 fi;
14063 echo "$as_me:14063: result: $with_pthread" >&5
14064 echo "${ECHO_T}$with_pthread" >&6
14065
14066 if test "$with_pthread" != no ; then
14067         echo "$as_me:14067: checking for pthread.h" >&5
14068 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14069 if test "${ac_cv_header_pthread_h+set}" = set; then
14070   echo $ECHO_N "(cached) $ECHO_C" >&6
14071 else
14072   cat >conftest.$ac_ext <<_ACEOF
14073 #line 14073 "configure"
14074 #include "confdefs.h"
14075 #include <pthread.h>
14076 _ACEOF
14077 if { (eval echo "$as_me:14077: \"$ac_cpp conftest.$ac_ext\"") >&5
14078   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14079   ac_status=$?
14080   egrep -v '^ *\+' conftest.er1 >conftest.err
14081   rm -f conftest.er1
14082   cat conftest.err >&5
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); } >/dev/null; then
14085   if test -s conftest.err; then
14086     ac_cpp_err=$ac_c_preproc_warn_flag
14087   else
14088     ac_cpp_err=
14089   fi
14090 else
14091   ac_cpp_err=yes
14092 fi
14093 if test -z "$ac_cpp_err"; then
14094   ac_cv_header_pthread_h=yes
14095 else
14096   echo "$as_me: failed program was:" >&5
14097   cat conftest.$ac_ext >&5
14098   ac_cv_header_pthread_h=no
14099 fi
14100 rm -f conftest.err conftest.$ac_ext
14101 fi
14102 echo "$as_me:14102: result: $ac_cv_header_pthread_h" >&5
14103 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14104 if test $ac_cv_header_pthread_h = yes; then
14105
14106 cat >>confdefs.h <<\EOF
14107 #define HAVE_PTHREADS_H 1
14108 EOF
14109
14110         for cf_lib_pthread in pthread c_r
14111         do
14112             echo "$as_me:14112: checking if we can link with the $cf_lib_pthread library" >&5
14113 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14114             cf_save_LIBS="$LIBS"
14115
14116 cf_add_libs="-l$cf_lib_pthread"
14117 # Filter out duplicates - this happens with badly-designed ".pc" files...
14118 for cf_add_1lib in $LIBS
14119 do
14120         for cf_add_2lib in $cf_add_libs
14121         do
14122                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14123                 then
14124                         cf_add_1lib=
14125                         break
14126                 fi
14127         done
14128         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14129 done
14130 LIBS="$cf_add_libs"
14131
14132             cat >conftest.$ac_ext <<_ACEOF
14133 #line 14133 "configure"
14134 #include "confdefs.h"
14135
14136 #include <pthread.h>
14137
14138 int
14139 main (void)
14140 {
14141
14142                 int rc = pthread_create(0,0,0,0);
14143                 int r2 = pthread_mutexattr_settype(0, 0);
14144
14145   ;
14146   return 0;
14147 }
14148 _ACEOF
14149 rm -f conftest.$ac_objext conftest$ac_exeext
14150 if { (eval echo "$as_me:14150: \"$ac_link\"") >&5
14151   (eval $ac_link) 2>&5
14152   ac_status=$?
14153   echo "$as_me:14153: \$? = $ac_status" >&5
14154   (exit $ac_status); } &&
14155          { ac_try='test -s conftest$ac_exeext'
14156   { (eval echo "$as_me:14156: \"$ac_try\"") >&5
14157   (eval $ac_try) 2>&5
14158   ac_status=$?
14159   echo "$as_me:14159: \$? = $ac_status" >&5
14160   (exit $ac_status); }; }; then
14161   with_pthread=yes
14162 else
14163   echo "$as_me: failed program was:" >&5
14164 cat conftest.$ac_ext >&5
14165 with_pthread=no
14166 fi
14167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14168             LIBS="$cf_save_LIBS"
14169             echo "$as_me:14169: result: $with_pthread" >&5
14170 echo "${ECHO_T}$with_pthread" >&6
14171             test "$with_pthread" = yes && break
14172         done
14173
14174         if test "$with_pthread" = yes ; then
14175
14176 cf_add_libs="-l$cf_lib_pthread"
14177 # Filter out duplicates - this happens with badly-designed ".pc" files...
14178 for cf_add_1lib in $LIBS
14179 do
14180         for cf_add_2lib in $cf_add_libs
14181         do
14182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14183                 then
14184                         cf_add_1lib=
14185                         break
14186                 fi
14187         done
14188         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14189 done
14190 LIBS="$cf_add_libs"
14191
14192 cat >>confdefs.h <<\EOF
14193 #define HAVE_LIBPTHREADS 1
14194 EOF
14195
14196         else
14197             { { echo "$as_me:14197: error: Cannot link with pthread library" >&5
14198 echo "$as_me: error: Cannot link with pthread library" >&2;}
14199    { (exit 1); exit 1; }; }
14200         fi
14201
14202 fi
14203
14204 fi
14205
14206 if test "x$with_pthread" != xno; then
14207         echo "$as_me:14207: checking for pthread_kill" >&5
14208 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14209 if test "${ac_cv_func_pthread_kill+set}" = set; then
14210   echo $ECHO_N "(cached) $ECHO_C" >&6
14211 else
14212   cat >conftest.$ac_ext <<_ACEOF
14213 #line 14213 "configure"
14214 #include "confdefs.h"
14215 #define pthread_kill autoconf_temporary
14216 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14217 #undef pthread_kill
14218
14219 #ifdef __cplusplus
14220 extern "C"
14221 #endif
14222
14223 /* We use char because int might match the return type of a gcc2
14224    builtin and then its argument prototype would still apply.  */
14225 char pthread_kill (void);
14226
14227 int
14228 main (void)
14229 {
14230
14231 /* The GNU C library defines stubs for functions which it implements
14232     to always fail with ENOSYS.  Some functions are actually named
14233     something starting with __ and the normal name is an alias.  */
14234 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14235 #error found stub for pthread_kill
14236 #endif
14237
14238         return pthread_kill ();
14239   ;
14240   return 0;
14241 }
14242 _ACEOF
14243 rm -f conftest.$ac_objext conftest$ac_exeext
14244 if { (eval echo "$as_me:14244: \"$ac_link\"") >&5
14245   (eval $ac_link) 2>&5
14246   ac_status=$?
14247   echo "$as_me:14247: \$? = $ac_status" >&5
14248   (exit $ac_status); } &&
14249          { ac_try='test -s conftest$ac_exeext'
14250   { (eval echo "$as_me:14250: \"$ac_try\"") >&5
14251   (eval $ac_try) 2>&5
14252   ac_status=$?
14253   echo "$as_me:14253: \$? = $ac_status" >&5
14254   (exit $ac_status); }; }; then
14255   ac_cv_func_pthread_kill=yes
14256 else
14257   echo "$as_me: failed program was:" >&5
14258 cat conftest.$ac_ext >&5
14259 ac_cv_func_pthread_kill=no
14260 fi
14261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14262 fi
14263 echo "$as_me:14263: result: $ac_cv_func_pthread_kill" >&5
14264 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14265 if test $ac_cv_func_pthread_kill = yes; then
14266
14267                 echo "$as_me:14267: checking if you want to allow EINTR in wgetch with pthreads" >&5
14268 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14269
14270 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14271 if test "${enable_pthreads_eintr+set}" = set; then
14272   enableval="$enable_pthreads_eintr"
14273   use_pthreads_eintr=$enableval
14274 else
14275   use_pthreads_eintr=no
14276 fi;
14277                 echo "$as_me:14277: result: $use_pthreads_eintr" >&5
14278 echo "${ECHO_T}$use_pthreads_eintr" >&6
14279                 if test "x$use_pthreads_eintr" = xyes ; then
14280
14281 cat >>confdefs.h <<\EOF
14282 #define USE_PTHREADS_EINTR 1
14283 EOF
14284
14285                 fi
14286 fi
14287
14288         echo "$as_me:14288: checking if you want to use weak-symbols for pthreads" >&5
14289 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14290
14291 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14292 if test "${enable_weak_symbols+set}" = set; then
14293   enableval="$enable_weak_symbols"
14294   use_weak_symbols=$enableval
14295 else
14296   use_weak_symbols=no
14297 fi;
14298         echo "$as_me:14298: result: $use_weak_symbols" >&5
14299 echo "${ECHO_T}$use_weak_symbols" >&6
14300         if test "x$use_weak_symbols" = xyes ; then
14301
14302 echo "$as_me:14302: checking if $CC supports weak symbols" >&5
14303 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14304 if test "${cf_cv_weak_symbols+set}" = set; then
14305   echo $ECHO_N "(cached) $ECHO_C" >&6
14306 else
14307
14308 cat >conftest.$ac_ext <<_ACEOF
14309 #line 14309 "configure"
14310 #include "confdefs.h"
14311
14312 #include <stdio.h>
14313 int
14314 main (void)
14315 {
14316
14317 #if defined(__GNUC__)
14318 #  if defined __USE_ISOC99
14319 #    define _cat_pragma(exp)    _Pragma(#exp)
14320 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14321 #  else
14322 #    define _weak_pragma(exp)
14323 #  endif
14324 #  define _declare(name)        __extension__ extern __typeof__(name) name
14325 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14326 #endif
14327
14328 weak_symbol(fopen);
14329
14330   ;
14331   return 0;
14332 }
14333 _ACEOF
14334 rm -f conftest.$ac_objext
14335 if { (eval echo "$as_me:14335: \"$ac_compile\"") >&5
14336   (eval $ac_compile) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); } &&
14340          { ac_try='test -s conftest.$ac_objext'
14341   { (eval echo "$as_me:14341: \"$ac_try\"") >&5
14342   (eval $ac_try) 2>&5
14343   ac_status=$?
14344   echo "$as_me:14344: \$? = $ac_status" >&5
14345   (exit $ac_status); }; }; then
14346   cf_cv_weak_symbols=yes
14347 else
14348   echo "$as_me: failed program was:" >&5
14349 cat conftest.$ac_ext >&5
14350 cf_cv_weak_symbols=no
14351 fi
14352 rm -f conftest.$ac_objext conftest.$ac_ext
14353
14354 fi
14355 echo "$as_me:14355: result: $cf_cv_weak_symbols" >&5
14356 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14357
14358         else
14359                 cf_cv_weak_symbols=no
14360         fi
14361
14362         if test "x$cf_cv_weak_symbols" = xyes ; then
14363
14364 cat >>confdefs.h <<\EOF
14365 #define USE_WEAK_SYMBOLS 1
14366 EOF
14367
14368         fi
14369 fi
14370
14371 PTHREAD=
14372 if test "x$with_pthread" = "xyes" ; then
14373
14374 cat >>confdefs.h <<\EOF
14375 #define USE_PTHREADS 1
14376 EOF
14377
14378         enable_reentrant=yes
14379         if test "x$cf_cv_weak_symbols" = xyes ; then
14380                 PTHREAD=-lpthread
14381
14382 cf_add_libs="-lpthread"
14383 # Filter out duplicates - this happens with badly-designed ".pc" files...
14384 for cf_add_1lib in $PRIVATE_LIBS
14385 do
14386         for cf_add_2lib in $cf_add_libs
14387         do
14388                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14389                 then
14390                         cf_add_1lib=
14391                         break
14392                 fi
14393         done
14394         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14395 done
14396 PRIVATE_LIBS="$cf_add_libs"
14397
14398         fi
14399 fi
14400
14401 # Reentrant code has to be opaque; there's little advantage to making ncurses
14402 # opaque outside of that, so there is no --enable-opaque option.  We can use
14403 # this option without --with-pthreads, but this will be always set for
14404 # pthreads.
14405 echo "$as_me:14405: checking if you want reentrant code" >&5
14406 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14407
14408 # Check whether --enable-reentrant or --disable-reentrant was given.
14409 if test "${enable_reentrant+set}" = set; then
14410   enableval="$enable_reentrant"
14411   with_reentrant=$enableval
14412 else
14413   with_reentrant=no
14414 fi;
14415 echo "$as_me:14415: result: $with_reentrant" >&5
14416 echo "${ECHO_T}$with_reentrant" >&6
14417 if test "x$with_reentrant" = xyes ; then
14418         cf_cv_enable_reentrant=1
14419         cf_cv_enable_opaque="NCURSES_INTERNALS"
14420         NCURSES_SIZE_T=int
14421         if test "x$cf_cv_weak_symbols" = xyes ; then
14422
14423 # remove pthread library from $LIBS
14424 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14425
14426 cf_add_libs="-lpthread"
14427 # Filter out duplicates - this happens with badly-designed ".pc" files...
14428 for cf_add_1lib in $TEST_LIBS
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_LIBS="$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 $TEST_LIBS2
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 TEST_LIBS2="$cf_add_libs"
14457
14458 cf_add_libs="-lpthread"
14459 # Filter out duplicates - this happens with badly-designed ".pc" files...
14460 for cf_add_1lib in $PRIVATE_LIBS
14461 do
14462         for cf_add_2lib in $cf_add_libs
14463         do
14464                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14465                 then
14466                         cf_add_1lib=
14467                         break
14468                 fi
14469         done
14470         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14471 done
14472 PRIVATE_LIBS="$cf_add_libs"
14473
14474         else
14475                 # when not using weak symbols but with_reentrant,
14476                 # add 't' to the library suffix on all platforms
14477                 # except cygwin, where we only do that if ALSO
14478                 # compiling with full thread support.
14479                 case "$host" in
14480                 (*cygwin* | *msys*)
14481                         if test "$with_pthread" = "yes" ; then
14482                                 if test "x$disable_lib_suffixes" = "xno" ; then
14483                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14484                                 fi
14485                         fi ;;
14486                 (*)
14487                         if test "x$disable_lib_suffixes" = "xno" ; then
14488                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14489                         fi
14490                         ;;
14491                 esac
14492         fi
14493
14494 cat >>confdefs.h <<\EOF
14495 #define USE_REENTRANT 1
14496 EOF
14497
14498 if test "${with_abi_version+set}" != set; then
14499         case $cf_cv_rel_version in
14500         (5.*)
14501                 cf_cv_rel_version=6.0
14502                 cf_cv_abi_version=6
14503                 { echo "$as_me:14503: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14504 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14505                 ;;
14506         esac
14507 fi
14508
14509 else
14510         cf_cv_enable_reentrant=0
14511         cf_cv_enable_opaque="NCURSES_OPAQUE"
14512         NCURSES_SIZE_T=short
14513 fi
14514
14515 echo "$as_me:14515: checking if you want opaque curses-library structures" >&5
14516 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14517
14518 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14519 if test "${enable_opaque_curses+set}" = set; then
14520   enableval="$enable_opaque_curses"
14521   test "$enableval" != yes && enableval=no
14522         if test "$enableval" != "no" ; then
14523     enable_opaque_curses=yes
14524         else
14525
14526          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14527          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14528
14529         fi
14530 else
14531   enableval=no
14532
14533          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14534          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14535
14536 fi;
14537 echo "$as_me:14537: result: $enable_opaque_curses" >&5
14538 echo "${ECHO_T}$enable_opaque_curses" >&6
14539
14540 test "$cf_cv_enable_reentrant" = 1 && \
14541 test "$enable_opaque_curses" = no && \
14542 { { echo "$as_me:14542: error: reentrant configuration requires opaque library" >&5
14543 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14544    { (exit 1); exit 1; }; }
14545
14546 echo "$as_me:14546: checking if you want opaque form-library structures" >&5
14547 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14548
14549 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14550 if test "${enable_opaque_form+set}" = set; then
14551   enableval="$enable_opaque_form"
14552   enable_opaque_form=yes
14553 else
14554   enable_opaque_form=no
14555 fi;
14556 echo "$as_me:14556: result: $enable_opaque_form" >&5
14557 echo "${ECHO_T}$enable_opaque_form" >&6
14558
14559 echo "$as_me:14559: checking if you want opaque menu-library structures" >&5
14560 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14561
14562 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14563 if test "${enable_opaque_menu+set}" = set; then
14564   enableval="$enable_opaque_menu"
14565   enable_opaque_menu=yes
14566 else
14567   enable_opaque_menu=no
14568 fi;
14569 echo "$as_me:14569: result: $enable_opaque_menu" >&5
14570 echo "${ECHO_T}$enable_opaque_menu" >&6
14571
14572 echo "$as_me:14572: checking if you want opaque panel-library structures" >&5
14573 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14574
14575 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14576 if test "${enable_opaque_panel+set}" = set; then
14577   enableval="$enable_opaque_panel"
14578   enable_opaque_panel=yes
14579 else
14580   enable_opaque_panel=no
14581 fi;
14582 echo "$as_me:14582: result: $enable_opaque_panel" >&5
14583 echo "${ECHO_T}$enable_opaque_panel" >&6
14584
14585 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14586 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14587 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14588 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14589
14590 ### Allow using a different wrap-prefix
14591 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14592         echo "$as_me:14592: checking for prefix used to wrap public variables" >&5
14593 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14594
14595 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14596 if test "${with_wrap_prefix+set}" = set; then
14597   withval="$with_wrap_prefix"
14598   NCURSES_WRAP_PREFIX=$withval
14599 else
14600   NCURSES_WRAP_PREFIX=_nc_
14601 fi;
14602         echo "$as_me:14602: result: $NCURSES_WRAP_PREFIX" >&5
14603 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14604 else
14605         NCURSES_WRAP_PREFIX=_nc_
14606 fi
14607
14608 cat >>confdefs.h <<EOF
14609 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14610 EOF
14611
14612 ###############################################################################
14613 # These options are relatively safe to experiment with.
14614
14615 echo "$as_me:14615: checking if you want all development code" >&5
14616 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14617
14618 # Check whether --with-develop or --without-develop was given.
14619 if test "${with_develop+set}" = set; then
14620   withval="$with_develop"
14621   with_develop=$withval
14622 else
14623   with_develop=no
14624 fi;
14625 echo "$as_me:14625: result: $with_develop" >&5
14626 echo "${ECHO_T}$with_develop" >&6
14627
14628 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14629 echo "$as_me:14629: checking if you want hard-tabs code" >&5
14630 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14631
14632 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14633 if test "${enable_hard_tabs+set}" = set; then
14634   enableval="$enable_hard_tabs"
14635
14636 else
14637   enable_hard_tabs=$with_develop
14638 fi;
14639 echo "$as_me:14639: result: $enable_hard_tabs" >&5
14640 echo "${ECHO_T}$enable_hard_tabs" >&6
14641 test "x$enable_hard_tabs" = xyes &&
14642 cat >>confdefs.h <<\EOF
14643 #define USE_HARD_TABS 1
14644 EOF
14645
14646 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14647 echo "$as_me:14647: checking if you want limited support for xmc" >&5
14648 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14649
14650 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14651 if test "${enable_xmc_glitch+set}" = set; then
14652   enableval="$enable_xmc_glitch"
14653
14654 else
14655   enable_xmc_glitch=$with_develop
14656 fi;
14657 echo "$as_me:14657: result: $enable_xmc_glitch" >&5
14658 echo "${ECHO_T}$enable_xmc_glitch" >&6
14659 test "x$enable_xmc_glitch" = xyes &&
14660 cat >>confdefs.h <<\EOF
14661 #define USE_XMC_SUPPORT 1
14662 EOF
14663
14664 ###############################################################################
14665 # These are just experimental, probably should not be in a package:
14666
14667 echo "$as_me:14667: checking if you do not want to assume colors are white-on-black" >&5
14668 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14669
14670 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14671 if test "${enable_assumed_color+set}" = set; then
14672   enableval="$enable_assumed_color"
14673   with_assumed_color=$enableval
14674 else
14675   with_assumed_color=yes
14676 fi;
14677 echo "$as_me:14677: result: $with_assumed_color" >&5
14678 echo "${ECHO_T}$with_assumed_color" >&6
14679 test "x$with_assumed_color" = xyes &&
14680 cat >>confdefs.h <<\EOF
14681 #define USE_ASSUMED_COLOR 1
14682 EOF
14683
14684 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14685 echo "$as_me:14685: checking if you want hashmap scrolling-optimization code" >&5
14686 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14687
14688 # Check whether --enable-hashmap or --disable-hashmap was given.
14689 if test "${enable_hashmap+set}" = set; then
14690   enableval="$enable_hashmap"
14691   with_hashmap=$enableval
14692 else
14693   with_hashmap=yes
14694 fi;
14695 echo "$as_me:14695: result: $with_hashmap" >&5
14696 echo "${ECHO_T}$with_hashmap" >&6
14697 test "x$with_hashmap" = xyes &&
14698 cat >>confdefs.h <<\EOF
14699 #define USE_HASHMAP 1
14700 EOF
14701
14702 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14703 echo "$as_me:14703: checking if you want colorfgbg code" >&5
14704 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14705
14706 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14707 if test "${enable_colorfgbg+set}" = set; then
14708   enableval="$enable_colorfgbg"
14709   with_colorfgbg=$enableval
14710 else
14711   with_colorfgbg=no
14712 fi;
14713 echo "$as_me:14713: result: $with_colorfgbg" >&5
14714 echo "${ECHO_T}$with_colorfgbg" >&6
14715 test "x$with_colorfgbg" = xyes &&
14716 cat >>confdefs.h <<\EOF
14717 #define USE_COLORFGBG 1
14718 EOF
14719
14720 ###   use option --enable-interop to turn on use of bindings used for interop
14721 echo "$as_me:14721: checking if you want interop bindings" >&5
14722 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14723
14724 # Check whether --enable-interop or --disable-interop was given.
14725 if test "${enable_interop+set}" = set; then
14726   enableval="$enable_interop"
14727   with_exp_interop=$enableval
14728 else
14729   with_exp_interop=$cf_dft_interop
14730 fi;
14731 echo "$as_me:14731: result: $with_exp_interop" >&5
14732 echo "${ECHO_T}$with_exp_interop" >&6
14733
14734 NCURSES_INTEROP_FUNCS=0
14735 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14736
14737 echo "$as_me:14737: checking if you want experimental safe-sprintf code" >&5
14738 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14739
14740 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14741 if test "${enable_safe_sprintf+set}" = set; then
14742   enableval="$enable_safe_sprintf"
14743   with_safe_sprintf=$enableval
14744 else
14745   with_safe_sprintf=no
14746 fi;
14747 echo "$as_me:14747: result: $with_safe_sprintf" >&5
14748 echo "${ECHO_T}$with_safe_sprintf" >&6
14749
14750 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14751 # when hashmap is used scroll hints are useless
14752 if test "$with_hashmap" = no ; then
14753 echo "$as_me:14753: checking if you want to experiment without scrolling-hints code" >&5
14754 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14755
14756 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14757 if test "${enable_scroll_hints+set}" = set; then
14758   enableval="$enable_scroll_hints"
14759   with_scroll_hints=$enableval
14760 else
14761   with_scroll_hints=yes
14762 fi;
14763 echo "$as_me:14763: result: $with_scroll_hints" >&5
14764 echo "${ECHO_T}$with_scroll_hints" >&6
14765 test "x$with_scroll_hints" = xyes &&
14766 cat >>confdefs.h <<\EOF
14767 #define USE_SCROLL_HINTS 1
14768 EOF
14769
14770 fi
14771
14772 echo "$as_me:14772: checking if you want wgetch-events code" >&5
14773 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14774
14775 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14776 if test "${enable_wgetch_events+set}" = set; then
14777   enableval="$enable_wgetch_events"
14778   with_wgetch_events=$enableval
14779 else
14780   with_wgetch_events=no
14781 fi;
14782 echo "$as_me:14782: result: $with_wgetch_events" >&5
14783 echo "${ECHO_T}$with_wgetch_events" >&6
14784 test "x$with_wgetch_events" = xyes &&
14785 cat >>confdefs.h <<\EOF
14786 #define NCURSES_WGETCH_EVENTS 1
14787 EOF
14788
14789 ###############################################################################
14790
14791 ###     use option --disable-echo to suppress full display compiling commands
14792
14793 echo "$as_me:14793: checking if you want to see long compiling messages" >&5
14794 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14795
14796 # Check whether --enable-echo or --disable-echo was given.
14797 if test "${enable_echo+set}" = set; then
14798   enableval="$enable_echo"
14799   test "$enableval" != no && enableval=yes
14800         if test "$enableval" != "yes" ; then
14801
14802         ECHO_LT='--silent'
14803         ECHO_LD='@echo linking $@;'
14804         RULE_CC='@echo compiling $<'
14805         SHOW_CC='@echo compiling $@'
14806         ECHO_CC='@'
14807
14808         else
14809
14810         ECHO_LT=''
14811         ECHO_LD=''
14812         RULE_CC=''
14813         SHOW_CC=''
14814         ECHO_CC=''
14815
14816         fi
14817 else
14818   enableval=yes
14819
14820         ECHO_LT=''
14821         ECHO_LD=''
14822         RULE_CC=''
14823         SHOW_CC=''
14824         ECHO_CC=''
14825
14826 fi;
14827 echo "$as_me:14827: result: $enableval" >&5
14828 echo "${ECHO_T}$enableval" >&6
14829
14830 if test "x$enable_echo" = xyes; then
14831         ECHO_LINK=
14832 else
14833         ECHO_LINK='@ echo linking $@ ... ;'
14834         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14835         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14836 fi
14837
14838 # --disable-stripping is used for debugging
14839
14840 echo "$as_me:14840: checking if you want to install stripped executables" >&5
14841 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14842
14843 # Check whether --enable-stripping or --disable-stripping was given.
14844 if test "${enable_stripping+set}" = set; then
14845   enableval="$enable_stripping"
14846   test "$enableval" != no && enableval=yes
14847         if test "$enableval" != "yes" ; then
14848     with_stripping=no
14849         else
14850                 with_stripping=yes
14851         fi
14852 else
14853   enableval=yes
14854         with_stripping=yes
14855
14856 fi;
14857 echo "$as_me:14857: result: $with_stripping" >&5
14858 echo "${ECHO_T}$with_stripping" >&6
14859
14860 if test "$with_stripping" = yes
14861 then
14862         INSTALL_OPT_S="-s"
14863 else
14864         INSTALL_OPT_S=
14865 fi
14866
14867 : ${INSTALL:=install}
14868 echo "$as_me:14868: checking if install accepts -p option" >&5
14869 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14870 if test "${cf_cv_install_p+set}" = set; then
14871   echo $ECHO_N "(cached) $ECHO_C" >&6
14872 else
14873
14874         rm -rf conftest*
14875         date >conftest.in
14876         mkdir conftest.out
14877         sleep 3
14878         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14879         then
14880                 if test -f conftest.out/conftest.in
14881                 then
14882                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14883                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14884                         if test -s conftest.err
14885                         then
14886                                 cf_cv_install_p=no
14887                         else
14888                                 cf_cv_install_p=yes
14889                         fi
14890                 else
14891                         cf_cv_install_p=no
14892                 fi
14893         else
14894                 cf_cv_install_p=no
14895         fi
14896         rm -rf conftest*
14897
14898 fi
14899 echo "$as_me:14899: result: $cf_cv_install_p" >&5
14900 echo "${ECHO_T}$cf_cv_install_p" >&6
14901
14902 echo "$as_me:14902: checking if install needs to be told about ownership" >&5
14903 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14904 case `$ac_config_guess` in
14905 (*minix)
14906         with_install_o=yes
14907         ;;
14908 (*)
14909         with_install_o=no
14910         ;;
14911 esac
14912
14913 echo "$as_me:14913: result: $with_install_o" >&5
14914 echo "${ECHO_T}$with_install_o" >&6
14915 if test "x$with_install_o" = xyes
14916 then
14917         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'`
14918 else
14919         INSTALL_OPT_O=
14920 fi
14921
14922 # If we're avoiding relinking of shared libraries during install, that is to
14923 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14924 # the install program has "-p" (for preserving timestamps).
14925 cf_cv_do_reranlib=yes
14926 if test "x$cf_cv_install_p" = xyes
14927 then
14928         if test "x$cf_cv_do_relink" != xyes
14929         then
14930                 cf_cv_do_reranlib=no
14931                 INSTALL_OPT_P="-p"
14932                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14933         fi
14934 fi
14935
14936 ###     use option --enable-warnings to turn on all gcc warnings
14937 echo "$as_me:14937: checking if you want to see compiler warnings" >&5
14938 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14939
14940 # Check whether --enable-warnings or --disable-warnings was given.
14941 if test "${enable_warnings+set}" = set; then
14942   enableval="$enable_warnings"
14943   with_warnings=$enableval
14944 fi;
14945 echo "$as_me:14945: result: $with_warnings" >&5
14946 echo "${ECHO_T}$with_warnings" >&6
14947
14948 if test "x$with_warnings" = "xyes"; then
14949
14950         ADAFLAGS="$ADAFLAGS -gnatg"
14951
14952 INTEL_COMPILER=no
14953
14954 if test "$GCC" = yes ; then
14955         case $host_os in
14956         (linux*|gnu*)
14957                 echo "$as_me:14957: checking if this is really Intel C compiler" >&5
14958 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14959                 cf_save_CFLAGS="$CFLAGS"
14960                 CFLAGS="$CFLAGS -no-gcc"
14961                 cat >conftest.$ac_ext <<_ACEOF
14962 #line 14962 "configure"
14963 #include "confdefs.h"
14964
14965 int
14966 main (void)
14967 {
14968
14969 #ifdef __INTEL_COMPILER
14970 #else
14971 make an error
14972 #endif
14973
14974   ;
14975   return 0;
14976 }
14977 _ACEOF
14978 rm -f conftest.$ac_objext
14979 if { (eval echo "$as_me:14979: \"$ac_compile\"") >&5
14980   (eval $ac_compile) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); } &&
14984          { ac_try='test -s conftest.$ac_objext'
14985   { (eval echo "$as_me:14985: \"$ac_try\"") >&5
14986   (eval $ac_try) 2>&5
14987   ac_status=$?
14988   echo "$as_me:14988: \$? = $ac_status" >&5
14989   (exit $ac_status); }; }; then
14990   INTEL_COMPILER=yes
14991 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14992
14993 else
14994   echo "$as_me: failed program was:" >&5
14995 cat conftest.$ac_ext >&5
14996 fi
14997 rm -f conftest.$ac_objext conftest.$ac_ext
14998                 CFLAGS="$cf_save_CFLAGS"
14999                 echo "$as_me:14999: result: $INTEL_COMPILER" >&5
15000 echo "${ECHO_T}$INTEL_COMPILER" >&6
15001                 ;;
15002         esac
15003 fi
15004
15005 CLANG_COMPILER=no
15006
15007 if test "$GCC" = yes ; then
15008         echo "$as_me:15008: checking if this is really Clang C compiler" >&5
15009 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15010         cf_save_CFLAGS="$CFLAGS"
15011         CFLAGS="$CFLAGS -Qunused-arguments"
15012         cat >conftest.$ac_ext <<_ACEOF
15013 #line 15013 "configure"
15014 #include "confdefs.h"
15015
15016 int
15017 main (void)
15018 {
15019
15020 #ifdef __clang__
15021 #else
15022 make an error
15023 #endif
15024
15025   ;
15026   return 0;
15027 }
15028 _ACEOF
15029 rm -f conftest.$ac_objext
15030 if { (eval echo "$as_me:15030: \"$ac_compile\"") >&5
15031   (eval $ac_compile) 2>&5
15032   ac_status=$?
15033   echo "$as_me:15033: \$? = $ac_status" >&5
15034   (exit $ac_status); } &&
15035          { ac_try='test -s conftest.$ac_objext'
15036   { (eval echo "$as_me:15036: \"$ac_try\"") >&5
15037   (eval $ac_try) 2>&5
15038   ac_status=$?
15039   echo "$as_me:15039: \$? = $ac_status" >&5
15040   (exit $ac_status); }; }; then
15041   CLANG_COMPILER=yes
15042 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15043
15044 else
15045   echo "$as_me: failed program was:" >&5
15046 cat conftest.$ac_ext >&5
15047 fi
15048 rm -f conftest.$ac_objext conftest.$ac_ext
15049         CFLAGS="$cf_save_CFLAGS"
15050         echo "$as_me:15050: result: $CLANG_COMPILER" >&5
15051 echo "${ECHO_T}$CLANG_COMPILER" >&6
15052 fi
15053
15054 cat > conftest.$ac_ext <<EOF
15055 #line 15055 "${as_me:-configure}"
15056 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15057 EOF
15058
15059 if test "$INTEL_COMPILER" = yes
15060 then
15061 # The "-wdXXX" options suppress warnings:
15062 # remark #1419: external declaration in primary source file
15063 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15064 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15065 # remark #193: zero used for undefined preprocessing identifier
15066 # remark #593: variable "curs_sb_left_arrow" was set but never used
15067 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15068 # remark #869: parameter "tw" was never referenced
15069 # remark #981: operands are evaluated in unspecified order
15070 # warning #279: controlling expression is constant
15071
15072         { echo "$as_me:15072: checking for $CC warning options..." >&5
15073 echo "$as_me: checking for $CC warning options..." >&6;}
15074         cf_save_CFLAGS="$CFLAGS"
15075         EXTRA_CFLAGS="-Wall"
15076         for cf_opt in \
15077                 wd1419 \
15078                 wd1683 \
15079                 wd1684 \
15080                 wd193 \
15081                 wd593 \
15082                 wd279 \
15083                 wd810 \
15084                 wd869 \
15085                 wd981
15086         do
15087                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15088                 if { (eval echo "$as_me:15088: \"$ac_compile\"") >&5
15089   (eval $ac_compile) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); }; then
15093                         test -n "$verbose" && echo "$as_me:15093: result: ... -$cf_opt" >&5
15094 echo "${ECHO_T}... -$cf_opt" >&6
15095                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15096                 fi
15097         done
15098         CFLAGS="$cf_save_CFLAGS"
15099
15100 elif test "$GCC" = yes
15101 then
15102         { echo "$as_me:15102: checking for $CC warning options..." >&5
15103 echo "$as_me: checking for $CC warning options..." >&6;}
15104         cf_save_CFLAGS="$CFLAGS"
15105         EXTRA_CFLAGS=
15106         cf_warn_CONST=""
15107         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15108         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15109         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15110         for cf_opt in W Wall \
15111                 Wbad-function-cast \
15112                 Wcast-align \
15113                 Wcast-qual \
15114                 Wdeclaration-after-statement \
15115                 Wextra \
15116                 Winline \
15117                 Wmissing-declarations \
15118                 Wmissing-prototypes \
15119                 Wnested-externs \
15120                 Wpointer-arith \
15121                 Wshadow \
15122                 Wstrict-prototypes \
15123                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15124         do
15125                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15126                 if { (eval echo "$as_me:15126: \"$ac_compile\"") >&5
15127   (eval $ac_compile) 2>&5
15128   ac_status=$?
15129   echo "$as_me:15129: \$? = $ac_status" >&5
15130   (exit $ac_status); }; then
15131                         test -n "$verbose" && echo "$as_me:15131: result: ... -$cf_opt" >&5
15132 echo "${ECHO_T}... -$cf_opt" >&6
15133                         case $cf_opt in
15134                         (Wcast-qual)
15135
15136         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15137         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15138
15139                                 ;;
15140                         (Winline)
15141                                 case $GCC_VERSION in
15142                                 ([34].*)
15143                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15144
15145 echo "${as_me:-configure}:15145: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15146
15147                                         continue;;
15148                                 esac
15149                                 ;;
15150                         (Wpointer-arith)
15151                                 case $GCC_VERSION in
15152                                 ([12].*)
15153                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15154
15155 echo "${as_me:-configure}:15155: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15156
15157                                         continue;;
15158                                 esac
15159                                 ;;
15160                         esac
15161                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15162                 fi
15163         done
15164         CFLAGS="$cf_save_CFLAGS"
15165 fi
15166 rm -rf conftest*
15167
15168         if test "x$cf_with_cxx" = xyes ; then
15169
15170 INTEL_CPLUSPLUS=no
15171
15172 if test "$GCC" = yes ; then
15173         case $host_os in
15174         (linux*|gnu*)
15175                 echo "$as_me:15175: checking if this is really Intel C++ compiler" >&5
15176 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15177                 cf_save_CFLAGS="$CXXFLAGS"
15178                 CXXFLAGS="$CXXFLAGS -no-gcc"
15179                 cat >conftest.$ac_ext <<_ACEOF
15180 #line 15180 "configure"
15181 #include "confdefs.h"
15182
15183 int
15184 main (void)
15185 {
15186
15187 #ifdef __INTEL_COMPILER
15188 #else
15189 make an error
15190 #endif
15191
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 rm -f conftest.$ac_objext
15197 if { (eval echo "$as_me:15197: \"$ac_compile\"") >&5
15198   (eval $ac_compile) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -s conftest.$ac_objext'
15203   { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   INTEL_CPLUSPLUS=yes
15209 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15210
15211 else
15212   echo "$as_me: failed program was:" >&5
15213 cat conftest.$ac_ext >&5
15214 fi
15215 rm -f conftest.$ac_objext conftest.$ac_ext
15216                 CXXFLAGS="$cf_save_CFLAGS"
15217                 echo "$as_me:15217: result: $INTEL_CPLUSPLUS" >&5
15218 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15219                 ;;
15220         esac
15221 fi
15222
15223 CLANG_CPLUSPLUS=no
15224
15225 if test "$GCC" = yes ; then
15226         echo "$as_me:15226: checking if this is really Clang C++ compiler" >&5
15227 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15228         cf_save_CFLAGS="$CXXFLAGS"
15229         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15230         cat >conftest.$ac_ext <<_ACEOF
15231 #line 15231 "configure"
15232 #include "confdefs.h"
15233
15234 int
15235 main (void)
15236 {
15237
15238 #ifdef __clang__
15239 #else
15240 make an error
15241 #endif
15242
15243   ;
15244   return 0;
15245 }
15246 _ACEOF
15247 rm -f conftest.$ac_objext
15248 if { (eval echo "$as_me:15248: \"$ac_compile\"") >&5
15249   (eval $ac_compile) 2>&5
15250   ac_status=$?
15251   echo "$as_me:15251: \$? = $ac_status" >&5
15252   (exit $ac_status); } &&
15253          { ac_try='test -s conftest.$ac_objext'
15254   { (eval echo "$as_me:15254: \"$ac_try\"") >&5
15255   (eval $ac_try) 2>&5
15256   ac_status=$?
15257   echo "$as_me:15257: \$? = $ac_status" >&5
15258   (exit $ac_status); }; }; then
15259   CLANG_CPLUSPLUS=yes
15260 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15261
15262 else
15263   echo "$as_me: failed program was:" >&5
15264 cat conftest.$ac_ext >&5
15265 fi
15266 rm -f conftest.$ac_objext conftest.$ac_ext
15267         CXXFLAGS="$cf_save_CFLAGS"
15268         echo "$as_me:15268: result: $CLANG_CPLUSPLUS" >&5
15269 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15270 fi
15271
15272 ac_ext=cc
15273 ac_cpp='$CXXCPP $CPPFLAGS'
15274 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15275 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15276 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15277 ac_main_return=return
15278
15279 cat > conftest.$ac_ext <<EOF
15280 #line 15280 "configure"
15281 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15282 EOF
15283
15284 if test "$INTEL_CPLUSPLUS" = yes
15285 then
15286 # The "-wdXXX" options suppress warnings:
15287 # remark #1419: external declaration in primary source file
15288 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15289 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15290 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15291 # remark #193: zero used for undefined preprocessing identifier
15292 # remark #593: variable "curs_sb_left_arrow" was set but never used
15293 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15294 # remark #869: parameter "tw" was never referenced
15295 # remark #981: operands are evaluated in unspecified order
15296 # warning #269: invalid format string conversion
15297
15298         { echo "$as_me:15298: checking for $CC warning options..." >&5
15299 echo "$as_me: checking for $CC warning options..." >&6;}
15300         cf_save_CXXFLAGS="$CXXFLAGS"
15301         EXTRA_CXXFLAGS="-Wall"
15302         for cf_opt in \
15303                 wd1419 \
15304                 wd1682 \
15305                 wd1683 \
15306                 wd1684 \
15307                 wd193 \
15308                 wd279 \
15309                 wd593 \
15310                 wd810 \
15311                 wd869 \
15312                 wd981
15313         do
15314                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15315                 if { (eval echo "$as_me:15315: \"$ac_compile\"") >&5
15316   (eval $ac_compile) 2>&5
15317   ac_status=$?
15318   echo "$as_me:15318: \$? = $ac_status" >&5
15319   (exit $ac_status); }; then
15320                         test -n "$verbose" && echo "$as_me:15320: result: ... -$cf_opt" >&5
15321 echo "${ECHO_T}... -$cf_opt" >&6
15322                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15323                 fi
15324         done
15325         CXXFLAGS="$cf_save_CXXFLAGS"
15326
15327 elif test "$GXX" = yes
15328 then
15329         { echo "$as_me:15329: checking for $CXX warning options..." >&5
15330 echo "$as_me: checking for $CXX warning options..." >&6;}
15331         cf_save_CXXFLAGS="$CXXFLAGS"
15332         EXTRA_CXXFLAGS="-W -Wall"
15333         cf_gxx_extra_warnings=""
15334         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15335         case "$GCC_VERSION" in
15336         ([1-2].*)
15337                 ;;
15338         (*)
15339                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15340                 ;;
15341         esac
15342         for cf_opt in \
15343                 Wabi \
15344                 fabi-version=0 \
15345                 Wextra \
15346                 Wignored-qualifiers \
15347                 Wlogical-op \
15348                 Woverloaded-virtual \
15349                 Wsign-promo \
15350                 Wsynth \
15351                 Wold-style-cast \
15352                 Wcast-align \
15353                 Wcast-qual \
15354                 Wpointer-arith \
15355                 Wshadow \
15356                 Wundef $cf_gxx_extra_warnings Wno-unused
15357         do
15358                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15359                 if { (eval echo "$as_me:15359: \"$ac_compile\"") >&5
15360   (eval $ac_compile) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); }; then
15364                         test -n "$verbose" && echo "$as_me:15364: result: ... -$cf_opt" >&5
15365 echo "${ECHO_T}... -$cf_opt" >&6
15366                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15367                 else
15368                         test -n "$verbose" && echo "$as_me:15368: result: ... no -$cf_opt" >&5
15369 echo "${ECHO_T}... no -$cf_opt" >&6
15370                 fi
15371         done
15372         CXXFLAGS="$cf_save_CXXFLAGS"
15373 fi
15374
15375 rm -rf conftest*
15376 ac_ext=c
15377 ac_cpp='$CPP $CPPFLAGS'
15378 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15379 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15380 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15381 ac_main_return=return
15382
15383         fi
15384 fi
15385
15386 if test "$GCC" = yes
15387 then
15388 cat > conftest.i <<EOF
15389 #ifndef GCC_PRINTF
15390 #define GCC_PRINTF 0
15391 #endif
15392 #ifndef GCC_SCANF
15393 #define GCC_SCANF 0
15394 #endif
15395 #ifndef GCC_NORETURN
15396 #define GCC_NORETURN /* nothing */
15397 #endif
15398 #ifndef GCC_UNUSED
15399 #define GCC_UNUSED /* nothing */
15400 #endif
15401 EOF
15402 if test "$GCC" = yes
15403 then
15404         { echo "$as_me:15404: checking for $CC __attribute__ directives..." >&5
15405 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15406 cat > conftest.$ac_ext <<EOF
15407 #line 15407 "${as_me:-configure}"
15408 #include "confdefs.h"
15409 #include "conftest.h"
15410 #include "conftest.i"
15411 #if     GCC_PRINTF
15412 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15413 #else
15414 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15415 #endif
15416 #if     GCC_SCANF
15417 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15418 #else
15419 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15420 #endif
15421 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15422 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15423 extern void foo(void) GCC_NORETURN;
15424 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15425 EOF
15426         cf_printf_attribute=no
15427         cf_scanf_attribute=no
15428         for cf_attribute in scanf printf unused noreturn
15429         do
15430
15431 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15432
15433                 cf_directive="__attribute__(($cf_attribute))"
15434                 echo "checking for $CC $cf_directive" 1>&5
15435
15436                 case $cf_attribute in
15437                 (printf)
15438                         cf_printf_attribute=yes
15439                         cat >conftest.h <<EOF
15440 #define GCC_$cf_ATTRIBUTE 1
15441 EOF
15442                         ;;
15443                 (scanf)
15444                         cf_scanf_attribute=yes
15445                         cat >conftest.h <<EOF
15446 #define GCC_$cf_ATTRIBUTE 1
15447 EOF
15448                         ;;
15449                 (*)
15450                         cat >conftest.h <<EOF
15451 #define GCC_$cf_ATTRIBUTE $cf_directive
15452 EOF
15453                         ;;
15454                 esac
15455
15456                 if { (eval echo "$as_me:15456: \"$ac_compile\"") >&5
15457   (eval $ac_compile) 2>&5
15458   ac_status=$?
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit $ac_status); }; then
15461                         test -n "$verbose" && echo "$as_me:15461: result: ... $cf_attribute" >&5
15462 echo "${ECHO_T}... $cf_attribute" >&6
15463                         cat conftest.h >>confdefs.h
15464                         case $cf_attribute in
15465                         (noreturn)
15466
15467 cat >>confdefs.h <<EOF
15468 #define GCC_NORETURN $cf_directive
15469 EOF
15470
15471                                 ;;
15472                         (printf)
15473                                 cf_value='/* nothing */'
15474                                 if test "$cf_printf_attribute" != no ; then
15475                                         cf_value='__attribute__((format(printf,fmt,var)))'
15476
15477 cat >>confdefs.h <<\EOF
15478 #define GCC_PRINTF 1
15479 EOF
15480
15481                                 fi
15482
15483 cat >>confdefs.h <<EOF
15484 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15485 EOF
15486
15487                                 ;;
15488                         (scanf)
15489                                 cf_value='/* nothing */'
15490                                 if test "$cf_scanf_attribute" != no ; then
15491                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15492
15493 cat >>confdefs.h <<\EOF
15494 #define GCC_SCANF 1
15495 EOF
15496
15497                                 fi
15498
15499 cat >>confdefs.h <<EOF
15500 #define GCC_SCANFLIKE(fmt,var) $cf_value
15501 EOF
15502
15503                                 ;;
15504                         (unused)
15505
15506 cat >>confdefs.h <<EOF
15507 #define GCC_UNUSED $cf_directive
15508 EOF
15509
15510                                 ;;
15511                         esac
15512                 fi
15513         done
15514 else
15515         fgrep define conftest.i >>confdefs.h
15516 fi
15517 rm -rf conftest*
15518 fi
15519
15520 echo "$as_me:15520: checking if you want to work around bogus compiler/loader warnings" >&5
15521 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15522
15523 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15524 if test "${enable_string_hacks+set}" = set; then
15525   enableval="$enable_string_hacks"
15526   with_string_hacks=$enableval
15527 else
15528   with_string_hacks=no
15529 fi;
15530 echo "$as_me:15530: result: $with_string_hacks" >&5
15531 echo "${ECHO_T}$with_string_hacks" >&6
15532
15533 if test "x$with_string_hacks" = "xyes"; then
15534
15535 cat >>confdefs.h <<\EOF
15536 #define USE_STRING_HACKS 1
15537 EOF
15538
15539         { echo "$as_me:15539: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15540 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15541         echo "$as_me:15541: checking for strlcat" >&5
15542 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15543 if test "${ac_cv_func_strlcat+set}" = set; then
15544   echo $ECHO_N "(cached) $ECHO_C" >&6
15545 else
15546   cat >conftest.$ac_ext <<_ACEOF
15547 #line 15547 "configure"
15548 #include "confdefs.h"
15549 #define strlcat autoconf_temporary
15550 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15551 #undef strlcat
15552
15553 #ifdef __cplusplus
15554 extern "C"
15555 #endif
15556
15557 /* We use char because int might match the return type of a gcc2
15558    builtin and then its argument prototype would still apply.  */
15559 char strlcat (void);
15560
15561 int
15562 main (void)
15563 {
15564
15565 /* The GNU C library defines stubs for functions which it implements
15566     to always fail with ENOSYS.  Some functions are actually named
15567     something starting with __ and the normal name is an alias.  */
15568 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15569 #error found stub for strlcat
15570 #endif
15571
15572         return strlcat ();
15573   ;
15574   return 0;
15575 }
15576 _ACEOF
15577 rm -f conftest.$ac_objext conftest$ac_exeext
15578 if { (eval echo "$as_me:15578: \"$ac_link\"") >&5
15579   (eval $ac_link) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); } &&
15583          { ac_try='test -s conftest$ac_exeext'
15584   { (eval echo "$as_me:15584: \"$ac_try\"") >&5
15585   (eval $ac_try) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); }; }; then
15589   ac_cv_func_strlcat=yes
15590 else
15591   echo "$as_me: failed program was:" >&5
15592 cat conftest.$ac_ext >&5
15593 ac_cv_func_strlcat=no
15594 fi
15595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15596 fi
15597 echo "$as_me:15597: result: $ac_cv_func_strlcat" >&5
15598 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15599 if test $ac_cv_func_strlcat = yes; then
15600
15601 cat >>confdefs.h <<\EOF
15602 #define HAVE_STRLCAT 1
15603 EOF
15604
15605 else
15606
15607                 echo "$as_me:15607: checking for strlcat in -lbsd" >&5
15608 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15609 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15610   echo $ECHO_N "(cached) $ECHO_C" >&6
15611 else
15612   ac_check_lib_save_LIBS=$LIBS
15613 LIBS="-lbsd  $LIBS"
15614 cat >conftest.$ac_ext <<_ACEOF
15615 #line 15615 "configure"
15616 #include "confdefs.h"
15617
15618 /* Override any gcc2 internal prototype to avoid an error.  */
15619 #ifdef __cplusplus
15620 extern "C"
15621 #endif
15622 /* We use char because int might match the return type of a gcc2
15623    builtin and then its argument prototype would still apply.  */
15624 char strlcat ();
15625 int
15626 main (void)
15627 {
15628 strlcat ();
15629   ;
15630   return 0;
15631 }
15632 _ACEOF
15633 rm -f conftest.$ac_objext conftest$ac_exeext
15634 if { (eval echo "$as_me:15634: \"$ac_link\"") >&5
15635   (eval $ac_link) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); } &&
15639          { ac_try='test -s conftest$ac_exeext'
15640   { (eval echo "$as_me:15640: \"$ac_try\"") >&5
15641   (eval $ac_try) 2>&5
15642   ac_status=$?
15643   echo "$as_me:15643: \$? = $ac_status" >&5
15644   (exit $ac_status); }; }; then
15645   ac_cv_lib_bsd_strlcat=yes
15646 else
15647   echo "$as_me: failed program was:" >&5
15648 cat conftest.$ac_ext >&5
15649 ac_cv_lib_bsd_strlcat=no
15650 fi
15651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15652 LIBS=$ac_check_lib_save_LIBS
15653 fi
15654 echo "$as_me:15654: result: $ac_cv_lib_bsd_strlcat" >&5
15655 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15656 if test $ac_cv_lib_bsd_strlcat = yes; then
15657
15658 cf_add_libs="-lbsd"
15659 # Filter out duplicates - this happens with badly-designed ".pc" files...
15660 for cf_add_1lib in $LIBS
15661 do
15662         for cf_add_2lib in $cf_add_libs
15663         do
15664                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15665                 then
15666                         cf_add_1lib=
15667                         break
15668                 fi
15669         done
15670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15671 done
15672 LIBS="$cf_add_libs"
15673
15674 for ac_header in bsd/string.h
15675 do
15676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15677 echo "$as_me:15677: checking for $ac_header" >&5
15678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15680   echo $ECHO_N "(cached) $ECHO_C" >&6
15681 else
15682   cat >conftest.$ac_ext <<_ACEOF
15683 #line 15683 "configure"
15684 #include "confdefs.h"
15685 #include <$ac_header>
15686 _ACEOF
15687 if { (eval echo "$as_me:15687: \"$ac_cpp conftest.$ac_ext\"") >&5
15688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15689   ac_status=$?
15690   egrep -v '^ *\+' conftest.er1 >conftest.err
15691   rm -f conftest.er1
15692   cat conftest.err >&5
15693   echo "$as_me:15693: \$? = $ac_status" >&5
15694   (exit $ac_status); } >/dev/null; then
15695   if test -s conftest.err; then
15696     ac_cpp_err=$ac_c_preproc_warn_flag
15697   else
15698     ac_cpp_err=
15699   fi
15700 else
15701   ac_cpp_err=yes
15702 fi
15703 if test -z "$ac_cpp_err"; then
15704   eval "$as_ac_Header=yes"
15705 else
15706   echo "$as_me: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   eval "$as_ac_Header=no"
15709 fi
15710 rm -f conftest.err conftest.$ac_ext
15711 fi
15712 echo "$as_me:15712: result: `eval echo '${'$as_ac_Header'}'`" >&5
15713 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15714 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15715   cat >>confdefs.h <<EOF
15716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15717 EOF
15718
15719 fi
15720 done
15721
15722 cat >>confdefs.h <<\EOF
15723 #define HAVE_STRLCAT 1
15724 EOF
15725
15726 fi
15727
15728 fi
15729
15730 for ac_func in strlcpy snprintf
15731 do
15732 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15733 echo "$as_me:15733: checking for $ac_func" >&5
15734 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15735 if eval "test \"\${$as_ac_var+set}\" = set"; then
15736   echo $ECHO_N "(cached) $ECHO_C" >&6
15737 else
15738   cat >conftest.$ac_ext <<_ACEOF
15739 #line 15739 "configure"
15740 #include "confdefs.h"
15741 #define $ac_func autoconf_temporary
15742 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15743 #undef $ac_func
15744
15745 #ifdef __cplusplus
15746 extern "C"
15747 #endif
15748
15749 /* We use char because int might match the return type of a gcc2
15750    builtin and then its argument prototype would still apply.  */
15751 char $ac_func (void);
15752
15753 int
15754 main (void)
15755 {
15756
15757 /* The GNU C library defines stubs for functions which it implements
15758     to always fail with ENOSYS.  Some functions are actually named
15759     something starting with __ and the normal name is an alias.  */
15760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15761 #error found stub for $ac_func
15762 #endif
15763
15764         return $ac_func ();
15765   ;
15766   return 0;
15767 }
15768 _ACEOF
15769 rm -f conftest.$ac_objext conftest$ac_exeext
15770 if { (eval echo "$as_me:15770: \"$ac_link\"") >&5
15771   (eval $ac_link) 2>&5
15772   ac_status=$?
15773   echo "$as_me:15773: \$? = $ac_status" >&5
15774   (exit $ac_status); } &&
15775          { ac_try='test -s conftest$ac_exeext'
15776   { (eval echo "$as_me:15776: \"$ac_try\"") >&5
15777   (eval $ac_try) 2>&5
15778   ac_status=$?
15779   echo "$as_me:15779: \$? = $ac_status" >&5
15780   (exit $ac_status); }; }; then
15781   eval "$as_ac_var=yes"
15782 else
15783   echo "$as_me: failed program was:" >&5
15784 cat conftest.$ac_ext >&5
15785 eval "$as_ac_var=no"
15786 fi
15787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15788 fi
15789 echo "$as_me:15789: result: `eval echo '${'$as_ac_var'}'`" >&5
15790 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15791 if test `eval echo '${'$as_ac_var'}'` = yes; then
15792   cat >>confdefs.h <<EOF
15793 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15794 EOF
15795
15796 fi
15797 done
15798
15799 fi
15800
15801 ###     use option --enable-assertions to turn on generation of assertion code
15802 echo "$as_me:15802: checking if you want to enable runtime assertions" >&5
15803 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15804
15805 # Check whether --enable-assertions or --disable-assertions was given.
15806 if test "${enable_assertions+set}" = set; then
15807   enableval="$enable_assertions"
15808   with_assertions=$enableval
15809 else
15810   with_assertions=no
15811 fi;
15812 echo "$as_me:15812: result: $with_assertions" >&5
15813 echo "${ECHO_T}$with_assertions" >&6
15814 if test -n "$GCC"
15815 then
15816         if test "$with_assertions" = no
15817         then
15818                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15819         else
15820
15821         ADAFLAGS="$ADAFLAGS -gnata"
15822
15823         fi
15824 fi
15825
15826 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15827
15828 echo "$as_me:15828: checking if you want to use dmalloc for testing" >&5
15829 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15830
15831 # Check whether --with-dmalloc or --without-dmalloc was given.
15832 if test "${with_dmalloc+set}" = set; then
15833   withval="$with_dmalloc"
15834
15835 cat >>confdefs.h <<EOF
15836 #define USE_DMALLOC 1
15837 EOF
15838
15839         : ${with_cflags:=-g}
15840         : ${with_no_leaks:=yes}
15841          with_dmalloc=yes
15842 else
15843   with_dmalloc=
15844 fi;
15845 echo "$as_me:15845: result: ${with_dmalloc:-no}" >&5
15846 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15847
15848 case .$with_cflags in
15849 (.*-g*)
15850         case .$CFLAGS in
15851         (.*-g*)
15852                 ;;
15853         (*)
15854
15855 cf_fix_cppflags=no
15856 cf_new_cflags=
15857 cf_new_cppflags=
15858 cf_new_extra_cppflags=
15859
15860 for cf_add_cflags in -g
15861 do
15862 case $cf_fix_cppflags in
15863 (no)
15864         case $cf_add_cflags in
15865         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15866                 case $cf_add_cflags in
15867                 (-D*)
15868                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15869
15870                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15871                                 && test -z "${cf_tst_cflags}" \
15872                                 && cf_fix_cppflags=yes
15873
15874                         if test $cf_fix_cppflags = yes ; then
15875
15876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15878
15879                                 continue
15880                         elif test "${cf_tst_cflags}" = "\"'" ; then
15881
15882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15884
15885                                 continue
15886                         fi
15887                         ;;
15888                 esac
15889                 case "$CPPFLAGS" in
15890                 (*$cf_add_cflags)
15891                         ;;
15892                 (*)
15893                         case $cf_add_cflags in
15894                         (-D*)
15895                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15896
15897 CPPFLAGS=`echo "$CPPFLAGS" | \
15898         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15899                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15900
15901                                 ;;
15902                         esac
15903
15904         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15905         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15906
15907                         ;;
15908                 esac
15909                 ;;
15910         (*)
15911
15912         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15913         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15914
15915                 ;;
15916         esac
15917         ;;
15918 (yes)
15919
15920         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15921         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15922
15923         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15924
15925         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15926                 && test -z "${cf_tst_cflags}" \
15927                 && cf_fix_cppflags=no
15928         ;;
15929 esac
15930 done
15931
15932 if test -n "$cf_new_cflags" ; then
15933
15934         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15935         CFLAGS="${CFLAGS}$cf_new_cflags"
15936
15937 fi
15938
15939 if test -n "$cf_new_cppflags" ; then
15940
15941         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15942         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15943
15944 fi
15945
15946 if test -n "$cf_new_extra_cppflags" ; then
15947
15948         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15949         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15950
15951 fi
15952
15953                 ;;
15954         esac
15955         ;;
15956 esac
15957
15958 if test "$with_dmalloc" = yes ; then
15959         echo "$as_me:15959: checking for dmalloc.h" >&5
15960 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15961 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15962   echo $ECHO_N "(cached) $ECHO_C" >&6
15963 else
15964   cat >conftest.$ac_ext <<_ACEOF
15965 #line 15965 "configure"
15966 #include "confdefs.h"
15967 #include <dmalloc.h>
15968 _ACEOF
15969 if { (eval echo "$as_me:15969: \"$ac_cpp conftest.$ac_ext\"") >&5
15970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15971   ac_status=$?
15972   egrep -v '^ *\+' conftest.er1 >conftest.err
15973   rm -f conftest.er1
15974   cat conftest.err >&5
15975   echo "$as_me:15975: \$? = $ac_status" >&5
15976   (exit $ac_status); } >/dev/null; then
15977   if test -s conftest.err; then
15978     ac_cpp_err=$ac_c_preproc_warn_flag
15979   else
15980     ac_cpp_err=
15981   fi
15982 else
15983   ac_cpp_err=yes
15984 fi
15985 if test -z "$ac_cpp_err"; then
15986   ac_cv_header_dmalloc_h=yes
15987 else
15988   echo "$as_me: failed program was:" >&5
15989   cat conftest.$ac_ext >&5
15990   ac_cv_header_dmalloc_h=no
15991 fi
15992 rm -f conftest.err conftest.$ac_ext
15993 fi
15994 echo "$as_me:15994: result: $ac_cv_header_dmalloc_h" >&5
15995 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15996 if test $ac_cv_header_dmalloc_h = yes; then
15997
15998 echo "$as_me:15998: checking for dmalloc_debug in -ldmalloc" >&5
15999 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16000 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16001   echo $ECHO_N "(cached) $ECHO_C" >&6
16002 else
16003   ac_check_lib_save_LIBS=$LIBS
16004 LIBS="-ldmalloc  $LIBS"
16005 cat >conftest.$ac_ext <<_ACEOF
16006 #line 16006 "configure"
16007 #include "confdefs.h"
16008
16009 /* Override any gcc2 internal prototype to avoid an error.  */
16010 #ifdef __cplusplus
16011 extern "C"
16012 #endif
16013 /* We use char because int might match the return type of a gcc2
16014    builtin and then its argument prototype would still apply.  */
16015 char dmalloc_debug ();
16016 int
16017 main (void)
16018 {
16019 dmalloc_debug ();
16020   ;
16021   return 0;
16022 }
16023 _ACEOF
16024 rm -f conftest.$ac_objext conftest$ac_exeext
16025 if { (eval echo "$as_me:16025: \"$ac_link\"") >&5
16026   (eval $ac_link) 2>&5
16027   ac_status=$?
16028   echo "$as_me:16028: \$? = $ac_status" >&5
16029   (exit $ac_status); } &&
16030          { ac_try='test -s conftest$ac_exeext'
16031   { (eval echo "$as_me:16031: \"$ac_try\"") >&5
16032   (eval $ac_try) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); }; }; then
16036   ac_cv_lib_dmalloc_dmalloc_debug=yes
16037 else
16038   echo "$as_me: failed program was:" >&5
16039 cat conftest.$ac_ext >&5
16040 ac_cv_lib_dmalloc_dmalloc_debug=no
16041 fi
16042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16043 LIBS=$ac_check_lib_save_LIBS
16044 fi
16045 echo "$as_me:16045: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16046 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16047 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16048   cat >>confdefs.h <<EOF
16049 #define HAVE_LIBDMALLOC 1
16050 EOF
16051
16052   LIBS="-ldmalloc $LIBS"
16053
16054 fi
16055
16056 fi
16057
16058 fi
16059
16060 echo "$as_me:16060: checking if you want to use dbmalloc for testing" >&5
16061 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16062
16063 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16064 if test "${with_dbmalloc+set}" = set; then
16065   withval="$with_dbmalloc"
16066
16067 cat >>confdefs.h <<EOF
16068 #define USE_DBMALLOC 1
16069 EOF
16070
16071         : ${with_cflags:=-g}
16072         : ${with_no_leaks:=yes}
16073          with_dbmalloc=yes
16074 else
16075   with_dbmalloc=
16076 fi;
16077 echo "$as_me:16077: result: ${with_dbmalloc:-no}" >&5
16078 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16079
16080 case .$with_cflags in
16081 (.*-g*)
16082         case .$CFLAGS in
16083         (.*-g*)
16084                 ;;
16085         (*)
16086
16087 cf_fix_cppflags=no
16088 cf_new_cflags=
16089 cf_new_cppflags=
16090 cf_new_extra_cppflags=
16091
16092 for cf_add_cflags in -g
16093 do
16094 case $cf_fix_cppflags in
16095 (no)
16096         case $cf_add_cflags in
16097         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16098                 case $cf_add_cflags in
16099                 (-D*)
16100                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16101
16102                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16103                                 && test -z "${cf_tst_cflags}" \
16104                                 && cf_fix_cppflags=yes
16105
16106                         if test $cf_fix_cppflags = yes ; then
16107
16108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16110
16111                                 continue
16112                         elif test "${cf_tst_cflags}" = "\"'" ; then
16113
16114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16116
16117                                 continue
16118                         fi
16119                         ;;
16120                 esac
16121                 case "$CPPFLAGS" in
16122                 (*$cf_add_cflags)
16123                         ;;
16124                 (*)
16125                         case $cf_add_cflags in
16126                         (-D*)
16127                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16128
16129 CPPFLAGS=`echo "$CPPFLAGS" | \
16130         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16131                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16132
16133                                 ;;
16134                         esac
16135
16136         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16137         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16138
16139                         ;;
16140                 esac
16141                 ;;
16142         (*)
16143
16144         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16145         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16146
16147                 ;;
16148         esac
16149         ;;
16150 (yes)
16151
16152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16154
16155         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16156
16157         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16158                 && test -z "${cf_tst_cflags}" \
16159                 && cf_fix_cppflags=no
16160         ;;
16161 esac
16162 done
16163
16164 if test -n "$cf_new_cflags" ; then
16165
16166         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16167         CFLAGS="${CFLAGS}$cf_new_cflags"
16168
16169 fi
16170
16171 if test -n "$cf_new_cppflags" ; then
16172
16173         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16174         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16175
16176 fi
16177
16178 if test -n "$cf_new_extra_cppflags" ; then
16179
16180         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16181         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16182
16183 fi
16184
16185                 ;;
16186         esac
16187         ;;
16188 esac
16189
16190 if test "$with_dbmalloc" = yes ; then
16191         echo "$as_me:16191: checking for dbmalloc.h" >&5
16192 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16193 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16194   echo $ECHO_N "(cached) $ECHO_C" >&6
16195 else
16196   cat >conftest.$ac_ext <<_ACEOF
16197 #line 16197 "configure"
16198 #include "confdefs.h"
16199 #include <dbmalloc.h>
16200 _ACEOF
16201 if { (eval echo "$as_me:16201: \"$ac_cpp conftest.$ac_ext\"") >&5
16202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16203   ac_status=$?
16204   egrep -v '^ *\+' conftest.er1 >conftest.err
16205   rm -f conftest.er1
16206   cat conftest.err >&5
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit $ac_status); } >/dev/null; then
16209   if test -s conftest.err; then
16210     ac_cpp_err=$ac_c_preproc_warn_flag
16211   else
16212     ac_cpp_err=
16213   fi
16214 else
16215   ac_cpp_err=yes
16216 fi
16217 if test -z "$ac_cpp_err"; then
16218   ac_cv_header_dbmalloc_h=yes
16219 else
16220   echo "$as_me: failed program was:" >&5
16221   cat conftest.$ac_ext >&5
16222   ac_cv_header_dbmalloc_h=no
16223 fi
16224 rm -f conftest.err conftest.$ac_ext
16225 fi
16226 echo "$as_me:16226: result: $ac_cv_header_dbmalloc_h" >&5
16227 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16228 if test $ac_cv_header_dbmalloc_h = yes; then
16229
16230 echo "$as_me:16230: checking for debug_malloc in -ldbmalloc" >&5
16231 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16232 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16233   echo $ECHO_N "(cached) $ECHO_C" >&6
16234 else
16235   ac_check_lib_save_LIBS=$LIBS
16236 LIBS="-ldbmalloc  $LIBS"
16237 cat >conftest.$ac_ext <<_ACEOF
16238 #line 16238 "configure"
16239 #include "confdefs.h"
16240
16241 /* Override any gcc2 internal prototype to avoid an error.  */
16242 #ifdef __cplusplus
16243 extern "C"
16244 #endif
16245 /* We use char because int might match the return type of a gcc2
16246    builtin and then its argument prototype would still apply.  */
16247 char debug_malloc ();
16248 int
16249 main (void)
16250 {
16251 debug_malloc ();
16252   ;
16253   return 0;
16254 }
16255 _ACEOF
16256 rm -f conftest.$ac_objext conftest$ac_exeext
16257 if { (eval echo "$as_me:16257: \"$ac_link\"") >&5
16258   (eval $ac_link) 2>&5
16259   ac_status=$?
16260   echo "$as_me:16260: \$? = $ac_status" >&5
16261   (exit $ac_status); } &&
16262          { ac_try='test -s conftest$ac_exeext'
16263   { (eval echo "$as_me:16263: \"$ac_try\"") >&5
16264   (eval $ac_try) 2>&5
16265   ac_status=$?
16266   echo "$as_me:16266: \$? = $ac_status" >&5
16267   (exit $ac_status); }; }; then
16268   ac_cv_lib_dbmalloc_debug_malloc=yes
16269 else
16270   echo "$as_me: failed program was:" >&5
16271 cat conftest.$ac_ext >&5
16272 ac_cv_lib_dbmalloc_debug_malloc=no
16273 fi
16274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16275 LIBS=$ac_check_lib_save_LIBS
16276 fi
16277 echo "$as_me:16277: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16278 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16279 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16280   cat >>confdefs.h <<EOF
16281 #define HAVE_LIBDBMALLOC 1
16282 EOF
16283
16284   LIBS="-ldbmalloc $LIBS"
16285
16286 fi
16287
16288 fi
16289
16290 fi
16291
16292 echo "$as_me:16292: checking if you want to use valgrind for testing" >&5
16293 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16294
16295 # Check whether --with-valgrind or --without-valgrind was given.
16296 if test "${with_valgrind+set}" = set; then
16297   withval="$with_valgrind"
16298
16299 cat >>confdefs.h <<EOF
16300 #define USE_VALGRIND 1
16301 EOF
16302
16303         : ${with_cflags:=-g}
16304         : ${with_no_leaks:=yes}
16305          with_valgrind=yes
16306 else
16307   with_valgrind=
16308 fi;
16309 echo "$as_me:16309: result: ${with_valgrind:-no}" >&5
16310 echo "${ECHO_T}${with_valgrind:-no}" >&6
16311
16312 case .$with_cflags in
16313 (.*-g*)
16314         case .$CFLAGS in
16315         (.*-g*)
16316                 ;;
16317         (*)
16318
16319 cf_fix_cppflags=no
16320 cf_new_cflags=
16321 cf_new_cppflags=
16322 cf_new_extra_cppflags=
16323
16324 for cf_add_cflags in -g
16325 do
16326 case $cf_fix_cppflags in
16327 (no)
16328         case $cf_add_cflags in
16329         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16330                 case $cf_add_cflags in
16331                 (-D*)
16332                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16333
16334                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16335                                 && test -z "${cf_tst_cflags}" \
16336                                 && cf_fix_cppflags=yes
16337
16338                         if test $cf_fix_cppflags = yes ; then
16339
16340         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16341         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16342
16343                                 continue
16344                         elif test "${cf_tst_cflags}" = "\"'" ; then
16345
16346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16348
16349                                 continue
16350                         fi
16351                         ;;
16352                 esac
16353                 case "$CPPFLAGS" in
16354                 (*$cf_add_cflags)
16355                         ;;
16356                 (*)
16357                         case $cf_add_cflags in
16358                         (-D*)
16359                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16360
16361 CPPFLAGS=`echo "$CPPFLAGS" | \
16362         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16363                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16364
16365                                 ;;
16366                         esac
16367
16368         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16369         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16370
16371                         ;;
16372                 esac
16373                 ;;
16374         (*)
16375
16376         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16377         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16378
16379                 ;;
16380         esac
16381         ;;
16382 (yes)
16383
16384         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16385         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16386
16387         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16388
16389         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16390                 && test -z "${cf_tst_cflags}" \
16391                 && cf_fix_cppflags=no
16392         ;;
16393 esac
16394 done
16395
16396 if test -n "$cf_new_cflags" ; then
16397
16398         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16399         CFLAGS="${CFLAGS}$cf_new_cflags"
16400
16401 fi
16402
16403 if test -n "$cf_new_cppflags" ; then
16404
16405         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16406         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16407
16408 fi
16409
16410 if test -n "$cf_new_extra_cppflags" ; then
16411
16412         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16413         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16414
16415 fi
16416
16417                 ;;
16418         esac
16419         ;;
16420 esac
16421
16422 echo "$as_me:16422: checking if you want to perform memory-leak testing" >&5
16423 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16424
16425 # Check whether --enable-leaks or --disable-leaks was given.
16426 if test "${enable_leaks+set}" = set; then
16427   enableval="$enable_leaks"
16428   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16429 else
16430   : ${with_no_leaks:=no}
16431 fi;
16432 echo "$as_me:16432: result: $with_no_leaks" >&5
16433 echo "${ECHO_T}$with_no_leaks" >&6
16434
16435 if test "$with_no_leaks" = yes ; then
16436
16437 cat >>confdefs.h <<\EOF
16438 #define NO_LEAKS 1
16439 EOF
16440
16441 cat >>confdefs.h <<\EOF
16442 #define YY_NO_LEAKS 1
16443 EOF
16444
16445 fi
16446
16447 cat >>confdefs.h <<\EOF
16448 #define HAVE_NC_ALLOC_H 1
16449 EOF
16450
16451 ###     use option --enable-expanded to generate certain macros as functions
16452
16453 # Check whether --enable-expanded or --disable-expanded was given.
16454 if test "${enable_expanded+set}" = set; then
16455   enableval="$enable_expanded"
16456   test "x$enableval" = xyes &&
16457 cat >>confdefs.h <<\EOF
16458 #define NCURSES_EXPANDED 1
16459 EOF
16460
16461 fi;
16462
16463 ###     use option --disable-macros to suppress macros in favor of functions
16464
16465 # Check whether --enable-macros or --disable-macros was given.
16466 if test "${enable_macros+set}" = set; then
16467   enableval="$enable_macros"
16468   test "$enableval" = no &&
16469 cat >>confdefs.h <<\EOF
16470 #define NCURSES_NOMACROS 1
16471 EOF
16472
16473 fi;
16474
16475 # Normally we only add trace() to the debug-library.  Allow this to be
16476 # extended to all models of the ncurses library:
16477 cf_all_traces=no
16478 case "$CFLAGS $CPPFLAGS" in
16479 (*-DTRACE*)
16480         cf_all_traces=yes
16481         ;;
16482 esac
16483
16484 echo "$as_me:16484: checking whether to add trace feature to all models" >&5
16485 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16486
16487 # Check whether --with-trace or --without-trace was given.
16488 if test "${with_trace+set}" = set; then
16489   withval="$with_trace"
16490   cf_with_trace=$withval
16491 else
16492   cf_with_trace=$cf_all_traces
16493 fi;
16494 echo "$as_me:16494: result: $cf_with_trace" >&5
16495 echo "${ECHO_T}$cf_with_trace" >&6
16496
16497 if test "x$cf_with_trace" = xyes ; then
16498         LIB_TRACING=all
16499         ADA_TRACE=TRUE
16500
16501 cf_fix_cppflags=no
16502 cf_new_cflags=
16503 cf_new_cppflags=
16504 cf_new_extra_cppflags=
16505
16506 for cf_add_cflags in -DTRACE
16507 do
16508 case $cf_fix_cppflags in
16509 (no)
16510         case $cf_add_cflags in
16511         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16512                 case $cf_add_cflags in
16513                 (-D*)
16514                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16515
16516                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16517                                 && test -z "${cf_tst_cflags}" \
16518                                 && cf_fix_cppflags=yes
16519
16520                         if test $cf_fix_cppflags = yes ; then
16521
16522         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16523         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16524
16525                                 continue
16526                         elif test "${cf_tst_cflags}" = "\"'" ; then
16527
16528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16530
16531                                 continue
16532                         fi
16533                         ;;
16534                 esac
16535                 case "$CPPFLAGS" in
16536                 (*$cf_add_cflags)
16537                         ;;
16538                 (*)
16539                         case $cf_add_cflags in
16540                         (-D*)
16541                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16542
16543 CPPFLAGS=`echo "$CPPFLAGS" | \
16544         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16545                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16546
16547                                 ;;
16548                         esac
16549
16550         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16551         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16552
16553                         ;;
16554                 esac
16555                 ;;
16556         (*)
16557
16558         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16559         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16560
16561                 ;;
16562         esac
16563         ;;
16564 (yes)
16565
16566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16568
16569         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16570
16571         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16572                 && test -z "${cf_tst_cflags}" \
16573                 && cf_fix_cppflags=no
16574         ;;
16575 esac
16576 done
16577
16578 if test -n "$cf_new_cflags" ; then
16579
16580         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16581         CFLAGS="${CFLAGS}$cf_new_cflags"
16582
16583 fi
16584
16585 if test -n "$cf_new_cppflags" ; then
16586
16587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16588         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16589
16590 fi
16591
16592 if test -n "$cf_new_extra_cppflags" ; then
16593
16594         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16595         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16596
16597 fi
16598
16599 cat >>confdefs.h <<\EOF
16600 #define HAVE__TRACEF 1
16601 EOF
16602
16603 else
16604         LIB_TRACING=DEBUG
16605         ADA_TRACE=FALSE
16606 fi
16607
16608 echo "$as_me:16608: checking if we want to use GNAT projects" >&5
16609 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16610
16611 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16612 if test "${enable_gnat_projects+set}" = set; then
16613   enableval="$enable_gnat_projects"
16614   test "$enableval" != no && enableval=yes
16615         if test "$enableval" != "yes" ; then
16616     enable_gnat_projects=no
16617         else
16618                 enable_gnat_projects=yes
16619         fi
16620 else
16621   enableval=yes
16622         enable_gnat_projects=yes
16623
16624 fi;
16625 echo "$as_me:16625: result: $enable_gnat_projects" >&5
16626 echo "${ECHO_T}$enable_gnat_projects" >&6
16627
16628 ###     Checks for libraries.
16629 case $cf_cv_system_name in
16630 (*mingw32*|*mingw64*)
16631         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16632         LIBS=" -lpsapi $LIBS"
16633         ;;
16634 (*)
16635 echo "$as_me:16635: checking for gettimeofday" >&5
16636 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16637 if test "${ac_cv_func_gettimeofday+set}" = set; then
16638   echo $ECHO_N "(cached) $ECHO_C" >&6
16639 else
16640   cat >conftest.$ac_ext <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643 #define gettimeofday autoconf_temporary
16644 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16645 #undef gettimeofday
16646
16647 #ifdef __cplusplus
16648 extern "C"
16649 #endif
16650
16651 /* We use char because int might match the return type of a gcc2
16652    builtin and then its argument prototype would still apply.  */
16653 char gettimeofday (void);
16654
16655 int
16656 main (void)
16657 {
16658
16659 /* The GNU C library defines stubs for functions which it implements
16660     to always fail with ENOSYS.  Some functions are actually named
16661     something starting with __ and the normal name is an alias.  */
16662 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16663 #error found stub for gettimeofday
16664 #endif
16665
16666         return gettimeofday ();
16667   ;
16668   return 0;
16669 }
16670 _ACEOF
16671 rm -f conftest.$ac_objext conftest$ac_exeext
16672 if { (eval echo "$as_me:16672: \"$ac_link\"") >&5
16673   (eval $ac_link) 2>&5
16674   ac_status=$?
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); } &&
16677          { ac_try='test -s conftest$ac_exeext'
16678   { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:16681: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   ac_cv_func_gettimeofday=yes
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 cat conftest.$ac_ext >&5
16687 ac_cv_func_gettimeofday=no
16688 fi
16689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16690 fi
16691 echo "$as_me:16691: result: $ac_cv_func_gettimeofday" >&5
16692 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16693 if test $ac_cv_func_gettimeofday = yes; then
16694
16695 cat >>confdefs.h <<\EOF
16696 #define HAVE_GETTIMEOFDAY 1
16697 EOF
16698
16699 else
16700
16701 echo "$as_me:16701: checking for gettimeofday in -lbsd" >&5
16702 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16703 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16704   echo $ECHO_N "(cached) $ECHO_C" >&6
16705 else
16706   ac_check_lib_save_LIBS=$LIBS
16707 LIBS="-lbsd  $LIBS"
16708 cat >conftest.$ac_ext <<_ACEOF
16709 #line 16709 "configure"
16710 #include "confdefs.h"
16711
16712 /* Override any gcc2 internal prototype to avoid an error.  */
16713 #ifdef __cplusplus
16714 extern "C"
16715 #endif
16716 /* We use char because int might match the return type of a gcc2
16717    builtin and then its argument prototype would still apply.  */
16718 char gettimeofday ();
16719 int
16720 main (void)
16721 {
16722 gettimeofday ();
16723   ;
16724   return 0;
16725 }
16726 _ACEOF
16727 rm -f conftest.$ac_objext conftest$ac_exeext
16728 if { (eval echo "$as_me:16728: \"$ac_link\"") >&5
16729   (eval $ac_link) 2>&5
16730   ac_status=$?
16731   echo "$as_me:16731: \$? = $ac_status" >&5
16732   (exit $ac_status); } &&
16733          { ac_try='test -s conftest$ac_exeext'
16734   { (eval echo "$as_me:16734: \"$ac_try\"") >&5
16735   (eval $ac_try) 2>&5
16736   ac_status=$?
16737   echo "$as_me:16737: \$? = $ac_status" >&5
16738   (exit $ac_status); }; }; then
16739   ac_cv_lib_bsd_gettimeofday=yes
16740 else
16741   echo "$as_me: failed program was:" >&5
16742 cat conftest.$ac_ext >&5
16743 ac_cv_lib_bsd_gettimeofday=no
16744 fi
16745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16746 LIBS=$ac_check_lib_save_LIBS
16747 fi
16748 echo "$as_me:16748: result: $ac_cv_lib_bsd_gettimeofday" >&5
16749 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16750 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16751
16752 cat >>confdefs.h <<\EOF
16753 #define HAVE_GETTIMEOFDAY 1
16754 EOF
16755
16756 cf_add_libs="-lbsd"
16757 # Filter out duplicates - this happens with badly-designed ".pc" files...
16758 for cf_add_1lib in $LIBS
16759 do
16760         for cf_add_2lib in $cf_add_libs
16761         do
16762                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16763                 then
16764                         cf_add_1lib=
16765                         break
16766                 fi
16767         done
16768         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16769 done
16770 LIBS="$cf_add_libs"
16771
16772 fi
16773
16774 fi
16775         ;;
16776 esac
16777
16778 echo "$as_me:16778: checking if -lm needed for math functions" >&5
16779 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16780 if test "${cf_cv_need_libm+set}" = set; then
16781   echo $ECHO_N "(cached) $ECHO_C" >&6
16782 else
16783
16784         cat >conftest.$ac_ext <<_ACEOF
16785 #line 16785 "configure"
16786 #include "confdefs.h"
16787
16788         #include <stdio.h>
16789         #include <stdlib.h>
16790         #include <math.h>
16791
16792 int
16793 main (void)
16794 {
16795 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16796   ;
16797   return 0;
16798 }
16799 _ACEOF
16800 rm -f conftest.$ac_objext conftest$ac_exeext
16801 if { (eval echo "$as_me:16801: \"$ac_link\"") >&5
16802   (eval $ac_link) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); } &&
16806          { ac_try='test -s conftest$ac_exeext'
16807   { (eval echo "$as_me:16807: \"$ac_try\"") >&5
16808   (eval $ac_try) 2>&5
16809   ac_status=$?
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit $ac_status); }; }; then
16812   cf_cv_need_libm=no
16813 else
16814   echo "$as_me: failed program was:" >&5
16815 cat conftest.$ac_ext >&5
16816 cf_cv_need_libm=yes
16817 fi
16818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16819 fi
16820 echo "$as_me:16820: result: $cf_cv_need_libm" >&5
16821 echo "${ECHO_T}$cf_cv_need_libm" >&6
16822 if test "$cf_cv_need_libm" = yes
16823 then
16824 MATH_LIB=-lm
16825 fi
16826
16827 ###     Checks for header files.
16828 echo "$as_me:16828: checking for ANSI C header files" >&5
16829 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16830 if test "${ac_cv_header_stdc+set}" = set; then
16831   echo $ECHO_N "(cached) $ECHO_C" >&6
16832 else
16833   cat >conftest.$ac_ext <<_ACEOF
16834 #line 16834 "configure"
16835 #include "confdefs.h"
16836 #include <stdlib.h>
16837 #include <stdarg.h>
16838 #include <string.h>
16839 #include <float.h>
16840
16841 _ACEOF
16842 if { (eval echo "$as_me:16842: \"$ac_cpp conftest.$ac_ext\"") >&5
16843   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16844   ac_status=$?
16845   egrep -v '^ *\+' conftest.er1 >conftest.err
16846   rm -f conftest.er1
16847   cat conftest.err >&5
16848   echo "$as_me:16848: \$? = $ac_status" >&5
16849   (exit $ac_status); } >/dev/null; then
16850   if test -s conftest.err; then
16851     ac_cpp_err=$ac_c_preproc_warn_flag
16852   else
16853     ac_cpp_err=
16854   fi
16855 else
16856   ac_cpp_err=yes
16857 fi
16858 if test -z "$ac_cpp_err"; then
16859   ac_cv_header_stdc=yes
16860 else
16861   echo "$as_me: failed program was:" >&5
16862   cat conftest.$ac_ext >&5
16863   ac_cv_header_stdc=no
16864 fi
16865 rm -f conftest.err conftest.$ac_ext
16866
16867 if test $ac_cv_header_stdc = yes; then
16868   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16869   cat >conftest.$ac_ext <<_ACEOF
16870 #line 16870 "configure"
16871 #include "confdefs.h"
16872 #include <string.h>
16873
16874 _ACEOF
16875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16876   egrep "memchr" >/dev/null 2>&1; then
16877   :
16878 else
16879   ac_cv_header_stdc=no
16880 fi
16881 rm -rf conftest*
16882
16883 fi
16884
16885 if test $ac_cv_header_stdc = yes; then
16886   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16887   cat >conftest.$ac_ext <<_ACEOF
16888 #line 16888 "configure"
16889 #include "confdefs.h"
16890 #include <stdlib.h>
16891
16892 _ACEOF
16893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16894   egrep "free" >/dev/null 2>&1; then
16895   :
16896 else
16897   ac_cv_header_stdc=no
16898 fi
16899 rm -rf conftest*
16900
16901 fi
16902
16903 if test $ac_cv_header_stdc = yes; then
16904   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16905   if test "$cross_compiling" = yes; then
16906   :
16907 else
16908   cat >conftest.$ac_ext <<_ACEOF
16909 #line 16909 "configure"
16910 #include "confdefs.h"
16911 #include <ctype.h>
16912 #if ((' ' & 0x0FF) == 0x020)
16913 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16914 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16915 #else
16916 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16917                      || ('j' <= (c) && (c) <= 'r') \
16918                      || ('s' <= (c) && (c) <= 'z'))
16919 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16920 #endif
16921
16922 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16923 int
16924 main (void)
16925 {
16926   int i;
16927   for (i = 0; i < 256; i++)
16928     if (XOR (islower (i), ISLOWER (i))
16929         || toupper (i) != TOUPPER (i))
16930       $ac_main_return(2);
16931   $ac_main_return (0);
16932 }
16933 _ACEOF
16934 rm -f conftest$ac_exeext
16935 if { (eval echo "$as_me:16935: \"$ac_link\"") >&5
16936   (eval $ac_link) 2>&5
16937   ac_status=$?
16938   echo "$as_me:16938: \$? = $ac_status" >&5
16939   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16940   { (eval echo "$as_me:16940: \"$ac_try\"") >&5
16941   (eval $ac_try) 2>&5
16942   ac_status=$?
16943   echo "$as_me:16943: \$? = $ac_status" >&5
16944   (exit $ac_status); }; }; then
16945   :
16946 else
16947   echo "$as_me: program exited with status $ac_status" >&5
16948 echo "$as_me: failed program was:" >&5
16949 cat conftest.$ac_ext >&5
16950 ac_cv_header_stdc=no
16951 fi
16952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16953 fi
16954 fi
16955 fi
16956 echo "$as_me:16956: result: $ac_cv_header_stdc" >&5
16957 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16958 if test $ac_cv_header_stdc = yes; then
16959
16960 cat >>confdefs.h <<\EOF
16961 #define STDC_HEADERS 1
16962 EOF
16963
16964 fi
16965
16966 ac_header_dirent=no
16967 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16968   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16969 echo "$as_me:16969: checking for $ac_hdr that defines DIR" >&5
16970 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16971 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16972   echo $ECHO_N "(cached) $ECHO_C" >&6
16973 else
16974   cat >conftest.$ac_ext <<_ACEOF
16975 #line 16975 "configure"
16976 #include "confdefs.h"
16977 #include <sys/types.h>
16978 #include <$ac_hdr>
16979
16980 int
16981 main (void)
16982 {
16983 if ((DIR *) 0)
16984 return 0;
16985   ;
16986   return 0;
16987 }
16988 _ACEOF
16989 rm -f conftest.$ac_objext
16990 if { (eval echo "$as_me:16990: \"$ac_compile\"") >&5
16991   (eval $ac_compile) 2>&5
16992   ac_status=$?
16993   echo "$as_me:16993: \$? = $ac_status" >&5
16994   (exit $ac_status); } &&
16995          { ac_try='test -s conftest.$ac_objext'
16996   { (eval echo "$as_me:16996: \"$ac_try\"") >&5
16997   (eval $ac_try) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); }; }; then
17001   eval "$as_ac_Header=yes"
17002 else
17003   echo "$as_me: failed program was:" >&5
17004 cat conftest.$ac_ext >&5
17005 eval "$as_ac_Header=no"
17006 fi
17007 rm -f conftest.$ac_objext conftest.$ac_ext
17008 fi
17009 echo "$as_me:17009: result: `eval echo '${'$as_ac_Header'}'`" >&5
17010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17012   cat >>confdefs.h <<EOF
17013 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17014 EOF
17015
17016 ac_header_dirent=$ac_hdr; break
17017 fi
17018
17019 done
17020 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17021 if test $ac_header_dirent = dirent.h; then
17022   echo "$as_me:17022: checking for opendir in -ldir" >&5
17023 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17024 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17025   echo $ECHO_N "(cached) $ECHO_C" >&6
17026 else
17027   ac_check_lib_save_LIBS=$LIBS
17028 LIBS="-ldir  $LIBS"
17029 cat >conftest.$ac_ext <<_ACEOF
17030 #line 17030 "configure"
17031 #include "confdefs.h"
17032
17033 /* Override any gcc2 internal prototype to avoid an error.  */
17034 #ifdef __cplusplus
17035 extern "C"
17036 #endif
17037 /* We use char because int might match the return type of a gcc2
17038    builtin and then its argument prototype would still apply.  */
17039 char opendir ();
17040 int
17041 main (void)
17042 {
17043 opendir ();
17044   ;
17045   return 0;
17046 }
17047 _ACEOF
17048 rm -f conftest.$ac_objext conftest$ac_exeext
17049 if { (eval echo "$as_me:17049: \"$ac_link\"") >&5
17050   (eval $ac_link) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit $ac_status); } &&
17054          { ac_try='test -s conftest$ac_exeext'
17055   { (eval echo "$as_me:17055: \"$ac_try\"") >&5
17056   (eval $ac_try) 2>&5
17057   ac_status=$?
17058   echo "$as_me:17058: \$? = $ac_status" >&5
17059   (exit $ac_status); }; }; then
17060   ac_cv_lib_dir_opendir=yes
17061 else
17062   echo "$as_me: failed program was:" >&5
17063 cat conftest.$ac_ext >&5
17064 ac_cv_lib_dir_opendir=no
17065 fi
17066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17067 LIBS=$ac_check_lib_save_LIBS
17068 fi
17069 echo "$as_me:17069: result: $ac_cv_lib_dir_opendir" >&5
17070 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17071 if test $ac_cv_lib_dir_opendir = yes; then
17072   LIBS="$LIBS -ldir"
17073 fi
17074
17075 else
17076   echo "$as_me:17076: checking for opendir in -lx" >&5
17077 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17078 if test "${ac_cv_lib_x_opendir+set}" = set; then
17079   echo $ECHO_N "(cached) $ECHO_C" >&6
17080 else
17081   ac_check_lib_save_LIBS=$LIBS
17082 LIBS="-lx  $LIBS"
17083 cat >conftest.$ac_ext <<_ACEOF
17084 #line 17084 "configure"
17085 #include "confdefs.h"
17086
17087 /* Override any gcc2 internal prototype to avoid an error.  */
17088 #ifdef __cplusplus
17089 extern "C"
17090 #endif
17091 /* We use char because int might match the return type of a gcc2
17092    builtin and then its argument prototype would still apply.  */
17093 char opendir ();
17094 int
17095 main (void)
17096 {
17097 opendir ();
17098   ;
17099   return 0;
17100 }
17101 _ACEOF
17102 rm -f conftest.$ac_objext conftest$ac_exeext
17103 if { (eval echo "$as_me:17103: \"$ac_link\"") >&5
17104   (eval $ac_link) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit $ac_status); } &&
17108          { ac_try='test -s conftest$ac_exeext'
17109   { (eval echo "$as_me:17109: \"$ac_try\"") >&5
17110   (eval $ac_try) 2>&5
17111   ac_status=$?
17112   echo "$as_me:17112: \$? = $ac_status" >&5
17113   (exit $ac_status); }; }; then
17114   ac_cv_lib_x_opendir=yes
17115 else
17116   echo "$as_me: failed program was:" >&5
17117 cat conftest.$ac_ext >&5
17118 ac_cv_lib_x_opendir=no
17119 fi
17120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17121 LIBS=$ac_check_lib_save_LIBS
17122 fi
17123 echo "$as_me:17123: result: $ac_cv_lib_x_opendir" >&5
17124 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17125 if test $ac_cv_lib_x_opendir = yes; then
17126   LIBS="$LIBS -lx"
17127 fi
17128
17129 fi
17130
17131 echo "$as_me:17131: checking whether time.h and sys/time.h may both be included" >&5
17132 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17133 if test "${ac_cv_header_time+set}" = set; then
17134   echo $ECHO_N "(cached) $ECHO_C" >&6
17135 else
17136   cat >conftest.$ac_ext <<_ACEOF
17137 #line 17137 "configure"
17138 #include "confdefs.h"
17139 #include <sys/types.h>
17140 #include <sys/time.h>
17141 #include <time.h>
17142
17143 int
17144 main (void)
17145 {
17146 if ((struct tm *) 0)
17147 return 0;
17148   ;
17149   return 0;
17150 }
17151 _ACEOF
17152 rm -f conftest.$ac_objext
17153 if { (eval echo "$as_me:17153: \"$ac_compile\"") >&5
17154   (eval $ac_compile) 2>&5
17155   ac_status=$?
17156   echo "$as_me:17156: \$? = $ac_status" >&5
17157   (exit $ac_status); } &&
17158          { ac_try='test -s conftest.$ac_objext'
17159   { (eval echo "$as_me:17159: \"$ac_try\"") >&5
17160   (eval $ac_try) 2>&5
17161   ac_status=$?
17162   echo "$as_me:17162: \$? = $ac_status" >&5
17163   (exit $ac_status); }; }; then
17164   ac_cv_header_time=yes
17165 else
17166   echo "$as_me: failed program was:" >&5
17167 cat conftest.$ac_ext >&5
17168 ac_cv_header_time=no
17169 fi
17170 rm -f conftest.$ac_objext conftest.$ac_ext
17171 fi
17172 echo "$as_me:17172: result: $ac_cv_header_time" >&5
17173 echo "${ECHO_T}$ac_cv_header_time" >&6
17174 if test $ac_cv_header_time = yes; then
17175
17176 cat >>confdefs.h <<\EOF
17177 #define TIME_WITH_SYS_TIME 1
17178 EOF
17179
17180 fi
17181
17182 cf_regex_func=no
17183
17184 cf_regex_libs="regex re"
17185 case $host_os in
17186 (mingw*)
17187         cf_regex_libs="gnurx $cf_regex_libs"
17188         ;;
17189 esac
17190
17191 echo "$as_me:17191: checking for regcomp" >&5
17192 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17193 if test "${ac_cv_func_regcomp+set}" = set; then
17194   echo $ECHO_N "(cached) $ECHO_C" >&6
17195 else
17196   cat >conftest.$ac_ext <<_ACEOF
17197 #line 17197 "configure"
17198 #include "confdefs.h"
17199 #define regcomp autoconf_temporary
17200 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17201 #undef regcomp
17202
17203 #ifdef __cplusplus
17204 extern "C"
17205 #endif
17206
17207 /* We use char because int might match the return type of a gcc2
17208    builtin and then its argument prototype would still apply.  */
17209 char regcomp (void);
17210
17211 int
17212 main (void)
17213 {
17214
17215 /* The GNU C library defines stubs for functions which it implements
17216     to always fail with ENOSYS.  Some functions are actually named
17217     something starting with __ and the normal name is an alias.  */
17218 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17219 #error found stub for regcomp
17220 #endif
17221
17222         return regcomp ();
17223   ;
17224   return 0;
17225 }
17226 _ACEOF
17227 rm -f conftest.$ac_objext conftest$ac_exeext
17228 if { (eval echo "$as_me:17228: \"$ac_link\"") >&5
17229   (eval $ac_link) 2>&5
17230   ac_status=$?
17231   echo "$as_me:17231: \$? = $ac_status" >&5
17232   (exit $ac_status); } &&
17233          { ac_try='test -s conftest$ac_exeext'
17234   { (eval echo "$as_me:17234: \"$ac_try\"") >&5
17235   (eval $ac_try) 2>&5
17236   ac_status=$?
17237   echo "$as_me:17237: \$? = $ac_status" >&5
17238   (exit $ac_status); }; }; then
17239   ac_cv_func_regcomp=yes
17240 else
17241   echo "$as_me: failed program was:" >&5
17242 cat conftest.$ac_ext >&5
17243 ac_cv_func_regcomp=no
17244 fi
17245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17246 fi
17247 echo "$as_me:17247: result: $ac_cv_func_regcomp" >&5
17248 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17249 if test $ac_cv_func_regcomp = yes; then
17250   cf_regex_func=regcomp
17251 else
17252
17253         for cf_regex_lib in $cf_regex_libs
17254         do
17255                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17256 echo "$as_me:17256: checking for regcomp in -l$cf_regex_lib" >&5
17257 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17258 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17259   echo $ECHO_N "(cached) $ECHO_C" >&6
17260 else
17261   ac_check_lib_save_LIBS=$LIBS
17262 LIBS="-l$cf_regex_lib  $LIBS"
17263 cat >conftest.$ac_ext <<_ACEOF
17264 #line 17264 "configure"
17265 #include "confdefs.h"
17266
17267 /* Override any gcc2 internal prototype to avoid an error.  */
17268 #ifdef __cplusplus
17269 extern "C"
17270 #endif
17271 /* We use char because int might match the return type of a gcc2
17272    builtin and then its argument prototype would still apply.  */
17273 char regcomp ();
17274 int
17275 main (void)
17276 {
17277 regcomp ();
17278   ;
17279   return 0;
17280 }
17281 _ACEOF
17282 rm -f conftest.$ac_objext conftest$ac_exeext
17283 if { (eval echo "$as_me:17283: \"$ac_link\"") >&5
17284   (eval $ac_link) 2>&5
17285   ac_status=$?
17286   echo "$as_me:17286: \$? = $ac_status" >&5
17287   (exit $ac_status); } &&
17288          { ac_try='test -s conftest$ac_exeext'
17289   { (eval echo "$as_me:17289: \"$ac_try\"") >&5
17290   (eval $ac_try) 2>&5
17291   ac_status=$?
17292   echo "$as_me:17292: \$? = $ac_status" >&5
17293   (exit $ac_status); }; }; then
17294   eval "$as_ac_Lib=yes"
17295 else
17296   echo "$as_me: failed program was:" >&5
17297 cat conftest.$ac_ext >&5
17298 eval "$as_ac_Lib=no"
17299 fi
17300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17301 LIBS=$ac_check_lib_save_LIBS
17302 fi
17303 echo "$as_me:17303: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17304 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17305 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17306
17307 cf_add_libs="-l$cf_regex_lib"
17308 # Filter out duplicates - this happens with badly-designed ".pc" files...
17309 for cf_add_1lib in $LIBS
17310 do
17311         for cf_add_2lib in $cf_add_libs
17312         do
17313                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17314                 then
17315                         cf_add_1lib=
17316                         break
17317                 fi
17318         done
17319         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17320 done
17321 LIBS="$cf_add_libs"
17322
17323                                 cf_regex_func=regcomp
17324                                 break
17325 fi
17326
17327         done
17328
17329 fi
17330
17331 if test "$cf_regex_func" = no ; then
17332         echo "$as_me:17332: checking for compile" >&5
17333 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17334 if test "${ac_cv_func_compile+set}" = set; then
17335   echo $ECHO_N "(cached) $ECHO_C" >&6
17336 else
17337   cat >conftest.$ac_ext <<_ACEOF
17338 #line 17338 "configure"
17339 #include "confdefs.h"
17340 #define compile autoconf_temporary
17341 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17342 #undef compile
17343
17344 #ifdef __cplusplus
17345 extern "C"
17346 #endif
17347
17348 /* We use char because int might match the return type of a gcc2
17349    builtin and then its argument prototype would still apply.  */
17350 char compile (void);
17351
17352 int
17353 main (void)
17354 {
17355
17356 /* The GNU C library defines stubs for functions which it implements
17357     to always fail with ENOSYS.  Some functions are actually named
17358     something starting with __ and the normal name is an alias.  */
17359 #if defined (__stub_compile) || defined (__stub___compile)
17360 #error found stub for compile
17361 #endif
17362
17363         return compile ();
17364   ;
17365   return 0;
17366 }
17367 _ACEOF
17368 rm -f conftest.$ac_objext conftest$ac_exeext
17369 if { (eval echo "$as_me:17369: \"$ac_link\"") >&5
17370   (eval $ac_link) 2>&5
17371   ac_status=$?
17372   echo "$as_me:17372: \$? = $ac_status" >&5
17373   (exit $ac_status); } &&
17374          { ac_try='test -s conftest$ac_exeext'
17375   { (eval echo "$as_me:17375: \"$ac_try\"") >&5
17376   (eval $ac_try) 2>&5
17377   ac_status=$?
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); }; }; then
17380   ac_cv_func_compile=yes
17381 else
17382   echo "$as_me: failed program was:" >&5
17383 cat conftest.$ac_ext >&5
17384 ac_cv_func_compile=no
17385 fi
17386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17387 fi
17388 echo "$as_me:17388: result: $ac_cv_func_compile" >&5
17389 echo "${ECHO_T}$ac_cv_func_compile" >&6
17390 if test $ac_cv_func_compile = yes; then
17391   cf_regex_func=compile
17392 else
17393
17394                 echo "$as_me:17394: checking for compile in -lgen" >&5
17395 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17396 if test "${ac_cv_lib_gen_compile+set}" = set; then
17397   echo $ECHO_N "(cached) $ECHO_C" >&6
17398 else
17399   ac_check_lib_save_LIBS=$LIBS
17400 LIBS="-lgen  $LIBS"
17401 cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404
17405 /* Override any gcc2 internal prototype to avoid an error.  */
17406 #ifdef __cplusplus
17407 extern "C"
17408 #endif
17409 /* We use char because int might match the return type of a gcc2
17410    builtin and then its argument prototype would still apply.  */
17411 char compile ();
17412 int
17413 main (void)
17414 {
17415 compile ();
17416   ;
17417   return 0;
17418 }
17419 _ACEOF
17420 rm -f conftest.$ac_objext conftest$ac_exeext
17421 if { (eval echo "$as_me:17421: \"$ac_link\"") >&5
17422   (eval $ac_link) 2>&5
17423   ac_status=$?
17424   echo "$as_me:17424: \$? = $ac_status" >&5
17425   (exit $ac_status); } &&
17426          { ac_try='test -s conftest$ac_exeext'
17427   { (eval echo "$as_me:17427: \"$ac_try\"") >&5
17428   (eval $ac_try) 2>&5
17429   ac_status=$?
17430   echo "$as_me:17430: \$? = $ac_status" >&5
17431   (exit $ac_status); }; }; then
17432   ac_cv_lib_gen_compile=yes
17433 else
17434   echo "$as_me: failed program was:" >&5
17435 cat conftest.$ac_ext >&5
17436 ac_cv_lib_gen_compile=no
17437 fi
17438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17439 LIBS=$ac_check_lib_save_LIBS
17440 fi
17441 echo "$as_me:17441: result: $ac_cv_lib_gen_compile" >&5
17442 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17443 if test $ac_cv_lib_gen_compile = yes; then
17444
17445 cf_add_libs="-lgen"
17446 # Filter out duplicates - this happens with badly-designed ".pc" files...
17447 for cf_add_1lib in $LIBS
17448 do
17449         for cf_add_2lib in $cf_add_libs
17450         do
17451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17452                 then
17453                         cf_add_1lib=
17454                         break
17455                 fi
17456         done
17457         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17458 done
17459 LIBS="$cf_add_libs"
17460
17461                                 cf_regex_func=compile
17462 fi
17463
17464 fi
17465
17466 fi
17467
17468 if test "$cf_regex_func" = no ; then
17469         { echo "$as_me:17469: WARNING: cannot find regular expression library" >&5
17470 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17471 fi
17472
17473 echo "$as_me:17473: checking for regular-expression headers" >&5
17474 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17475 if test "${cf_cv_regex_hdrs+set}" = set; then
17476   echo $ECHO_N "(cached) $ECHO_C" >&6
17477 else
17478
17479 cf_cv_regex_hdrs=no
17480 case $cf_regex_func in
17481 (compile)
17482         for cf_regex_hdr in regexp.h regexpr.h
17483         do
17484                 cat >conftest.$ac_ext <<_ACEOF
17485 #line 17485 "configure"
17486 #include "confdefs.h"
17487 #include <$cf_regex_hdr>
17488 int
17489 main (void)
17490 {
17491
17492                         char *p = compile("", "", "", 0);
17493                         int x = step("", "");
17494
17495   ;
17496   return 0;
17497 }
17498 _ACEOF
17499 rm -f conftest.$ac_objext conftest$ac_exeext
17500 if { (eval echo "$as_me:17500: \"$ac_link\"") >&5
17501   (eval $ac_link) 2>&5
17502   ac_status=$?
17503   echo "$as_me:17503: \$? = $ac_status" >&5
17504   (exit $ac_status); } &&
17505          { ac_try='test -s conftest$ac_exeext'
17506   { (eval echo "$as_me:17506: \"$ac_try\"") >&5
17507   (eval $ac_try) 2>&5
17508   ac_status=$?
17509   echo "$as_me:17509: \$? = $ac_status" >&5
17510   (exit $ac_status); }; }; then
17511
17512                         cf_cv_regex_hdrs=$cf_regex_hdr
17513                         break
17514
17515 else
17516   echo "$as_me: failed program was:" >&5
17517 cat conftest.$ac_ext >&5
17518 fi
17519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17520         done
17521         ;;
17522 (*)
17523         for cf_regex_hdr in regex.h
17524         do
17525                 cat >conftest.$ac_ext <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528 #include <sys/types.h>
17529 #include <$cf_regex_hdr>
17530 int
17531 main (void)
17532 {
17533
17534                         regex_t *p;
17535                         int x = regcomp(p, "", 0);
17536                         int y = regexec(p, "", 0, 0, 0);
17537                         regfree(p);
17538
17539   ;
17540   return 0;
17541 }
17542 _ACEOF
17543 rm -f conftest.$ac_objext conftest$ac_exeext
17544 if { (eval echo "$as_me:17544: \"$ac_link\"") >&5
17545   (eval $ac_link) 2>&5
17546   ac_status=$?
17547   echo "$as_me:17547: \$? = $ac_status" >&5
17548   (exit $ac_status); } &&
17549          { ac_try='test -s conftest$ac_exeext'
17550   { (eval echo "$as_me:17550: \"$ac_try\"") >&5
17551   (eval $ac_try) 2>&5
17552   ac_status=$?
17553   echo "$as_me:17553: \$? = $ac_status" >&5
17554   (exit $ac_status); }; }; then
17555
17556                         cf_cv_regex_hdrs=$cf_regex_hdr
17557                         break
17558
17559 else
17560   echo "$as_me: failed program was:" >&5
17561 cat conftest.$ac_ext >&5
17562 fi
17563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17564         done
17565         ;;
17566 esac
17567
17568 fi
17569 echo "$as_me:17569: result: $cf_cv_regex_hdrs" >&5
17570 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17571
17572 case $cf_cv_regex_hdrs in
17573         (no)            { echo "$as_me:17573: WARNING: no regular expression header found" >&5
17574 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17575         (regex.h)
17576 cat >>confdefs.h <<\EOF
17577 #define HAVE_REGEX_H_FUNCS 1
17578 EOF
17579  ;;
17580         (regexp.h)
17581 cat >>confdefs.h <<\EOF
17582 #define HAVE_REGEXP_H_FUNCS 1
17583 EOF
17584  ;;
17585         (regexpr.h)
17586 cat >>confdefs.h <<\EOF
17587 #define HAVE_REGEXPR_H_FUNCS 1
17588 EOF
17589  ;;
17590 esac
17591
17592 for ac_header in \
17593 fcntl.h \
17594 getopt.h \
17595 limits.h \
17596 locale.h \
17597 math.h \
17598 poll.h \
17599 sys/bsdtypes.h \
17600 sys/ioctl.h \
17601 sys/param.h \
17602 sys/poll.h \
17603 sys/select.h \
17604 sys/time.h \
17605 sys/times.h \
17606 ttyent.h \
17607 unistd.h \
17608 wctype.h \
17609
17610 do
17611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17612 echo "$as_me:17612: checking for $ac_header" >&5
17613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17615   echo $ECHO_N "(cached) $ECHO_C" >&6
17616 else
17617   cat >conftest.$ac_ext <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17620 #include <$ac_header>
17621 _ACEOF
17622 if { (eval echo "$as_me:17622: \"$ac_cpp conftest.$ac_ext\"") >&5
17623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17624   ac_status=$?
17625   egrep -v '^ *\+' conftest.er1 >conftest.err
17626   rm -f conftest.er1
17627   cat conftest.err >&5
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); } >/dev/null; then
17630   if test -s conftest.err; then
17631     ac_cpp_err=$ac_c_preproc_warn_flag
17632   else
17633     ac_cpp_err=
17634   fi
17635 else
17636   ac_cpp_err=yes
17637 fi
17638 if test -z "$ac_cpp_err"; then
17639   eval "$as_ac_Header=yes"
17640 else
17641   echo "$as_me: failed program was:" >&5
17642   cat conftest.$ac_ext >&5
17643   eval "$as_ac_Header=no"
17644 fi
17645 rm -f conftest.err conftest.$ac_ext
17646 fi
17647 echo "$as_me:17647: result: `eval echo '${'$as_ac_Header'}'`" >&5
17648 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17649 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17650   cat >>confdefs.h <<EOF
17651 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17652 EOF
17653
17654 fi
17655 done
17656
17657 for ac_header in unistd.h getopt.h
17658 do
17659 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17660 echo "$as_me:17660: checking for $ac_header" >&5
17661 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17663   echo $ECHO_N "(cached) $ECHO_C" >&6
17664 else
17665   cat >conftest.$ac_ext <<_ACEOF
17666 #line 17666 "configure"
17667 #include "confdefs.h"
17668 #include <$ac_header>
17669 _ACEOF
17670 if { (eval echo "$as_me:17670: \"$ac_cpp conftest.$ac_ext\"") >&5
17671   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17672   ac_status=$?
17673   egrep -v '^ *\+' conftest.er1 >conftest.err
17674   rm -f conftest.er1
17675   cat conftest.err >&5
17676   echo "$as_me:17676: \$? = $ac_status" >&5
17677   (exit $ac_status); } >/dev/null; then
17678   if test -s conftest.err; then
17679     ac_cpp_err=$ac_c_preproc_warn_flag
17680   else
17681     ac_cpp_err=
17682   fi
17683 else
17684   ac_cpp_err=yes
17685 fi
17686 if test -z "$ac_cpp_err"; then
17687   eval "$as_ac_Header=yes"
17688 else
17689   echo "$as_me: failed program was:" >&5
17690   cat conftest.$ac_ext >&5
17691   eval "$as_ac_Header=no"
17692 fi
17693 rm -f conftest.err conftest.$ac_ext
17694 fi
17695 echo "$as_me:17695: result: `eval echo '${'$as_ac_Header'}'`" >&5
17696 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17697 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17698   cat >>confdefs.h <<EOF
17699 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17700 EOF
17701
17702 fi
17703 done
17704
17705 echo "$as_me:17705: checking for header declaring getopt variables" >&5
17706 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17707 if test "${cf_cv_getopt_header+set}" = set; then
17708   echo $ECHO_N "(cached) $ECHO_C" >&6
17709 else
17710
17711 cf_cv_getopt_header=none
17712 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17713 do
17714 cat >conftest.$ac_ext <<_ACEOF
17715 #line 17715 "configure"
17716 #include "confdefs.h"
17717
17718 #include <$cf_header>
17719 int
17720 main (void)
17721 {
17722 int x = optind; char *y = optarg
17723   ;
17724   return 0;
17725 }
17726 _ACEOF
17727 rm -f conftest.$ac_objext
17728 if { (eval echo "$as_me:17728: \"$ac_compile\"") >&5
17729   (eval $ac_compile) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); } &&
17733          { ac_try='test -s conftest.$ac_objext'
17734   { (eval echo "$as_me:17734: \"$ac_try\"") >&5
17735   (eval $ac_try) 2>&5
17736   ac_status=$?
17737   echo "$as_me:17737: \$? = $ac_status" >&5
17738   (exit $ac_status); }; }; then
17739   cf_cv_getopt_header=$cf_header
17740  break
17741 else
17742   echo "$as_me: failed program was:" >&5
17743 cat conftest.$ac_ext >&5
17744 fi
17745 rm -f conftest.$ac_objext conftest.$ac_ext
17746 done
17747
17748 fi
17749 echo "$as_me:17749: result: $cf_cv_getopt_header" >&5
17750 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17751 if test $cf_cv_getopt_header != none ; then
17752
17753 cat >>confdefs.h <<\EOF
17754 #define HAVE_GETOPT_HEADER 1
17755 EOF
17756
17757 fi
17758 if test $cf_cv_getopt_header = getopt.h ; then
17759
17760 cat >>confdefs.h <<\EOF
17761 #define NEED_GETOPT_H 1
17762 EOF
17763
17764 fi
17765
17766 # check for ISC (this may also define _POSIX_SOURCE)
17767 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17768 if test "x$ISC" = xyes ; then
17769
17770 echo "$as_me:17770: checking for main in -lcposix" >&5
17771 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17772 if test "${ac_cv_lib_cposix_main+set}" = set; then
17773   echo $ECHO_N "(cached) $ECHO_C" >&6
17774 else
17775   ac_check_lib_save_LIBS=$LIBS
17776 LIBS="-lcposix  $LIBS"
17777 cat >conftest.$ac_ext <<_ACEOF
17778 #line 17778 "configure"
17779 #include "confdefs.h"
17780
17781 int
17782 main (void)
17783 {
17784 main ();
17785   ;
17786   return 0;
17787 }
17788 _ACEOF
17789 rm -f conftest.$ac_objext conftest$ac_exeext
17790 if { (eval echo "$as_me:17790: \"$ac_link\"") >&5
17791   (eval $ac_link) 2>&5
17792   ac_status=$?
17793   echo "$as_me:17793: \$? = $ac_status" >&5
17794   (exit $ac_status); } &&
17795          { ac_try='test -s conftest$ac_exeext'
17796   { (eval echo "$as_me:17796: \"$ac_try\"") >&5
17797   (eval $ac_try) 2>&5
17798   ac_status=$?
17799   echo "$as_me:17799: \$? = $ac_status" >&5
17800   (exit $ac_status); }; }; then
17801   ac_cv_lib_cposix_main=yes
17802 else
17803   echo "$as_me: failed program was:" >&5
17804 cat conftest.$ac_ext >&5
17805 ac_cv_lib_cposix_main=no
17806 fi
17807 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17808 LIBS=$ac_check_lib_save_LIBS
17809 fi
17810 echo "$as_me:17810: result: $ac_cv_lib_cposix_main" >&5
17811 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17812 if test $ac_cv_lib_cposix_main = yes; then
17813   cat >>confdefs.h <<EOF
17814 #define HAVE_LIBCPOSIX 1
17815 EOF
17816
17817   LIBS="-lcposix $LIBS"
17818
17819 fi
17820
17821         echo "$as_me:17821: checking for bzero in -linet" >&5
17822 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17823 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17824   echo $ECHO_N "(cached) $ECHO_C" >&6
17825 else
17826   ac_check_lib_save_LIBS=$LIBS
17827 LIBS="-linet  $LIBS"
17828 cat >conftest.$ac_ext <<_ACEOF
17829 #line 17829 "configure"
17830 #include "confdefs.h"
17831
17832 /* Override any gcc2 internal prototype to avoid an error.  */
17833 #ifdef __cplusplus
17834 extern "C"
17835 #endif
17836 /* We use char because int might match the return type of a gcc2
17837    builtin and then its argument prototype would still apply.  */
17838 char bzero ();
17839 int
17840 main (void)
17841 {
17842 bzero ();
17843   ;
17844   return 0;
17845 }
17846 _ACEOF
17847 rm -f conftest.$ac_objext conftest$ac_exeext
17848 if { (eval echo "$as_me:17848: \"$ac_link\"") >&5
17849   (eval $ac_link) 2>&5
17850   ac_status=$?
17851   echo "$as_me:17851: \$? = $ac_status" >&5
17852   (exit $ac_status); } &&
17853          { ac_try='test -s conftest$ac_exeext'
17854   { (eval echo "$as_me:17854: \"$ac_try\"") >&5
17855   (eval $ac_try) 2>&5
17856   ac_status=$?
17857   echo "$as_me:17857: \$? = $ac_status" >&5
17858   (exit $ac_status); }; }; then
17859   ac_cv_lib_inet_bzero=yes
17860 else
17861   echo "$as_me: failed program was:" >&5
17862 cat conftest.$ac_ext >&5
17863 ac_cv_lib_inet_bzero=no
17864 fi
17865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17866 LIBS=$ac_check_lib_save_LIBS
17867 fi
17868 echo "$as_me:17868: result: $ac_cv_lib_inet_bzero" >&5
17869 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17870 if test $ac_cv_lib_inet_bzero = yes; then
17871
17872 cf_add_libs="-linet"
17873 # Filter out duplicates - this happens with badly-designed ".pc" files...
17874 for cf_add_1lib in $LIBS
17875 do
17876         for cf_add_2lib in $cf_add_libs
17877         do
17878                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17879                 then
17880                         cf_add_1lib=
17881                         break
17882                 fi
17883         done
17884         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17885 done
17886 LIBS="$cf_add_libs"
17887
17888 fi
17889 fi
17890
17891 echo "$as_me:17891: checking if sys/time.h works with sys/select.h" >&5
17892 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17893 if test "${cf_cv_sys_time_select+set}" = set; then
17894   echo $ECHO_N "(cached) $ECHO_C" >&6
17895 else
17896
17897 cat >conftest.$ac_ext <<_ACEOF
17898 #line 17898 "configure"
17899 #include "confdefs.h"
17900
17901 #include <sys/types.h>
17902 #ifdef HAVE_SYS_TIME_H
17903 #include <sys/time.h>
17904 #endif
17905 #ifdef HAVE_SYS_SELECT_H
17906 #include <sys/select.h>
17907 #endif
17908
17909 int
17910 main (void)
17911 {
17912
17913   ;
17914   return 0;
17915 }
17916 _ACEOF
17917 rm -f conftest.$ac_objext
17918 if { (eval echo "$as_me:17918: \"$ac_compile\"") >&5
17919   (eval $ac_compile) 2>&5
17920   ac_status=$?
17921   echo "$as_me:17921: \$? = $ac_status" >&5
17922   (exit $ac_status); } &&
17923          { ac_try='test -s conftest.$ac_objext'
17924   { (eval echo "$as_me:17924: \"$ac_try\"") >&5
17925   (eval $ac_try) 2>&5
17926   ac_status=$?
17927   echo "$as_me:17927: \$? = $ac_status" >&5
17928   (exit $ac_status); }; }; then
17929   cf_cv_sys_time_select=yes
17930 else
17931   echo "$as_me: failed program was:" >&5
17932 cat conftest.$ac_ext >&5
17933 cf_cv_sys_time_select=no
17934 fi
17935 rm -f conftest.$ac_objext conftest.$ac_ext
17936
17937 fi
17938
17939 echo "$as_me:17939: result: $cf_cv_sys_time_select" >&5
17940 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17941 test "$cf_cv_sys_time_select" = yes &&
17942 cat >>confdefs.h <<\EOF
17943 #define HAVE_SYS_TIME_SELECT 1
17944 EOF
17945
17946 ###     checks for compiler characteristics
17947 ac_ext=c
17948 ac_cpp='$CPP $CPPFLAGS'
17949 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17950 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17951 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17952 ac_main_return=return
17953
17954 echo "$as_me:17954: checking for an ANSI C-conforming const" >&5
17955 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17956 if test "${ac_cv_c_const+set}" = set; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959   cat >conftest.$ac_ext <<_ACEOF
17960 #line 17960 "configure"
17961 #include "confdefs.h"
17962
17963 int
17964 main (void)
17965 {
17966 /* FIXME: Include the comments suggested by Paul. */
17967 #ifndef __cplusplus
17968   /* Ultrix mips cc rejects this.  */
17969   typedef int charset[2];
17970   const charset x;
17971   /* SunOS 4.1.1 cc rejects this.  */
17972   char const *const *ccp;
17973   char **p;
17974   /* NEC SVR4.0.2 mips cc rejects this.  */
17975   struct point {int x, y;};
17976   static struct point const zero = {0,0};
17977   /* AIX XL C 1.02.0.0 rejects this.
17978      It does not let you subtract one const X* pointer from another in
17979      an arm of an if-expression whose if-part is not a constant
17980      expression */
17981   const char *g = "string";
17982   ccp = &g + (g ? g-g : 0);
17983   /* HPUX 7.0 cc rejects these. */
17984   ++ccp;
17985   p = (char**) ccp;
17986   ccp = (char const *const *) p;
17987   { /* SCO 3.2v4 cc rejects this.  */
17988     char *t;
17989     char const *s = 0 ? (char *) 0 : (char const *) 0;
17990
17991     *t++ = 0;
17992   }
17993   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17994     int x[] = {25, 17};
17995     const int *foo = &x[0];
17996     ++foo;
17997   }
17998   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17999     typedef const int *iptr;
18000     iptr p = 0;
18001     ++p;
18002   }
18003   { /* AIX XL C 1.02.0.0 rejects this saying
18004        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18005     struct s { int j; const int *ap[3]; };
18006     struct s *b; b->j = 5;
18007   }
18008   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18009     const int foo = 10;
18010   }
18011 #endif
18012
18013   ;
18014   return 0;
18015 }
18016 _ACEOF
18017 rm -f conftest.$ac_objext
18018 if { (eval echo "$as_me:18018: \"$ac_compile\"") >&5
18019   (eval $ac_compile) 2>&5
18020   ac_status=$?
18021   echo "$as_me:18021: \$? = $ac_status" >&5
18022   (exit $ac_status); } &&
18023          { ac_try='test -s conftest.$ac_objext'
18024   { (eval echo "$as_me:18024: \"$ac_try\"") >&5
18025   (eval $ac_try) 2>&5
18026   ac_status=$?
18027   echo "$as_me:18027: \$? = $ac_status" >&5
18028   (exit $ac_status); }; }; then
18029   ac_cv_c_const=yes
18030 else
18031   echo "$as_me: failed program was:" >&5
18032 cat conftest.$ac_ext >&5
18033 ac_cv_c_const=no
18034 fi
18035 rm -f conftest.$ac_objext conftest.$ac_ext
18036 fi
18037 echo "$as_me:18037: result: $ac_cv_c_const" >&5
18038 echo "${ECHO_T}$ac_cv_c_const" >&6
18039 if test $ac_cv_c_const = no; then
18040
18041 cat >>confdefs.h <<\EOF
18042 #define const
18043 EOF
18044
18045 fi
18046
18047 echo "$as_me:18047: checking for inline" >&5
18048 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18049 if test "${ac_cv_c_inline+set}" = set; then
18050   echo $ECHO_N "(cached) $ECHO_C" >&6
18051 else
18052   ac_cv_c_inline=no
18053 for ac_kw in inline __inline__ __inline; do
18054   cat >conftest.$ac_ext <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18057 #ifndef __cplusplus
18058 static $ac_kw int static_foo () {return 0; }
18059 $ac_kw int foo () {return 0; }
18060 #endif
18061
18062 _ACEOF
18063 rm -f conftest.$ac_objext
18064 if { (eval echo "$as_me:18064: \"$ac_compile\"") >&5
18065   (eval $ac_compile) 2>&5
18066   ac_status=$?
18067   echo "$as_me:18067: \$? = $ac_status" >&5
18068   (exit $ac_status); } &&
18069          { ac_try='test -s conftest.$ac_objext'
18070   { (eval echo "$as_me:18070: \"$ac_try\"") >&5
18071   (eval $ac_try) 2>&5
18072   ac_status=$?
18073   echo "$as_me:18073: \$? = $ac_status" >&5
18074   (exit $ac_status); }; }; then
18075   ac_cv_c_inline=$ac_kw; break
18076 else
18077   echo "$as_me: failed program was:" >&5
18078 cat conftest.$ac_ext >&5
18079 fi
18080 rm -f conftest.$ac_objext conftest.$ac_ext
18081 done
18082
18083 fi
18084 echo "$as_me:18084: result: $ac_cv_c_inline" >&5
18085 echo "${ECHO_T}$ac_cv_c_inline" >&6
18086 case $ac_cv_c_inline in
18087   inline | yes) ;;
18088   no)
18089 cat >>confdefs.h <<\EOF
18090 #define inline
18091 EOF
18092  ;;
18093   *)  cat >>confdefs.h <<EOF
18094 #define inline $ac_cv_c_inline
18095 EOF
18096  ;;
18097 esac
18098
18099 NCURSES_INLINE=
18100 if test "$ac_cv_c_inline" != no ; then
18101         NCURSES_INLINE=inline
18102         if test "$INTEL_COMPILER" = yes
18103         then
18104                 :
18105         elif test "$CLANG_COMPILER" = yes
18106         then
18107                 :
18108         elif test "$GCC" = yes
18109         then
18110                 echo "$as_me:18110: checking if $CC supports options to tune inlining" >&5
18111 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18112 if test "${cf_cv_gcc_inline+set}" = set; then
18113   echo $ECHO_N "(cached) $ECHO_C" >&6
18114 else
18115
18116                 cf_save_CFLAGS=$CFLAGS
18117                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18118                 cat >conftest.$ac_ext <<_ACEOF
18119 #line 18119 "configure"
18120 #include "confdefs.h"
18121 inline int foo(void) { return 1; }
18122 int
18123 main (void)
18124 {
18125 ${cf_cv_main_return:-return} foo()
18126   ;
18127   return 0;
18128 }
18129 _ACEOF
18130 rm -f conftest.$ac_objext
18131 if { (eval echo "$as_me:18131: \"$ac_compile\"") >&5
18132   (eval $ac_compile) 2>&5
18133   ac_status=$?
18134   echo "$as_me:18134: \$? = $ac_status" >&5
18135   (exit $ac_status); } &&
18136          { ac_try='test -s conftest.$ac_objext'
18137   { (eval echo "$as_me:18137: \"$ac_try\"") >&5
18138   (eval $ac_try) 2>&5
18139   ac_status=$?
18140   echo "$as_me:18140: \$? = $ac_status" >&5
18141   (exit $ac_status); }; }; then
18142   cf_cv_gcc_inline=yes
18143 else
18144   echo "$as_me: failed program was:" >&5
18145 cat conftest.$ac_ext >&5
18146 cf_cv_gcc_inline=no
18147 fi
18148 rm -f conftest.$ac_objext conftest.$ac_ext
18149                 CFLAGS=$cf_save_CFLAGS
18150
18151 fi
18152 echo "$as_me:18152: result: $cf_cv_gcc_inline" >&5
18153 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18154                 if test "$cf_cv_gcc_inline" = yes ; then
18155
18156 cf_fix_cppflags=no
18157 cf_new_cflags=
18158 cf_new_cppflags=
18159 cf_new_extra_cppflags=
18160
18161 for cf_add_cflags in --param max-inline-insns-single=1200
18162 do
18163 case $cf_fix_cppflags in
18164 (no)
18165         case $cf_add_cflags in
18166         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18167                 case $cf_add_cflags in
18168                 (-D*)
18169                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18170
18171                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18172                                 && test -z "${cf_tst_cflags}" \
18173                                 && cf_fix_cppflags=yes
18174
18175                         if test $cf_fix_cppflags = yes ; then
18176
18177         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18178         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18179
18180                                 continue
18181                         elif test "${cf_tst_cflags}" = "\"'" ; then
18182
18183         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18184         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18185
18186                                 continue
18187                         fi
18188                         ;;
18189                 esac
18190                 case "$CPPFLAGS" in
18191                 (*$cf_add_cflags)
18192                         ;;
18193                 (*)
18194                         case $cf_add_cflags in
18195                         (-D*)
18196                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18197
18198 CPPFLAGS=`echo "$CPPFLAGS" | \
18199         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18200                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18201
18202                                 ;;
18203                         esac
18204
18205         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18206         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18207
18208                         ;;
18209                 esac
18210                 ;;
18211         (*)
18212
18213         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18214         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18215
18216                 ;;
18217         esac
18218         ;;
18219 (yes)
18220
18221         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18222         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18223
18224         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18225
18226         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18227                 && test -z "${cf_tst_cflags}" \
18228                 && cf_fix_cppflags=no
18229         ;;
18230 esac
18231 done
18232
18233 if test -n "$cf_new_cflags" ; then
18234
18235         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18236         CFLAGS="${CFLAGS}$cf_new_cflags"
18237
18238 fi
18239
18240 if test -n "$cf_new_cppflags" ; then
18241
18242         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18243         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18244
18245 fi
18246
18247 if test -n "$cf_new_extra_cppflags" ; then
18248
18249         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18250         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18251
18252 fi
18253
18254                 fi
18255         fi
18256 fi
18257
18258 echo "$as_me:18258: checking for signal global datatype" >&5
18259 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18260 if test "${cf_cv_sig_atomic_t+set}" = set; then
18261   echo $ECHO_N "(cached) $ECHO_C" >&6
18262 else
18263
18264         for cf_type in \
18265                 "volatile sig_atomic_t" \
18266                 "sig_atomic_t" \
18267                 "int"
18268         do
18269         cat >conftest.$ac_ext <<_ACEOF
18270 #line 18270 "configure"
18271 #include "confdefs.h"
18272
18273 #include <sys/types.h>
18274 #include <signal.h>
18275 #include <stdio.h>
18276
18277 extern $cf_type x;
18278 $cf_type x;
18279 static void handler(int sig)
18280 {
18281         x = 5;
18282 }
18283 int
18284 main (void)
18285 {
18286 signal(SIGINT, handler);
18287                  x = 1
18288   ;
18289   return 0;
18290 }
18291 _ACEOF
18292 rm -f conftest.$ac_objext
18293 if { (eval echo "$as_me:18293: \"$ac_compile\"") >&5
18294   (eval $ac_compile) 2>&5
18295   ac_status=$?
18296   echo "$as_me:18296: \$? = $ac_status" >&5
18297   (exit $ac_status); } &&
18298          { ac_try='test -s conftest.$ac_objext'
18299   { (eval echo "$as_me:18299: \"$ac_try\"") >&5
18300   (eval $ac_try) 2>&5
18301   ac_status=$?
18302   echo "$as_me:18302: \$? = $ac_status" >&5
18303   (exit $ac_status); }; }; then
18304   cf_cv_sig_atomic_t=$cf_type
18305 else
18306   echo "$as_me: failed program was:" >&5
18307 cat conftest.$ac_ext >&5
18308 cf_cv_sig_atomic_t=no
18309 fi
18310 rm -f conftest.$ac_objext conftest.$ac_ext
18311                 test "$cf_cv_sig_atomic_t" != no && break
18312         done
18313
18314 fi
18315
18316 echo "$as_me:18316: result: $cf_cv_sig_atomic_t" >&5
18317 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18318 test "$cf_cv_sig_atomic_t" != no &&
18319 cat >>confdefs.h <<EOF
18320 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18321 EOF
18322
18323 if test $NCURSES_CHTYPE = auto ; then
18324
18325 echo "$as_me:18325: checking for type of chtype" >&5
18326 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18327 if test "${cf_cv_typeof_chtype+set}" = set; then
18328   echo $ECHO_N "(cached) $ECHO_C" >&6
18329 else
18330
18331                 if test "$cross_compiling" = yes; then
18332   cf_cv_typeof_chtype=long
18333 else
18334   cat >conftest.$ac_ext <<_ACEOF
18335 #line 18335 "configure"
18336 #include "confdefs.h"
18337
18338 #define WANT_BITS 31
18339 #include <stdio.h>
18340 int main(void)
18341 {
18342         FILE *fp = fopen("cf_test.out", "w");
18343         if (fp != 0) {
18344                 char *result = "long";
18345                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18346                         int n;
18347                         unsigned int x, y;
18348                         for (n = 0; n < WANT_BITS; n++) {
18349                                 x = (1 << n);
18350                                 y = (x >> n);
18351                                 if (y != 1 || x == 0) {
18352                                         x = 0;
18353                                         break;
18354                                 }
18355                         }
18356                         /*
18357                          * If x is nonzero, an int is big enough for the bits
18358                          * that we want.
18359                          */
18360                         result = (x != 0) ? "int" : "long";
18361                 }
18362                 fputs(result, fp);
18363                 fclose(fp);
18364         }
18365         ${cf_cv_main_return:-return}(0);
18366 }
18367
18368 _ACEOF
18369 rm -f conftest$ac_exeext
18370 if { (eval echo "$as_me:18370: \"$ac_link\"") >&5
18371   (eval $ac_link) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18375   { (eval echo "$as_me:18375: \"$ac_try\"") >&5
18376   (eval $ac_try) 2>&5
18377   ac_status=$?
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); }; }; then
18380   cf_cv_typeof_chtype=`cat cf_test.out`
18381 else
18382   echo "$as_me: program exited with status $ac_status" >&5
18383 echo "$as_me: failed program was:" >&5
18384 cat conftest.$ac_ext >&5
18385 cf_cv_typeof_chtype=long
18386 fi
18387 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18388 fi
18389                 rm -f cf_test.out
18390
18391 fi
18392
18393 echo "$as_me:18393: result: $cf_cv_typeof_chtype" >&5
18394 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18395
18396 cat >>confdefs.h <<EOF
18397 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18398 EOF
18399
18400 else
18401         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18402 fi
18403 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18404
18405 echo "$as_me:18405: checking if unsigned literals are legal" >&5
18406 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18407 if test "${cf_cv_unsigned_literals+set}" = set; then
18408   echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410
18411         cat >conftest.$ac_ext <<_ACEOF
18412 #line 18412 "configure"
18413 #include "confdefs.h"
18414
18415 int
18416 main (void)
18417 {
18418 long x = 1L + 1UL + 1U + 1
18419   ;
18420   return 0;
18421 }
18422 _ACEOF
18423 rm -f conftest.$ac_objext
18424 if { (eval echo "$as_me:18424: \"$ac_compile\"") >&5
18425   (eval $ac_compile) 2>&5
18426   ac_status=$?
18427   echo "$as_me:18427: \$? = $ac_status" >&5
18428   (exit $ac_status); } &&
18429          { ac_try='test -s conftest.$ac_objext'
18430   { (eval echo "$as_me:18430: \"$ac_try\"") >&5
18431   (eval $ac_try) 2>&5
18432   ac_status=$?
18433   echo "$as_me:18433: \$? = $ac_status" >&5
18434   (exit $ac_status); }; }; then
18435   cf_cv_unsigned_literals=yes
18436 else
18437   echo "$as_me: failed program was:" >&5
18438 cat conftest.$ac_ext >&5
18439 cf_cv_unsigned_literals=no
18440 fi
18441 rm -f conftest.$ac_objext conftest.$ac_ext
18442
18443 fi
18444
18445 echo "$as_me:18445: result: $cf_cv_unsigned_literals" >&5
18446 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18447
18448 cf_cv_1UL="1"
18449 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18450 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18451
18452 if test $NCURSES_MMASK_T = auto ; then
18453         cf_cv_typeof_mmask_t=long
18454 else
18455         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18456 fi
18457 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18458
18459 ###     Checks for external-data
18460
18461 echo "$as_me:18461: checking if external errno is declared" >&5
18462 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18463 if test "${cf_cv_dcl_errno+set}" = set; then
18464   echo $ECHO_N "(cached) $ECHO_C" >&6
18465 else
18466
18467         cat >conftest.$ac_ext <<_ACEOF
18468 #line 18468 "configure"
18469 #include "confdefs.h"
18470
18471 #ifdef HAVE_STDLIB_H
18472 #include <stdlib.h>
18473 #endif
18474 #include <stdio.h>
18475 #include <sys/types.h>
18476 #include <errno.h>
18477 int
18478 main (void)
18479 {
18480 int x = (int) errno
18481   ;
18482   return 0;
18483 }
18484 _ACEOF
18485 rm -f conftest.$ac_objext
18486 if { (eval echo "$as_me:18486: \"$ac_compile\"") >&5
18487   (eval $ac_compile) 2>&5
18488   ac_status=$?
18489   echo "$as_me:18489: \$? = $ac_status" >&5
18490   (exit $ac_status); } &&
18491          { ac_try='test -s conftest.$ac_objext'
18492   { (eval echo "$as_me:18492: \"$ac_try\"") >&5
18493   (eval $ac_try) 2>&5
18494   ac_status=$?
18495   echo "$as_me:18495: \$? = $ac_status" >&5
18496   (exit $ac_status); }; }; then
18497   cf_cv_dcl_errno=yes
18498 else
18499   echo "$as_me: failed program was:" >&5
18500 cat conftest.$ac_ext >&5
18501 cf_cv_dcl_errno=no
18502 fi
18503 rm -f conftest.$ac_objext conftest.$ac_ext
18504
18505 fi
18506 echo "$as_me:18506: result: $cf_cv_dcl_errno" >&5
18507 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18508
18509 if test "$cf_cv_dcl_errno" = no ; then
18510
18511 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18512
18513         cat >>confdefs.h <<EOF
18514 #define $cf_result 1
18515 EOF
18516
18517 fi
18518
18519 # It's possible (for near-UNIX clones) that the data doesn't exist
18520
18521 echo "$as_me:18521: checking if external errno exists" >&5
18522 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18523 if test "${cf_cv_have_errno+set}" = set; then
18524   echo $ECHO_N "(cached) $ECHO_C" >&6
18525 else
18526
18527         cat >conftest.$ac_ext <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530
18531 #undef errno
18532 extern int errno;
18533
18534 int
18535 main (void)
18536 {
18537 errno = 2
18538   ;
18539   return 0;
18540 }
18541 _ACEOF
18542 rm -f conftest.$ac_objext conftest$ac_exeext
18543 if { (eval echo "$as_me:18543: \"$ac_link\"") >&5
18544   (eval $ac_link) 2>&5
18545   ac_status=$?
18546   echo "$as_me:18546: \$? = $ac_status" >&5
18547   (exit $ac_status); } &&
18548          { ac_try='test -s conftest$ac_exeext'
18549   { (eval echo "$as_me:18549: \"$ac_try\"") >&5
18550   (eval $ac_try) 2>&5
18551   ac_status=$?
18552   echo "$as_me:18552: \$? = $ac_status" >&5
18553   (exit $ac_status); }; }; then
18554   cf_cv_have_errno=yes
18555 else
18556   echo "$as_me: failed program was:" >&5
18557 cat conftest.$ac_ext >&5
18558 cf_cv_have_errno=no
18559 fi
18560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18561
18562 fi
18563 echo "$as_me:18563: result: $cf_cv_have_errno" >&5
18564 echo "${ECHO_T}$cf_cv_have_errno" >&6
18565
18566 if test "$cf_cv_have_errno" = yes ; then
18567
18568 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18569
18570         cat >>confdefs.h <<EOF
18571 #define $cf_result 1
18572 EOF
18573
18574 fi
18575
18576 echo "$as_me:18576: checking if data-only library module links" >&5
18577 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18578 if test "${cf_cv_link_dataonly+set}" = set; then
18579   echo $ECHO_N "(cached) $ECHO_C" >&6
18580 else
18581
18582         rm -f conftest.a
18583         cat >conftest.$ac_ext <<EOF
18584 #line 18584 "configure"
18585 int     testdata[3] = { 123, 456, 789 };
18586 EOF
18587         if { (eval echo "$as_me:18587: \"$ac_compile\"") >&5
18588   (eval $ac_compile) 2>&5
18589   ac_status=$?
18590   echo "$as_me:18590: \$? = $ac_status" >&5
18591   (exit $ac_status); } ; then
18592                 mv conftest.o data.o && \
18593                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18594         fi
18595         rm -f conftest.$ac_ext data.o
18596         cat >conftest.$ac_ext <<EOF
18597 #line 18597 "configure"
18598 int     testfunc(void)
18599 {
18600 #if defined(NeXT)
18601         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18602 #else
18603         extern int testdata[3];
18604         return testdata[0] == 123
18605            &&  testdata[1] == 456
18606            &&  testdata[2] == 789;
18607 #endif
18608 }
18609 EOF
18610         if { (eval echo "$as_me:18610: \"$ac_compile\"") >&5
18611   (eval $ac_compile) 2>&5
18612   ac_status=$?
18613   echo "$as_me:18613: \$? = $ac_status" >&5
18614   (exit $ac_status); }; then
18615                 mv conftest.o func.o && \
18616                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18617         fi
18618         rm -f conftest.$ac_ext func.o
18619         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18620         cf_saveLIBS="$LIBS"
18621         LIBS="conftest.a $LIBS"
18622         if test "$cross_compiling" = yes; then
18623   cf_cv_link_dataonly=unknown
18624 else
18625   cat >conftest.$ac_ext <<_ACEOF
18626 #line 18626 "configure"
18627 #include "confdefs.h"
18628
18629         int main(void)
18630         {
18631                 extern int testfunc();
18632                 ${cf_cv_main_return:-return} (!testfunc());
18633         }
18634
18635 _ACEOF
18636 rm -f conftest$ac_exeext
18637 if { (eval echo "$as_me:18637: \"$ac_link\"") >&5
18638   (eval $ac_link) 2>&5
18639   ac_status=$?
18640   echo "$as_me:18640: \$? = $ac_status" >&5
18641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18642   { (eval echo "$as_me:18642: \"$ac_try\"") >&5
18643   (eval $ac_try) 2>&5
18644   ac_status=$?
18645   echo "$as_me:18645: \$? = $ac_status" >&5
18646   (exit $ac_status); }; }; then
18647   cf_cv_link_dataonly=yes
18648 else
18649   echo "$as_me: program exited with status $ac_status" >&5
18650 echo "$as_me: failed program was:" >&5
18651 cat conftest.$ac_ext >&5
18652 cf_cv_link_dataonly=no
18653 fi
18654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18655 fi
18656         LIBS="$cf_saveLIBS"
18657
18658 fi
18659
18660 echo "$as_me:18660: result: $cf_cv_link_dataonly" >&5
18661 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18662
18663 if test "$cf_cv_link_dataonly" = no ; then
18664
18665 cat >>confdefs.h <<\EOF
18666 #define BROKEN_LINKER 1
18667 EOF
18668
18669         BROKEN_LINKER=1
18670 fi
18671
18672 ###     Checks for library functions.
18673
18674 for ac_func in \
18675 getcwd \
18676 getegid \
18677 geteuid \
18678 getopt \
18679 getttynam \
18680 issetugid \
18681 poll \
18682 putenv \
18683 remove \
18684 select \
18685 setbuf \
18686 setbuffer \
18687 setenv \
18688 setvbuf \
18689 sigaction \
18690 sigvec \
18691 strdup \
18692 strstr \
18693 sysconf \
18694 tcgetpgrp \
18695 tdestroy \
18696 times \
18697 tsearch \
18698 vsnprintf \
18699
18700 do
18701 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18702 echo "$as_me:18702: checking for $ac_func" >&5
18703 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18704 if eval "test \"\${$as_ac_var+set}\" = set"; then
18705   echo $ECHO_N "(cached) $ECHO_C" >&6
18706 else
18707   cat >conftest.$ac_ext <<_ACEOF
18708 #line 18708 "configure"
18709 #include "confdefs.h"
18710 #define $ac_func autoconf_temporary
18711 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18712 #undef $ac_func
18713
18714 #ifdef __cplusplus
18715 extern "C"
18716 #endif
18717
18718 /* We use char because int might match the return type of a gcc2
18719    builtin and then its argument prototype would still apply.  */
18720 char $ac_func (void);
18721
18722 int
18723 main (void)
18724 {
18725
18726 /* The GNU C library defines stubs for functions which it implements
18727     to always fail with ENOSYS.  Some functions are actually named
18728     something starting with __ and the normal name is an alias.  */
18729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18730 #error found stub for $ac_func
18731 #endif
18732
18733         return $ac_func ();
18734   ;
18735   return 0;
18736 }
18737 _ACEOF
18738 rm -f conftest.$ac_objext conftest$ac_exeext
18739 if { (eval echo "$as_me:18739: \"$ac_link\"") >&5
18740   (eval $ac_link) 2>&5
18741   ac_status=$?
18742   echo "$as_me:18742: \$? = $ac_status" >&5
18743   (exit $ac_status); } &&
18744          { ac_try='test -s conftest$ac_exeext'
18745   { (eval echo "$as_me:18745: \"$ac_try\"") >&5
18746   (eval $ac_try) 2>&5
18747   ac_status=$?
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); }; }; then
18750   eval "$as_ac_var=yes"
18751 else
18752   echo "$as_me: failed program was:" >&5
18753 cat conftest.$ac_ext >&5
18754 eval "$as_ac_var=no"
18755 fi
18756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18757 fi
18758 echo "$as_me:18758: result: `eval echo '${'$as_ac_var'}'`" >&5
18759 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18760 if test `eval echo '${'$as_ac_var'}'` = yes; then
18761   cat >>confdefs.h <<EOF
18762 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18763 EOF
18764
18765 fi
18766 done
18767
18768 if test "x$ac_cv_func_getopt" = xno && \
18769    test "x$cf_with_progs$cf_with_tests" != xnono; then
18770         { { echo "$as_me:18770: error: getopt is required for building programs" >&5
18771 echo "$as_me: error: getopt is required for building programs" >&2;}
18772    { (exit 1); exit 1; }; }
18773 fi
18774
18775 if test "x$with_safe_sprintf" = xyes
18776 then
18777         if test "x$ac_cv_func_vsnprintf" = xyes
18778         then
18779                 { echo "$as_me:18779: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18780 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18781         else
18782
18783 cat >>confdefs.h <<\EOF
18784 #define USE_SAFE_SPRINTF 1
18785 EOF
18786
18787         fi
18788 fi
18789
18790 if test "x$with_getcap" = "xyes" ; then
18791
18792 echo "$as_me:18792: checking for terminal-capability database functions" >&5
18793 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18794 if test "${cf_cv_cgetent+set}" = set; then
18795   echo $ECHO_N "(cached) $ECHO_C" >&6
18796 else
18797
18798 cat >conftest.$ac_ext <<_ACEOF
18799 #line 18799 "configure"
18800 #include "confdefs.h"
18801
18802 #include <stdlib.h>
18803 int
18804 main (void)
18805 {
18806
18807         char temp[128];
18808         char *buf = temp;
18809         char *db_array = temp;
18810         cgetent(&buf, &db_array, "vt100");
18811         cgetcap(buf, "tc", '=');
18812         cgetmatch(buf, "tc");
18813
18814   ;
18815   return 0;
18816 }
18817 _ACEOF
18818 rm -f conftest.$ac_objext conftest$ac_exeext
18819 if { (eval echo "$as_me:18819: \"$ac_link\"") >&5
18820   (eval $ac_link) 2>&5
18821   ac_status=$?
18822   echo "$as_me:18822: \$? = $ac_status" >&5
18823   (exit $ac_status); } &&
18824          { ac_try='test -s conftest$ac_exeext'
18825   { (eval echo "$as_me:18825: \"$ac_try\"") >&5
18826   (eval $ac_try) 2>&5
18827   ac_status=$?
18828   echo "$as_me:18828: \$? = $ac_status" >&5
18829   (exit $ac_status); }; }; then
18830   cf_cv_cgetent=yes
18831 else
18832   echo "$as_me: failed program was:" >&5
18833 cat conftest.$ac_ext >&5
18834 cf_cv_cgetent=no
18835 fi
18836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18837
18838 fi
18839 echo "$as_me:18839: result: $cf_cv_cgetent" >&5
18840 echo "${ECHO_T}$cf_cv_cgetent" >&6
18841
18842 if test "$cf_cv_cgetent" = yes
18843 then
18844
18845 cat >>confdefs.h <<\EOF
18846 #define HAVE_BSD_CGETENT 1
18847 EOF
18848
18849 echo "$as_me:18849: checking if cgetent uses const parameter" >&5
18850 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18851 if test "${cf_cv_cgetent_const+set}" = set; then
18852   echo $ECHO_N "(cached) $ECHO_C" >&6
18853 else
18854
18855 cat >conftest.$ac_ext <<_ACEOF
18856 #line 18856 "configure"
18857 #include "confdefs.h"
18858
18859 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18860 #include <stdlib.h>
18861 int
18862 main (void)
18863 {
18864
18865         char temp[128];
18866         char *buf = temp;
18867 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18868         const char *db_array = temp;
18869         cgetent(&buf, &db_array, "vt100");
18870 #endif
18871         cgetcap(buf, "tc", '=');
18872         cgetmatch(buf, "tc");
18873
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 rm -f conftest.$ac_objext conftest$ac_exeext
18879 if { (eval echo "$as_me:18879: \"$ac_link\"") >&5
18880   (eval $ac_link) 2>&5
18881   ac_status=$?
18882   echo "$as_me:18882: \$? = $ac_status" >&5
18883   (exit $ac_status); } &&
18884          { ac_try='test -s conftest$ac_exeext'
18885   { (eval echo "$as_me:18885: \"$ac_try\"") >&5
18886   (eval $ac_try) 2>&5
18887   ac_status=$?
18888   echo "$as_me:18888: \$? = $ac_status" >&5
18889   (exit $ac_status); }; }; then
18890   cf_cv_cgetent_const=yes
18891 else
18892   echo "$as_me: failed program was:" >&5
18893 cat conftest.$ac_ext >&5
18894 cf_cv_cgetent_const=no
18895 fi
18896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18897
18898 fi
18899 echo "$as_me:18899: result: $cf_cv_cgetent_const" >&5
18900 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18901         if test "$cf_cv_cgetent_const" = yes
18902         then
18903
18904 cat >>confdefs.h <<EOF
18905 #define CGETENT_CONST const
18906 EOF
18907
18908         fi
18909 fi
18910
18911 fi
18912
18913 echo "$as_me:18913: checking for isascii" >&5
18914 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18915 if test "${cf_cv_have_isascii+set}" = set; then
18916   echo $ECHO_N "(cached) $ECHO_C" >&6
18917 else
18918
18919         cat >conftest.$ac_ext <<_ACEOF
18920 #line 18920 "configure"
18921 #include "confdefs.h"
18922 #include <ctype.h>
18923 int
18924 main (void)
18925 {
18926 int x = isascii(' ')
18927   ;
18928   return 0;
18929 }
18930 _ACEOF
18931 rm -f conftest.$ac_objext conftest$ac_exeext
18932 if { (eval echo "$as_me:18932: \"$ac_link\"") >&5
18933   (eval $ac_link) 2>&5
18934   ac_status=$?
18935   echo "$as_me:18935: \$? = $ac_status" >&5
18936   (exit $ac_status); } &&
18937          { ac_try='test -s conftest$ac_exeext'
18938   { (eval echo "$as_me:18938: \"$ac_try\"") >&5
18939   (eval $ac_try) 2>&5
18940   ac_status=$?
18941   echo "$as_me:18941: \$? = $ac_status" >&5
18942   (exit $ac_status); }; }; then
18943   cf_cv_have_isascii=yes
18944 else
18945   echo "$as_me: failed program was:" >&5
18946 cat conftest.$ac_ext >&5
18947 cf_cv_have_isascii=no
18948 fi
18949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18950
18951 fi
18952 echo "$as_me:18952: result: $cf_cv_have_isascii" >&5
18953 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18954 test "$cf_cv_have_isascii" = yes &&
18955 cat >>confdefs.h <<\EOF
18956 #define HAVE_ISASCII 1
18957 EOF
18958
18959 if test "$ac_cv_func_sigaction" = yes; then
18960 echo "$as_me:18960: checking whether sigaction needs _POSIX_SOURCE" >&5
18961 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18962 cat >conftest.$ac_ext <<_ACEOF
18963 #line 18963 "configure"
18964 #include "confdefs.h"
18965
18966 #include <sys/types.h>
18967 #include <signal.h>
18968 int
18969 main (void)
18970 {
18971 struct sigaction act
18972   ;
18973   return 0;
18974 }
18975 _ACEOF
18976 rm -f conftest.$ac_objext
18977 if { (eval echo "$as_me:18977: \"$ac_compile\"") >&5
18978   (eval $ac_compile) 2>&5
18979   ac_status=$?
18980   echo "$as_me:18980: \$? = $ac_status" >&5
18981   (exit $ac_status); } &&
18982          { ac_try='test -s conftest.$ac_objext'
18983   { (eval echo "$as_me:18983: \"$ac_try\"") >&5
18984   (eval $ac_try) 2>&5
18985   ac_status=$?
18986   echo "$as_me:18986: \$? = $ac_status" >&5
18987   (exit $ac_status); }; }; then
18988   sigact_bad=no
18989 else
18990   echo "$as_me: failed program was:" >&5
18991 cat conftest.$ac_ext >&5
18992
18993 cat >conftest.$ac_ext <<_ACEOF
18994 #line 18994 "configure"
18995 #include "confdefs.h"
18996
18997 #define _POSIX_SOURCE
18998 #include <sys/types.h>
18999 #include <signal.h>
19000 int
19001 main (void)
19002 {
19003 struct sigaction act
19004   ;
19005   return 0;
19006 }
19007 _ACEOF
19008 rm -f conftest.$ac_objext
19009 if { (eval echo "$as_me:19009: \"$ac_compile\"") >&5
19010   (eval $ac_compile) 2>&5
19011   ac_status=$?
19012   echo "$as_me:19012: \$? = $ac_status" >&5
19013   (exit $ac_status); } &&
19014          { ac_try='test -s conftest.$ac_objext'
19015   { (eval echo "$as_me:19015: \"$ac_try\"") >&5
19016   (eval $ac_try) 2>&5
19017   ac_status=$?
19018   echo "$as_me:19018: \$? = $ac_status" >&5
19019   (exit $ac_status); }; }; then
19020   sigact_bad=yes
19021
19022 cat >>confdefs.h <<\EOF
19023 #define _POSIX_SOURCE 1
19024 EOF
19025
19026 else
19027   echo "$as_me: failed program was:" >&5
19028 cat conftest.$ac_ext >&5
19029 sigact_bad=unknown
19030 fi
19031 rm -f conftest.$ac_objext conftest.$ac_ext
19032 fi
19033 rm -f conftest.$ac_objext conftest.$ac_ext
19034 echo "$as_me:19034: result: $sigact_bad" >&5
19035 echo "${ECHO_T}$sigact_bad" >&6
19036 fi
19037
19038 echo "$as_me:19038: checking if nanosleep really works" >&5
19039 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19040 if test "${cf_cv_func_nanosleep+set}" = set; then
19041   echo $ECHO_N "(cached) $ECHO_C" >&6
19042 else
19043
19044 if test "$cross_compiling" = yes; then
19045   cf_cv_func_nanosleep=unknown
19046 else
19047   cat >conftest.$ac_ext <<_ACEOF
19048 #line 19048 "configure"
19049 #include "confdefs.h"
19050
19051 #include <stdio.h>
19052 #include <errno.h>
19053 #include <time.h>
19054
19055 #ifdef HAVE_SYS_TIME_H
19056 #include <sys/time.h>
19057 #endif
19058
19059 int main(void) {
19060         struct timespec ts1, ts2;
19061         int code;
19062         ts1.tv_sec  = 0;
19063         ts1.tv_nsec = 750000000;
19064         ts2.tv_sec  = 0;
19065         ts2.tv_nsec = 0;
19066         errno = 0;
19067         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19068         ${cf_cv_main_return:-return}(code != 0);
19069 }
19070
19071 _ACEOF
19072 rm -f conftest$ac_exeext
19073 if { (eval echo "$as_me:19073: \"$ac_link\"") >&5
19074   (eval $ac_link) 2>&5
19075   ac_status=$?
19076   echo "$as_me:19076: \$? = $ac_status" >&5
19077   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19078   { (eval echo "$as_me:19078: \"$ac_try\"") >&5
19079   (eval $ac_try) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); }; }; then
19083   cf_cv_func_nanosleep=yes
19084 else
19085   echo "$as_me: program exited with status $ac_status" >&5
19086 echo "$as_me: failed program was:" >&5
19087 cat conftest.$ac_ext >&5
19088 cf_cv_func_nanosleep=no
19089 fi
19090 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19091 fi
19092 fi
19093 echo "$as_me:19093: result: $cf_cv_func_nanosleep" >&5
19094 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19095
19096 test "$cf_cv_func_nanosleep" = "yes" &&
19097 cat >>confdefs.h <<\EOF
19098 #define HAVE_NANOSLEEP 1
19099 EOF
19100
19101 for ac_header in \
19102 termio.h \
19103 termios.h \
19104 unistd.h \
19105 sys/ioctl.h \
19106 sys/termio.h \
19107
19108 do
19109 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19110 echo "$as_me:19110: checking for $ac_header" >&5
19111 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19112 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19113   echo $ECHO_N "(cached) $ECHO_C" >&6
19114 else
19115   cat >conftest.$ac_ext <<_ACEOF
19116 #line 19116 "configure"
19117 #include "confdefs.h"
19118 #include <$ac_header>
19119 _ACEOF
19120 if { (eval echo "$as_me:19120: \"$ac_cpp conftest.$ac_ext\"") >&5
19121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19122   ac_status=$?
19123   egrep -v '^ *\+' conftest.er1 >conftest.err
19124   rm -f conftest.er1
19125   cat conftest.err >&5
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit $ac_status); } >/dev/null; then
19128   if test -s conftest.err; then
19129     ac_cpp_err=$ac_c_preproc_warn_flag
19130   else
19131     ac_cpp_err=
19132   fi
19133 else
19134   ac_cpp_err=yes
19135 fi
19136 if test -z "$ac_cpp_err"; then
19137   eval "$as_ac_Header=yes"
19138 else
19139   echo "$as_me: failed program was:" >&5
19140   cat conftest.$ac_ext >&5
19141   eval "$as_ac_Header=no"
19142 fi
19143 rm -f conftest.err conftest.$ac_ext
19144 fi
19145 echo "$as_me:19145: result: `eval echo '${'$as_ac_Header'}'`" >&5
19146 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19147 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19148   cat >>confdefs.h <<EOF
19149 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19150 EOF
19151
19152 fi
19153 done
19154
19155 if test "$ac_cv_header_termios_h" = yes ; then
19156         case "$CFLAGS $CPPFLAGS" in
19157         (*-D_POSIX_SOURCE*)
19158                 termios_bad=dunno ;;
19159         (*)     termios_bad=maybe ;;
19160         esac
19161         if test "$termios_bad" = maybe ; then
19162         echo "$as_me:19162: checking whether termios.h needs _POSIX_SOURCE" >&5
19163 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19164         cat >conftest.$ac_ext <<_ACEOF
19165 #line 19165 "configure"
19166 #include "confdefs.h"
19167 #include <termios.h>
19168 int
19169 main (void)
19170 {
19171 struct termios foo; int x = foo.c_iflag
19172   ;
19173   return 0;
19174 }
19175 _ACEOF
19176 rm -f conftest.$ac_objext
19177 if { (eval echo "$as_me:19177: \"$ac_compile\"") >&5
19178   (eval $ac_compile) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit $ac_status); } &&
19182          { ac_try='test -s conftest.$ac_objext'
19183   { (eval echo "$as_me:19183: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit $ac_status); }; }; then
19188   termios_bad=no
19189 else
19190   echo "$as_me: failed program was:" >&5
19191 cat conftest.$ac_ext >&5
19192
19193                 cat >conftest.$ac_ext <<_ACEOF
19194 #line 19194 "configure"
19195 #include "confdefs.h"
19196
19197 #define _POSIX_SOURCE
19198 #include <termios.h>
19199 int
19200 main (void)
19201 {
19202 struct termios foo; int x = foo.c_iflag
19203   ;
19204   return 0;
19205 }
19206 _ACEOF
19207 rm -f conftest.$ac_objext
19208 if { (eval echo "$as_me:19208: \"$ac_compile\"") >&5
19209   (eval $ac_compile) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit $ac_status); } &&
19213          { ac_try='test -s conftest.$ac_objext'
19214   { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215   (eval $ac_try) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit $ac_status); }; }; then
19219   termios_bad=unknown
19220 else
19221   echo "$as_me: failed program was:" >&5
19222 cat conftest.$ac_ext >&5
19223 termios_bad=yes
19224 cat >>confdefs.h <<\EOF
19225 #define _POSIX_SOURCE 1
19226 EOF
19227
19228 fi
19229 rm -f conftest.$ac_objext conftest.$ac_ext
19230
19231 fi
19232 rm -f conftest.$ac_objext conftest.$ac_ext
19233         echo "$as_me:19233: result: $termios_bad" >&5
19234 echo "${ECHO_T}$termios_bad" >&6
19235         fi
19236 fi
19237
19238 echo "$as_me:19238: checking for tcgetattr" >&5
19239 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19240 if test "${cf_cv_have_tcgetattr+set}" = set; then
19241   echo $ECHO_N "(cached) $ECHO_C" >&6
19242 else
19243
19244 cat >conftest.$ac_ext <<_ACEOF
19245 #line 19245 "configure"
19246 #include "confdefs.h"
19247
19248 #include <sys/types.h>
19249 #ifdef HAVE_UNISTD_H
19250 #include <unistd.h>
19251 #endif
19252 #ifdef HAVE_TERMIOS_H
19253 #include <termios.h>
19254 #define TTY struct termios
19255 #else
19256 #ifdef HAVE_TERMIO_H
19257 #include <termio.h>
19258 #define TTY struct termio
19259 #endif
19260 #endif
19261
19262 int
19263 main (void)
19264 {
19265
19266 TTY foo;
19267 tcgetattr(1, &foo);
19268   ;
19269   return 0;
19270 }
19271 _ACEOF
19272 rm -f conftest.$ac_objext conftest$ac_exeext
19273 if { (eval echo "$as_me:19273: \"$ac_link\"") >&5
19274   (eval $ac_link) 2>&5
19275   ac_status=$?
19276   echo "$as_me:19276: \$? = $ac_status" >&5
19277   (exit $ac_status); } &&
19278          { ac_try='test -s conftest$ac_exeext'
19279   { (eval echo "$as_me:19279: \"$ac_try\"") >&5
19280   (eval $ac_try) 2>&5
19281   ac_status=$?
19282   echo "$as_me:19282: \$? = $ac_status" >&5
19283   (exit $ac_status); }; }; then
19284   cf_cv_have_tcgetattr=yes
19285 else
19286   echo "$as_me: failed program was:" >&5
19287 cat conftest.$ac_ext >&5
19288 cf_cv_have_tcgetattr=no
19289 fi
19290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19291 fi
19292 echo "$as_me:19292: result: $cf_cv_have_tcgetattr" >&5
19293 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19294 test "$cf_cv_have_tcgetattr" = yes &&
19295 cat >>confdefs.h <<\EOF
19296 #define HAVE_TCGETATTR 1
19297 EOF
19298
19299 echo "$as_me:19299: checking for vsscanf function or workaround" >&5
19300 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19301 if test "${cf_cv_func_vsscanf+set}" = set; then
19302   echo $ECHO_N "(cached) $ECHO_C" >&6
19303 else
19304
19305 cat >conftest.$ac_ext <<_ACEOF
19306 #line 19306 "configure"
19307 #include "confdefs.h"
19308
19309 #include <stdarg.h>
19310 #include <stdio.h>
19311 int
19312 main (void)
19313 {
19314
19315         va_list ap;
19316         vsscanf("from", "%d", ap)
19317   ;
19318   return 0;
19319 }
19320 _ACEOF
19321 rm -f conftest.$ac_objext conftest$ac_exeext
19322 if { (eval echo "$as_me:19322: \"$ac_link\"") >&5
19323   (eval $ac_link) 2>&5
19324   ac_status=$?
19325   echo "$as_me:19325: \$? = $ac_status" >&5
19326   (exit $ac_status); } &&
19327          { ac_try='test -s conftest$ac_exeext'
19328   { (eval echo "$as_me:19328: \"$ac_try\"") >&5
19329   (eval $ac_try) 2>&5
19330   ac_status=$?
19331   echo "$as_me:19331: \$? = $ac_status" >&5
19332   (exit $ac_status); }; }; then
19333   cf_cv_func_vsscanf=vsscanf
19334 else
19335   echo "$as_me: failed program was:" >&5
19336 cat conftest.$ac_ext >&5
19337
19338 cat >conftest.$ac_ext <<_ACEOF
19339 #line 19339 "configure"
19340 #include "confdefs.h"
19341
19342 #include <stdarg.h>
19343 #include <stdio.h>
19344 int
19345 main (void)
19346 {
19347
19348         FILE strbuf;
19349         char *str = "from";
19350
19351         strbuf._flag = _IOREAD;
19352         strbuf._ptr = strbuf._base = (unsigned char *) str;
19353         strbuf._cnt = strlen(str);
19354         strbuf._file = _NFILE;
19355         return (vfscanf(&strbuf, "%d", ap))
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f conftest.$ac_objext conftest$ac_exeext
19361 if { (eval echo "$as_me:19361: \"$ac_link\"") >&5
19362   (eval $ac_link) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit $ac_status); } &&
19366          { ac_try='test -s conftest$ac_exeext'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit $ac_status); }; }; then
19372   cf_cv_func_vsscanf=vfscanf
19373 else
19374   echo "$as_me: failed program was:" >&5
19375 cat conftest.$ac_ext >&5
19376
19377 cat >conftest.$ac_ext <<_ACEOF
19378 #line 19378 "configure"
19379 #include "confdefs.h"
19380
19381 #include <stdarg.h>
19382 #include <stdio.h>
19383 int
19384 main (void)
19385 {
19386
19387         FILE strbuf;
19388         char *str = "from";
19389
19390         strbuf._flag = _IOREAD;
19391         strbuf._ptr = strbuf._base = (unsigned char *) str;
19392         strbuf._cnt = strlen(str);
19393         strbuf._file = _NFILE;
19394         return (_doscan(&strbuf, "%d", ap))
19395   ;
19396   return 0;
19397 }
19398 _ACEOF
19399 rm -f conftest.$ac_objext conftest$ac_exeext
19400 if { (eval echo "$as_me:19400: \"$ac_link\"") >&5
19401   (eval $ac_link) 2>&5
19402   ac_status=$?
19403   echo "$as_me:19403: \$? = $ac_status" >&5
19404   (exit $ac_status); } &&
19405          { ac_try='test -s conftest$ac_exeext'
19406   { (eval echo "$as_me:19406: \"$ac_try\"") >&5
19407   (eval $ac_try) 2>&5
19408   ac_status=$?
19409   echo "$as_me:19409: \$? = $ac_status" >&5
19410   (exit $ac_status); }; }; then
19411   cf_cv_func_vsscanf=_doscan
19412 else
19413   echo "$as_me: failed program was:" >&5
19414 cat conftest.$ac_ext >&5
19415
19416 cf_cv_func_vsscanf=no
19417 fi
19418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19419 fi
19420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19421 fi
19422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19423 fi
19424 echo "$as_me:19424: result: $cf_cv_func_vsscanf" >&5
19425 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19426
19427 case $cf_cv_func_vsscanf in
19428 (vsscanf)
19429 cat >>confdefs.h <<\EOF
19430 #define HAVE_VSSCANF 1
19431 EOF
19432 ;;
19433 (vfscanf)
19434 cat >>confdefs.h <<\EOF
19435 #define HAVE_VFSCANF 1
19436 EOF
19437 ;;
19438 (_doscan)
19439 cat >>confdefs.h <<\EOF
19440 #define HAVE__DOSCAN 1
19441 EOF
19442 ;;
19443 esac
19444
19445 for ac_header in \
19446 unistd.h \
19447
19448 do
19449 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19450 echo "$as_me:19450: checking for $ac_header" >&5
19451 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19452 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19453   echo $ECHO_N "(cached) $ECHO_C" >&6
19454 else
19455   cat >conftest.$ac_ext <<_ACEOF
19456 #line 19456 "configure"
19457 #include "confdefs.h"
19458 #include <$ac_header>
19459 _ACEOF
19460 if { (eval echo "$as_me:19460: \"$ac_cpp conftest.$ac_ext\"") >&5
19461   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19462   ac_status=$?
19463   egrep -v '^ *\+' conftest.er1 >conftest.err
19464   rm -f conftest.er1
19465   cat conftest.err >&5
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit $ac_status); } >/dev/null; then
19468   if test -s conftest.err; then
19469     ac_cpp_err=$ac_c_preproc_warn_flag
19470   else
19471     ac_cpp_err=
19472   fi
19473 else
19474   ac_cpp_err=yes
19475 fi
19476 if test -z "$ac_cpp_err"; then
19477   eval "$as_ac_Header=yes"
19478 else
19479   echo "$as_me: failed program was:" >&5
19480   cat conftest.$ac_ext >&5
19481   eval "$as_ac_Header=no"
19482 fi
19483 rm -f conftest.err conftest.$ac_ext
19484 fi
19485 echo "$as_me:19485: result: `eval echo '${'$as_ac_Header'}'`" >&5
19486 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19487 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19488   cat >>confdefs.h <<EOF
19489 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19490 EOF
19491
19492 fi
19493 done
19494
19495 echo "$as_me:19495: checking for working mkstemp" >&5
19496 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19497 if test "${cf_cv_func_mkstemp+set}" = set; then
19498   echo $ECHO_N "(cached) $ECHO_C" >&6
19499 else
19500
19501 rm -rf conftest*
19502 if test "$cross_compiling" = yes; then
19503   cf_cv_func_mkstemp=maybe
19504 else
19505   cat >conftest.$ac_ext <<_ACEOF
19506 #line 19506 "configure"
19507 #include "confdefs.h"
19508
19509 #include <sys/types.h>
19510 #ifdef HAVE_UNISTD_H
19511 #include <unistd.h>
19512 #endif
19513 #include <stdlib.h>
19514 #include <stdio.h>
19515 #include <string.h>
19516 #include <sys/stat.h>
19517 int main(void)
19518 {
19519         char *tmpl = "conftestXXXXXX";
19520         char name[2][80];
19521         int n;
19522         int result = 0;
19523         int fd;
19524         struct stat sb;
19525
19526         umask(077);
19527         for (n = 0; n < 2; ++n) {
19528                 strcpy(name[n], tmpl);
19529                 if ((fd = mkstemp(name[n])) >= 0) {
19530                         if (!strcmp(name[n], tmpl)
19531                          || stat(name[n], &sb) != 0
19532                          || (sb.st_mode & S_IFMT) != S_IFREG
19533                          || (sb.st_mode & 077) != 0) {
19534                                 result = 1;
19535                         }
19536                         close(fd);
19537                 }
19538         }
19539         if (result == 0
19540          && !strcmp(name[0], name[1]))
19541                 result = 1;
19542         ${cf_cv_main_return:-return}(result);
19543 }
19544
19545 _ACEOF
19546 rm -f conftest$ac_exeext
19547 if { (eval echo "$as_me:19547: \"$ac_link\"") >&5
19548   (eval $ac_link) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19552   { (eval echo "$as_me:19552: \"$ac_try\"") >&5
19553   (eval $ac_try) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit $ac_status); }; }; then
19557   cf_cv_func_mkstemp=yes
19558
19559 else
19560   echo "$as_me: program exited with status $ac_status" >&5
19561 echo "$as_me: failed program was:" >&5
19562 cat conftest.$ac_ext >&5
19563 cf_cv_func_mkstemp=no
19564
19565 fi
19566 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19567 fi
19568
19569 fi
19570 echo "$as_me:19570: result: $cf_cv_func_mkstemp" >&5
19571 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19572 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19573         echo "$as_me:19573: checking for mkstemp" >&5
19574 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19575 if test "${ac_cv_func_mkstemp+set}" = set; then
19576   echo $ECHO_N "(cached) $ECHO_C" >&6
19577 else
19578   cat >conftest.$ac_ext <<_ACEOF
19579 #line 19579 "configure"
19580 #include "confdefs.h"
19581 #define mkstemp autoconf_temporary
19582 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19583 #undef mkstemp
19584
19585 #ifdef __cplusplus
19586 extern "C"
19587 #endif
19588
19589 /* We use char because int might match the return type of a gcc2
19590    builtin and then its argument prototype would still apply.  */
19591 char mkstemp (void);
19592
19593 int
19594 main (void)
19595 {
19596
19597 /* The GNU C library defines stubs for functions which it implements
19598     to always fail with ENOSYS.  Some functions are actually named
19599     something starting with __ and the normal name is an alias.  */
19600 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19601 #error found stub for mkstemp
19602 #endif
19603
19604         return mkstemp ();
19605   ;
19606   return 0;
19607 }
19608 _ACEOF
19609 rm -f conftest.$ac_objext conftest$ac_exeext
19610 if { (eval echo "$as_me:19610: \"$ac_link\"") >&5
19611   (eval $ac_link) 2>&5
19612   ac_status=$?
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit $ac_status); } &&
19615          { ac_try='test -s conftest$ac_exeext'
19616   { (eval echo "$as_me:19616: \"$ac_try\"") >&5
19617   (eval $ac_try) 2>&5
19618   ac_status=$?
19619   echo "$as_me:19619: \$? = $ac_status" >&5
19620   (exit $ac_status); }; }; then
19621   ac_cv_func_mkstemp=yes
19622 else
19623   echo "$as_me: failed program was:" >&5
19624 cat conftest.$ac_ext >&5
19625 ac_cv_func_mkstemp=no
19626 fi
19627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19628 fi
19629 echo "$as_me:19629: result: $ac_cv_func_mkstemp" >&5
19630 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19631
19632 fi
19633 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19634
19635 cat >>confdefs.h <<\EOF
19636 #define HAVE_MKSTEMP 1
19637 EOF
19638
19639 fi
19640
19641 # setup for prototype of fallback for vsscanf()
19642
19643 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19644         HAVE_VSSCANF=1
19645 else
19646         HAVE_VSSCANF=0
19647 fi
19648
19649 if test "x$cross_compiling" = xyes ; then
19650         { echo "$as_me:19650: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19651 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19652 else
19653         echo "$as_me:19653: checking whether setvbuf arguments are reversed" >&5
19654 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19655 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19656   echo $ECHO_N "(cached) $ECHO_C" >&6
19657 else
19658   if test "$cross_compiling" = yes; then
19659   { { echo "$as_me:19659: error: cannot run test program while cross compiling" >&5
19660 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19661    { (exit 1); exit 1; }; }
19662 else
19663   cat >conftest.$ac_ext <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666 #include <stdio.h>
19667 /* If setvbuf has the reversed format, exit 0. */
19668 int
19669 main (void)
19670 {
19671   /* This call has the arguments reversed.
19672      A reversed system may check and see that the address of main
19673      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19674   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19675     $ac_main_return(1);
19676   putc('\r', stdout);
19677   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19678 }
19679 _ACEOF
19680 rm -f conftest$ac_exeext
19681 if { (eval echo "$as_me:19681: \"$ac_link\"") >&5
19682   (eval $ac_link) 2>&5
19683   ac_status=$?
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19686   { (eval echo "$as_me:19686: \"$ac_try\"") >&5
19687   (eval $ac_try) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit $ac_status); }; }; then
19691   ac_cv_func_setvbuf_reversed=yes
19692 else
19693   echo "$as_me: program exited with status $ac_status" >&5
19694 echo "$as_me: failed program was:" >&5
19695 cat conftest.$ac_ext >&5
19696 ac_cv_func_setvbuf_reversed=no
19697 fi
19698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19699 fi
19700 rm -f core core.* *.core
19701 fi
19702 echo "$as_me:19702: result: $ac_cv_func_setvbuf_reversed" >&5
19703 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19704 if test $ac_cv_func_setvbuf_reversed = yes; then
19705
19706 cat >>confdefs.h <<\EOF
19707 #define SETVBUF_REVERSED 1
19708 EOF
19709
19710 fi
19711
19712 fi
19713 echo "$as_me:19713: checking for intptr_t" >&5
19714 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19715 if test "${ac_cv_type_intptr_t+set}" = set; then
19716   echo $ECHO_N "(cached) $ECHO_C" >&6
19717 else
19718   cat >conftest.$ac_ext <<_ACEOF
19719 #line 19719 "configure"
19720 #include "confdefs.h"
19721 $ac_includes_default
19722 int
19723 main (void)
19724 {
19725 if ((intptr_t *) 0)
19726   return 0;
19727 if (sizeof (intptr_t))
19728   return 0;
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 rm -f conftest.$ac_objext
19734 if { (eval echo "$as_me:19734: \"$ac_compile\"") >&5
19735   (eval $ac_compile) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit $ac_status); } &&
19739          { ac_try='test -s conftest.$ac_objext'
19740   { (eval echo "$as_me:19740: \"$ac_try\"") >&5
19741   (eval $ac_try) 2>&5
19742   ac_status=$?
19743   echo "$as_me:19743: \$? = $ac_status" >&5
19744   (exit $ac_status); }; }; then
19745   ac_cv_type_intptr_t=yes
19746 else
19747   echo "$as_me: failed program was:" >&5
19748 cat conftest.$ac_ext >&5
19749 ac_cv_type_intptr_t=no
19750 fi
19751 rm -f conftest.$ac_objext conftest.$ac_ext
19752 fi
19753 echo "$as_me:19753: result: $ac_cv_type_intptr_t" >&5
19754 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19755 if test $ac_cv_type_intptr_t = yes; then
19756   :
19757 else
19758
19759 cat >>confdefs.h <<EOF
19760 #define intptr_t long
19761 EOF
19762
19763 fi
19764
19765 echo "$as_me:19765: checking for ssize_t" >&5
19766 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19767 if test "${ac_cv_type_ssize_t+set}" = set; then
19768   echo $ECHO_N "(cached) $ECHO_C" >&6
19769 else
19770   cat >conftest.$ac_ext <<_ACEOF
19771 #line 19771 "configure"
19772 #include "confdefs.h"
19773 $ac_includes_default
19774 int
19775 main (void)
19776 {
19777 if ((ssize_t *) 0)
19778   return 0;
19779 if (sizeof (ssize_t))
19780   return 0;
19781   ;
19782   return 0;
19783 }
19784 _ACEOF
19785 rm -f conftest.$ac_objext
19786 if { (eval echo "$as_me:19786: \"$ac_compile\"") >&5
19787   (eval $ac_compile) 2>&5
19788   ac_status=$?
19789   echo "$as_me:19789: \$? = $ac_status" >&5
19790   (exit $ac_status); } &&
19791          { ac_try='test -s conftest.$ac_objext'
19792   { (eval echo "$as_me:19792: \"$ac_try\"") >&5
19793   (eval $ac_try) 2>&5
19794   ac_status=$?
19795   echo "$as_me:19795: \$? = $ac_status" >&5
19796   (exit $ac_status); }; }; then
19797   ac_cv_type_ssize_t=yes
19798 else
19799   echo "$as_me: failed program was:" >&5
19800 cat conftest.$ac_ext >&5
19801 ac_cv_type_ssize_t=no
19802 fi
19803 rm -f conftest.$ac_objext conftest.$ac_ext
19804 fi
19805 echo "$as_me:19805: result: $ac_cv_type_ssize_t" >&5
19806 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19807 if test $ac_cv_type_ssize_t = yes; then
19808   :
19809 else
19810
19811 cat >>confdefs.h <<EOF
19812 #define ssize_t int
19813 EOF
19814
19815 fi
19816
19817 echo "$as_me:19817: checking for type sigaction_t" >&5
19818 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19819 if test "${cf_cv_type_sigaction+set}" = set; then
19820   echo $ECHO_N "(cached) $ECHO_C" >&6
19821 else
19822
19823         cat >conftest.$ac_ext <<_ACEOF
19824 #line 19824 "configure"
19825 #include "confdefs.h"
19826
19827 #include <signal.h>
19828 int
19829 main (void)
19830 {
19831 sigaction_t x
19832   ;
19833   return 0;
19834 }
19835 _ACEOF
19836 rm -f conftest.$ac_objext
19837 if { (eval echo "$as_me:19837: \"$ac_compile\"") >&5
19838   (eval $ac_compile) 2>&5
19839   ac_status=$?
19840   echo "$as_me:19840: \$? = $ac_status" >&5
19841   (exit $ac_status); } &&
19842          { ac_try='test -s conftest.$ac_objext'
19843   { (eval echo "$as_me:19843: \"$ac_try\"") >&5
19844   (eval $ac_try) 2>&5
19845   ac_status=$?
19846   echo "$as_me:19846: \$? = $ac_status" >&5
19847   (exit $ac_status); }; }; then
19848   cf_cv_type_sigaction=yes
19849 else
19850   echo "$as_me: failed program was:" >&5
19851 cat conftest.$ac_ext >&5
19852 cf_cv_type_sigaction=no
19853 fi
19854 rm -f conftest.$ac_objext conftest.$ac_ext
19855 fi
19856
19857 echo "$as_me:19857: result: $cf_cv_type_sigaction" >&5
19858 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19859 test "$cf_cv_type_sigaction" = yes &&
19860 cat >>confdefs.h <<\EOF
19861 #define HAVE_TYPE_SIGACTION 1
19862 EOF
19863
19864 echo "$as_me:19864: checking declaration of size-change" >&5
19865 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19866 if test "${cf_cv_sizechange+set}" = set; then
19867   echo $ECHO_N "(cached) $ECHO_C" >&6
19868 else
19869
19870         cf_cv_sizechange=unknown
19871         cf_save_CPPFLAGS="$CPPFLAGS"
19872
19873 for cf_opts in "" "NEED_PTEM_H"
19874 do
19875
19876         CPPFLAGS="$cf_save_CPPFLAGS"
19877         if test -n "$cf_opts"
19878         then
19879
19880         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19881         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19882
19883         fi
19884         cat >conftest.$ac_ext <<_ACEOF
19885 #line 19885 "configure"
19886 #include "confdefs.h"
19887 #include <sys/types.h>
19888 #ifdef HAVE_TERMIOS_H
19889 #include <termios.h>
19890 #else
19891 #ifdef HAVE_TERMIO_H
19892 #include <termio.h>
19893 #endif
19894 #endif
19895
19896 #ifdef NEED_PTEM_H
19897 /* This is a workaround for SCO:  they neglected to define struct winsize in
19898  * termios.h -- it's only in termio.h and ptem.h
19899  */
19900 #include <sys/stream.h>
19901 #include <sys/ptem.h>
19902 #endif
19903
19904 #ifdef HAVE_SYS_IOCTL_H
19905 #include <sys/ioctl.h>
19906 #endif
19907
19908 int
19909 main (void)
19910 {
19911
19912 #ifdef TIOCGSIZE
19913         struct ttysize win;     /* SunOS 3.0... */
19914         int y = win.ts_lines;
19915         int x = win.ts_cols;
19916 #else
19917 #ifdef TIOCGWINSZ
19918         struct winsize win;     /* everything else */
19919         int y = win.ws_row;
19920         int x = win.ws_col;
19921 #else
19922         no TIOCGSIZE or TIOCGWINSZ
19923 #endif /* TIOCGWINSZ */
19924 #endif /* TIOCGSIZE */
19925
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 rm -f conftest.$ac_objext
19931 if { (eval echo "$as_me:19931: \"$ac_compile\"") >&5
19932   (eval $ac_compile) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit $ac_status); } &&
19936          { ac_try='test -s conftest.$ac_objext'
19937   { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938   (eval $ac_try) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit $ac_status); }; }; then
19942   cf_cv_sizechange=yes
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat conftest.$ac_ext >&5
19946 cf_cv_sizechange=no
19947 fi
19948 rm -f conftest.$ac_objext conftest.$ac_ext
19949
19950         CPPFLAGS="$cf_save_CPPFLAGS"
19951         if test "$cf_cv_sizechange" = yes ; then
19952                 echo "size-change succeeded ($cf_opts)" >&5
19953                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19954                 break
19955         fi
19956 done
19957
19958 fi
19959 echo "$as_me:19959: result: $cf_cv_sizechange" >&5
19960 echo "${ECHO_T}$cf_cv_sizechange" >&6
19961 if test "$cf_cv_sizechange" != no ; then
19962
19963 cat >>confdefs.h <<\EOF
19964 #define HAVE_SIZECHANGE 1
19965 EOF
19966
19967         case $cf_cv_sizechange in
19968         (NEED*)
19969                 cat >>confdefs.h <<EOF
19970 #define $cf_cv_sizechange  1
19971 EOF
19972
19973                 ;;
19974         esac
19975 fi
19976
19977 echo "$as_me:19977: checking for memmove" >&5
19978 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19979 if test "${ac_cv_func_memmove+set}" = set; then
19980   echo $ECHO_N "(cached) $ECHO_C" >&6
19981 else
19982   cat >conftest.$ac_ext <<_ACEOF
19983 #line 19983 "configure"
19984 #include "confdefs.h"
19985 #define memmove autoconf_temporary
19986 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19987 #undef memmove
19988
19989 #ifdef __cplusplus
19990 extern "C"
19991 #endif
19992
19993 /* We use char because int might match the return type of a gcc2
19994    builtin and then its argument prototype would still apply.  */
19995 char memmove (void);
19996
19997 int
19998 main (void)
19999 {
20000
20001 /* The GNU C library defines stubs for functions which it implements
20002     to always fail with ENOSYS.  Some functions are actually named
20003     something starting with __ and the normal name is an alias.  */
20004 #if defined (__stub_memmove) || defined (__stub___memmove)
20005 #error found stub for memmove
20006 #endif
20007
20008         return memmove ();
20009   ;
20010   return 0;
20011 }
20012 _ACEOF
20013 rm -f conftest.$ac_objext conftest$ac_exeext
20014 if { (eval echo "$as_me:20014: \"$ac_link\"") >&5
20015   (eval $ac_link) 2>&5
20016   ac_status=$?
20017   echo "$as_me:20017: \$? = $ac_status" >&5
20018   (exit $ac_status); } &&
20019          { ac_try='test -s conftest$ac_exeext'
20020   { (eval echo "$as_me:20020: \"$ac_try\"") >&5
20021   (eval $ac_try) 2>&5
20022   ac_status=$?
20023   echo "$as_me:20023: \$? = $ac_status" >&5
20024   (exit $ac_status); }; }; then
20025   ac_cv_func_memmove=yes
20026 else
20027   echo "$as_me: failed program was:" >&5
20028 cat conftest.$ac_ext >&5
20029 ac_cv_func_memmove=no
20030 fi
20031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20032 fi
20033 echo "$as_me:20033: result: $ac_cv_func_memmove" >&5
20034 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20035 if test $ac_cv_func_memmove = yes; then
20036   :
20037 else
20038
20039 echo "$as_me:20039: checking for bcopy" >&5
20040 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20041 if test "${ac_cv_func_bcopy+set}" = set; then
20042   echo $ECHO_N "(cached) $ECHO_C" >&6
20043 else
20044   cat >conftest.$ac_ext <<_ACEOF
20045 #line 20045 "configure"
20046 #include "confdefs.h"
20047 #define bcopy autoconf_temporary
20048 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20049 #undef bcopy
20050
20051 #ifdef __cplusplus
20052 extern "C"
20053 #endif
20054
20055 /* We use char because int might match the return type of a gcc2
20056    builtin and then its argument prototype would still apply.  */
20057 char bcopy (void);
20058
20059 int
20060 main (void)
20061 {
20062
20063 /* The GNU C library defines stubs for functions which it implements
20064     to always fail with ENOSYS.  Some functions are actually named
20065     something starting with __ and the normal name is an alias.  */
20066 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20067 #error found stub for bcopy
20068 #endif
20069
20070         return bcopy ();
20071   ;
20072   return 0;
20073 }
20074 _ACEOF
20075 rm -f conftest.$ac_objext conftest$ac_exeext
20076 if { (eval echo "$as_me:20076: \"$ac_link\"") >&5
20077   (eval $ac_link) 2>&5
20078   ac_status=$?
20079   echo "$as_me:20079: \$? = $ac_status" >&5
20080   (exit $ac_status); } &&
20081          { ac_try='test -s conftest$ac_exeext'
20082   { (eval echo "$as_me:20082: \"$ac_try\"") >&5
20083   (eval $ac_try) 2>&5
20084   ac_status=$?
20085   echo "$as_me:20085: \$? = $ac_status" >&5
20086   (exit $ac_status); }; }; then
20087   ac_cv_func_bcopy=yes
20088 else
20089   echo "$as_me: failed program was:" >&5
20090 cat conftest.$ac_ext >&5
20091 ac_cv_func_bcopy=no
20092 fi
20093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20094 fi
20095 echo "$as_me:20095: result: $ac_cv_func_bcopy" >&5
20096 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20097 if test $ac_cv_func_bcopy = yes; then
20098
20099         echo "$as_me:20099: checking if bcopy does overlapping moves" >&5
20100 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20101 if test "${cf_cv_good_bcopy+set}" = set; then
20102   echo $ECHO_N "(cached) $ECHO_C" >&6
20103 else
20104
20105                 if test "$cross_compiling" = yes; then
20106   cf_cv_good_bcopy=unknown
20107 else
20108   cat >conftest.$ac_ext <<_ACEOF
20109 #line 20109 "configure"
20110 #include "confdefs.h"
20111
20112 int main(void) {
20113         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20114         char temp[40];
20115         bcopy(data, temp, sizeof(data));
20116         bcopy(temp+10, temp, 15);
20117         bcopy(temp+5, temp+15, 10);
20118         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20119 }
20120
20121 _ACEOF
20122 rm -f conftest$ac_exeext
20123 if { (eval echo "$as_me:20123: \"$ac_link\"") >&5
20124   (eval $ac_link) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20128   { (eval echo "$as_me:20128: \"$ac_try\"") >&5
20129   (eval $ac_try) 2>&5
20130   ac_status=$?
20131   echo "$as_me:20131: \$? = $ac_status" >&5
20132   (exit $ac_status); }; }; then
20133   cf_cv_good_bcopy=yes
20134 else
20135   echo "$as_me: program exited with status $ac_status" >&5
20136 echo "$as_me: failed program was:" >&5
20137 cat conftest.$ac_ext >&5
20138 cf_cv_good_bcopy=no
20139 fi
20140 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20141 fi
20142
20143 fi
20144 echo "$as_me:20144: result: $cf_cv_good_bcopy" >&5
20145 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20146
20147 else
20148   cf_cv_good_bcopy=no
20149 fi
20150
20151         if test "$cf_cv_good_bcopy" = yes ; then
20152
20153 cat >>confdefs.h <<\EOF
20154 #define USE_OK_BCOPY 1
20155 EOF
20156
20157         else
20158
20159 cat >>confdefs.h <<\EOF
20160 #define USE_MY_MEMMOVE 1
20161 EOF
20162
20163         fi
20164
20165 fi
20166
20167 tty 2>&1 >/dev/null || {
20168 for ac_func in posix_openpt
20169 do
20170 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20171 echo "$as_me:20171: checking for $ac_func" >&5
20172 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20173 if eval "test \"\${$as_ac_var+set}\" = set"; then
20174   echo $ECHO_N "(cached) $ECHO_C" >&6
20175 else
20176   cat >conftest.$ac_ext <<_ACEOF
20177 #line 20177 "configure"
20178 #include "confdefs.h"
20179 #define $ac_func autoconf_temporary
20180 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20181 #undef $ac_func
20182
20183 #ifdef __cplusplus
20184 extern "C"
20185 #endif
20186
20187 /* We use char because int might match the return type of a gcc2
20188    builtin and then its argument prototype would still apply.  */
20189 char $ac_func (void);
20190
20191 int
20192 main (void)
20193 {
20194
20195 /* The GNU C library defines stubs for functions which it implements
20196     to always fail with ENOSYS.  Some functions are actually named
20197     something starting with __ and the normal name is an alias.  */
20198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20199 #error found stub for $ac_func
20200 #endif
20201
20202         return $ac_func ();
20203   ;
20204   return 0;
20205 }
20206 _ACEOF
20207 rm -f conftest.$ac_objext conftest$ac_exeext
20208 if { (eval echo "$as_me:20208: \"$ac_link\"") >&5
20209   (eval $ac_link) 2>&5
20210   ac_status=$?
20211   echo "$as_me:20211: \$? = $ac_status" >&5
20212   (exit $ac_status); } &&
20213          { ac_try='test -s conftest$ac_exeext'
20214   { (eval echo "$as_me:20214: \"$ac_try\"") >&5
20215   (eval $ac_try) 2>&5
20216   ac_status=$?
20217   echo "$as_me:20217: \$? = $ac_status" >&5
20218   (exit $ac_status); }; }; then
20219   eval "$as_ac_var=yes"
20220 else
20221   echo "$as_me: failed program was:" >&5
20222 cat conftest.$ac_ext >&5
20223 eval "$as_ac_var=no"
20224 fi
20225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20226 fi
20227 echo "$as_me:20227: result: `eval echo '${'$as_ac_var'}'`" >&5
20228 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20229 if test `eval echo '${'$as_ac_var'}'` = yes; then
20230   cat >>confdefs.h <<EOF
20231 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20232 EOF
20233
20234 fi
20235 done
20236  }
20237 echo "$as_me:20237: checking if poll really works" >&5
20238 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20239 if test "${cf_cv_working_poll+set}" = set; then
20240   echo $ECHO_N "(cached) $ECHO_C" >&6
20241 else
20242
20243 if test "$cross_compiling" = yes; then
20244   cf_cv_working_poll=unknown
20245 else
20246   cat >conftest.$ac_ext <<_ACEOF
20247 #line 20247 "configure"
20248 #include "confdefs.h"
20249
20250 #include <stdlib.h>
20251 #include <stdio.h>
20252 #include <unistd.h>
20253 #include <fcntl.h>
20254 #ifdef HAVE_POLL_H
20255 #include <poll.h>
20256 #else
20257 #include <sys/poll.h>
20258 #endif
20259 int main(void) {
20260         struct pollfd myfds;
20261         int ret;
20262
20263         /* check for Darwin bug with respect to "devices" */
20264         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20265         if (myfds.fd < 0)
20266                 myfds.fd = 0;
20267         myfds.events = POLLIN;
20268         myfds.revents = 0;
20269
20270         ret = poll(&myfds, 1, 100);
20271
20272         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20273                 ret = -1;
20274         } else {
20275                 int fd = 0;
20276                 if (!isatty(fd)) {
20277                         fd = open("/dev/tty", 2);       /* O_RDWR */
20278                 }
20279 #ifdef HAVE_POSIX_OPENPT
20280                 if (fd < 0) {
20281                         fd = posix_openpt(O_RDWR);
20282                 }
20283 #endif
20284
20285                 if (fd >= 0) {
20286                         /* also check with standard input */
20287                         myfds.fd = fd;
20288                         myfds.events = POLLIN;
20289                         myfds.revents = 0;
20290                         ret = poll(&myfds, 1, 100);
20291                 } else {
20292                         ret = -1;
20293                 }
20294         }
20295         ${cf_cv_main_return:-return}(ret < 0);
20296 }
20297 _ACEOF
20298 rm -f conftest$ac_exeext
20299 if { (eval echo "$as_me:20299: \"$ac_link\"") >&5
20300   (eval $ac_link) 2>&5
20301   ac_status=$?
20302   echo "$as_me:20302: \$? = $ac_status" >&5
20303   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20304   { (eval echo "$as_me:20304: \"$ac_try\"") >&5
20305   (eval $ac_try) 2>&5
20306   ac_status=$?
20307   echo "$as_me:20307: \$? = $ac_status" >&5
20308   (exit $ac_status); }; }; then
20309   cf_cv_working_poll=yes
20310 else
20311   echo "$as_me: program exited with status $ac_status" >&5
20312 echo "$as_me: failed program was:" >&5
20313 cat conftest.$ac_ext >&5
20314 cf_cv_working_poll=no
20315 fi
20316 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20317 fi
20318 fi
20319 echo "$as_me:20319: result: $cf_cv_working_poll" >&5
20320 echo "${ECHO_T}$cf_cv_working_poll" >&6
20321 test "$cf_cv_working_poll" = "yes" &&
20322 cat >>confdefs.h <<\EOF
20323 #define HAVE_WORKING_POLL 1
20324 EOF
20325
20326 echo "$as_me:20326: checking for va_copy" >&5
20327 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20328 if test "${cf_cv_have_va_copy+set}" = set; then
20329   echo $ECHO_N "(cached) $ECHO_C" >&6
20330 else
20331
20332 cat >conftest.$ac_ext <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20335
20336 #include <stdarg.h>
20337
20338 int
20339 main (void)
20340 {
20341
20342         static va_list dst;
20343         static va_list src;
20344         va_copy(dst, src)
20345   ;
20346   return 0;
20347 }
20348 _ACEOF
20349 rm -f conftest.$ac_objext conftest$ac_exeext
20350 if { (eval echo "$as_me:20350: \"$ac_link\"") >&5
20351   (eval $ac_link) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit $ac_status); } &&
20355          { ac_try='test -s conftest$ac_exeext'
20356   { (eval echo "$as_me:20356: \"$ac_try\"") >&5
20357   (eval $ac_try) 2>&5
20358   ac_status=$?
20359   echo "$as_me:20359: \$? = $ac_status" >&5
20360   (exit $ac_status); }; }; then
20361   cf_cv_have_va_copy=yes
20362 else
20363   echo "$as_me: failed program was:" >&5
20364 cat conftest.$ac_ext >&5
20365 cf_cv_have_va_copy=no
20366 fi
20367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20368 fi
20369 echo "$as_me:20369: result: $cf_cv_have_va_copy" >&5
20370 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20371
20372 test "$cf_cv_have_va_copy" = yes &&
20373 cat >>confdefs.h <<\EOF
20374 #define HAVE_VA_COPY 1
20375 EOF
20376
20377 echo "$as_me:20377: checking for __va_copy" >&5
20378 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20379 if test "${cf_cv_have___va_copy+set}" = set; then
20380   echo $ECHO_N "(cached) $ECHO_C" >&6
20381 else
20382
20383 cat >conftest.$ac_ext <<_ACEOF
20384 #line 20384 "configure"
20385 #include "confdefs.h"
20386
20387 #include <stdarg.h>
20388
20389 int
20390 main (void)
20391 {
20392
20393         static va_list dst;
20394         static va_list src;
20395         __va_copy(dst, src)
20396   ;
20397   return 0;
20398 }
20399 _ACEOF
20400 rm -f conftest.$ac_objext conftest$ac_exeext
20401 if { (eval echo "$as_me:20401: \"$ac_link\"") >&5
20402   (eval $ac_link) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); } &&
20406          { ac_try='test -s conftest$ac_exeext'
20407   { (eval echo "$as_me:20407: \"$ac_try\"") >&5
20408   (eval $ac_try) 2>&5
20409   ac_status=$?
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit $ac_status); }; }; then
20412   cf_cv_have___va_copy=yes
20413 else
20414   echo "$as_me: failed program was:" >&5
20415 cat conftest.$ac_ext >&5
20416 cf_cv_have___va_copy=no
20417 fi
20418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20419 fi
20420 echo "$as_me:20420: result: $cf_cv_have___va_copy" >&5
20421 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20422
20423 test "$cf_cv_have___va_copy" = yes &&
20424 cat >>confdefs.h <<\EOF
20425 #define HAVE___VA_COPY 1
20426 EOF
20427
20428 echo "$as_me:20428: checking for pid_t" >&5
20429 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20430 if test "${ac_cv_type_pid_t+set}" = set; then
20431   echo $ECHO_N "(cached) $ECHO_C" >&6
20432 else
20433   cat >conftest.$ac_ext <<_ACEOF
20434 #line 20434 "configure"
20435 #include "confdefs.h"
20436 $ac_includes_default
20437 int
20438 main (void)
20439 {
20440 if ((pid_t *) 0)
20441   return 0;
20442 if (sizeof (pid_t))
20443   return 0;
20444   ;
20445   return 0;
20446 }
20447 _ACEOF
20448 rm -f conftest.$ac_objext
20449 if { (eval echo "$as_me:20449: \"$ac_compile\"") >&5
20450   (eval $ac_compile) 2>&5
20451   ac_status=$?
20452   echo "$as_me:20452: \$? = $ac_status" >&5
20453   (exit $ac_status); } &&
20454          { ac_try='test -s conftest.$ac_objext'
20455   { (eval echo "$as_me:20455: \"$ac_try\"") >&5
20456   (eval $ac_try) 2>&5
20457   ac_status=$?
20458   echo "$as_me:20458: \$? = $ac_status" >&5
20459   (exit $ac_status); }; }; then
20460   ac_cv_type_pid_t=yes
20461 else
20462   echo "$as_me: failed program was:" >&5
20463 cat conftest.$ac_ext >&5
20464 ac_cv_type_pid_t=no
20465 fi
20466 rm -f conftest.$ac_objext conftest.$ac_ext
20467 fi
20468 echo "$as_me:20468: result: $ac_cv_type_pid_t" >&5
20469 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20470 if test $ac_cv_type_pid_t = yes; then
20471   :
20472 else
20473
20474 cat >>confdefs.h <<EOF
20475 #define pid_t int
20476 EOF
20477
20478 fi
20479
20480 for ac_header in unistd.h vfork.h
20481 do
20482 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20483 echo "$as_me:20483: checking for $ac_header" >&5
20484 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20485 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20486   echo $ECHO_N "(cached) $ECHO_C" >&6
20487 else
20488   cat >conftest.$ac_ext <<_ACEOF
20489 #line 20489 "configure"
20490 #include "confdefs.h"
20491 #include <$ac_header>
20492 _ACEOF
20493 if { (eval echo "$as_me:20493: \"$ac_cpp conftest.$ac_ext\"") >&5
20494   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20495   ac_status=$?
20496   egrep -v '^ *\+' conftest.er1 >conftest.err
20497   rm -f conftest.er1
20498   cat conftest.err >&5
20499   echo "$as_me:20499: \$? = $ac_status" >&5
20500   (exit $ac_status); } >/dev/null; then
20501   if test -s conftest.err; then
20502     ac_cpp_err=$ac_c_preproc_warn_flag
20503   else
20504     ac_cpp_err=
20505   fi
20506 else
20507   ac_cpp_err=yes
20508 fi
20509 if test -z "$ac_cpp_err"; then
20510   eval "$as_ac_Header=yes"
20511 else
20512   echo "$as_me: failed program was:" >&5
20513   cat conftest.$ac_ext >&5
20514   eval "$as_ac_Header=no"
20515 fi
20516 rm -f conftest.err conftest.$ac_ext
20517 fi
20518 echo "$as_me:20518: result: `eval echo '${'$as_ac_Header'}'`" >&5
20519 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20520 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20521   cat >>confdefs.h <<EOF
20522 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20523 EOF
20524
20525 fi
20526 done
20527
20528 for ac_func in fork vfork
20529 do
20530 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20531 echo "$as_me:20531: checking for $ac_func" >&5
20532 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20533 if eval "test \"\${$as_ac_var+set}\" = set"; then
20534   echo $ECHO_N "(cached) $ECHO_C" >&6
20535 else
20536   cat >conftest.$ac_ext <<_ACEOF
20537 #line 20537 "configure"
20538 #include "confdefs.h"
20539 #define $ac_func autoconf_temporary
20540 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20541 #undef $ac_func
20542
20543 #ifdef __cplusplus
20544 extern "C"
20545 #endif
20546
20547 /* We use char because int might match the return type of a gcc2
20548    builtin and then its argument prototype would still apply.  */
20549 char $ac_func (void);
20550
20551 int
20552 main (void)
20553 {
20554
20555 /* The GNU C library defines stubs for functions which it implements
20556     to always fail with ENOSYS.  Some functions are actually named
20557     something starting with __ and the normal name is an alias.  */
20558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20559 #error found stub for $ac_func
20560 #endif
20561
20562         return $ac_func ();
20563   ;
20564   return 0;
20565 }
20566 _ACEOF
20567 rm -f conftest.$ac_objext conftest$ac_exeext
20568 if { (eval echo "$as_me:20568: \"$ac_link\"") >&5
20569   (eval $ac_link) 2>&5
20570   ac_status=$?
20571   echo "$as_me:20571: \$? = $ac_status" >&5
20572   (exit $ac_status); } &&
20573          { ac_try='test -s conftest$ac_exeext'
20574   { (eval echo "$as_me:20574: \"$ac_try\"") >&5
20575   (eval $ac_try) 2>&5
20576   ac_status=$?
20577   echo "$as_me:20577: \$? = $ac_status" >&5
20578   (exit $ac_status); }; }; then
20579   eval "$as_ac_var=yes"
20580 else
20581   echo "$as_me: failed program was:" >&5
20582 cat conftest.$ac_ext >&5
20583 eval "$as_ac_var=no"
20584 fi
20585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20586 fi
20587 echo "$as_me:20587: result: `eval echo '${'$as_ac_var'}'`" >&5
20588 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20589 if test `eval echo '${'$as_ac_var'}'` = yes; then
20590   cat >>confdefs.h <<EOF
20591 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20592 EOF
20593
20594 fi
20595 done
20596
20597 ac_cv_func_fork_works=$ac_cv_func_fork
20598 if test "x$ac_cv_func_fork" = xyes; then
20599   echo "$as_me:20599: checking for working fork" >&5
20600 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20601 if test "${ac_cv_func_fork_works+set}" = set; then
20602   echo $ECHO_N "(cached) $ECHO_C" >&6
20603 else
20604   if test "$cross_compiling" = yes; then
20605   ac_cv_func_fork_works=cross
20606 else
20607   cat >conftest.$ac_ext <<_ACEOF
20608 /* By Rüdiger Kuhlmann. */
20609       #include <sys/types.h>
20610       #if HAVE_UNISTD_H
20611       # include <unistd.h>
20612       #endif
20613       /* Some systems only have a dummy stub for fork() */
20614       int main (void)
20615       {
20616         if (fork() < 0)
20617           $ac_main_return (1);
20618         $ac_main_return (0);
20619       }
20620 _ACEOF
20621 rm -f conftest$ac_exeext
20622 if { (eval echo "$as_me:20622: \"$ac_link\"") >&5
20623   (eval $ac_link) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20627   { (eval echo "$as_me:20627: \"$ac_try\"") >&5
20628   (eval $ac_try) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); }; }; then
20632   ac_cv_func_fork_works=yes
20633 else
20634   echo "$as_me: program exited with status $ac_status" >&5
20635 echo "$as_me: failed program was:" >&5
20636 cat conftest.$ac_ext >&5
20637 ac_cv_func_fork_works=no
20638 fi
20639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20640 fi
20641 fi
20642 echo "$as_me:20642: result: $ac_cv_func_fork_works" >&5
20643 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20644
20645 fi
20646 if test "x$ac_cv_func_fork_works" = xcross; then
20647   case $host in
20648     *-*-amigaos* | *-*-msdosdjgpp*)
20649       # Override, as these systems have only a dummy fork() stub
20650       ac_cv_func_fork_works=no
20651       ;;
20652     *)
20653       ac_cv_func_fork_works=yes
20654       ;;
20655   esac
20656   { echo "$as_me:20656: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20657 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20658 fi
20659 ac_cv_func_vfork_works=$ac_cv_func_vfork
20660 if test "x$ac_cv_func_vfork" = xyes; then
20661   echo "$as_me:20661: checking for working vfork" >&5
20662 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20663 if test "${ac_cv_func_vfork_works+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666   if test "$cross_compiling" = yes; then
20667   ac_cv_func_vfork_works=cross
20668 else
20669   cat >conftest.$ac_ext <<_ACEOF
20670 #line 20670 "configure"
20671 #include "confdefs.h"
20672 /* Thanks to Paul Eggert for this test.  */
20673 #include <stdio.h>
20674 #include <sys/types.h>
20675 #include <sys/stat.h>
20676 #if HAVE_UNISTD_H
20677 # include <unistd.h>
20678 #endif
20679 #if HAVE_VFORK_H
20680 # include <vfork.h>
20681 #endif
20682 /* On some sparc systems, changes by the child to local and incoming
20683    argument registers are propagated back to the parent.  The compiler
20684    is told about this with #include <vfork.h>, but some compilers
20685    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20686    static variable whose address is put into a register that is
20687    clobbered by the vfork.  */
20688 static
20689 #ifdef __cplusplus
20690 sparc_address_test (int arg)
20691 # else
20692 sparc_address_test (arg) int arg;
20693 #endif
20694 {
20695   static pid_t child;
20696   if (!child) {
20697     child = vfork ();
20698     if (child < 0) {
20699       perror ("vfork");
20700       _exit(2);
20701     }
20702     if (!child) {
20703       arg = getpid();
20704       write(-1, "", 0);
20705       _exit (arg);
20706     }
20707   }
20708 }
20709
20710 int
20711 main (void)
20712 {
20713   pid_t parent = getpid ();
20714   pid_t child;
20715
20716   sparc_address_test ();
20717
20718   child = vfork ();
20719
20720   if (child == 0) {
20721     /* Here is another test for sparc vfork register problems.  This
20722        test uses lots of local variables, at least as many local
20723        variables as main has allocated so far including compiler
20724        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20725        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20726        reuse the register of parent for one of the local variables,
20727        since it will think that parent can't possibly be used any more
20728        in this routine.  Assigning to the local variable will thus
20729        munge parent in the parent process.  */
20730     pid_t
20731       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20732       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20733     /* Convince the compiler that p..p7 are live; otherwise, it might
20734        use the same hardware register for all 8 local variables.  */
20735     if (p != p1 || p != p2 || p != p3 || p != p4
20736         || p != p5 || p != p6 || p != p7)
20737       _exit(1);
20738
20739     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20740        from child file descriptors.  If the child closes a descriptor
20741        before it execs or exits, this munges the parent's descriptor
20742        as well.  Test for this by closing stdout in the child.  */
20743     _exit(close(fileno(stdout)) != 0);
20744   } else {
20745     int status;
20746     struct stat st;
20747
20748     while (wait(&status) != child)
20749       ;
20750     $ac_main_return(
20751          /* Was there some problem with vforking?  */
20752          child < 0
20753
20754          /* Did the child fail?  (This shouldn't happen.)  */
20755          || status
20756
20757          /* Did the vfork/compiler bug occur?  */
20758          || parent != getpid()
20759
20760          /* Did the file descriptor bug occur?  */
20761          || fstat(fileno(stdout), &st) != 0
20762          );
20763   }
20764 }
20765 _ACEOF
20766 rm -f conftest$ac_exeext
20767 if { (eval echo "$as_me:20767: \"$ac_link\"") >&5
20768   (eval $ac_link) 2>&5
20769   ac_status=$?
20770   echo "$as_me:20770: \$? = $ac_status" >&5
20771   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20772   { (eval echo "$as_me:20772: \"$ac_try\"") >&5
20773   (eval $ac_try) 2>&5
20774   ac_status=$?
20775   echo "$as_me:20775: \$? = $ac_status" >&5
20776   (exit $ac_status); }; }; then
20777   ac_cv_func_vfork_works=yes
20778 else
20779   echo "$as_me: program exited with status $ac_status" >&5
20780 echo "$as_me: failed program was:" >&5
20781 cat conftest.$ac_ext >&5
20782 ac_cv_func_vfork_works=no
20783 fi
20784 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20785 fi
20786 fi
20787 echo "$as_me:20787: result: $ac_cv_func_vfork_works" >&5
20788 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20789
20790 fi;
20791 if test "x$ac_cv_func_fork_works" = xcross; then
20792   ac_cv_func_vfork_works=ac_cv_func_vfork
20793   { echo "$as_me:20793: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20794 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20795 fi
20796
20797 if test "x$ac_cv_func_vfork_works" = xyes; then
20798
20799 cat >>confdefs.h <<\EOF
20800 #define HAVE_WORKING_VFORK 1
20801 EOF
20802
20803 else
20804
20805 cat >>confdefs.h <<\EOF
20806 #define vfork fork
20807 EOF
20808
20809 fi
20810 if test "x$ac_cv_func_fork_works" = xyes; then
20811
20812 cat >>confdefs.h <<\EOF
20813 #define HAVE_WORKING_FORK 1
20814 EOF
20815
20816 fi
20817
20818 # special check for test/ditto.c
20819
20820 echo "$as_me:20820: checking for openpty in -lutil" >&5
20821 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20822 if test "${ac_cv_lib_util_openpty+set}" = set; then
20823   echo $ECHO_N "(cached) $ECHO_C" >&6
20824 else
20825   ac_check_lib_save_LIBS=$LIBS
20826 LIBS="-lutil  $LIBS"
20827 cat >conftest.$ac_ext <<_ACEOF
20828 #line 20828 "configure"
20829 #include "confdefs.h"
20830
20831 /* Override any gcc2 internal prototype to avoid an error.  */
20832 #ifdef __cplusplus
20833 extern "C"
20834 #endif
20835 /* We use char because int might match the return type of a gcc2
20836    builtin and then its argument prototype would still apply.  */
20837 char openpty ();
20838 int
20839 main (void)
20840 {
20841 openpty ();
20842   ;
20843   return 0;
20844 }
20845 _ACEOF
20846 rm -f conftest.$ac_objext conftest$ac_exeext
20847 if { (eval echo "$as_me:20847: \"$ac_link\"") >&5
20848   (eval $ac_link) 2>&5
20849   ac_status=$?
20850   echo "$as_me:20850: \$? = $ac_status" >&5
20851   (exit $ac_status); } &&
20852          { ac_try='test -s conftest$ac_exeext'
20853   { (eval echo "$as_me:20853: \"$ac_try\"") >&5
20854   (eval $ac_try) 2>&5
20855   ac_status=$?
20856   echo "$as_me:20856: \$? = $ac_status" >&5
20857   (exit $ac_status); }; }; then
20858   ac_cv_lib_util_openpty=yes
20859 else
20860   echo "$as_me: failed program was:" >&5
20861 cat conftest.$ac_ext >&5
20862 ac_cv_lib_util_openpty=no
20863 fi
20864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20865 LIBS=$ac_check_lib_save_LIBS
20866 fi
20867 echo "$as_me:20867: result: $ac_cv_lib_util_openpty" >&5
20868 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20869 if test $ac_cv_lib_util_openpty = yes; then
20870   cf_cv_lib_util=yes
20871 else
20872   cf_cv_lib_util=no
20873 fi
20874
20875 echo "$as_me:20875: checking for openpty header" >&5
20876 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20877 if test "${cf_cv_func_openpty+set}" = set; then
20878   echo $ECHO_N "(cached) $ECHO_C" >&6
20879 else
20880
20881         cf_save_LIBS="$LIBS"
20882         test $cf_cv_lib_util = yes && {
20883 cf_add_libs="-lutil"
20884 # Filter out duplicates - this happens with badly-designed ".pc" files...
20885 for cf_add_1lib in $LIBS
20886 do
20887         for cf_add_2lib in $cf_add_libs
20888         do
20889                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20890                 then
20891                         cf_add_1lib=
20892                         break
20893                 fi
20894         done
20895         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20896 done
20897 LIBS="$cf_add_libs"
20898  }
20899         for cf_header in pty.h libutil.h util.h
20900         do
20901         cat >conftest.$ac_ext <<_ACEOF
20902 #line 20902 "configure"
20903 #include "confdefs.h"
20904
20905 #include <$cf_header>
20906
20907 int
20908 main (void)
20909 {
20910
20911         int x = openpty((int *)0, (int *)0, (char *)0,
20912                                    (struct termios *)0, (struct winsize *)0);
20913
20914   ;
20915   return 0;
20916 }
20917 _ACEOF
20918 rm -f conftest.$ac_objext conftest$ac_exeext
20919 if { (eval echo "$as_me:20919: \"$ac_link\"") >&5
20920   (eval $ac_link) 2>&5
20921   ac_status=$?
20922   echo "$as_me:20922: \$? = $ac_status" >&5
20923   (exit $ac_status); } &&
20924          { ac_try='test -s conftest$ac_exeext'
20925   { (eval echo "$as_me:20925: \"$ac_try\"") >&5
20926   (eval $ac_try) 2>&5
20927   ac_status=$?
20928   echo "$as_me:20928: \$? = $ac_status" >&5
20929   (exit $ac_status); }; }; then
20930
20931                 cf_cv_func_openpty=$cf_header
20932                 break
20933
20934 else
20935   echo "$as_me: failed program was:" >&5
20936 cat conftest.$ac_ext >&5
20937
20938                 cf_cv_func_openpty=no
20939
20940 fi
20941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20942         done
20943         LIBS="$cf_save_LIBS"
20944
20945 fi
20946 echo "$as_me:20946: result: $cf_cv_func_openpty" >&5
20947 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20948
20949 if test "$cf_cv_func_openpty" != no ; then
20950
20951 cat >>confdefs.h <<EOF
20952 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20953 EOF
20954
20955 cat >>confdefs.h <<\EOF
20956 #define USE_XTERM_PTY 1
20957 EOF
20958
20959         if test "x$cf_cv_lib_util" = xyes ; then
20960
20961 cf_add_libs="-lutil"
20962 # Filter out duplicates - this happens with badly-designed ".pc" files...
20963 for cf_add_1lib in $TEST_LIBS
20964 do
20965         for cf_add_2lib in $cf_add_libs
20966         do
20967                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20968                 then
20969                         cf_add_1lib=
20970                         break
20971                 fi
20972         done
20973         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20974 done
20975 TEST_LIBS="$cf_add_libs"
20976
20977         fi
20978 fi
20979
20980 if test "$with_hashed_db" != no ; then
20981
20982 cat >>confdefs.h <<\EOF
20983 #define USE_HASHED_DB 1
20984 EOF
20985
20986 case $with_hashed_db in
20987 (yes|*able*)
20988         ;;
20989 (*)
20990         if test -d "$with_hashed_db" ; then
20991
20992 if test -n "$with_hashed_db/include" ; then
20993   for cf_add_incdir in $with_hashed_db/include
20994   do
20995         while test $cf_add_incdir != /usr/include
20996         do
20997           if test -d $cf_add_incdir
20998           then
20999                 cf_have_incdir=no
21000                 if test -n "$CFLAGS$CPPFLAGS" ; then
21001                   # a loop is needed to ensure we can add subdirs of existing dirs
21002                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21003                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21004                           cf_have_incdir=yes; break
21005                         fi
21006                   done
21007                 fi
21008
21009                 if test "$cf_have_incdir" = no ; then
21010                   if test "$cf_add_incdir" = /usr/local/include ; then
21011                         if test "$GCC" = yes
21012                         then
21013                           cf_save_CPPFLAGS=$CPPFLAGS
21014
21015         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21016         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21017
21018                           cat >conftest.$ac_ext <<_ACEOF
21019 #line 21019 "configure"
21020 #include "confdefs.h"
21021 #include <stdio.h>
21022 int
21023 main (void)
21024 {
21025 printf("Hello")
21026   ;
21027   return 0;
21028 }
21029 _ACEOF
21030 rm -f conftest.$ac_objext
21031 if { (eval echo "$as_me:21031: \"$ac_compile\"") >&5
21032   (eval $ac_compile) 2>&5
21033   ac_status=$?
21034   echo "$as_me:21034: \$? = $ac_status" >&5
21035   (exit $ac_status); } &&
21036          { ac_try='test -s conftest.$ac_objext'
21037   { (eval echo "$as_me:21037: \"$ac_try\"") >&5
21038   (eval $ac_try) 2>&5
21039   ac_status=$?
21040   echo "$as_me:21040: \$? = $ac_status" >&5
21041   (exit $ac_status); }; }; then
21042   :
21043 else
21044   echo "$as_me: failed program was:" >&5
21045 cat conftest.$ac_ext >&5
21046 cf_have_incdir=yes
21047 fi
21048 rm -f conftest.$ac_objext conftest.$ac_ext
21049                           CPPFLAGS=$cf_save_CPPFLAGS
21050                         fi
21051                   fi
21052                 fi
21053
21054                 if test "$cf_have_incdir" = no ; then
21055                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21056
21057 echo "${as_me:-configure}:21057: testing adding $cf_add_incdir to include-path ..." 1>&5
21058
21059                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21060
21061                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21062                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21063                   cf_add_incdir="$cf_top_incdir"
21064                 else
21065                   break
21066                 fi
21067           else
21068                 break
21069           fi
21070         done
21071   done
21072 fi
21073
21074 if test -n "$with_hashed_db/lib" ; then
21075         for cf_add_libdir in $with_hashed_db/lib
21076         do
21077                 if test $cf_add_libdir = /usr/lib ; then
21078                         :
21079                 elif test -d $cf_add_libdir
21080                 then
21081                         cf_have_libdir=no
21082                         if test -n "$LDFLAGS$LIBS" ; then
21083                                 # a loop is needed to ensure we can add subdirs of existing dirs
21084                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21085                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21086                                                 cf_have_libdir=yes; break
21087                                         fi
21088                                 done
21089                         fi
21090                         if test "$cf_have_libdir" = no ; then
21091                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21092
21093 echo "${as_me:-configure}:21093: testing adding $cf_add_libdir to library-path ..." 1>&5
21094
21095                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21096                         fi
21097                 fi
21098         done
21099 fi
21100
21101         else
21102                 case "$with_hashed_db" in
21103                 (./*|../*|/*)
21104                         { echo "$as_me:21104: WARNING: no such directory $with_hashed_db" >&5
21105 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21106                         ;;
21107                 (*)
21108
21109 cf_search=
21110
21111 test "x$prefix" != "xNONE" && \
21112 test -d "$prefix" && \
21113  {
21114         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21115         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21116         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21117         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21118         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21119         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21120 }
21121
21122 for cf_subdir_prefix in \
21123         /usr \
21124         /usr/local \
21125         /usr/pkg \
21126         /opt \
21127         /opt/local \
21128         $HOME
21129 do
21130
21131 test "x$cf_subdir_prefix" != "x$prefix" && \
21132 test -d "$cf_subdir_prefix" && \
21133 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21134         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21135         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21136         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21137         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21138         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21139         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"
21140 }
21141
21142 done
21143
21144         for cf_item in $cf_search
21145         do
21146                 case $cf_item in
21147                 (*/$with_hashed_db)
21148
21149 if test -n "$cf_item" ; then
21150   for cf_add_incdir in $cf_item
21151   do
21152         while test $cf_add_incdir != /usr/include
21153         do
21154           if test -d $cf_add_incdir
21155           then
21156                 cf_have_incdir=no
21157                 if test -n "$CFLAGS$CPPFLAGS" ; then
21158                   # a loop is needed to ensure we can add subdirs of existing dirs
21159                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21160                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21161                           cf_have_incdir=yes; break
21162                         fi
21163                   done
21164                 fi
21165
21166                 if test "$cf_have_incdir" = no ; then
21167                   if test "$cf_add_incdir" = /usr/local/include ; then
21168                         if test "$GCC" = yes
21169                         then
21170                           cf_save_CPPFLAGS=$CPPFLAGS
21171
21172         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21173         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21174
21175                           cat >conftest.$ac_ext <<_ACEOF
21176 #line 21176 "configure"
21177 #include "confdefs.h"
21178 #include <stdio.h>
21179 int
21180 main (void)
21181 {
21182 printf("Hello")
21183   ;
21184   return 0;
21185 }
21186 _ACEOF
21187 rm -f conftest.$ac_objext
21188 if { (eval echo "$as_me:21188: \"$ac_compile\"") >&5
21189   (eval $ac_compile) 2>&5
21190   ac_status=$?
21191   echo "$as_me:21191: \$? = $ac_status" >&5
21192   (exit $ac_status); } &&
21193          { ac_try='test -s conftest.$ac_objext'
21194   { (eval echo "$as_me:21194: \"$ac_try\"") >&5
21195   (eval $ac_try) 2>&5
21196   ac_status=$?
21197   echo "$as_me:21197: \$? = $ac_status" >&5
21198   (exit $ac_status); }; }; then
21199   :
21200 else
21201   echo "$as_me: failed program was:" >&5
21202 cat conftest.$ac_ext >&5
21203 cf_have_incdir=yes
21204 fi
21205 rm -f conftest.$ac_objext conftest.$ac_ext
21206                           CPPFLAGS=$cf_save_CPPFLAGS
21207                         fi
21208                   fi
21209                 fi
21210
21211                 if test "$cf_have_incdir" = no ; then
21212                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21213
21214 echo "${as_me:-configure}:21214: testing adding $cf_add_incdir to include-path ..." 1>&5
21215
21216                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21217
21218                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21219                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21220                   cf_add_incdir="$cf_top_incdir"
21221                 else
21222                   break
21223                 fi
21224           else
21225                 break
21226           fi
21227         done
21228   done
21229 fi
21230
21231                         ;;
21232                 esac
21233         done
21234
21235 cf_search=
21236
21237 test "x$prefix" != "xNONE" && \
21238 test -d "$prefix" && \
21239  {
21240         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21241         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21242         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21243         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21244         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21245         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21246 }
21247
21248 for cf_subdir_prefix in \
21249         /usr \
21250         /usr/local \
21251         /usr/pkg \
21252         /opt \
21253         /opt/local \
21254         $HOME
21255 do
21256
21257 test "x$cf_subdir_prefix" != "x$prefix" && \
21258 test -d "$cf_subdir_prefix" && \
21259 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21260         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21261         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21262         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21263         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21264         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21265         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"
21266 }
21267
21268 done
21269
21270         for cf_item in $cf_search
21271         do
21272                 case $cf_item in
21273                 (*/$with_hashed_db)
21274
21275 if test -n "$cf_item" ; then
21276         for cf_add_libdir in $cf_item
21277         do
21278                 if test $cf_add_libdir = /usr/lib ; then
21279                         :
21280                 elif test -d $cf_add_libdir
21281                 then
21282                         cf_have_libdir=no
21283                         if test -n "$LDFLAGS$LIBS" ; then
21284                                 # a loop is needed to ensure we can add subdirs of existing dirs
21285                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21286                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21287                                                 cf_have_libdir=yes; break
21288                                         fi
21289                                 done
21290                         fi
21291                         if test "$cf_have_libdir" = no ; then
21292                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21293
21294 echo "${as_me:-configure}:21294: testing adding $cf_add_libdir to library-path ..." 1>&5
21295
21296                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21297                         fi
21298                 fi
21299         done
21300 fi
21301
21302                         ;;
21303                 esac
21304         done
21305
21306                         ;;
21307                 esac
21308         fi
21309 esac
21310
21311 echo "$as_me:21311: checking for db.h" >&5
21312 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21313 if test "${ac_cv_header_db_h+set}" = set; then
21314   echo $ECHO_N "(cached) $ECHO_C" >&6
21315 else
21316   cat >conftest.$ac_ext <<_ACEOF
21317 #line 21317 "configure"
21318 #include "confdefs.h"
21319 #include <db.h>
21320 _ACEOF
21321 if { (eval echo "$as_me:21321: \"$ac_cpp conftest.$ac_ext\"") >&5
21322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21323   ac_status=$?
21324   egrep -v '^ *\+' conftest.er1 >conftest.err
21325   rm -f conftest.er1
21326   cat conftest.err >&5
21327   echo "$as_me:21327: \$? = $ac_status" >&5
21328   (exit $ac_status); } >/dev/null; then
21329   if test -s conftest.err; then
21330     ac_cpp_err=$ac_c_preproc_warn_flag
21331   else
21332     ac_cpp_err=
21333   fi
21334 else
21335   ac_cpp_err=yes
21336 fi
21337 if test -z "$ac_cpp_err"; then
21338   ac_cv_header_db_h=yes
21339 else
21340   echo "$as_me: failed program was:" >&5
21341   cat conftest.$ac_ext >&5
21342   ac_cv_header_db_h=no
21343 fi
21344 rm -f conftest.err conftest.$ac_ext
21345 fi
21346 echo "$as_me:21346: result: $ac_cv_header_db_h" >&5
21347 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21348 if test $ac_cv_header_db_h = yes; then
21349
21350 echo "$as_me:21350: checking for version of db" >&5
21351 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21352 if test "${cf_cv_hashed_db_version+set}" = set; then
21353   echo $ECHO_N "(cached) $ECHO_C" >&6
21354 else
21355
21356 cf_cv_hashed_db_version=unknown
21357
21358 for cf_db_version in 1 2 3 4 5 6
21359 do
21360
21361 echo "${as_me:-configure}:21361: testing checking for db version $cf_db_version ..." 1>&5
21362
21363         cat >conftest.$ac_ext <<_ACEOF
21364 #line 21364 "configure"
21365 #include "confdefs.h"
21366
21367 $ac_includes_default
21368 #include <db.h>
21369
21370 #ifdef DB_VERSION_MAJOR
21371         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21372 #if $cf_db_version == DB_VERSION_MAJOR
21373         /* ok */
21374 #else
21375         make an error
21376 #endif
21377 #else
21378 #if $cf_db_version == 1
21379         /* ok: assuming this is DB 1.8.5 */
21380 #else
21381         make an error
21382 #endif
21383 #endif
21384
21385 int
21386 main (void)
21387 {
21388 DBT *foo = 0
21389   ;
21390   return 0;
21391 }
21392 _ACEOF
21393 rm -f conftest.$ac_objext
21394 if { (eval echo "$as_me:21394: \"$ac_compile\"") >&5
21395   (eval $ac_compile) 2>&5
21396   ac_status=$?
21397   echo "$as_me:21397: \$? = $ac_status" >&5
21398   (exit $ac_status); } &&
21399          { ac_try='test -s conftest.$ac_objext'
21400   { (eval echo "$as_me:21400: \"$ac_try\"") >&5
21401   (eval $ac_try) 2>&5
21402   ac_status=$?
21403   echo "$as_me:21403: \$? = $ac_status" >&5
21404   (exit $ac_status); }; }; then
21405
21406         cf_cv_hashed_db_version=$cf_db_version
21407         break
21408
21409 else
21410   echo "$as_me: failed program was:" >&5
21411 cat conftest.$ac_ext >&5
21412 fi
21413 rm -f conftest.$ac_objext conftest.$ac_ext
21414 done
21415
21416 fi
21417 echo "$as_me:21417: result: $cf_cv_hashed_db_version" >&5
21418 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21419
21420 if test "$cf_cv_hashed_db_version" = unknown ; then
21421         { { echo "$as_me:21421: error: Cannot determine version of db" >&5
21422 echo "$as_me: error: Cannot determine version of db" >&2;}
21423    { (exit 1); exit 1; }; }
21424 else
21425
21426 echo "$as_me:21426: checking for db libraries" >&5
21427 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21428 if test "${cf_cv_hashed_db_libs+set}" = set; then
21429   echo $ECHO_N "(cached) $ECHO_C" >&6
21430 else
21431
21432 cf_cv_hashed_db_libs=unknown
21433 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21434 do
21435         cf_save_libs="$LIBS"
21436         if test -n "$cf_db_libs"; then
21437
21438 cf_add_libs="-l$cf_db_libs"
21439 # Filter out duplicates - this happens with badly-designed ".pc" files...
21440 for cf_add_1lib in $LIBS
21441 do
21442         for cf_add_2lib in $cf_add_libs
21443         do
21444                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21445                 then
21446                         cf_add_1lib=
21447                         break
21448                 fi
21449         done
21450         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21451 done
21452 LIBS="$cf_add_libs"
21453
21454         fi
21455
21456 echo "${as_me:-configure}:21456: testing checking for library "$cf_db_libs" ..." 1>&5
21457
21458         cat >conftest.$ac_ext <<_ACEOF
21459 #line 21459 "configure"
21460 #include "confdefs.h"
21461
21462 $ac_includes_default
21463 #include <db.h>
21464
21465 int
21466 main (void)
21467 {
21468
21469         char *path = "/tmp/foo";
21470 #ifdef DB_VERSION_MAJOR
21471 #if DB_VERSION_MAJOR >= 4
21472         DB *result = 0;
21473         db_create(&result, NULL, 0);
21474         result->open(result,
21475                 NULL,
21476                 path,
21477                 path,
21478                 DB_HASH,
21479                 DB_CREATE,
21480                 0644);
21481 #elif DB_VERSION_MAJOR >= 3
21482         DB *result = 0;
21483         db_create(&result, NULL, 0);
21484         result->open(result,
21485                 path,
21486                 path,
21487                 DB_HASH,
21488                 DB_CREATE,
21489                 0644);
21490 #elif DB_VERSION_MAJOR >= 2
21491         DB *result = 0;
21492         db_open(path,
21493                 DB_HASH,
21494                 DB_CREATE,
21495                 0644,
21496                 (DB_ENV *) 0,
21497                 (DB_INFO *) 0,
21498                 &result);
21499 #endif /* DB_VERSION_MAJOR */
21500 #else
21501         DB *result = dbopen(path,
21502                      2,
21503                      0644,
21504                      DB_HASH,
21505                      0);
21506 #endif
21507         ${cf_cv_main_return:-return}(result != 0)
21508
21509   ;
21510   return 0;
21511 }
21512 _ACEOF
21513 rm -f conftest.$ac_objext conftest$ac_exeext
21514 if { (eval echo "$as_me:21514: \"$ac_link\"") >&5
21515   (eval $ac_link) 2>&5
21516   ac_status=$?
21517   echo "$as_me:21517: \$? = $ac_status" >&5
21518   (exit $ac_status); } &&
21519          { ac_try='test -s conftest$ac_exeext'
21520   { (eval echo "$as_me:21520: \"$ac_try\"") >&5
21521   (eval $ac_try) 2>&5
21522   ac_status=$?
21523   echo "$as_me:21523: \$? = $ac_status" >&5
21524   (exit $ac_status); }; }; then
21525
21526         if test -n "$cf_db_libs" ; then
21527                 cf_cv_hashed_db_libs=$cf_db_libs
21528         else
21529                 cf_cv_hashed_db_libs=default
21530         fi
21531         LIBS="$cf_save_libs"
21532         break
21533
21534 else
21535   echo "$as_me: failed program was:" >&5
21536 cat conftest.$ac_ext >&5
21537 fi
21538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21539         LIBS="$cf_save_libs"
21540 done
21541
21542 fi
21543 echo "$as_me:21543: result: $cf_cv_hashed_db_libs" >&5
21544 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21545
21546         if test "$cf_cv_hashed_db_libs" = unknown ; then
21547                 { { echo "$as_me:21547: error: Cannot determine library for db" >&5
21548 echo "$as_me: error: Cannot determine library for db" >&2;}
21549    { (exit 1); exit 1; }; }
21550         elif test "$cf_cv_hashed_db_libs" != default ; then
21551
21552 cf_add_libs="-l$cf_cv_hashed_db_libs"
21553 # Filter out duplicates - this happens with badly-designed ".pc" files...
21554 for cf_add_1lib in $LIBS
21555 do
21556         for cf_add_2lib in $cf_add_libs
21557         do
21558                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21559                 then
21560                         cf_add_1lib=
21561                         break
21562                 fi
21563         done
21564         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21565 done
21566 LIBS="$cf_add_libs"
21567
21568         fi
21569 fi
21570
21571 else
21572
21573         { { echo "$as_me:21573: error: Cannot find db.h" >&5
21574 echo "$as_me: error: Cannot find db.h" >&2;}
21575    { (exit 1); exit 1; }; }
21576
21577 fi
21578
21579 fi
21580
21581 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21582         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21583         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21584 fi
21585
21586 # Just in case, check if the C compiler has a bool type.
21587
21588 echo "$as_me:21588: checking if we should include stdbool.h" >&5
21589 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21590
21591 if test "${cf_cv_header_stdbool_h+set}" = set; then
21592   echo $ECHO_N "(cached) $ECHO_C" >&6
21593 else
21594
21595         cat >conftest.$ac_ext <<_ACEOF
21596 #line 21596 "configure"
21597 #include "confdefs.h"
21598
21599 int
21600 main (void)
21601 {
21602 bool foo = false
21603   ;
21604   return 0;
21605 }
21606 _ACEOF
21607 rm -f conftest.$ac_objext
21608 if { (eval echo "$as_me:21608: \"$ac_compile\"") >&5
21609   (eval $ac_compile) 2>&5
21610   ac_status=$?
21611   echo "$as_me:21611: \$? = $ac_status" >&5
21612   (exit $ac_status); } &&
21613          { ac_try='test -s conftest.$ac_objext'
21614   { (eval echo "$as_me:21614: \"$ac_try\"") >&5
21615   (eval $ac_try) 2>&5
21616   ac_status=$?
21617   echo "$as_me:21617: \$? = $ac_status" >&5
21618   (exit $ac_status); }; }; then
21619   cf_cv_header_stdbool_h=0
21620 else
21621   echo "$as_me: failed program was:" >&5
21622 cat conftest.$ac_ext >&5
21623 cat >conftest.$ac_ext <<_ACEOF
21624 #line 21624 "configure"
21625 #include "confdefs.h"
21626
21627 #ifndef __BEOS__
21628 #include <stdbool.h>
21629 #endif
21630
21631 int
21632 main (void)
21633 {
21634 bool foo = false
21635   ;
21636   return 0;
21637 }
21638 _ACEOF
21639 rm -f conftest.$ac_objext
21640 if { (eval echo "$as_me:21640: \"$ac_compile\"") >&5
21641   (eval $ac_compile) 2>&5
21642   ac_status=$?
21643   echo "$as_me:21643: \$? = $ac_status" >&5
21644   (exit $ac_status); } &&
21645          { ac_try='test -s conftest.$ac_objext'
21646   { (eval echo "$as_me:21646: \"$ac_try\"") >&5
21647   (eval $ac_try) 2>&5
21648   ac_status=$?
21649   echo "$as_me:21649: \$? = $ac_status" >&5
21650   (exit $ac_status); }; }; then
21651   cf_cv_header_stdbool_h=1
21652 else
21653   echo "$as_me: failed program was:" >&5
21654 cat conftest.$ac_ext >&5
21655 cf_cv_header_stdbool_h=0
21656 fi
21657 rm -f conftest.$ac_objext conftest.$ac_ext
21658 fi
21659 rm -f conftest.$ac_objext conftest.$ac_ext
21660 fi
21661
21662 if test "$cf_cv_header_stdbool_h" = 1
21663 then    echo "$as_me:21663: result: yes" >&5
21664 echo "${ECHO_T}yes" >&6
21665 else    echo "$as_me:21665: result: no" >&5
21666 echo "${ECHO_T}no" >&6
21667 fi
21668
21669 echo "$as_me:21669: checking for builtin bool type" >&5
21670 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21671
21672 if test "${cf_cv_cc_bool_type+set}" = set; then
21673   echo $ECHO_N "(cached) $ECHO_C" >&6
21674 else
21675
21676         cat >conftest.$ac_ext <<_ACEOF
21677 #line 21677 "configure"
21678 #include "confdefs.h"
21679
21680 #include <stdio.h>
21681 #include <sys/types.h>
21682
21683 int
21684 main (void)
21685 {
21686 bool x = false
21687   ;
21688   return 0;
21689 }
21690 _ACEOF
21691 rm -f conftest.$ac_objext
21692 if { (eval echo "$as_me:21692: \"$ac_compile\"") >&5
21693   (eval $ac_compile) 2>&5
21694   ac_status=$?
21695   echo "$as_me:21695: \$? = $ac_status" >&5
21696   (exit $ac_status); } &&
21697          { ac_try='test -s conftest.$ac_objext'
21698   { (eval echo "$as_me:21698: \"$ac_try\"") >&5
21699   (eval $ac_try) 2>&5
21700   ac_status=$?
21701   echo "$as_me:21701: \$? = $ac_status" >&5
21702   (exit $ac_status); }; }; then
21703   cf_cv_cc_bool_type=1
21704 else
21705   echo "$as_me: failed program was:" >&5
21706 cat conftest.$ac_ext >&5
21707 cf_cv_cc_bool_type=0
21708 fi
21709 rm -f conftest.$ac_objext conftest.$ac_ext
21710
21711 fi
21712
21713 if test "$cf_cv_cc_bool_type" = 1
21714 then    echo "$as_me:21714: result: yes" >&5
21715 echo "${ECHO_T}yes" >&6
21716 else    echo "$as_me:21716: result: no" >&5
21717 echo "${ECHO_T}no" >&6
21718 fi
21719
21720 # Check for C++ compiler characteristics (and ensure that it's there!)
21721 if test -n "$CXX" ; then
21722         ac_ext=cc
21723 ac_cpp='$CXXCPP $CPPFLAGS'
21724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21727 ac_main_return=return
21728
21729 if test -n "$GXX" ; then
21730
21731         cf_save="$LIBS"
21732         LIBS="$LIBS $CXXLIBS"
21733         echo "$as_me:21733: checking if we already have C++ library" >&5
21734 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21735         cat >conftest.$ac_ext <<_ACEOF
21736 #line 21736 "configure"
21737 #include "confdefs.h"
21738
21739                         #include <iostream>
21740 int
21741 main (void)
21742 {
21743
21744                         std::cout << "Hello World!" << std::endl;
21745   ;
21746   return 0;
21747 }
21748 _ACEOF
21749 rm -f conftest.$ac_objext conftest$ac_exeext
21750 if { (eval echo "$as_me:21750: \"$ac_link\"") >&5
21751   (eval $ac_link) 2>&5
21752   ac_status=$?
21753   echo "$as_me:21753: \$? = $ac_status" >&5
21754   (exit $ac_status); } &&
21755          { ac_try='test -s conftest$ac_exeext'
21756   { (eval echo "$as_me:21756: \"$ac_try\"") >&5
21757   (eval $ac_try) 2>&5
21758   ac_status=$?
21759   echo "$as_me:21759: \$? = $ac_status" >&5
21760   (exit $ac_status); }; }; then
21761   cf_have_libstdcpp=yes
21762 else
21763   echo "$as_me: failed program was:" >&5
21764 cat conftest.$ac_ext >&5
21765 cf_have_libstdcpp=no
21766 fi
21767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21768         echo "$as_me:21768: result: $cf_have_libstdcpp" >&5
21769 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21770         LIBS="$cf_save"
21771
21772         if test $cf_have_libstdcpp != yes
21773         then
21774                 case $cf_cv_system_name in
21775                 (os2*)
21776                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21777                                 cf_stdcpp_libname=stdcpp
21778                         else
21779                                 cf_stdcpp_libname=stdc++
21780                         fi
21781                         ;;
21782                 (*)
21783                         cf_stdcpp_libname=stdc++
21784                         ;;
21785                 esac
21786
21787                 echo "$as_me:21787: checking for library $cf_stdcpp_libname" >&5
21788 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21789 if test "${cf_cv_libstdcpp+set}" = set; then
21790   echo $ECHO_N "(cached) $ECHO_C" >&6
21791 else
21792
21793                         cf_save="$LIBS"
21794                         LIBS="$LIBS $CXXLIBS"
21795
21796 cf_add_libs="-l$cf_stdcpp_libname"
21797 # Filter out duplicates - this happens with badly-designed ".pc" files...
21798 for cf_add_1lib in $LIBS
21799 do
21800         for cf_add_2lib in $cf_add_libs
21801         do
21802                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21803                 then
21804                         cf_add_1lib=
21805                         break
21806                 fi
21807         done
21808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21809 done
21810 LIBS="$cf_add_libs"
21811
21812                 cat >conftest.$ac_ext <<_ACEOF
21813 #line 21813 "configure"
21814 #include "confdefs.h"
21815
21816                                 #include <iostream>
21817 int
21818 main (void)
21819 {
21820
21821                                 std::cout << "Hello World!" << std::endl;
21822   ;
21823   return 0;
21824 }
21825 _ACEOF
21826 rm -f conftest.$ac_objext conftest$ac_exeext
21827 if { (eval echo "$as_me:21827: \"$ac_link\"") >&5
21828   (eval $ac_link) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit $ac_status); } &&
21832          { ac_try='test -s conftest$ac_exeext'
21833   { (eval echo "$as_me:21833: \"$ac_try\"") >&5
21834   (eval $ac_try) 2>&5
21835   ac_status=$?
21836   echo "$as_me:21836: \$? = $ac_status" >&5
21837   (exit $ac_status); }; }; then
21838   cf_cv_libstdcpp=yes
21839 else
21840   echo "$as_me: failed program was:" >&5
21841 cat conftest.$ac_ext >&5
21842 cf_cv_libstdcpp=no
21843 fi
21844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21845                         LIBS="$cf_save"
21846
21847 fi
21848 echo "$as_me:21848: result: $cf_cv_libstdcpp" >&5
21849 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21850                 test "$cf_cv_libstdcpp" = yes && {
21851 cf_add_libs="-l$cf_stdcpp_libname"
21852 # Filter out duplicates - this happens with badly-designed ".pc" files...
21853 for cf_add_1lib in $CXXLIBS
21854 do
21855         for cf_add_2lib in $cf_add_libs
21856         do
21857                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21858                 then
21859                         cf_add_1lib=
21860                         break
21861                 fi
21862         done
21863         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21864 done
21865 CXXLIBS="$cf_add_libs"
21866  }
21867         fi
21868 fi
21869
21870         echo "$as_me:21870: checking whether $CXX understands -c and -o together" >&5
21871 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21872 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21873   echo $ECHO_N "(cached) $ECHO_C" >&6
21874 else
21875
21876 cat > conftest.$ac_ext <<CF_EOF
21877 int main(void)
21878 {
21879         ${cf_cv_main_return:-return}(0);
21880 }
21881 CF_EOF
21882 # We do the test twice because some compilers refuse to overwrite an
21883 # existing .o file with -o, though they will create one.
21884 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21885 if { (eval echo "$as_me:21885: \"$ac_try\"") >&5
21886   (eval $ac_try) 2>&5
21887   ac_status=$?
21888   echo "$as_me:21888: \$? = $ac_status" >&5
21889   (exit $ac_status); } &&
21890   test -f conftest2.$ac_objext && { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891   (eval $ac_try) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit $ac_status); };
21895 then
21896   eval cf_cv_prog_CXX_c_o=yes
21897 else
21898   eval cf_cv_prog_CXX_c_o=no
21899 fi
21900 rm -rf conftest*
21901
21902 fi
21903 if test $cf_cv_prog_CXX_c_o = yes; then
21904   echo "$as_me:21904: result: yes" >&5
21905 echo "${ECHO_T}yes" >&6
21906 else
21907   echo "$as_me:21907: result: no" >&5
21908 echo "${ECHO_T}no" >&6
21909 fi
21910
21911         case $GXX_VERSION in
21912         (1*|2.0-6*)
21913                 cf_cxx_library=yes
21914                 ;;
21915         (*-2.7*|2.7*)
21916
21917 cf_cxx_library=unknown
21918 case $cf_cv_system_name in
21919 (os2*)
21920         cf_gpp_libname=gpp
21921         ;;
21922 (*)
21923         cf_gpp_libname=g++
21924         ;;
21925 esac
21926 if test "$GXX" = yes; then
21927         echo "$as_me:21927: checking for lib$cf_gpp_libname" >&5
21928 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21929         cf_save="$LIBS"
21930
21931 cf_add_libs="-l$cf_gpp_libname"
21932 # Filter out duplicates - this happens with badly-designed ".pc" files...
21933 for cf_add_1lib in $LIBS
21934 do
21935         for cf_add_2lib in $cf_add_libs
21936         do
21937                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21938                 then
21939                         cf_add_1lib=
21940                         break
21941                 fi
21942         done
21943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21944 done
21945 LIBS="$cf_add_libs"
21946
21947         cat >conftest.$ac_ext <<_ACEOF
21948 #line 21948 "configure"
21949 #include "confdefs.h"
21950
21951 #include <$cf_gpp_libname/builtin.h>
21952
21953 int
21954 main (void)
21955 {
21956 two_arg_error_handler_t foo2 = lib_error_handler
21957   ;
21958   return 0;
21959 }
21960 _ACEOF
21961 rm -f conftest.$ac_objext conftest$ac_exeext
21962 if { (eval echo "$as_me:21962: \"$ac_link\"") >&5
21963   (eval $ac_link) 2>&5
21964   ac_status=$?
21965   echo "$as_me:21965: \$? = $ac_status" >&5
21966   (exit $ac_status); } &&
21967          { ac_try='test -s conftest$ac_exeext'
21968   { (eval echo "$as_me:21968: \"$ac_try\"") >&5
21969   (eval $ac_try) 2>&5
21970   ac_status=$?
21971   echo "$as_me:21971: \$? = $ac_status" >&5
21972   (exit $ac_status); }; }; then
21973   cf_cxx_library=yes
21974
21975 cf_add_libs="-l$cf_gpp_libname"
21976 # Filter out duplicates - this happens with badly-designed ".pc" files...
21977 for cf_add_1lib in $CXXLIBS
21978 do
21979         for cf_add_2lib in $cf_add_libs
21980         do
21981                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21982                 then
21983                         cf_add_1lib=
21984                         break
21985                 fi
21986         done
21987         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21988 done
21989 CXXLIBS="$cf_add_libs"
21990
21991          if test "$cf_gpp_libname" = cpp ; then
21992
21993 cat >>confdefs.h <<\EOF
21994 #define HAVE_GPP_BUILTIN_H 1
21995 EOF
21996
21997          else
21998
21999 cat >>confdefs.h <<\EOF
22000 #define HAVE_GXX_BUILTIN_H 1
22001 EOF
22002
22003          fi
22004 else
22005   echo "$as_me: failed program was:" >&5
22006 cat conftest.$ac_ext >&5
22007 cat >conftest.$ac_ext <<_ACEOF
22008 #line 22008 "configure"
22009 #include "confdefs.h"
22010
22011 #include <builtin.h>
22012
22013 int
22014 main (void)
22015 {
22016 two_arg_error_handler_t foo2 = lib_error_handler
22017   ;
22018   return 0;
22019 }
22020 _ACEOF
22021 rm -f conftest.$ac_objext conftest$ac_exeext
22022 if { (eval echo "$as_me:22022: \"$ac_link\"") >&5
22023   (eval $ac_link) 2>&5
22024   ac_status=$?
22025   echo "$as_me:22025: \$? = $ac_status" >&5
22026   (exit $ac_status); } &&
22027          { ac_try='test -s conftest$ac_exeext'
22028   { (eval echo "$as_me:22028: \"$ac_try\"") >&5
22029   (eval $ac_try) 2>&5
22030   ac_status=$?
22031   echo "$as_me:22031: \$? = $ac_status" >&5
22032   (exit $ac_status); }; }; then
22033   cf_cxx_library=yes
22034
22035 cf_add_libs="-l$cf_gpp_libname"
22036 # Filter out duplicates - this happens with badly-designed ".pc" files...
22037 for cf_add_1lib in $CXXLIBS
22038 do
22039         for cf_add_2lib in $cf_add_libs
22040         do
22041                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22042                 then
22043                         cf_add_1lib=
22044                         break
22045                 fi
22046         done
22047         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22048 done
22049 CXXLIBS="$cf_add_libs"
22050
22051 cat >>confdefs.h <<\EOF
22052 #define HAVE_BUILTIN_H 1
22053 EOF
22054
22055 else
22056   echo "$as_me: failed program was:" >&5
22057 cat conftest.$ac_ext >&5
22058 cf_cxx_library=no
22059 fi
22060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22061 fi
22062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22063         LIBS="$cf_save"
22064         echo "$as_me:22064: result: $cf_cxx_library" >&5
22065 echo "${ECHO_T}$cf_cxx_library" >&6
22066 fi
22067
22068                 ;;
22069         (*)
22070                 cf_cxx_library=no
22071                 ;;
22072         esac
22073
22074         ac_ext=cc
22075 ac_cpp='$CXXCPP $CPPFLAGS'
22076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22079 ac_main_return=return
22080 echo "$as_me:22080: checking how to run the C++ preprocessor" >&5
22081 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22082 if test -z "$CXXCPP"; then
22083   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22084   echo $ECHO_N "(cached) $ECHO_C" >&6
22085 else
22086       # Double quotes because CXXCPP needs to be expanded
22087     for CXXCPP in "$CXX -E" "/lib/cpp"
22088     do
22089       ac_preproc_ok=false
22090 for ac_cxx_preproc_warn_flag in '' yes
22091 do
22092   # Use a header file that comes with gcc, so configuring glibc
22093   # with a fresh cross-compiler works.
22094   # On the NeXT, cc -E runs the code through the compiler's parser,
22095   # not just through cpp. "Syntax error" is here to catch this case.
22096   cat >conftest.$ac_ext <<_ACEOF
22097 #line 22097 "configure"
22098 #include "confdefs.h"
22099 #include <assert.h>
22100                      Syntax error
22101 _ACEOF
22102 if { (eval echo "$as_me:22102: \"$ac_cpp conftest.$ac_ext\"") >&5
22103   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22104   ac_status=$?
22105   egrep -v '^ *\+' conftest.er1 >conftest.err
22106   rm -f conftest.er1
22107   cat conftest.err >&5
22108   echo "$as_me:22108: \$? = $ac_status" >&5
22109   (exit $ac_status); } >/dev/null; then
22110   if test -s conftest.err; then
22111     ac_cpp_err=$ac_cxx_preproc_warn_flag
22112   else
22113     ac_cpp_err=
22114   fi
22115 else
22116   ac_cpp_err=yes
22117 fi
22118 if test -z "$ac_cpp_err"; then
22119   :
22120 else
22121   echo "$as_me: failed program was:" >&5
22122   cat conftest.$ac_ext >&5
22123   # Broken: fails on valid input.
22124 continue
22125 fi
22126 rm -f conftest.err conftest.$ac_ext
22127
22128   # OK, works on sane cases.  Now check whether non-existent headers
22129   # can be detected and how.
22130   cat >conftest.$ac_ext <<_ACEOF
22131 #line 22131 "configure"
22132 #include "confdefs.h"
22133 #include <ac_nonexistent.h>
22134 _ACEOF
22135 if { (eval echo "$as_me:22135: \"$ac_cpp conftest.$ac_ext\"") >&5
22136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22137   ac_status=$?
22138   egrep -v '^ *\+' conftest.er1 >conftest.err
22139   rm -f conftest.er1
22140   cat conftest.err >&5
22141   echo "$as_me:22141: \$? = $ac_status" >&5
22142   (exit $ac_status); } >/dev/null; then
22143   if test -s conftest.err; then
22144     ac_cpp_err=$ac_cxx_preproc_warn_flag
22145   else
22146     ac_cpp_err=
22147   fi
22148 else
22149   ac_cpp_err=yes
22150 fi
22151 if test -z "$ac_cpp_err"; then
22152   # Broken: success on invalid input.
22153 continue
22154 else
22155   echo "$as_me: failed program was:" >&5
22156   cat conftest.$ac_ext >&5
22157   # Passes both tests.
22158 ac_preproc_ok=:
22159 break
22160 fi
22161 rm -f conftest.err conftest.$ac_ext
22162
22163 done
22164 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22165 rm -f conftest.err conftest.$ac_ext
22166 if $ac_preproc_ok; then
22167   break
22168 fi
22169
22170     done
22171     ac_cv_prog_CXXCPP=$CXXCPP
22172
22173 fi
22174   CXXCPP=$ac_cv_prog_CXXCPP
22175 else
22176   ac_cv_prog_CXXCPP=$CXXCPP
22177 fi
22178 echo "$as_me:22178: result: $CXXCPP" >&5
22179 echo "${ECHO_T}$CXXCPP" >&6
22180 ac_preproc_ok=false
22181 for ac_cxx_preproc_warn_flag in '' yes
22182 do
22183   # Use a header file that comes with gcc, so configuring glibc
22184   # with a fresh cross-compiler works.
22185   # On the NeXT, cc -E runs the code through the compiler's parser,
22186   # not just through cpp. "Syntax error" is here to catch this case.
22187   cat >conftest.$ac_ext <<_ACEOF
22188 #line 22188 "configure"
22189 #include "confdefs.h"
22190 #include <assert.h>
22191                      Syntax error
22192 _ACEOF
22193 if { (eval echo "$as_me:22193: \"$ac_cpp conftest.$ac_ext\"") >&5
22194   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22195   ac_status=$?
22196   egrep -v '^ *\+' conftest.er1 >conftest.err
22197   rm -f conftest.er1
22198   cat conftest.err >&5
22199   echo "$as_me:22199: \$? = $ac_status" >&5
22200   (exit $ac_status); } >/dev/null; then
22201   if test -s conftest.err; then
22202     ac_cpp_err=$ac_cxx_preproc_warn_flag
22203   else
22204     ac_cpp_err=
22205   fi
22206 else
22207   ac_cpp_err=yes
22208 fi
22209 if test -z "$ac_cpp_err"; then
22210   :
22211 else
22212   echo "$as_me: failed program was:" >&5
22213   cat conftest.$ac_ext >&5
22214   # Broken: fails on valid input.
22215 continue
22216 fi
22217 rm -f conftest.err conftest.$ac_ext
22218
22219   # OK, works on sane cases.  Now check whether non-existent headers
22220   # can be detected and how.
22221   cat >conftest.$ac_ext <<_ACEOF
22222 #line 22222 "configure"
22223 #include "confdefs.h"
22224 #include <ac_nonexistent.h>
22225 _ACEOF
22226 if { (eval echo "$as_me:22226: \"$ac_cpp conftest.$ac_ext\"") >&5
22227   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22228   ac_status=$?
22229   egrep -v '^ *\+' conftest.er1 >conftest.err
22230   rm -f conftest.er1
22231   cat conftest.err >&5
22232   echo "$as_me:22232: \$? = $ac_status" >&5
22233   (exit $ac_status); } >/dev/null; then
22234   if test -s conftest.err; then
22235     ac_cpp_err=$ac_cxx_preproc_warn_flag
22236   else
22237     ac_cpp_err=
22238   fi
22239 else
22240   ac_cpp_err=yes
22241 fi
22242 if test -z "$ac_cpp_err"; then
22243   # Broken: success on invalid input.
22244 continue
22245 else
22246   echo "$as_me: failed program was:" >&5
22247   cat conftest.$ac_ext >&5
22248   # Passes both tests.
22249 ac_preproc_ok=:
22250 break
22251 fi
22252 rm -f conftest.err conftest.$ac_ext
22253
22254 done
22255 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22256 rm -f conftest.err conftest.$ac_ext
22257 if $ac_preproc_ok; then
22258   :
22259 else
22260   { { echo "$as_me:22260: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22261 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22262    { (exit 1); exit 1; }; }
22263 fi
22264
22265 ac_ext=cc
22266 ac_cpp='$CXXCPP $CPPFLAGS'
22267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22270 ac_main_return=return
22271
22272 for ac_header in typeinfo
22273 do
22274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22275 echo "$as_me:22275: checking for $ac_header" >&5
22276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22278   echo $ECHO_N "(cached) $ECHO_C" >&6
22279 else
22280   cat >conftest.$ac_ext <<_ACEOF
22281 #line 22281 "configure"
22282 #include "confdefs.h"
22283 #include <$ac_header>
22284 _ACEOF
22285 if { (eval echo "$as_me:22285: \"$ac_cpp conftest.$ac_ext\"") >&5
22286   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22287   ac_status=$?
22288   egrep -v '^ *\+' conftest.er1 >conftest.err
22289   rm -f conftest.er1
22290   cat conftest.err >&5
22291   echo "$as_me:22291: \$? = $ac_status" >&5
22292   (exit $ac_status); } >/dev/null; then
22293   if test -s conftest.err; then
22294     ac_cpp_err=$ac_cxx_preproc_warn_flag
22295   else
22296     ac_cpp_err=
22297   fi
22298 else
22299   ac_cpp_err=yes
22300 fi
22301 if test -z "$ac_cpp_err"; then
22302   eval "$as_ac_Header=yes"
22303 else
22304   echo "$as_me: failed program was:" >&5
22305   cat conftest.$ac_ext >&5
22306   eval "$as_ac_Header=no"
22307 fi
22308 rm -f conftest.err conftest.$ac_ext
22309 fi
22310 echo "$as_me:22310: result: `eval echo '${'$as_ac_Header'}'`" >&5
22311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22313   cat >>confdefs.h <<EOF
22314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22315 EOF
22316
22317 fi
22318 done
22319
22320 for ac_header in iostream
22321 do
22322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22323 echo "$as_me:22323: checking for $ac_header" >&5
22324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22326   echo $ECHO_N "(cached) $ECHO_C" >&6
22327 else
22328   cat >conftest.$ac_ext <<_ACEOF
22329 #line 22329 "configure"
22330 #include "confdefs.h"
22331 #include <$ac_header>
22332 _ACEOF
22333 if { (eval echo "$as_me:22333: \"$ac_cpp conftest.$ac_ext\"") >&5
22334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22335   ac_status=$?
22336   egrep -v '^ *\+' conftest.er1 >conftest.err
22337   rm -f conftest.er1
22338   cat conftest.err >&5
22339   echo "$as_me:22339: \$? = $ac_status" >&5
22340   (exit $ac_status); } >/dev/null; then
22341   if test -s conftest.err; then
22342     ac_cpp_err=$ac_cxx_preproc_warn_flag
22343   else
22344     ac_cpp_err=
22345   fi
22346 else
22347   ac_cpp_err=yes
22348 fi
22349 if test -z "$ac_cpp_err"; then
22350   eval "$as_ac_Header=yes"
22351 else
22352   echo "$as_me: failed program was:" >&5
22353   cat conftest.$ac_ext >&5
22354   eval "$as_ac_Header=no"
22355 fi
22356 rm -f conftest.err conftest.$ac_ext
22357 fi
22358 echo "$as_me:22358: result: `eval echo '${'$as_ac_Header'}'`" >&5
22359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22361   cat >>confdefs.h <<EOF
22362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22363 EOF
22364
22365 fi
22366 done
22367
22368 if test x"$ac_cv_header_iostream" = xyes ; then
22369         echo "$as_me:22369: checking if iostream uses std-namespace" >&5
22370 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22371         cat >conftest.$ac_ext <<_ACEOF
22372 #line 22372 "configure"
22373 #include "confdefs.h"
22374
22375 #include <iostream>
22376 using std::endl;
22377 using std::cerr;
22378 int
22379 main (void)
22380 {
22381
22382 cerr << "testing" << endl;
22383
22384   ;
22385   return 0;
22386 }
22387 _ACEOF
22388 rm -f conftest.$ac_objext
22389 if { (eval echo "$as_me:22389: \"$ac_compile\"") >&5
22390   (eval $ac_compile) 2>&5
22391   ac_status=$?
22392   echo "$as_me:22392: \$? = $ac_status" >&5
22393   (exit $ac_status); } &&
22394          { ac_try='test -s conftest.$ac_objext'
22395   { (eval echo "$as_me:22395: \"$ac_try\"") >&5
22396   (eval $ac_try) 2>&5
22397   ac_status=$?
22398   echo "$as_me:22398: \$? = $ac_status" >&5
22399   (exit $ac_status); }; }; then
22400   cf_iostream_namespace=yes
22401 else
22402   echo "$as_me: failed program was:" >&5
22403 cat conftest.$ac_ext >&5
22404 cf_iostream_namespace=no
22405 fi
22406 rm -f conftest.$ac_objext conftest.$ac_ext
22407         echo "$as_me:22407: result: $cf_iostream_namespace" >&5
22408 echo "${ECHO_T}$cf_iostream_namespace" >&6
22409         if test "$cf_iostream_namespace" = yes ; then
22410
22411 cat >>confdefs.h <<\EOF
22412 #define IOSTREAM_NAMESPACE 1
22413 EOF
22414
22415         fi
22416 fi
22417
22418 echo "$as_me:22418: checking if we should include stdbool.h" >&5
22419 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22420
22421 if test "${cf_cv_header_stdbool_h+set}" = set; then
22422   echo $ECHO_N "(cached) $ECHO_C" >&6
22423 else
22424
22425         cat >conftest.$ac_ext <<_ACEOF
22426 #line 22426 "configure"
22427 #include "confdefs.h"
22428
22429 int
22430 main (void)
22431 {
22432 bool foo = false
22433   ;
22434   return 0;
22435 }
22436 _ACEOF
22437 rm -f conftest.$ac_objext
22438 if { (eval echo "$as_me:22438: \"$ac_compile\"") >&5
22439   (eval $ac_compile) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit $ac_status); } &&
22443          { ac_try='test -s conftest.$ac_objext'
22444   { (eval echo "$as_me:22444: \"$ac_try\"") >&5
22445   (eval $ac_try) 2>&5
22446   ac_status=$?
22447   echo "$as_me:22447: \$? = $ac_status" >&5
22448   (exit $ac_status); }; }; then
22449   cf_cv_header_stdbool_h=0
22450 else
22451   echo "$as_me: failed program was:" >&5
22452 cat conftest.$ac_ext >&5
22453 cat >conftest.$ac_ext <<_ACEOF
22454 #line 22454 "configure"
22455 #include "confdefs.h"
22456
22457 #ifndef __BEOS__
22458 #include <stdbool.h>
22459 #endif
22460
22461 int
22462 main (void)
22463 {
22464 bool foo = false
22465   ;
22466   return 0;
22467 }
22468 _ACEOF
22469 rm -f conftest.$ac_objext
22470 if { (eval echo "$as_me:22470: \"$ac_compile\"") >&5
22471   (eval $ac_compile) 2>&5
22472   ac_status=$?
22473   echo "$as_me:22473: \$? = $ac_status" >&5
22474   (exit $ac_status); } &&
22475          { ac_try='test -s conftest.$ac_objext'
22476   { (eval echo "$as_me:22476: \"$ac_try\"") >&5
22477   (eval $ac_try) 2>&5
22478   ac_status=$?
22479   echo "$as_me:22479: \$? = $ac_status" >&5
22480   (exit $ac_status); }; }; then
22481   cf_cv_header_stdbool_h=1
22482 else
22483   echo "$as_me: failed program was:" >&5
22484 cat conftest.$ac_ext >&5
22485 cf_cv_header_stdbool_h=0
22486 fi
22487 rm -f conftest.$ac_objext conftest.$ac_ext
22488 fi
22489 rm -f conftest.$ac_objext conftest.$ac_ext
22490 fi
22491
22492 if test "$cf_cv_header_stdbool_h" = 1
22493 then    echo "$as_me:22493: result: yes" >&5
22494 echo "${ECHO_T}yes" >&6
22495 else    echo "$as_me:22495: result: no" >&5
22496 echo "${ECHO_T}no" >&6
22497 fi
22498
22499 echo "$as_me:22499: checking for builtin bool type" >&5
22500 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22501
22502 if test "${cf_cv_builtin_bool+set}" = set; then
22503   echo $ECHO_N "(cached) $ECHO_C" >&6
22504 else
22505
22506         cat >conftest.$ac_ext <<_ACEOF
22507 #line 22507 "configure"
22508 #include "confdefs.h"
22509
22510 #include <stdio.h>
22511 #include <sys/types.h>
22512
22513 int
22514 main (void)
22515 {
22516 bool x = false
22517   ;
22518   return 0;
22519 }
22520 _ACEOF
22521 rm -f conftest.$ac_objext
22522 if { (eval echo "$as_me:22522: \"$ac_compile\"") >&5
22523   (eval $ac_compile) 2>&5
22524   ac_status=$?
22525   echo "$as_me:22525: \$? = $ac_status" >&5
22526   (exit $ac_status); } &&
22527          { ac_try='test -s conftest.$ac_objext'
22528   { (eval echo "$as_me:22528: \"$ac_try\"") >&5
22529   (eval $ac_try) 2>&5
22530   ac_status=$?
22531   echo "$as_me:22531: \$? = $ac_status" >&5
22532   (exit $ac_status); }; }; then
22533   cf_cv_builtin_bool=1
22534 else
22535   echo "$as_me: failed program was:" >&5
22536 cat conftest.$ac_ext >&5
22537 cf_cv_builtin_bool=0
22538 fi
22539 rm -f conftest.$ac_objext conftest.$ac_ext
22540
22541 fi
22542
22543 if test "$cf_cv_builtin_bool" = 1
22544 then    echo "$as_me:22544: result: yes" >&5
22545 echo "${ECHO_T}yes" >&6
22546 else    echo "$as_me:22546: result: no" >&5
22547 echo "${ECHO_T}no" >&6
22548 fi
22549
22550 echo "$as_me:22550: checking for size of bool" >&5
22551 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22552 if test "${cf_cv_type_of_bool+set}" = set; then
22553   echo $ECHO_N "(cached) $ECHO_C" >&6
22554 else
22555
22556         rm -f cf_test.out
22557         if test "$cross_compiling" = yes; then
22558   cf_cv_type_of_bool=unknown
22559 else
22560   cat >conftest.$ac_ext <<_ACEOF
22561 #line 22561 "configure"
22562 #include "confdefs.h"
22563
22564 #include <stdlib.h>
22565 #include <stdio.h>
22566
22567 #if defined(__cplusplus)
22568
22569 #ifdef HAVE_GXX_BUILTIN_H
22570 #include <g++/builtin.h>
22571 #elif HAVE_GPP_BUILTIN_H
22572 #include <gpp/builtin.h>
22573 #elif HAVE_BUILTIN_H
22574 #include <builtin.h>
22575 #endif
22576
22577 #else
22578
22579 #if $cf_cv_header_stdbool_h
22580 #include <stdbool.h>
22581 #endif
22582
22583 #endif
22584
22585 int main(void)
22586 {
22587         FILE *fp = fopen("cf_test.out", "w");
22588         if (fp != 0) {
22589                 bool x = true;
22590                 if ((bool)(-x) >= 0)
22591                         fputs("unsigned ", fp);
22592                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22593                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22594                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22595                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22596                 fclose(fp);
22597         }
22598         ${cf_cv_main_return:-return}(0);
22599 }
22600
22601 _ACEOF
22602 rm -f conftest$ac_exeext
22603 if { (eval echo "$as_me:22603: \"$ac_link\"") >&5
22604   (eval $ac_link) 2>&5
22605   ac_status=$?
22606   echo "$as_me:22606: \$? = $ac_status" >&5
22607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22608   { (eval echo "$as_me:22608: \"$ac_try\"") >&5
22609   (eval $ac_try) 2>&5
22610   ac_status=$?
22611   echo "$as_me:22611: \$? = $ac_status" >&5
22612   (exit $ac_status); }; }; then
22613   cf_cv_type_of_bool=`cat cf_test.out`
22614                  if test -z "$cf_cv_type_of_bool"; then
22615                    cf_cv_type_of_bool=unknown
22616                  fi
22617 else
22618   echo "$as_me: program exited with status $ac_status" >&5
22619 echo "$as_me: failed program was:" >&5
22620 cat conftest.$ac_ext >&5
22621 cf_cv_type_of_bool=unknown
22622 fi
22623 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22624 fi
22625
22626 fi
22627
22628         rm -f cf_test.out
22629 echo "$as_me:22629: result: $cf_cv_type_of_bool" >&5
22630 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22631 if test "$cf_cv_type_of_bool" = unknown ; then
22632         case .$NCURSES_BOOL in
22633         (.auto|.) NCURSES_BOOL=unsigned;;
22634         esac
22635         { echo "$as_me:22635: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22636 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22637         cf_cv_type_of_bool=$NCURSES_BOOL
22638 fi
22639
22640 echo "$as_me:22640: checking for special defines needed for etip.h" >&5
22641 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22642 cf_save_CXXFLAGS="$CXXFLAGS"
22643 cf_result="none"
22644
22645 # etip.h includes ncurses.h which includes ncurses_dll.h
22646 # But ncurses_dll.h is generated - fix here.
22647 test -d include || mkdir include
22648 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
22649
22650 for cf_math in "" MATH_H
22651 do
22652 for cf_excp in "" MATH_EXCEPTION
22653 do
22654         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22655         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22656         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22657 cat >conftest.$ac_ext <<_ACEOF
22658 #line 22658 "configure"
22659 #include "confdefs.h"
22660
22661 #include <etip.h.in>
22662
22663 int
22664 main (void)
22665 {
22666
22667   ;
22668   return 0;
22669 }
22670 _ACEOF
22671 rm -f conftest.$ac_objext
22672 if { (eval echo "$as_me:22672: \"$ac_compile\"") >&5
22673   (eval $ac_compile) 2>&5
22674   ac_status=$?
22675   echo "$as_me:22675: \$? = $ac_status" >&5
22676   (exit $ac_status); } &&
22677          { ac_try='test -s conftest.$ac_objext'
22678   { (eval echo "$as_me:22678: \"$ac_try\"") >&5
22679   (eval $ac_try) 2>&5
22680   ac_status=$?
22681   echo "$as_me:22681: \$? = $ac_status" >&5
22682   (exit $ac_status); }; }; then
22683
22684         test -n "$cf_math" && cat >>confdefs.h <<EOF
22685 #define ETIP_NEEDS_${cf_math} 1
22686 EOF
22687
22688         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22689 #define ETIP_NEEDS_${cf_excp} 1
22690 EOF
22691
22692         cf_result="$cf_math $cf_excp"
22693         break 2
22694
22695 else
22696   echo "$as_me: failed program was:" >&5
22697 cat conftest.$ac_ext >&5
22698 fi
22699 rm -f conftest.$ac_objext conftest.$ac_ext
22700 done
22701 done
22702 echo "$as_me:22702: result: $cf_result" >&5
22703 echo "${ECHO_T}$cf_result" >&6
22704 CXXFLAGS="$cf_save_CXXFLAGS"
22705
22706 if test -n "$CXX"; then
22707 echo "$as_me:22707: checking if $CXX accepts parameter initialization" >&5
22708 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22709 if test "${cf_cv_cpp_param_init+set}" = set; then
22710   echo $ECHO_N "(cached) $ECHO_C" >&6
22711 else
22712
22713         ac_ext=cc
22714 ac_cpp='$CXXCPP $CPPFLAGS'
22715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22718 ac_main_return=return
22719
22720         if test "$cross_compiling" = yes; then
22721   cf_cv_cpp_param_init=unknown
22722 else
22723   cat >conftest.$ac_ext <<_ACEOF
22724 #line 22724 "configure"
22725 #include "confdefs.h"
22726
22727 class TEST {
22728 private:
22729         int value;
22730 public:
22731         TEST(int x = 1);
22732         ~TEST();
22733 };
22734
22735 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22736 {
22737         value = x;
22738 }
22739 int main(void) { }
22740
22741 _ACEOF
22742 rm -f conftest$ac_exeext
22743 if { (eval echo "$as_me:22743: \"$ac_link\"") >&5
22744   (eval $ac_link) 2>&5
22745   ac_status=$?
22746   echo "$as_me:22746: \$? = $ac_status" >&5
22747   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22748   { (eval echo "$as_me:22748: \"$ac_try\"") >&5
22749   (eval $ac_try) 2>&5
22750   ac_status=$?
22751   echo "$as_me:22751: \$? = $ac_status" >&5
22752   (exit $ac_status); }; }; then
22753   cf_cv_cpp_param_init=yes
22754 else
22755   echo "$as_me: program exited with status $ac_status" >&5
22756 echo "$as_me: failed program was:" >&5
22757 cat conftest.$ac_ext >&5
22758 cf_cv_cpp_param_init=no
22759 fi
22760 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22761 fi
22762         ac_ext=cc
22763 ac_cpp='$CXXCPP $CPPFLAGS'
22764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22767 ac_main_return=return
22768
22769 fi
22770 echo "$as_me:22770: result: $cf_cv_cpp_param_init" >&5
22771 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22772 fi
22773 test "$cf_cv_cpp_param_init" = yes &&
22774 cat >>confdefs.h <<\EOF
22775 #define CPP_HAS_PARAM_INIT 1
22776 EOF
22777
22778 if test -n "$CXX"; then
22779
22780 echo "$as_me:22780: checking if $CXX accepts static_cast" >&5
22781 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22782 if test "${cf_cv_cpp_static_cast+set}" = set; then
22783   echo $ECHO_N "(cached) $ECHO_C" >&6
22784 else
22785
22786         ac_ext=cc
22787 ac_cpp='$CXXCPP $CPPFLAGS'
22788 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22789 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22790 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22791 ac_main_return=return
22792
22793         cat >conftest.$ac_ext <<_ACEOF
22794 #line 22794 "configure"
22795 #include "confdefs.h"
22796
22797 class NCursesPanel
22798 {
22799 public:
22800   NCursesPanel(int nlines,
22801                int ncols,
22802                int begin_y = 0,
22803                int begin_x = 0)
22804   {
22805   }
22806   NCursesPanel();
22807   ~NCursesPanel();
22808 };
22809
22810 template<class T> class NCursesUserPanel : public NCursesPanel
22811 {
22812 public:
22813   NCursesUserPanel (int nlines,
22814                     int ncols,
22815                     int begin_y = 0,
22816                     int begin_x = 0,
22817                     const T* p_UserData = static_cast<T*>(0))
22818     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22819   {
22820   };
22821   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22822   {
22823   };
22824
22825   virtual ~NCursesUserPanel() {};
22826 };
22827
22828 int
22829 main (void)
22830 {
22831
22832         const char* p_UserData = static_cast<char*>(0)
22833   ;
22834   return 0;
22835 }
22836 _ACEOF
22837 rm -f conftest.$ac_objext
22838 if { (eval echo "$as_me:22838: \"$ac_compile\"") >&5
22839   (eval $ac_compile) 2>&5
22840   ac_status=$?
22841   echo "$as_me:22841: \$? = $ac_status" >&5
22842   (exit $ac_status); } &&
22843          { ac_try='test -s conftest.$ac_objext'
22844   { (eval echo "$as_me:22844: \"$ac_try\"") >&5
22845   (eval $ac_try) 2>&5
22846   ac_status=$?
22847   echo "$as_me:22847: \$? = $ac_status" >&5
22848   (exit $ac_status); }; }; then
22849   cf_cv_cpp_static_cast=yes
22850 else
22851   echo "$as_me: failed program was:" >&5
22852 cat conftest.$ac_ext >&5
22853 cf_cv_cpp_static_cast=no
22854 fi
22855 rm -f conftest.$ac_objext conftest.$ac_ext
22856
22857         ac_ext=cc
22858 ac_cpp='$CXXCPP $CPPFLAGS'
22859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22860 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22862 ac_main_return=return
22863
22864 fi
22865 echo "$as_me:22865: result: $cf_cv_cpp_static_cast" >&5
22866 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22867
22868 fi
22869
22870 test "$cf_cv_cpp_static_cast" = yes &&
22871 cat >>confdefs.h <<\EOF
22872 #define CPP_HAS_STATIC_CAST 1
22873 EOF
22874
22875         CXX_AR='$(AR)'
22876         CXX_ARFLAGS='$(ARFLAGS)'
22877         case $cf_cv_system_name in
22878         (irix*)
22879             if test "$GXX" != yes ; then
22880                 CXX_AR='$(CXX)'
22881                 CXX_ARFLAGS='-ar -o'
22882             fi
22883             ;;
22884         (sco3.2v5*)
22885             CXXLDFLAGS="-u main"
22886             ;;
22887         (solaris2*)
22888             if test "$GXX" != yes ; then
22889                 CXX_AR='$(CXX)'
22890                 CXX_ARFLAGS='-xar -o'
22891             fi
22892             ;;
22893         esac
22894
22895 else
22896         cf_cxx_library=no
22897         cf_cv_builtin_bool=1
22898
22899         # Just because we are not configuring against C++ right now does not
22900         # mean that a user will not want to use C++.  Some distributors disable
22901         # the C++ portion of this configuration as a shortcut (or just to avoid
22902         # compiling the demo in the c++ directory).  So we need a reasonable
22903         # default for the 'bool' type.
22904         #
22905         # Caveat: since the storage of the bool type is not standardized, it
22906         # may change.
22907
22908         if test "$NCURSES_BOOL" != auto ; then
22909                 cf_cv_type_of_bool=$NCURSES_BOOL
22910                 cf_cv_header_stdbool_h=0
22911         else
22912                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22913
22914 echo "$as_me:22914: checking for size of bool" >&5
22915 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22916 if test "${cf_cv_type_of_bool+set}" = set; then
22917   echo $ECHO_N "(cached) $ECHO_C" >&6
22918 else
22919
22920         rm -f cf_test.out
22921         if test "$cross_compiling" = yes; then
22922   cf_cv_type_of_bool=unknown
22923 else
22924   cat >conftest.$ac_ext <<_ACEOF
22925 #line 22925 "configure"
22926 #include "confdefs.h"
22927
22928 #include <stdlib.h>
22929 #include <stdio.h>
22930
22931 #if defined(__cplusplus)
22932
22933 #ifdef HAVE_GXX_BUILTIN_H
22934 #include <g++/builtin.h>
22935 #elif HAVE_GPP_BUILTIN_H
22936 #include <gpp/builtin.h>
22937 #elif HAVE_BUILTIN_H
22938 #include <builtin.h>
22939 #endif
22940
22941 #else
22942
22943 #if $cf_cv_header_stdbool_h
22944 #include <stdbool.h>
22945 #endif
22946
22947 #endif
22948
22949 int main(void)
22950 {
22951         FILE *fp = fopen("cf_test.out", "w");
22952         if (fp != 0) {
22953                 bool x = true;
22954                 if ((bool)(-x) >= 0)
22955                         fputs("unsigned ", fp);
22956                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22957                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22958                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22959                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22960                 fclose(fp);
22961         }
22962         ${cf_cv_main_return:-return}(0);
22963 }
22964
22965 _ACEOF
22966 rm -f conftest$ac_exeext
22967 if { (eval echo "$as_me:22967: \"$ac_link\"") >&5
22968   (eval $ac_link) 2>&5
22969   ac_status=$?
22970   echo "$as_me:22970: \$? = $ac_status" >&5
22971   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22972   { (eval echo "$as_me:22972: \"$ac_try\"") >&5
22973   (eval $ac_try) 2>&5
22974   ac_status=$?
22975   echo "$as_me:22975: \$? = $ac_status" >&5
22976   (exit $ac_status); }; }; then
22977   cf_cv_type_of_bool=`cat cf_test.out`
22978                  if test -z "$cf_cv_type_of_bool"; then
22979                    cf_cv_type_of_bool=unknown
22980                  fi
22981 else
22982   echo "$as_me: program exited with status $ac_status" >&5
22983 echo "$as_me: failed program was:" >&5
22984 cat conftest.$ac_ext >&5
22985 cf_cv_type_of_bool=unknown
22986 fi
22987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22988 fi
22989
22990 fi
22991
22992         rm -f cf_test.out
22993 echo "$as_me:22993: result: $cf_cv_type_of_bool" >&5
22994 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22995 if test "$cf_cv_type_of_bool" = unknown ; then
22996         case .$NCURSES_BOOL in
22997         (.auto|.) NCURSES_BOOL=unsigned;;
22998         esac
22999         { echo "$as_me:22999: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23000 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23001         cf_cv_type_of_bool=$NCURSES_BOOL
23002 fi
23003
23004                 else
23005                         echo "$as_me:23005: checking for fallback type of bool" >&5
23006 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
23007                         case "$host_cpu" in
23008                         (i?86)  cf_cv_type_of_bool=char ;;
23009                         (*)     cf_cv_type_of_bool=int  ;;
23010                         esac
23011                         echo "$as_me:23011: result: $cf_cv_type_of_bool" >&5
23012 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23013                 fi
23014         fi
23015 fi
23016
23017 # If the C compiler did not declare bool, and we did not determine that the C++
23018 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
23019 # ncurses library use the same type as C++ bool.  Note that this allows one to
23020 # specify the type of bool in a configure-script option and postpone
23021 # integration with the C++ compiler provided that the types are compatible.
23022 USE_CXX_BOOL=1
23023 if test $cf_cv_cc_bool_type = 1
23024 then
23025         # oops: C has a bool.  Unlikely, but C++ could differ.
23026         USE_CXX_BOOL=0
23027 elif test $cf_cv_builtin_bool = 0
23028 then
23029         # C++ has no bool
23030         USE_CXX_BOOL=0
23031 else
23032         # this is the normal case
23033         USE_CXX_BOOL='defined(__cplusplus)'
23034 fi
23035
23036 if test -f "${srcdir}/Ada95/Makefile.in" ; then
23037
23038         if test "$cf_with_ada" != "no" ; then
23039                 if test "$with_libtool" != "no"; then
23040                         { echo "$as_me:23040: WARNING: libtool does not support Ada - disabling feature" >&5
23041 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23042                         cf_with_ada=no
23043                 fi
23044         fi
23045
23046         if test "$cf_with_ada" != "no" ; then
23047
23048 cf_ada_make=gnatmake
23049 cf_ada_config="#"
23050 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23051 set dummy $cf_ada_make; ac_word=$2
23052 echo "$as_me:23052: checking for $ac_word" >&5
23053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23054 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23055   echo $ECHO_N "(cached) $ECHO_C" >&6
23056 else
23057   if test -n "$gnatmake_exists"; then
23058   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23059 else
23060   ac_save_IFS=$IFS; IFS=$ac_path_separator
23061 ac_dummy="$PATH"
23062 for ac_dir in $ac_dummy; do
23063   IFS=$ac_save_IFS
23064   test -z "$ac_dir" && ac_dir=.
23065   $as_executable_p "$ac_dir/$ac_word" || continue
23066 ac_cv_prog_gnatmake_exists="yes"
23067 echo "$as_me:23067: found $ac_dir/$ac_word" >&5
23068 break
23069 done
23070
23071   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23072 fi
23073 fi
23074 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23075 if test -n "$gnatmake_exists"; then
23076   echo "$as_me:23076: result: $gnatmake_exists" >&5
23077 echo "${ECHO_T}$gnatmake_exists" >&6
23078 else
23079   echo "$as_me:23079: result: no" >&5
23080 echo "${ECHO_T}no" >&6
23081 fi
23082
23083 if test "$ac_cv_prog_gnatmake_exists" = no; then
23084         cf_ada_make=
23085         cf_cv_prog_gnat_correct=no
23086 else
23087         # Extract the first word of "gprconfig", so it can be a program name with args.
23088 set dummy gprconfig; ac_word=$2
23089 echo "$as_me:23089: checking for $ac_word" >&5
23090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23091 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23092   echo $ECHO_N "(cached) $ECHO_C" >&6
23093 else
23094   if test -n "$gprconfig_exists"; then
23095   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23096 else
23097   ac_save_IFS=$IFS; IFS=$ac_path_separator
23098 ac_dummy="$PATH"
23099 for ac_dir in $ac_dummy; do
23100   IFS=$ac_save_IFS
23101   test -z "$ac_dir" && ac_dir=.
23102   $as_executable_p "$ac_dir/$ac_word" || continue
23103 ac_cv_prog_gprconfig_exists="yes"
23104 echo "$as_me:23104: found $ac_dir/$ac_word" >&5
23105 break
23106 done
23107
23108   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23109 fi
23110 fi
23111 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23112 if test -n "$gprconfig_exists"; then
23113   echo "$as_me:23113: result: $gprconfig_exists" >&5
23114 echo "${ECHO_T}$gprconfig_exists" >&6
23115 else
23116   echo "$as_me:23116: result: no" >&5
23117 echo "${ECHO_T}no" >&6
23118 fi
23119
23120         if test "$ac_cv_prog_gprconfig_exists" = yes
23121         then
23122                 rm -rf conftest* *~conftest*
23123                 if mkdir conftest.src
23124                 then
23125                         cf_ada_config=""
23126                         cd conftest.src
23127                         for cf_gprconfig in Ada C
23128                         do
23129                                 echo "$as_me:23129: checking for gprconfig name for $cf_gprconfig" >&5
23130 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23131                                 if test $cf_gprconfig = C
23132                                 then
23133                                         for cf_gprconfig_param in \
23134                                                 $cf_gprconfig,,,,GNATGCC \
23135                                                 $cf_gprconfig,,,,GCC \
23136                                                 $cf_gprconfig
23137                                         do
23138                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23139                                                 test -n "$cf_gprconfig_value" && break
23140                                         done
23141                                 else
23142                                         cf_gprconfig_param=$cf_gprconfig
23143                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23144                                 fi
23145                                 if test -n "$cf_gprconfig_value"
23146                                 then
23147                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23148                                         echo "$as_me:23148: result: $cf_gprconfig_value" >&5
23149 echo "${ECHO_T}$cf_gprconfig_value" >&6
23150                                 else
23151                                         echo "$as_me:23151: result: missing" >&5
23152 echo "${ECHO_T}missing" >&6
23153                                         cf_ada_config="#"
23154                                         break
23155                                 fi
23156                         done
23157                         cd ..
23158                         rm -rf conftest* *~conftest*
23159                 fi
23160         else
23161                 # gprconfig is newer than gnatmake; we can continue...
23162                 cf_ada_config="##"
23163         fi
23164         if test "x$cf_ada_config" != "x#"
23165         then
23166
23167 echo "$as_me:23167: checking for gnat version" >&5
23168 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23169 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23170         grep '[0-9].[0-9][0-9]*' |\
23171         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23172 echo "$as_me:23172: result: $cf_gnat_version" >&5
23173 echo "${ECHO_T}$cf_gnat_version" >&6
23174
23175 case $cf_gnat_version in
23176 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23177         cf_cv_prog_gnat_correct=yes
23178         ;;
23179 (*)
23180         { echo "$as_me:23180: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23181 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23182         cf_cv_prog_gnat_correct=no
23183         ;;
23184 esac
23185
23186                 # Extract the first word of "m4", so it can be a program name with args.
23187 set dummy m4; ac_word=$2
23188 echo "$as_me:23188: checking for $ac_word" >&5
23189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23190 if test "${ac_cv_prog_M4_exists+set}" = set; then
23191   echo $ECHO_N "(cached) $ECHO_C" >&6
23192 else
23193   if test -n "$M4_exists"; then
23194   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23195 else
23196   ac_save_IFS=$IFS; IFS=$ac_path_separator
23197 ac_dummy="$PATH"
23198 for ac_dir in $ac_dummy; do
23199   IFS=$ac_save_IFS
23200   test -z "$ac_dir" && ac_dir=.
23201   $as_executable_p "$ac_dir/$ac_word" || continue
23202 ac_cv_prog_M4_exists="yes"
23203 echo "$as_me:23203: found $ac_dir/$ac_word" >&5
23204 break
23205 done
23206
23207   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23208 fi
23209 fi
23210 M4_exists=$ac_cv_prog_M4_exists
23211 if test -n "$M4_exists"; then
23212   echo "$as_me:23212: result: $M4_exists" >&5
23213 echo "${ECHO_T}$M4_exists" >&6
23214 else
23215   echo "$as_me:23215: result: no" >&5
23216 echo "${ECHO_T}no" >&6
23217 fi
23218
23219                 if test "$ac_cv_prog_M4_exists" = no; then
23220                         cf_cv_prog_gnat_correct=no
23221                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23222                 fi
23223                 if test "$cf_cv_prog_gnat_correct" = yes; then
23224                         echo "$as_me:23224: checking if GNAT works" >&5
23225 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23226
23227 rm -rf conftest* *~conftest*
23228 cat >>conftest.ads <<CF_EOF
23229 procedure conftest;
23230 CF_EOF
23231 cat >>conftest.adb <<CF_EOF
23232 with Text_IO;
23233 with GNAT.OS_Lib;
23234 procedure conftest is
23235 begin
23236    Text_IO.Put ("Hello World");
23237    Text_IO.New_Line;
23238    GNAT.OS_Lib.OS_Exit (0);
23239 end conftest;
23240 CF_EOF
23241 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23242    if ( ./conftest 1>&5 2>&1 ) ; then
23243       cf_cv_prog_gnat_correct=yes
23244    else
23245       cf_cv_prog_gnat_correct=no
23246    fi
23247 else
23248    cf_cv_prog_gnat_correct=no
23249 fi
23250 rm -rf conftest* *~conftest*
23251
23252                         echo "$as_me:23252: result: $cf_cv_prog_gnat_correct" >&5
23253 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23254                 fi
23255         else
23256                 cf_cv_prog_gnat_correct=no
23257         fi
23258 fi
23259
23260                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23261
23262         ADAFLAGS="$ADAFLAGS -gnatpn"
23263
23264         echo "$as_me:23264: checking optimization options for ADAFLAGS" >&5
23265 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23266         case "$CFLAGS" in
23267         (*-g*)
23268
23269         ADAFLAGS="$ADAFLAGS -g"
23270
23271                 ;;
23272         esac
23273         case "$CFLAGS" in
23274         (*-O*)
23275                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23276
23277         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23278
23279                 ;;
23280         esac
23281         echo "$as_me:23281: result: $ADAFLAGS" >&5
23282 echo "${ECHO_T}$ADAFLAGS" >&6
23283
23284 echo "$as_me:23284: checking if GNATPREP supports -T option" >&5
23285 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23286 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23287   echo $ECHO_N "(cached) $ECHO_C" >&6
23288 else
23289
23290 cf_cv_gnatprep_opt_t=no
23291 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23292
23293 fi
23294 echo "$as_me:23294: result: $cf_cv_gnatprep_opt_t" >&5
23295 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23296 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23297
23298 echo "$as_me:23298: checking if GNAT supports generics" >&5
23299 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23300 case $cf_gnat_version in
23301 (3.[1-9]*|[4-9].*)
23302         cf_gnat_generics=yes
23303         ;;
23304 (*)
23305         cf_gnat_generics=no
23306         ;;
23307 esac
23308 echo "$as_me:23308: result: $cf_gnat_generics" >&5
23309 echo "${ECHO_T}$cf_gnat_generics" >&6
23310
23311 if test "$cf_gnat_generics" = yes
23312 then
23313         cf_compile_generics=generics
23314         cf_generic_objects="\${GENOBJS}"
23315 else
23316         cf_compile_generics=
23317         cf_generic_objects=
23318 fi
23319
23320 echo "$as_me:23320: checking if GNAT supports SIGINT" >&5
23321 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23322 if test "${cf_cv_gnat_sigint+set}" = set; then
23323   echo $ECHO_N "(cached) $ECHO_C" >&6
23324 else
23325
23326 rm -rf conftest* *~conftest*
23327 cat >>conftest.ads <<CF_EOF
23328 with Ada.Interrupts.Names;
23329
23330 package ConfTest is
23331
23332    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23333    pragma Unreserve_All_Interrupts;
23334    pragma Warnings (On);
23335
23336    protected Process is
23337       procedure Stop;
23338       function Continue return Boolean;
23339       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23340    private
23341       Done : Boolean := False;
23342    end Process;
23343
23344 end ConfTest;
23345 CF_EOF
23346 cat >>conftest.adb <<CF_EOF
23347 package body ConfTest is
23348    protected body Process is
23349       procedure Stop is
23350       begin
23351          Done := True;
23352       end Stop;
23353       function Continue return Boolean is
23354       begin
23355          return not Done;
23356       end Continue;
23357    end Process;
23358 end ConfTest;
23359 CF_EOF
23360 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23361       cf_cv_gnat_sigint=yes
23362 else
23363    cf_cv_gnat_sigint=no
23364 fi
23365 rm -rf conftest* *~conftest*
23366
23367 fi
23368 echo "$as_me:23368: result: $cf_cv_gnat_sigint" >&5
23369 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23370
23371 if test $cf_cv_gnat_sigint = yes ; then
23372         USE_GNAT_SIGINT=""
23373 else
23374         USE_GNAT_SIGINT="#"
23375 fi
23376
23377 cf_gnat_libraries=no
23378 cf_gnat_projects=no
23379
23380 if test "$enable_gnat_projects" != no ; then
23381 echo "$as_me:23381: checking if GNAT supports project files" >&5
23382 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23383 case $cf_gnat_version in
23384 (3.[0-9]*)
23385         ;;
23386 (*)
23387         case $cf_cv_system_name in
23388         (cygwin*|msys*)
23389                 ;;
23390         (*)
23391                 rm -rf conftest* *~conftest*
23392                 if mkdir conftest.src conftest.bin conftest.lib
23393                 then
23394                         cd conftest.src
23395                         rm -rf conftest* *~conftest*
23396                         cat >>library.gpr <<CF_EOF
23397 project Library is
23398   Kind := External ("LIB_KIND");
23399   for Library_Name use "ConfTest";
23400   for Object_Dir use ".";
23401   for Library_ALI_Dir use External("LIBRARY_DIR");
23402   for Library_Version use External ("SONAME");
23403   for Library_Kind use Kind;
23404   for Library_Dir use External("BUILD_DIR");
23405   Source_Dir := External ("SOURCE_DIR");
23406   for Source_Dirs use (Source_Dir);
23407 end Library;
23408 CF_EOF
23409                         cat >>confpackage.ads <<CF_EOF
23410 package ConfPackage is
23411    procedure conftest;
23412 end ConfPackage;
23413 CF_EOF
23414                         cat >>confpackage.adb <<CF_EOF
23415 with Text_IO;
23416 package body ConfPackage is
23417    procedure conftest is
23418    begin
23419       Text_IO.Put ("Hello World");
23420       Text_IO.New_Line;
23421    end conftest;
23422 end ConfPackage;
23423 CF_EOF
23424                         if ( $cf_ada_make $ADAFLAGS \
23425                                         -Plibrary.gpr \
23426                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23427                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23428                                         -XSOURCE_DIR=`pwd` \
23429                                         -XSONAME=libConfTest.so.1 \
23430                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23431                                 cf_gnat_projects=yes
23432                         fi
23433                         cd ..
23434                 fi
23435                 if test -f conftest.lib/confpackage.ali
23436                 then
23437                         cf_gnat_libraries=yes
23438                 fi
23439                 rm -rf conftest* *~conftest*
23440                 ;;
23441         esac
23442         ;;
23443 esac
23444 echo "$as_me:23444: result: $cf_gnat_projects" >&5
23445 echo "${ECHO_T}$cf_gnat_projects" >&6
23446 fi # enable_gnat_projects
23447
23448 if test $cf_gnat_projects = yes
23449 then
23450         echo "$as_me:23450: checking if GNAT supports libraries" >&5
23451 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23452         echo "$as_me:23452: result: $cf_gnat_libraries" >&5
23453 echo "${ECHO_T}$cf_gnat_libraries" >&6
23454 fi
23455
23456 if test "$cf_gnat_projects" = yes
23457 then
23458         USE_OLD_MAKERULES="#"
23459         USE_GNAT_PROJECTS=""
23460 else
23461         USE_OLD_MAKERULES=""
23462         USE_GNAT_PROJECTS="#"
23463 fi
23464
23465 if test "$cf_gnat_libraries" = yes
23466 then
23467         USE_GNAT_LIBRARIES=""
23468 else
23469         USE_GNAT_LIBRARIES="#"
23470 fi
23471
23472 echo "$as_me:23472: checking for ada-compiler" >&5
23473 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23474
23475 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23476 if test "${with_ada_compiler+set}" = set; then
23477   withval="$with_ada_compiler"
23478   cf_ada_compiler=$withval
23479 else
23480   cf_ada_compiler=gnatmake
23481 fi;
23482
23483 echo "$as_me:23483: result: $cf_ada_compiler" >&5
23484 echo "${ECHO_T}$cf_ada_compiler" >&6
23485
23486                         cf_ada_package=terminal_interface
23487
23488 echo "$as_me:23488: checking for ada-include" >&5
23489 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23490
23491 # Check whether --with-ada-include or --without-ada-include was given.
23492 if test "${with_ada_include+set}" = set; then
23493   withval="$with_ada_include"
23494
23495 else
23496   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23497 fi; if test -n "$prefix/share/ada/adainclude" ; then
23498
23499 if test "x$prefix" != xNONE; then
23500         cf_path_syntax="$prefix"
23501 else
23502         cf_path_syntax="$ac_default_prefix"
23503 fi
23504
23505 case ".$withval" in
23506 (.\$\(*\)*|.\'*\'*)
23507         ;;
23508 (..|./*|.\\*)
23509         ;;
23510 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23511         ;;
23512 (.\${*prefix}*|.\${*dir}*)
23513         eval withval="$withval"
23514         case ".$withval" in
23515         (.NONE/*)
23516                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23517                 ;;
23518         esac
23519         ;;
23520 (.no|.NONE/*)
23521         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23522         ;;
23523 (*)
23524         { { echo "$as_me:23524: error: expected a pathname, not \"$withval\"" >&5
23525 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23526    { (exit 1); exit 1; }; }
23527         ;;
23528 esac
23529
23530 fi
23531 eval ADA_INCLUDE="$withval"
23532
23533 echo "$as_me:23533: result: $ADA_INCLUDE" >&5
23534 echo "${ECHO_T}$ADA_INCLUDE" >&6
23535
23536 echo "$as_me:23536: checking for ada-objects" >&5
23537 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23538
23539 # Check whether --with-ada-objects or --without-ada-objects was given.
23540 if test "${with_ada_objects+set}" = set; then
23541   withval="$with_ada_objects"
23542
23543 else
23544   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23545 fi; if test -n "$prefix/lib/ada/adalib" ; then
23546
23547 if test "x$prefix" != xNONE; then
23548         cf_path_syntax="$prefix"
23549 else
23550         cf_path_syntax="$ac_default_prefix"
23551 fi
23552
23553 case ".$withval" in
23554 (.\$\(*\)*|.\'*\'*)
23555         ;;
23556 (..|./*|.\\*)
23557         ;;
23558 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23559         ;;
23560 (.\${*prefix}*|.\${*dir}*)
23561         eval withval="$withval"
23562         case ".$withval" in
23563         (.NONE/*)
23564                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23565                 ;;
23566         esac
23567         ;;
23568 (.no|.NONE/*)
23569         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23570         ;;
23571 (*)
23572         { { echo "$as_me:23572: error: expected a pathname, not \"$withval\"" >&5
23573 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23574    { (exit 1); exit 1; }; }
23575         ;;
23576 esac
23577
23578 fi
23579 eval ADA_OBJECTS="$withval"
23580
23581 echo "$as_me:23581: result: $ADA_OBJECTS" >&5
23582 echo "${ECHO_T}$ADA_OBJECTS" >&6
23583
23584 echo "$as_me:23584: checking if an Ada95 shared-library should be built" >&5
23585 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23586
23587 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23588 if test "${with_ada_sharedlib+set}" = set; then
23589   withval="$with_ada_sharedlib"
23590   with_ada_sharedlib=$withval
23591 else
23592   with_ada_sharedlib=no
23593 fi;
23594 echo "$as_me:23594: result: $with_ada_sharedlib" >&5
23595 echo "${ECHO_T}$with_ada_sharedlib" >&6
23596
23597 if test "x$with_ada_sharedlib" != xno
23598 then
23599         if test "x$cf_gnat_projects" != xyes
23600         then
23601                 { echo "$as_me:23601: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23602 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23603                 with_ada_sharedlib=no
23604         fi
23605 fi
23606
23607 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23608 MAKE_ADA_SHAREDLIB="#"
23609
23610 if test "x$with_ada_sharedlib" != xno
23611 then
23612         MAKE_ADA_SHAREDLIB=
23613         if test "x$with_ada_sharedlib" != xyes
23614         then
23615                 ADA_SHAREDLIB="$with_ada_sharedlib"
23616         fi
23617 fi
23618
23619                 fi
23620         fi
23621 else
23622         cf_with_ada=no
23623 fi
23624
23625 # do this "late" to avoid conflict with header-checks
23626 if test "x$with_widec" = xyes ; then
23627         echo "$as_me:23627: checking for wchar_t" >&5
23628 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23629 if test "${ac_cv_type_wchar_t+set}" = set; then
23630   echo $ECHO_N "(cached) $ECHO_C" >&6
23631 else
23632   cat >conftest.$ac_ext <<_ACEOF
23633 #line 23633 "configure"
23634 #include "confdefs.h"
23635 $ac_includes_default
23636 int
23637 main (void)
23638 {
23639 if ((wchar_t *) 0)
23640   return 0;
23641 if (sizeof (wchar_t))
23642   return 0;
23643   ;
23644   return 0;
23645 }
23646 _ACEOF
23647 rm -f conftest.$ac_objext
23648 if { (eval echo "$as_me:23648: \"$ac_compile\"") >&5
23649   (eval $ac_compile) 2>&5
23650   ac_status=$?
23651   echo "$as_me:23651: \$? = $ac_status" >&5
23652   (exit $ac_status); } &&
23653          { ac_try='test -s conftest.$ac_objext'
23654   { (eval echo "$as_me:23654: \"$ac_try\"") >&5
23655   (eval $ac_try) 2>&5
23656   ac_status=$?
23657   echo "$as_me:23657: \$? = $ac_status" >&5
23658   (exit $ac_status); }; }; then
23659   ac_cv_type_wchar_t=yes
23660 else
23661   echo "$as_me: failed program was:" >&5
23662 cat conftest.$ac_ext >&5
23663 ac_cv_type_wchar_t=no
23664 fi
23665 rm -f conftest.$ac_objext conftest.$ac_ext
23666 fi
23667 echo "$as_me:23667: result: $ac_cv_type_wchar_t" >&5
23668 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23669
23670 echo "$as_me:23670: checking size of wchar_t" >&5
23671 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23672 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23673   echo $ECHO_N "(cached) $ECHO_C" >&6
23674 else
23675   if test "$ac_cv_type_wchar_t" = yes; then
23676   if test "$cross_compiling" = yes; then
23677   # Depending upon the size, compute the lo and hi bounds.
23678 cat >conftest.$ac_ext <<_ACEOF
23679 #line 23679 "configure"
23680 #include "confdefs.h"
23681 $ac_includes_default
23682 int
23683 main (void)
23684 {
23685 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23686   ;
23687   return 0;
23688 }
23689 _ACEOF
23690 rm -f conftest.$ac_objext
23691 if { (eval echo "$as_me:23691: \"$ac_compile\"") >&5
23692   (eval $ac_compile) 2>&5
23693   ac_status=$?
23694   echo "$as_me:23694: \$? = $ac_status" >&5
23695   (exit $ac_status); } &&
23696          { ac_try='test -s conftest.$ac_objext'
23697   { (eval echo "$as_me:23697: \"$ac_try\"") >&5
23698   (eval $ac_try) 2>&5
23699   ac_status=$?
23700   echo "$as_me:23700: \$? = $ac_status" >&5
23701   (exit $ac_status); }; }; then
23702   ac_lo=0 ac_mid=0
23703   while :; do
23704     cat >conftest.$ac_ext <<_ACEOF
23705 #line 23705 "configure"
23706 #include "confdefs.h"
23707 $ac_includes_default
23708 int
23709 main (void)
23710 {
23711 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23712   ;
23713   return 0;
23714 }
23715 _ACEOF
23716 rm -f conftest.$ac_objext
23717 if { (eval echo "$as_me:23717: \"$ac_compile\"") >&5
23718   (eval $ac_compile) 2>&5
23719   ac_status=$?
23720   echo "$as_me:23720: \$? = $ac_status" >&5
23721   (exit $ac_status); } &&
23722          { ac_try='test -s conftest.$ac_objext'
23723   { (eval echo "$as_me:23723: \"$ac_try\"") >&5
23724   (eval $ac_try) 2>&5
23725   ac_status=$?
23726   echo "$as_me:23726: \$? = $ac_status" >&5
23727   (exit $ac_status); }; }; then
23728   ac_hi=$ac_mid; break
23729 else
23730   echo "$as_me: failed program was:" >&5
23731 cat conftest.$ac_ext >&5
23732 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23733 fi
23734 rm -f conftest.$ac_objext conftest.$ac_ext
23735   done
23736 else
23737   echo "$as_me: failed program was:" >&5
23738 cat conftest.$ac_ext >&5
23739 ac_hi=-1 ac_mid=-1
23740   while :; do
23741     cat >conftest.$ac_ext <<_ACEOF
23742 #line 23742 "configure"
23743 #include "confdefs.h"
23744 $ac_includes_default
23745 int
23746 main (void)
23747 {
23748 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23749   ;
23750   return 0;
23751 }
23752 _ACEOF
23753 rm -f conftest.$ac_objext
23754 if { (eval echo "$as_me:23754: \"$ac_compile\"") >&5
23755   (eval $ac_compile) 2>&5
23756   ac_status=$?
23757   echo "$as_me:23757: \$? = $ac_status" >&5
23758   (exit $ac_status); } &&
23759          { ac_try='test -s conftest.$ac_objext'
23760   { (eval echo "$as_me:23760: \"$ac_try\"") >&5
23761   (eval $ac_try) 2>&5
23762   ac_status=$?
23763   echo "$as_me:23763: \$? = $ac_status" >&5
23764   (exit $ac_status); }; }; then
23765   ac_lo=$ac_mid; break
23766 else
23767   echo "$as_me: failed program was:" >&5
23768 cat conftest.$ac_ext >&5
23769 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23770 fi
23771 rm -f conftest.$ac_objext conftest.$ac_ext
23772   done
23773 fi
23774 rm -f conftest.$ac_objext conftest.$ac_ext
23775 # Binary search between lo and hi bounds.
23776 while test "x$ac_lo" != "x$ac_hi"; do
23777   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23778   cat >conftest.$ac_ext <<_ACEOF
23779 #line 23779 "configure"
23780 #include "confdefs.h"
23781 $ac_includes_default
23782 int
23783 main (void)
23784 {
23785 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23786   ;
23787   return 0;
23788 }
23789 _ACEOF
23790 rm -f conftest.$ac_objext
23791 if { (eval echo "$as_me:23791: \"$ac_compile\"") >&5
23792   (eval $ac_compile) 2>&5
23793   ac_status=$?
23794   echo "$as_me:23794: \$? = $ac_status" >&5
23795   (exit $ac_status); } &&
23796          { ac_try='test -s conftest.$ac_objext'
23797   { (eval echo "$as_me:23797: \"$ac_try\"") >&5
23798   (eval $ac_try) 2>&5
23799   ac_status=$?
23800   echo "$as_me:23800: \$? = $ac_status" >&5
23801   (exit $ac_status); }; }; then
23802   ac_hi=$ac_mid
23803 else
23804   echo "$as_me: failed program was:" >&5
23805 cat conftest.$ac_ext >&5
23806 ac_lo=`expr $ac_mid + 1`
23807 fi
23808 rm -f conftest.$ac_objext conftest.$ac_ext
23809 done
23810 ac_cv_sizeof_wchar_t=$ac_lo
23811 else
23812   if test "$cross_compiling" = yes; then
23813   { { echo "$as_me:23813: error: cannot run test program while cross compiling" >&5
23814 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23815    { (exit 1); exit 1; }; }
23816 else
23817   cat >conftest.$ac_ext <<_ACEOF
23818 #line 23818 "configure"
23819 #include "confdefs.h"
23820 $ac_includes_default
23821 int
23822 main (void)
23823 {
23824 FILE *f = fopen ("conftest.val", "w");
23825 if (!f)
23826   $ac_main_return (1);
23827 fprintf (f, "%d", (sizeof (wchar_t)));
23828 fclose (f);
23829   ;
23830   return 0;
23831 }
23832 _ACEOF
23833 rm -f conftest$ac_exeext
23834 if { (eval echo "$as_me:23834: \"$ac_link\"") >&5
23835   (eval $ac_link) 2>&5
23836   ac_status=$?
23837   echo "$as_me:23837: \$? = $ac_status" >&5
23838   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23839   { (eval echo "$as_me:23839: \"$ac_try\"") >&5
23840   (eval $ac_try) 2>&5
23841   ac_status=$?
23842   echo "$as_me:23842: \$? = $ac_status" >&5
23843   (exit $ac_status); }; }; then
23844   ac_cv_sizeof_wchar_t=`cat conftest.val`
23845 else
23846   echo "$as_me: program exited with status $ac_status" >&5
23847 echo "$as_me: failed program was:" >&5
23848 cat conftest.$ac_ext >&5
23849 fi
23850 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23851 fi
23852 fi
23853 rm -f conftest.val
23854 else
23855   ac_cv_sizeof_wchar_t=0
23856 fi
23857 fi
23858 echo "$as_me:23858: result: $ac_cv_sizeof_wchar_t" >&5
23859 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23860 cat >>confdefs.h <<EOF
23861 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23862 EOF
23863
23864 fi
23865
23866 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23867 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23868 ###
23869 ### ticlib modules may be a separate library, otherwise contained in termlib.
23870 ### termlib modules may be a separate library, otherwise contained in ncurses.
23871 ###
23872 ### The of "+" or " " between the tokens controls the way the script
23873 ### chooses to split module lists into libraries.
23874 ###
23875 ### (see CF_LIB_RULES).
23876 echo "$as_me:23876: checking for library subsets" >&5
23877 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23878 LIB_SUBSETS=
23879
23880 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23881         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23882         if test "$with_ticlib" != no ; then
23883                 LIB_SUBSETS="${LIB_SUBSETS} "
23884         else
23885                 LIB_SUBSETS="${LIB_SUBSETS}+"
23886         fi
23887 fi
23888
23889 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23890 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23891
23892 if test "$with_termlib" != no ; then
23893         LIB_SUBSETS="${LIB_SUBSETS} "
23894 else
23895         LIB_SUBSETS="${LIB_SUBSETS}+"
23896 fi
23897
23898 LIB_SUBSETS="${LIB_SUBSETS}base"
23899
23900 # Most term-driver calls are to tinfo, but some like init_pair are to the
23901 # base library (so it resides in base).
23902 if test "$with_term_driver" != no ; then
23903         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23904         case $cf_cv_system_name in
23905         (*mingw32*|*mingw64*)
23906                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23907                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23908                 ;;
23909         (*)
23910                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23911                 ;;
23912         esac
23913 fi
23914
23915 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23916 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23917
23918 echo "$as_me:23918: result: $LIB_SUBSETS" >&5
23919 echo "${ECHO_T}$LIB_SUBSETS" >&6
23920
23921 ### Construct the list of include-directories to be generated
23922
23923 if test "$srcdir" != "."; then
23924         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23925 fi
23926 CPPFLAGS="-I../include $CPPFLAGS"
23927 if test "$srcdir" != "."; then
23928         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23929 fi
23930 CPPFLAGS="-I. $CPPFLAGS"
23931
23932 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23933 if test "$srcdir" != "."; then
23934         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23935 fi
23936 if test "$GCC" != yes; then
23937         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23938 elif test "$includedir" != "/usr/include"; then
23939         if test "$includedir" = '${prefix}/include' ; then
23940                 if test x$prefix != x/usr ; then
23941                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23942                 fi
23943         else
23944                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23945         fi
23946 fi
23947
23948 ### Build up pieces for makefile rules
23949 echo "$as_me:23949: checking default library suffix" >&5
23950 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23951
23952         case $DFT_LWR_MODEL in
23953         (libtool) DFT_ARG_SUFFIX=''   ;;
23954         (normal)  DFT_ARG_SUFFIX=''   ;;
23955         (debug)   DFT_ARG_SUFFIX='_g' ;;
23956         (profile) DFT_ARG_SUFFIX='_p' ;;
23957         (shared)  DFT_ARG_SUFFIX=''   ;;
23958         esac
23959         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23960 echo "$as_me:23960: result: $DFT_ARG_SUFFIX" >&5
23961 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23962
23963 echo "$as_me:23963: checking default library-dependency suffix" >&5
23964 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23965
23966         case X$DFT_LWR_MODEL in
23967         (Xlibtool)
23968                 DFT_LIB_SUFFIX='.la'
23969                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23970                 ;;
23971         (Xdebug)
23972                 DFT_LIB_SUFFIX='_g.a'
23973                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23974                 ;;
23975         (Xprofile)
23976                 DFT_LIB_SUFFIX='_p.a'
23977                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23978                 ;;
23979         (Xshared)
23980                 case $cf_cv_system_name in
23981                 (aix[5-7]*)
23982                         DFT_LIB_SUFFIX='.so'
23983                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23984                         ;;
23985                 (cygwin*|msys*|mingw*)
23986                         DFT_LIB_SUFFIX='.dll'
23987                         DFT_DEP_SUFFIX='.dll.a'
23988                         ;;
23989                 (darwin*)
23990                         DFT_LIB_SUFFIX='.dylib'
23991                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23992                         ;;
23993                 (hpux*)
23994                         case $target in
23995                         (ia64*)
23996                                 DFT_LIB_SUFFIX='.so'
23997                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23998                                 ;;
23999                         (*)
24000                                 DFT_LIB_SUFFIX='.sl'
24001                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24002                                 ;;
24003                         esac
24004                         ;;
24005                 (*)
24006                         DFT_LIB_SUFFIX='.so'
24007                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24008                         ;;
24009                 esac
24010                 ;;
24011         (*)
24012                 DFT_LIB_SUFFIX='.a'
24013                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24014                 ;;
24015         esac
24016         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24017         then
24018                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
24019                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
24020         fi
24021 echo "$as_me:24021: result: $DFT_DEP_SUFFIX" >&5
24022 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
24023
24024 echo "$as_me:24024: checking default object directory" >&5
24025 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
24026
24027         case $DFT_LWR_MODEL in
24028         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
24029         (normal)  DFT_OBJ_SUBDIR='objects' ;;
24030         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
24031         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
24032         (shared)
24033                 case $cf_cv_system_name in
24034                 (cygwin|msys)
24035                         DFT_OBJ_SUBDIR='objects' ;;
24036                 (*)
24037                         DFT_OBJ_SUBDIR='obj_s' ;;
24038                 esac
24039         esac
24040 echo "$as_me:24040: result: $DFT_OBJ_SUBDIR" >&5
24041 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
24042
24043 if test "x$cf_with_cxx" = xyes ; then
24044 echo "$as_me:24044: checking c++ library-dependency suffix" >&5
24045 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
24046 if test "$with_libtool" != "no"; then
24047         # libtool thinks it can make c++ shared libraries (perhaps only g++)
24048         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24049 elif test "$with_shared_cxx" != "no"; then
24050         # also for g++ users...
24051         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24052 else
24053         # we normally make a static library because C/C++ library rules differ
24054
24055         case Xnormal in
24056         (Xlibtool)
24057                 CXX_LIB_SUFFIX='.la'
24058                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24059                 ;;
24060         (Xdebug)
24061                 CXX_LIB_SUFFIX='_g.a'
24062                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24063                 ;;
24064         (Xprofile)
24065                 CXX_LIB_SUFFIX='_p.a'
24066                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24067                 ;;
24068         (Xshared)
24069                 case $cf_cv_system_name in
24070                 (aix[5-7]*)
24071                         CXX_LIB_SUFFIX='.so'
24072                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24073                         ;;
24074                 (cygwin*|msys*|mingw*)
24075                         CXX_LIB_SUFFIX='.dll'
24076                         CXX_DEP_SUFFIX='.dll.a'
24077                         ;;
24078                 (darwin*)
24079                         CXX_LIB_SUFFIX='.dylib'
24080                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24081                         ;;
24082                 (hpux*)
24083                         case $target in
24084                         (ia64*)
24085                                 CXX_LIB_SUFFIX='.so'
24086                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24087                                 ;;
24088                         (*)
24089                                 CXX_LIB_SUFFIX='.sl'
24090                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24091                                 ;;
24092                         esac
24093                         ;;
24094                 (*)
24095                         CXX_LIB_SUFFIX='.so'
24096                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24097                         ;;
24098                 esac
24099                 ;;
24100         (*)
24101                 CXX_LIB_SUFFIX='.a'
24102                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24103                 ;;
24104         esac
24105         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24106         then
24107                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24108                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24109         fi
24110
24111 fi
24112 echo "$as_me:24112: result: $CXX_LIB_SUFFIX" >&5
24113 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24114
24115 fi
24116
24117 # do not want -ldl in build except as needed for -lncurses dependency
24118 if test "x$with_dlsym" = xyes ; then
24119 if test $DFT_LWR_MODEL = shared || \
24120    test $DFT_LWR_MODEL = libtool ; then
24121
24122 # remove dl library from $LIBS
24123 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24124
24125 fi
24126 fi
24127 ### Set up low-level terminfo dependencies for makefiles.
24128
24129 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24130 # do not need libdl
24131 TICS_LIST=
24132 if test "x$with_dlsym" = xyes ; then
24133
24134 # remove dl library from $SHLIB_LIST
24135 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24136
24137 fi
24138
24139 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24140 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24141 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24142 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24143 then
24144         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24145 fi
24146
24147 if test "$with_ticlib" != no ; then
24148
24149         if test "x$with_ticlib" != xyes ; then
24150                 TICS_NAME=$with_ticlib
24151                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24152                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24153                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24154                 TICS_LIB_SUFFIX="${with_ticlib}"
24155         else
24156                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24157                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24158                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24159                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24160         fi
24161         TICS_LDFLAGS="-L${LIB_DIR}"
24162         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24163 else
24164         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24165         TICS_LDFLAGS="-L${LIB_DIR}"
24166         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24167 fi
24168
24169 if test "$with_termlib" != no ; then
24170
24171         if test "x$with_termlib" != xyes ; then
24172                 TINFO_NAME=$with_termlib
24173                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24174                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24175                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24176                 TINFO_LIB_SUFFIX="${with_termlib}"
24177         else
24178                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24179                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24180                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24181                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24182         fi
24183
24184         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24185         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24186         if test "$DFT_LWR_MODEL" = "libtool"; then
24187                 TEST_ARGS="${TEST_DEPS}"
24188                 TEST_ARG2="${TEST_DEP2}"
24189                 TINFO_LDFLAGS="-L${LIB_DIR}"
24190                 TINFO_LIBS="$TEST_ARGS"
24191                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24192                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24193         else
24194                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24195                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24196                 if test "x$with_term_driver" != xno ; then
24197                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24198                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24199                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24200                 else
24201                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24202                         TINFO_LIBS="$TEST_ARGS"
24203                 fi
24204                 TINFO_LDFLAGS="-L${LIB_DIR}"
24205                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24206         fi
24207 else
24208         # the next lines are needed for linking libtic over libncurses
24209         TINFO_NAME=${LIB_NAME}
24210         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24211         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24212         if test "x$with_tic_depends" = xyes ; then
24213                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24214         else
24215                 TICS_LIST="$SHLIB_LIST"
24216         fi
24217
24218         TINFO_LDFLAGS="-L${LIB_DIR}"
24219         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24220 fi
24221
24222 if test "$DFT_LWR_MODEL" = shared ; then
24223         case $cf_cv_system_name in
24224         (cygwin*|msys*)
24225                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24226                 TINFO_SUFFIX=.dll
24227                 ;;
24228         esac
24229 fi
24230
24231 if test "x$with_dlsym" = xyes ; then
24232
24233 # remove dl library from $TICS_LIST
24234 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24235
24236 fi
24237
24238 if test "$DFT_LWR_MODEL" = "libtool"; then
24239         OBJEXT=lo
24240 fi
24241
24242 # needed for Ada95
24243 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24244
24245 case $DFT_LWR_MODEL in
24246 (normal|debug|profile)
24247
24248 if test "$GCC" = yes ; then
24249         case $cf_cv_system_name in
24250         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24251                 LDFLAGS_STATIC=
24252                 LDFLAGS_SHARED=
24253                 ;;
24254         (*)     # normally, except when broken
24255                 LDFLAGS_STATIC=-static
24256                 LDFLAGS_SHARED=-dynamic
24257                 ;;
24258         esac
24259 else
24260         case $cf_cv_system_name in
24261         (aix[4-7]*)     # from ld manpage
24262                 LDFLAGS_STATIC=-bstatic
24263                 LDFLAGS_SHARED=-bdynamic
24264                 ;;
24265         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24266                 # We could also use just "archive" and "shared".
24267                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24268                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24269                 ;;
24270         (irix*)         # from ld manpage IRIX64
24271                 LDFLAGS_STATIC=-Bstatic
24272                 LDFLAGS_SHARED=-Bdynamic
24273                 ;;
24274         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24275                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24276                 LDFLAGS_STATIC=-noso
24277                 LDFLAGS_SHARED=-so_archive
24278                 ;;
24279         (solaris2*)
24280                 LDFLAGS_STATIC=-Bstatic
24281                 LDFLAGS_SHARED=-Bdynamic
24282                 ;;
24283         esac
24284 fi
24285
24286 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24287 then
24288         echo "$as_me:24288: checking if linker supports switching between static/dynamic" >&5
24289 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24290
24291         rm -f libconftest.a
24292         cat >conftest.$ac_ext <<EOF
24293 #line 24293 "configure"
24294 #include <stdio.h>
24295 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24296 EOF
24297         if { (eval echo "$as_me:24297: \"$ac_compile\"") >&5
24298   (eval $ac_compile) 2>&5
24299   ac_status=$?
24300   echo "$as_me:24300: \$? = $ac_status" >&5
24301   (exit $ac_status); } ; then
24302                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24303                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24304         fi
24305         rm -f conftest.*
24306
24307         cf_save_LIBS="$LIBS"
24308
24309         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24310         cat >conftest.$ac_ext <<_ACEOF
24311 #line 24311 "configure"
24312 #include "confdefs.h"
24313
24314 #line 24314 "configure"
24315 #include <stdio.h>
24316 int cf_ldflags_static(FILE *fp);
24317
24318 int
24319 main (void)
24320 {
24321
24322         return cf_ldflags_static(stdin);
24323
24324   ;
24325   return 0;
24326 }
24327 _ACEOF
24328 rm -f conftest.$ac_objext conftest$ac_exeext
24329 if { (eval echo "$as_me:24329: \"$ac_link\"") >&5
24330   (eval $ac_link) 2>&5
24331   ac_status=$?
24332   echo "$as_me:24332: \$? = $ac_status" >&5
24333   (exit $ac_status); } &&
24334          { ac_try='test -s conftest$ac_exeext'
24335   { (eval echo "$as_me:24335: \"$ac_try\"") >&5
24336   (eval $ac_try) 2>&5
24337   ac_status=$?
24338   echo "$as_me:24338: \$? = $ac_status" >&5
24339   (exit $ac_status); }; }; then
24340
24341         # some linkers simply ignore the -dynamic
24342         case x`file conftest$ac_exeext 2>/dev/null` in
24343         (*static*)
24344                 cf_ldflags_static=no
24345                 ;;
24346         (*)
24347                 cf_ldflags_static=yes
24348                 ;;
24349         esac
24350
24351 else
24352   echo "$as_me: failed program was:" >&5
24353 cat conftest.$ac_ext >&5
24354 cf_ldflags_static=no
24355 fi
24356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24357
24358         rm -f libconftest.*
24359         LIBS="$cf_save_LIBS"
24360
24361         echo "$as_me:24361: result: $cf_ldflags_static" >&5
24362 echo "${ECHO_T}$cf_ldflags_static" >&6
24363
24364         if test $cf_ldflags_static != yes
24365         then
24366                 LDFLAGS_STATIC=
24367                 LDFLAGS_SHARED=
24368         fi
24369 else
24370         LDFLAGS_STATIC=
24371         LDFLAGS_SHARED=
24372 fi
24373
24374         ;;
24375 esac
24376
24377 echo "$as_me:24377: checking where we will install curses.h" >&5
24378 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24379
24380 includesubdir=
24381 if test "$with_overwrite" = no && \
24382  ( test "x$includedir" = 'x${prefix}/include' || \
24383    test "x$includedir" = "x${prefix}/include" )
24384 then
24385         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24386 fi
24387 echo "$as_me:24387: result: ${includedir}${includesubdir}" >&5
24388 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24389
24390 ### Resolve a conflict between normal and wide-curses by forcing applications
24391 ### that will need libutf8 to add it to their configure script.
24392 if test "$with_overwrite" != no ; then
24393 if test "$NCURSES_LIBUTF8" = 1 ; then
24394         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24395         { echo "$as_me:24395: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24396 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24397 fi
24398 fi
24399 WITH_OVERWRITE=$with_overwrite
24400
24401 # used to separate tack out of the tree
24402 NCURSES_TREE=
24403
24404 ### predefined stuff for the test programs
24405
24406 cat >>confdefs.h <<\EOF
24407 #define HAVE_SLK_COLOR 1
24408 EOF
24409
24410 ### Construct the list of subdirectories for which we'll customize makefiles
24411 ### with the appropriate compile-rules.
24412
24413 echo "$as_me:24413: checking for src modules" >&5
24414 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24415
24416 # dependencies and linker-arguments for test-programs
24417 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24418 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24419 if test "$DFT_LWR_MODEL" = "libtool"; then
24420         TEST_ARGS="${TEST_DEPS}"
24421         TEST_ARG2="${TEST_DEP2}"
24422 else
24423         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24424         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24425 fi
24426
24427 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24428 cf_cv_src_modules=
24429 for cf_dir in $modules_to_build
24430 do
24431         if test -f $srcdir/$cf_dir/modules; then
24432
24433                 # We may/may not have tack in the distribution, though the
24434                 # makefile is.
24435                 if test $cf_dir = tack ; then
24436                         if test "x$cf_with_tack" != "xyes"; then
24437                                 continue
24438                         fi
24439                 fi
24440
24441                 if test -z "$cf_cv_src_modules"; then
24442                         cf_cv_src_modules=$cf_dir
24443                 else
24444                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24445                 fi
24446
24447                 # Make the ncurses_cfg.h file record the library interface files as
24448                 # well.  These are header files that are the same name as their
24449                 # directory.  Ncurses is the only library that does not follow
24450                 # that pattern.
24451                 if test $cf_dir = tack ; then
24452                         continue
24453                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24454
24455 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24456
24457                         cat >>confdefs.h <<EOF
24458 #define HAVE_${cf_have_include}_H 1
24459 EOF
24460
24461                         cat >>confdefs.h <<EOF
24462 #define HAVE_LIB${cf_have_include} 1
24463 EOF
24464
24465                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24466                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24467                         if test "$DFT_LWR_MODEL" = "libtool"; then
24468                                 TEST_ARGS="${TEST_DEPS}"
24469                                 TEST_ARG2="${TEST_DEP2}"
24470                         else
24471                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24472                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24473                         fi
24474                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24475                 fi
24476         fi
24477 done
24478 echo "$as_me:24478: result: $cf_cv_src_modules" >&5
24479 echo "${ECHO_T}$cf_cv_src_modules" >&6
24480
24481 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24482 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24483
24484 SRC_SUBDIRS=
24485 if test "x$cf_with_manpages" != xno ; then
24486         SRC_SUBDIRS="$SRC_SUBDIRS man"
24487 fi
24488 SRC_SUBDIRS="$SRC_SUBDIRS include"
24489 for cf_dir in $cf_cv_src_modules
24490 do
24491         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24492 done
24493 if test "x$cf_with_tests" != "xno" ; then
24494         SRC_SUBDIRS="$SRC_SUBDIRS test"
24495 fi
24496 # always make this, to install the ncurses-config script
24497 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24498 if test "$cf_with_cxx_binding" != no; then
24499         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24500         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24501 fi
24502
24503 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24504 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24505
24506 ADA_SUBDIRS=
24507 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24508         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24509         ADA_SUBDIRS="gen src"
24510         if test "x$cf_with_tests" != "xno" ; then
24511                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24512         fi
24513 fi
24514
24515 SUB_MAKEFILES=
24516 for cf_dir in $SRC_SUBDIRS
24517 do
24518         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24519 done
24520
24521 if test -n "$ADA_SUBDIRS"; then
24522         for cf_dir in $ADA_SUBDIRS
24523         do
24524                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24525         done
24526
24527 fi
24528
24529 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24530    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24531    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24532 fi
24533
24534 DIRS_TO_MAKE="lib"
24535 for cf_item in $cf_list_models
24536 do
24537
24538         case $cf_item in
24539         (libtool) cf_subdir='obj_lo'  ;;
24540         (normal)  cf_subdir='objects' ;;
24541         (debug)   cf_subdir='obj_g' ;;
24542         (profile) cf_subdir='obj_p' ;;
24543         (shared)
24544                 case $cf_cv_system_name in
24545                 (cygwin|msys)
24546                         cf_subdir='objects' ;;
24547                 (*)
24548                         cf_subdir='obj_s' ;;
24549                 esac
24550         esac
24551
24552         for cf_item2 in $DIRS_TO_MAKE
24553         do
24554                 test $cf_item2 = $cf_subdir && break
24555         done
24556         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24557 done
24558 for cf_dir in $DIRS_TO_MAKE
24559 do
24560         test ! -d $cf_dir && mkdir $cf_dir
24561 done
24562
24563 # symbols that differ when compiling Ada95 by itself.
24564 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24565
24566 # values to use as strings
24567
24568 cat >>confdefs.h <<EOF
24569 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24570 EOF
24571
24572 cat >>confdefs.h <<EOF
24573 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24574 EOF
24575
24576 ### Now that we're done running tests, add the compiler-warnings, if any
24577
24578 cf_fix_cppflags=no
24579 cf_new_cflags=
24580 cf_new_cppflags=
24581 cf_new_extra_cppflags=
24582
24583 for cf_add_cflags in $EXTRA_CFLAGS
24584 do
24585 case $cf_fix_cppflags in
24586 (no)
24587         case $cf_add_cflags in
24588         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24589                 case $cf_add_cflags in
24590                 (-D*)
24591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24592
24593                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24594                                 && test -z "${cf_tst_cflags}" \
24595                                 && cf_fix_cppflags=yes
24596
24597                         if test $cf_fix_cppflags = yes ; then
24598
24599         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24600         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24601
24602                                 continue
24603                         elif test "${cf_tst_cflags}" = "\"'" ; then
24604
24605         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24606         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24607
24608                                 continue
24609                         fi
24610                         ;;
24611                 esac
24612                 case "$CPPFLAGS" in
24613                 (*$cf_add_cflags)
24614                         ;;
24615                 (*)
24616                         case $cf_add_cflags in
24617                         (-D*)
24618                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24619
24620 CPPFLAGS=`echo "$CPPFLAGS" | \
24621         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24622                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24623
24624                                 ;;
24625                         esac
24626
24627         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24628         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24629
24630                         ;;
24631                 esac
24632                 ;;
24633         (*)
24634
24635         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24636         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24637
24638                 ;;
24639         esac
24640         ;;
24641 (yes)
24642
24643         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24644         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24645
24646         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24647
24648         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24649                 && test -z "${cf_tst_cflags}" \
24650                 && cf_fix_cppflags=no
24651         ;;
24652 esac
24653 done
24654
24655 if test -n "$cf_new_cflags" ; then
24656
24657         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24658         CFLAGS="${CFLAGS}$cf_new_cflags"
24659
24660 fi
24661
24662 if test -n "$cf_new_cppflags" ; then
24663
24664         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24665         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24666
24667 fi
24668
24669 if test -n "$cf_new_extra_cppflags" ; then
24670
24671         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24672         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24673
24674 fi
24675
24676 ### Define substitutions for header files to avoid name-pollution
24677
24678 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24679         HAVE_TCGETATTR=1
24680 else
24681         HAVE_TCGETATTR=0
24682 fi
24683
24684 if test "x$ac_cv_header_stdint_h" = xyes ; then
24685         HAVE_STDINT_H=1
24686 else
24687         HAVE_STDINT_H=0
24688 fi
24689
24690 if test "x$ac_cv_header_termio_h" = xyes ; then
24691         HAVE_TERMIO_H=1
24692 else
24693         HAVE_TERMIO_H=0
24694 fi
24695
24696 if test "x$ac_cv_header_termios_h" = xyes ; then
24697         HAVE_TERMIOS_H=1
24698 else
24699         HAVE_TERMIOS_H=0
24700 fi
24701
24702 ################################################################################
24703 test "x$use_database" = xyes && \
24704 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24705
24706 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24707 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24708
24709 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24710 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24711 fi
24712
24713 # Extract the first word of "tic", so it can be a program name with args.
24714 set dummy tic; ac_word=$2
24715 echo "$as_me:24715: checking for $ac_word" >&5
24716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24717 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24718   echo $ECHO_N "(cached) $ECHO_C" >&6
24719 else
24720   case $TIC_PATH in
24721   [\\/]* | ?:[\\/]*)
24722   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24723   ;;
24724   *)
24725   ac_save_IFS=$IFS; IFS=$ac_path_separator
24726 ac_dummy="$PATH:/usr/local/ncurses/bin"
24727 for ac_dir in $ac_dummy; do
24728   IFS=$ac_save_IFS
24729   test -z "$ac_dir" && ac_dir=.
24730   if $as_executable_p "$ac_dir/$ac_word"; then
24731    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24732    echo "$as_me:24732: found $ac_dir/$ac_word" >&5
24733    break
24734 fi
24735 done
24736
24737   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24738   ;;
24739 esac
24740 fi
24741 TIC_PATH=$ac_cv_path_TIC_PATH
24742
24743 if test -n "$TIC_PATH"; then
24744   echo "$as_me:24744: result: $TIC_PATH" >&5
24745 echo "${ECHO_T}$TIC_PATH" >&6
24746 else
24747   echo "$as_me:24747: result: no" >&5
24748 echo "${ECHO_T}no" >&6
24749 fi
24750
24751 if test -n "$FALLBACK_LIST"
24752 then
24753         if test "$TIC_PATH" = unknown
24754         then
24755                 { echo "$as_me:24755: WARNING: no tic program found for fallbacks" >&5
24756 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24757         fi
24758 fi
24759
24760 if test "x$cf_with_tests" != xno ; then
24761         MAKE_TESTS=
24762 else
24763         MAKE_TESTS="#"
24764 fi
24765
24766 ADAHTML_DIR=../../doc/html/ada
24767
24768 # these could be configurable, but are not currently
24769 PANEL_NAME=panel
24770 MENU_NAME=menu
24771 FORM_NAME=form
24772 CXX_NAME=ncurses++
24773
24774 # workaround for OS/2 (20151017)
24775 case $cf_cv_system_name in
24776 (os2*)
24777         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24778         ;;
24779 (*)
24780         LIBTOOL_OPTS_CXX=
24781         ;;
24782 esac
24783
24784 # workaround for g++ versus Solaris (20131116)
24785 case $cf_cv_system_name in
24786 (solaris2*)
24787         case "x$CPPFLAGS" in
24788         (*-D_XOPEN_SOURCE_EXTENDED*)
24789                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24790
24791 echo "${as_me:-configure}:24791: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24792
24793                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24794                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24795                 ;;
24796         esac
24797         ;;
24798 esac
24799
24800 # Help to automatically enable the extended curses features when using either
24801 # the *-config or the ".pc" files by adding defines.
24802 echo "$as_me:24802: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24803 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24804 PKG_CFLAGS=
24805 for cf_loop1 in $CPPFLAGS_after_XOPEN
24806 do
24807         cf_found=no
24808         for cf_loop2 in $CPPFLAGS_before_XOPEN
24809         do
24810                 if test "x$cf_loop1" = "x$cf_loop2"
24811                 then
24812                         cf_found=yes
24813                         break
24814                 fi
24815         done
24816         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24817 done
24818 echo "$as_me:24818: result: $PKG_CFLAGS" >&5
24819 echo "${ECHO_T}$PKG_CFLAGS" >&6
24820
24821 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24822 case "x$NCURSES_OSPEED" in
24823 (*short*)
24824         cf_compatible=1
24825         ;;
24826 (*)
24827         cf_compatible=0
24828         ;;
24829 esac
24830
24831 cat >>confdefs.h <<EOF
24832 #define NCURSES_OSPEED_COMPAT $cf_compatible
24833 EOF
24834
24835 case "x$cf_cv_typeof_chtype" in
24836 (xshort|xint|xlong)
24837         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24838         ;;
24839 esac
24840
24841 case "x$cf_cv_typeof_mmask_t" in
24842 (xshort|xint|xlong)
24843         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24844         ;;
24845 esac
24846
24847 # substitute into misc/Makefile to suppress
24848 # (un)install.data from the
24849 # (un)install rules.
24850 if test "x$cf_with_db_install" = "xno"; then
24851         MISC_INSTALL_DATA=
24852         MISC_UNINSTALL_DATA=
24853 else
24854         MISC_INSTALL_DATA=install.data
24855         MISC_UNINSTALL_DATA=uninstall.data
24856 fi
24857
24858 SUB_SCRIPTS=
24859
24860 if test -n "$PACKAGE"
24861 then
24862         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24863         export PACKAGE
24864         echo "package: $PACKAGE"
24865 fi
24866
24867 UNALTERED_SYMS=
24868 cf_filter_syms=no
24869
24870 if test -n "$RESULTING_SYMS"
24871 then
24872         cf_filter_syms=$cf_dft_filter_syms
24873         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24874
24875 echo "${as_me:-configure}:24875: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24876
24877 fi
24878
24879 if test "x$WILDCARD_SYMS" = xno
24880 then
24881         cf_filter_syms=yes
24882 fi
24883
24884 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24885
24886 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24887 if test $cf_filter_syms = yes
24888 then
24889         RESULTING_SYMS=resulting.map
24890 fi
24891
24892 if test "x$cross_compiling" = xyes ; then
24893         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24894         CHECK_BUILD="#"
24895 else
24896         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24897         CHECK_BUILD=
24898 fi
24899
24900 cat >>confdefs.h <<\EOF
24901 #define HAVE_CURSES_DATA_BOOLNAMES 1
24902 EOF
24903
24904 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"
24905 ac_config_commands="$ac_config_commands default"
24906 cat >confcache <<\_ACEOF
24907 # This file is a shell script that caches the results of configure
24908 # tests run on this system so they can be shared between configure
24909 # scripts and configure runs, see configure's option --config-cache.
24910 # It is not useful on other systems.  If it contains results you don't
24911 # want to keep, you may remove or edit it.
24912 #
24913 # config.status only pays attention to the cache file if you give it
24914 # the --recheck option to rerun configure.
24915 #
24916 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24917 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24918 # following values.
24919
24920 _ACEOF
24921
24922 # The following way of writing the cache mishandles newlines in values,
24923 # but we know of no workaround that is simple, portable, and efficient.
24924 # So, don't put newlines in cache variables' values.
24925 # Ultrix sh set writes to stderr and can't be redirected directly,
24926 # and sets the high bit in the cache file unless we assign to the vars.
24927 {
24928   (set) 2>&1 |
24929     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24930     *ac_space=\ *)
24931       # `set' does not quote correctly, so add quotes (double-quote
24932       # substitution turns \\\\ into \\, and sed turns \\ into \).
24933       sed -n \
24934         "s/'/'\\\\''/g;
24935           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24936       ;;
24937     *)
24938       # `set' quotes correctly as required by POSIX, so do not add quotes.
24939       sed -n \
24940         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24941       ;;
24942     esac;
24943 } |
24944   sed '
24945      t clear
24946      : clear
24947      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24948      t end
24949      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24950      : end' >>confcache
24951 if cmp -s $cache_file confcache; then :; else
24952   if test -w $cache_file; then
24953     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24954     cat confcache >$cache_file
24955   else
24956     echo "not updating unwritable cache $cache_file"
24957   fi
24958 fi
24959 rm -f confcache
24960
24961 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24962 # Let make expand exec_prefix.
24963 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24964
24965 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24966 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24967 # trailing colons and then remove the whole line if VPATH becomes empty
24968 # (actually we leave an empty line to preserve line numbers).
24969 if test "x$srcdir" = x.; then
24970   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24971 s/:*\$(srcdir):*/:/;
24972 s/:*\${srcdir}:*/:/;
24973 s/:*@srcdir@:*/:/;
24974 s/^\([^=]*=[    ]*\):*/\1/;
24975 s/:*$//;
24976 s/^[^=]*=[      ]*$//;
24977 }'
24978 fi
24979
24980 DEFS=-DHAVE_CONFIG_H
24981
24982 : ${CONFIG_STATUS=./config.status}
24983 ac_clean_files_save=$ac_clean_files
24984 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24985 { echo "$as_me:24985: creating $CONFIG_STATUS" >&5
24986 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24987 cat >$CONFIG_STATUS <<_ACEOF
24988 #! $SHELL
24989 # Generated automatically by configure.
24990 # Run this file to recreate the current configuration.
24991 # Compiler output produced by configure, useful for debugging
24992 # configure, is in config.log if it exists.
24993
24994 debug=false
24995 SHELL=\${CONFIG_SHELL-$SHELL}
24996 ac_cs_invocation="\$0 \$@"
24997
24998 _ACEOF
24999
25000 cat >>$CONFIG_STATUS <<\_ACEOF
25001 # Be Bourne compatible
25002 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25003   emulate sh
25004   NULLCMD=:
25005 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25006   set -o posix
25007 fi
25008
25009 # Name of the executable.
25010 as_me=`echo "$0" |sed 's,.*[\\/],,'`
25011
25012 if expr a : '\(a\)' >/dev/null 2>&1; then
25013   as_expr=expr
25014 else
25015   as_expr=false
25016 fi
25017
25018 rm -f conf$$ conf$$.exe conf$$.file
25019 echo >conf$$.file
25020 if ln -s conf$$.file conf$$ 2>/dev/null; then
25021   # We could just check for DJGPP; but this test a) works b) is more generic
25022   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25023   if test -f conf$$.exe; then
25024     # Don't use ln at all; we don't have any links
25025     as_ln_s='cp -p'
25026   else
25027     as_ln_s='ln -s'
25028   fi
25029 elif ln conf$$.file conf$$ 2>/dev/null; then
25030   as_ln_s=ln
25031 else
25032   as_ln_s='cp -p'
25033 fi
25034 rm -f conf$$ conf$$.exe conf$$.file
25035
25036 as_executable_p="test -f"
25037
25038 # Support unset when possible.
25039 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25040   as_unset=unset
25041 else
25042   as_unset=false
25043 fi
25044
25045 # NLS nuisances.
25046 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25047 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25048 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25049 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25050 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25051 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25052 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25053 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25054
25055 # IFS
25056 # We need space, tab and new line, in precisely that order.
25057 as_nl='
25058 '
25059 IFS="   $as_nl"
25060
25061 # CDPATH.
25062 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25063
25064 exec 6>&1
25065
25066 _ACEOF
25067
25068 # Files that config.status was made for.
25069 if test -n "$ac_config_files"; then
25070   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25071 fi
25072
25073 if test -n "$ac_config_headers"; then
25074   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25075 fi
25076
25077 if test -n "$ac_config_links"; then
25078   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25079 fi
25080
25081 if test -n "$ac_config_commands"; then
25082   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25083 fi
25084
25085 cat >>$CONFIG_STATUS <<\EOF
25086
25087 ac_cs_usage="\
25088 \`$as_me' instantiates files from templates according to the
25089 current configuration.
25090
25091 Usage: $0 [OPTIONS] [FILE]...
25092
25093   -h, --help       print this help, then exit
25094   -V, --version    print version number, then exit
25095   -d, --debug      don't remove temporary files
25096       --recheck    update $as_me by reconfiguring in the same conditions
25097   --file=FILE[:TEMPLATE]
25098                    instantiate the configuration file FILE
25099   --header=FILE[:TEMPLATE]
25100                    instantiate the configuration header FILE
25101
25102 Configuration files:
25103 $config_files
25104
25105 Configuration headers:
25106 $config_headers
25107
25108 Configuration commands:
25109 $config_commands
25110
25111 Report bugs to <dickey@invisible-island.net>."
25112 EOF
25113
25114 cat >>$CONFIG_STATUS <<EOF
25115 ac_cs_version="\\
25116 config.status
25117 configured by $0, generated by GNU Autoconf 2.52.20181006,
25118   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25119
25120 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25121 Free Software Foundation, Inc.
25122 This config.status script is free software; the Free Software Foundation
25123 gives unlimited permission to copy, distribute and modify it."
25124 srcdir=$srcdir
25125 INSTALL="$INSTALL"
25126 EOF
25127
25128 cat >>$CONFIG_STATUS <<\EOF
25129 # If no file are specified by the user, then we need to provide default
25130 # value.  By we need to know if files were specified by the user.
25131 ac_need_defaults=:
25132 while test $# != 0
25133 do
25134   case $1 in
25135   --*=*)
25136     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25137     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25138     shift
25139     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25140     shift
25141     ;;
25142   -*);;
25143   *) # This is not an option, so the user has probably given explicit
25144      # arguments.
25145      ac_need_defaults=false;;
25146   esac
25147
25148   case $1 in
25149   # Handling of the options.
25150 EOF
25151 cat >>$CONFIG_STATUS <<EOF
25152   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25153     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25154     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25155 EOF
25156 cat >>$CONFIG_STATUS <<\EOF
25157   --version | --vers* | -V )
25158     echo "$ac_cs_version"; exit 0 ;;
25159   --he | --h)
25160     # Conflict between --help and --header
25161     { { echo "$as_me:25161: error: ambiguous option: $1
25162 Try \`$0 --help' for more information." >&5
25163 echo "$as_me: error: ambiguous option: $1
25164 Try \`$0 --help' for more information." >&2;}
25165    { (exit 1); exit 1; }; };;
25166   --help | --hel | -h )
25167     echo "$ac_cs_usage"; exit 0 ;;
25168   --debug | --d* | -d )
25169     debug=: ;;
25170   --file | --fil | --fi | --f )
25171     shift
25172     CONFIG_FILES="$CONFIG_FILES $1"
25173     ac_need_defaults=false;;
25174   --header | --heade | --head | --hea )
25175     shift
25176     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25177     ac_need_defaults=false;;
25178
25179   # This is an error.
25180   -*) { { echo "$as_me:25180: error: unrecognized option: $1
25181 Try \`$0 --help' for more information." >&5
25182 echo "$as_me: error: unrecognized option: $1
25183 Try \`$0 --help' for more information." >&2;}
25184    { (exit 1); exit 1; }; } ;;
25185
25186   *) ac_config_targets="$ac_config_targets $1" ;;
25187
25188   esac
25189   shift
25190 done
25191
25192 exec 5>>config.log
25193 cat >&5 << _ACEOF
25194
25195 ## ----------------------- ##
25196 ## Running config.status.  ##
25197 ## ----------------------- ##
25198
25199 This file was extended by $as_me 2.52.20181006, executed with
25200   CONFIG_FILES    = $CONFIG_FILES
25201   CONFIG_HEADERS  = $CONFIG_HEADERS
25202   CONFIG_LINKS    = $CONFIG_LINKS
25203   CONFIG_COMMANDS = $CONFIG_COMMANDS
25204   > $ac_cs_invocation
25205 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25206
25207 _ACEOF
25208 EOF
25209
25210 cat >>$CONFIG_STATUS <<EOF
25211 #
25212 # INIT-COMMANDS section.
25213 #
25214
25215 ### Special initialization commands, used to pass information from the
25216 ### configuration-run into config.status
25217
25218 AWK="$AWK"
25219 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25220 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25221 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25222 ECHO_LD="$ECHO_LD"
25223 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25224 LDCONFIG="$LDCONFIG"
25225 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25226 LIB_NAME="$LIB_NAME"
25227 LIB_PREFIX="$LIB_PREFIX"
25228 LIB_SUBSETS="$LIB_SUBSETS"
25229 LIB_SUFFIX="$LIB_SUFFIX"
25230 LIB_TRACING="$LIB_TRACING"
25231 LN_S="$LN_S"
25232 MAKE_TERMINFO="$MAKE_TERMINFO"
25233 NCURSES_MAJOR="$NCURSES_MAJOR"
25234 NCURSES_MINOR="$NCURSES_MINOR"
25235 NCURSES_OSPEED="$NCURSES_OSPEED"
25236 NCURSES_PATCH="$NCURSES_PATCH"
25237 SRC_SUBDIRS="$SRC_SUBDIRS"
25238 TERMINFO="$TERMINFO"
25239 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25240 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25241 TICS_NAME="$TICS_NAME"
25242 TICS_SUFFIX="$TICS_SUFFIX"
25243 TIC_PATH="$TIC_PATH"
25244 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25245 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25246 TINFO_NAME="$TINFO_NAME"
25247 TINFO_SUFFIX="$TINFO_SUFFIX"
25248 UNALTERED_SYMS="$UNALTERED_SYMS"
25249 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25250 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25251 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25252 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25253 WILDCARD_SYMS="$WILDCARD_SYMS"
25254 WITH_CURSES_H="$with_curses_h"
25255 WITH_ECHO="${enable_echo:=yes}"
25256 WITH_OVERWRITE="$with_overwrite"
25257 cf_LIST_MODELS="$cf_list_models"
25258 cf_cv_abi_version="$cf_cv_abi_version"
25259 cf_cv_do_relink="$cf_cv_do_relink"
25260 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25261 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25262 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25263 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25264 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25265 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25266 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25267 cf_cv_rel_version="$cf_cv_rel_version"
25268 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25269 cf_cv_shared_soname='$cf_cv_shared_soname'
25270 cf_cv_shlib_version="$cf_cv_shlib_version"
25271 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25272 cf_cv_system_name="$cf_cv_system_name"
25273 cf_cv_term_driver="$with_term_driver"
25274 cf_with_ada="$cf_with_ada"
25275 cf_with_cxx_binding="$cf_with_cxx_binding"
25276 cf_with_db_install="$cf_with_db_install"
25277 cf_with_manpages="$cf_with_manpages"
25278 cf_with_tests="$cf_with_tests"
25279 host="$host"
25280 target="$target"
25281 with_shared_cxx="$with_shared_cxx"
25282
25283 EOF
25284
25285 cat >>$CONFIG_STATUS <<\EOF
25286 for ac_config_target in $ac_config_targets
25287 do
25288   case "$ac_config_target" in
25289   # Handling of arguments.
25290   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25291   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25292   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25293   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25294   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25295   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25296   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25297   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25298   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25299   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25300   *) { { echo "$as_me:25300: error: invalid argument: $ac_config_target" >&5
25301 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25302    { (exit 1); exit 1; }; };;
25303   esac
25304 done
25305
25306 # If the user did not use the arguments to specify the items to instantiate,
25307 # then the envvar interface is used.  Set only those that are not.
25308 # We use the long form for the default assignment because of an extremely
25309 # bizarre bug on SunOS 4.1.3.
25310 if $ac_need_defaults; then
25311   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25312   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25313   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25314 fi
25315
25316 # Create a temporary directory, and hook for its removal unless debugging.
25317 $debug ||
25318 {
25319   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25320   trap '{ (exit 1); exit 1; }' 1 2 13 15
25321 }
25322
25323 # Create a (secure) tmp directory for tmp files.
25324 : ${TMPDIR=/tmp}
25325 {
25326   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25327   test -n "$tmp" && test -d "$tmp"
25328 }  ||
25329 {
25330   tmp=$TMPDIR/cs$$-$RANDOM
25331   (umask 077 && mkdir $tmp)
25332 } ||
25333 {
25334    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25335    { (exit 1); exit 1; }
25336 }
25337
25338 EOF
25339
25340 cat >>$CONFIG_STATUS <<EOF
25341
25342 #
25343 # CONFIG_FILES section.
25344 #
25345
25346 # No need to generate the scripts if there are no CONFIG_FILES.
25347 # This happens for instance when ./config.status config.h
25348 if test -n "\$CONFIG_FILES"; then
25349   # Protect against being on the right side of a sed subst in config.status.
25350   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25351    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25352 s,@SHELL@,$SHELL,;t t
25353 s,@exec_prefix@,$exec_prefix,;t t
25354 s,@prefix@,$prefix,;t t
25355 s,@program_transform_name@,$program_transform_name,;t t
25356 s,@bindir@,$bindir,;t t
25357 s,@sbindir@,$sbindir,;t t
25358 s,@libexecdir@,$libexecdir,;t t
25359 s,@datarootdir@,$datarootdir,;t t
25360 s,@datadir@,$datadir,;t t
25361 s,@sysconfdir@,$sysconfdir,;t t
25362 s,@sharedstatedir@,$sharedstatedir,;t t
25363 s,@localstatedir@,$localstatedir,;t t
25364 s,@runstatedir@,$runstatedir,;t t
25365 s,@libdir@,$libdir,;t t
25366 s,@includedir@,$includedir,;t t
25367 s,@oldincludedir@,$oldincludedir,;t t
25368 s,@infodir@,$infodir,;t t
25369 s,@mandir@,$mandir,;t t
25370 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25371 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25372 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25373 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25374 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25375 s,@build_alias@,$build_alias,;t t
25376 s,@host_alias@,$host_alias,;t t
25377 s,@target_alias@,$target_alias,;t t
25378 s,@ECHO_C@,$ECHO_C,;t t
25379 s,@ECHO_N@,$ECHO_N,;t t
25380 s,@ECHO_T@,$ECHO_T,;t t
25381 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25382 s,@DEFS@,$DEFS,;t t
25383 s,@LIBS@,$LIBS,;t t
25384 s,@top_builddir@,$top_builddir,;t t
25385 s,@EGREP@,$EGREP,;t t
25386 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25387 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25388 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25389 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25390 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25391 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25392 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25393 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25394 s,@VERSION@,$VERSION,;t t
25395 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25396 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25397 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25398 s,@PACKAGE@,$PACKAGE,;t t
25399 s,@build@,$build,;t t
25400 s,@build_cpu@,$build_cpu,;t t
25401 s,@build_vendor@,$build_vendor,;t t
25402 s,@build_os@,$build_os,;t t
25403 s,@host@,$host,;t t
25404 s,@host_cpu@,$host_cpu,;t t
25405 s,@host_vendor@,$host_vendor,;t t
25406 s,@host_os@,$host_os,;t t
25407 s,@target@,$target,;t t
25408 s,@target_cpu@,$target_cpu,;t t
25409 s,@target_vendor@,$target_vendor,;t t
25410 s,@target_os@,$target_os,;t t
25411 s,@CC@,$CC,;t t
25412 s,@CFLAGS@,$CFLAGS,;t t
25413 s,@LDFLAGS@,$LDFLAGS,;t t
25414 s,@CPPFLAGS@,$CPPFLAGS,;t t
25415 s,@ac_ct_CC@,$ac_ct_CC,;t t
25416 s,@EXEEXT@,$EXEEXT,;t t
25417 s,@OBJEXT@,$OBJEXT,;t t
25418 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25419 s,@CPP@,$CPP,;t t
25420 s,@LDCONFIG@,$LDCONFIG,;t t
25421 s,@CXX@,$CXX,;t t
25422 s,@CXXFLAGS@,$CXXFLAGS,;t t
25423 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25424 s,@AWK@,$AWK,;t t
25425 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25426 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25427 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25428 s,@LINT@,$LINT,;t t
25429 s,@LINT_OPTS@,$LINT_OPTS,;t t
25430 s,@LN_S@,$LN_S,;t t
25431 s,@cf_config_suffix@,$cf_config_suffix,;t t
25432 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25433 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25434 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25435 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25436 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25437 s,@SET_MAKE@,$SET_MAKE,;t t
25438 s,@CTAGS@,$CTAGS,;t t
25439 s,@ETAGS@,$ETAGS,;t t
25440 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25441 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25442 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25443 s,@RANLIB@,$RANLIB,;t t
25444 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25445 s,@LD@,$LD,;t t
25446 s,@ac_ct_LD@,$ac_ct_LD,;t t
25447 s,@AR@,$AR,;t t
25448 s,@ac_ct_AR@,$ac_ct_AR,;t t
25449 s,@NM@,$NM,;t t
25450 s,@ac_ct_NM@,$ac_ct_NM,;t t
25451 s,@ARFLAGS@,$ARFLAGS,;t t
25452 s,@DESTDIR@,$DESTDIR,;t t
25453 s,@BUILD_CC@,$BUILD_CC,;t t
25454 s,@BUILD_CPP@,$BUILD_CPP,;t t
25455 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25456 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25457 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25458 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25459 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25460 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25461 s,@cf_list_models@,$cf_list_models,;t t
25462 s,@ABI_VERSION@,$ABI_VERSION,;t t
25463 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25464 s,@LIBTOOL@,$LIBTOOL,;t t
25465 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25466 s,@LT_UNDEF@,$LT_UNDEF,;t t
25467 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25468 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25469 s,@LIB_CREATE@,$LIB_CREATE,;t t
25470 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25471 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25472 s,@LIB_PREP@,$LIB_PREP,;t t
25473 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25474 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25475 s,@LIB_LINK@,$LIB_LINK,;t t
25476 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25477 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25478 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25479 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25480 s,@TICS_NAME@,$TICS_NAME,;t t
25481 s,@TINFO_NAME@,$TINFO_NAME,;t t
25482 s,@LIB_NAME@,$LIB_NAME,;t t
25483 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25484 s,@CC_G_OPT@,$CC_G_OPT,;t t
25485 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25486 s,@LD_MODEL@,$LD_MODEL,;t t
25487 s,@shlibdir@,$shlibdir,;t t
25488 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25489 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25490 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25491 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25492 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25493 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25494 s,@LINK_PROGS@,$LINK_PROGS,;t t
25495 s,@LINK_TESTS@,$LINK_TESTS,;t t
25496 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25497 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25498 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25499 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25500 s,@RPATH_LIST@,$RPATH_LIST,;t t
25501 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25502 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25503 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25504 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25505 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25506 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25507 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25508 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25509 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25510 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
25511 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25512 s,@XTERM_KBS@,$XTERM_KBS,;t t
25513 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25514 s,@TERMINFO@,$TERMINFO,;t t
25515 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25516 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25517 s,@TERMPATH@,$TERMPATH,;t t
25518 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25519 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25520 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25521 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25522 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25523 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25524 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25525 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25526 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25527 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25528 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25529 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25530 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25531 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25532 s,@RGB_PATH@,$RGB_PATH,;t t
25533 s,@no_x11_rgb@,$no_x11_rgb,;t t
25534 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25535 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25536 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25537 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25538 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25539 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25540 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25541 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25542 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25543 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25544 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25545 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25546 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25547 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25548 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25549 s,@PTHREAD@,$PTHREAD,;t t
25550 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25551 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25552 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25553 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25554 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25555 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25556 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25557 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25558 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25559 s,@ECHO_LT@,$ECHO_LT,;t t
25560 s,@ECHO_LD@,$ECHO_LD,;t t
25561 s,@RULE_CC@,$RULE_CC,;t t
25562 s,@SHOW_CC@,$SHOW_CC,;t t
25563 s,@ECHO_CC@,$ECHO_CC,;t t
25564 s,@ECHO_LINK@,$ECHO_LINK,;t t
25565 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25566 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25567 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25568 s,@ADAFLAGS@,$ADAFLAGS,;t t
25569 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25570 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25571 s,@ADA_TRACE@,$ADA_TRACE,;t t
25572 s,@MATH_LIB@,$MATH_LIB,;t t
25573 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25574 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25575 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25576 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25577 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25578 s,@TEST_LIBS@,$TEST_LIBS,;t t
25579 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25580 s,@CXXCPP@,$CXXCPP,;t t
25581 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25582 s,@CXX_AR@,$CXX_AR,;t t
25583 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25584 s,@CXXLIBS@,$CXXLIBS,;t t
25585 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25586 s,@gnatmake_exists@,$gnatmake_exists,;t t
25587 s,@gprconfig_exists@,$gprconfig_exists,;t t
25588 s,@M4_exists@,$M4_exists,;t t
25589 s,@cf_ada_make@,$cf_ada_make,;t t
25590 s,@cf_ada_config@,$cf_ada_config,;t t
25591 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25592 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25593 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25594 s,@cf_compile_generics@,$cf_compile_generics,;t t
25595 s,@cf_generic_objects@,$cf_generic_objects,;t t
25596 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25597 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25598 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25599 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25600 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25601 s,@cf_ada_package@,$cf_ada_package,;t t
25602 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25603 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25604 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25605 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25606 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25607 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25608 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25609 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25610 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25611 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25612 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25613 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25614 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25615 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25616 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25617 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25618 s,@TICS_LIBS@,$TICS_LIBS,;t t
25619 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25620 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25621 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25622 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25623 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25624 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25625 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25626 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25627 s,@includesubdir@,$includesubdir,;t t
25628 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25629 s,@TICS_LIST@,$TICS_LIST,;t t
25630 s,@TINFO_LIST@,$TINFO_LIST,;t t
25631 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25632 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25633 s,@TEST_ARGS@,$TEST_ARGS,;t t
25634 s,@TEST_DEPS@,$TEST_DEPS,;t t
25635 s,@TEST_ARG2@,$TEST_ARG2,;t t
25636 s,@TEST_DEP2@,$TEST_DEP2,;t t
25637 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25638 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25639 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25640 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25641 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25642 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25643 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25644 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25645 s,@cross_compiling@,$cross_compiling,;t t
25646 s,@TIC_PATH@,$TIC_PATH,;t t
25647 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25648 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25649 s,@PANEL_NAME@,$PANEL_NAME,;t t
25650 s,@MENU_NAME@,$MENU_NAME,;t t
25651 s,@FORM_NAME@,$FORM_NAME,;t t
25652 s,@CXX_NAME@,$CXX_NAME,;t t
25653 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25654 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25655 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25656 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25657 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25658 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25659 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25660 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25661 CEOF
25662
25663 EOF
25664
25665   cat >>$CONFIG_STATUS <<\EOF
25666   # Split the substitutions into bite-sized pieces for seds with
25667   # small command number limits, like on Digital OSF/1 and HP-UX.
25668   ac_max_sed_lines=48
25669   ac_sed_frag=1 # Number of current file.
25670   ac_beg=1 # First line for current file.
25671   ac_end=$ac_max_sed_lines # Line after last line for current file.
25672   ac_more_lines=:
25673   ac_sed_cmds=
25674   while $ac_more_lines; do
25675     if test $ac_beg -gt 1; then
25676       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25677     else
25678       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25679     fi
25680     if test ! -s $tmp/subs.frag; then
25681       ac_more_lines=false
25682     else
25683       # The purpose of the label and of the branching condition is to
25684       # speed up the sed processing (if there are no `@' at all, there
25685       # is no need to browse any of the substitutions).
25686       # These are the two extra sed commands mentioned above.
25687       (echo ':t
25688   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25689       # It is possible to make a multiline substitution using escaped newlines.
25690       # Ensure that we do not split the substitution between script fragments.
25691       ac_BEG=$ac_end
25692       ac_END=`expr $ac_end + $ac_max_sed_lines`
25693       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25694       if test -s $tmp/subs.next; then
25695         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25696         if test ! -s $tmp/subs.edit; then
25697           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25698           if test ! -s $tmp/subs.edit; then
25699             if test $ac_beg -gt 1; then
25700               ac_end=`expr $ac_end - 1`
25701               continue
25702             fi
25703           fi
25704         fi
25705       fi
25706
25707       if test -z "$ac_sed_cmds"; then
25708         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25709       else
25710         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25711       fi
25712       ac_sed_frag=`expr $ac_sed_frag + 1`
25713       ac_beg=$ac_end
25714       ac_end=`expr $ac_end + $ac_max_sed_lines`
25715     fi
25716   done
25717   if test -z "$ac_sed_cmds"; then
25718     ac_sed_cmds=cat
25719   fi
25720 fi # test -n "$CONFIG_FILES"
25721
25722 EOF
25723 cat >>$CONFIG_STATUS <<\EOF
25724 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25725   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25726   case $ac_file in
25727   - | *:- | *:-:* ) # input from stdin
25728         cat >$tmp/stdin
25729         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25730         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25731   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25732         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25733   * )   ac_file_in=$ac_file.in ;;
25734   esac
25735
25736   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25737   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25738          X"$ac_file" : 'X\(//\)[^/]' \| \
25739          X"$ac_file" : 'X\(//\)$' \| \
25740          X"$ac_file" : 'X\(/\)' \| \
25741          .     : '\(.\)' 2>/dev/null ||
25742 echo X"$ac_file" |
25743     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25744           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25745           /^X\(\/\/\)$/{ s//\1/; q; }
25746           /^X\(\/\).*/{ s//\1/; q; }
25747           s/.*/./; q'`
25748   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25749     { case "$ac_dir" in
25750   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25751   *)                      as_incr_dir=.;;
25752 esac
25753 as_dummy="$ac_dir"
25754 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25755   case $as_mkdir_dir in
25756     # Skip DOS drivespec
25757     ?:) as_incr_dir=$as_mkdir_dir ;;
25758     *)
25759       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25760       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25761     ;;
25762   esac
25763 done; }
25764
25765     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25766     # A "../" for each directory in $ac_dir_suffix.
25767     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25768   else
25769     ac_dir_suffix= ac_dots=
25770   fi
25771
25772   case $srcdir in
25773   .)  ac_srcdir=.
25774       if test -z "$ac_dots"; then
25775          ac_top_srcdir=.
25776       else
25777          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25778       fi ;;
25779   [\\/]* | ?:[\\/]* )
25780       ac_srcdir=$srcdir$ac_dir_suffix;
25781       ac_top_srcdir=$srcdir ;;
25782   *) # Relative path.
25783     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25784     ac_top_srcdir=$ac_dots$srcdir ;;
25785   esac
25786
25787   case $INSTALL in
25788   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25789   *) ac_INSTALL=$ac_dots$INSTALL ;;
25790   esac
25791
25792   if test x"$ac_file" != x-; then
25793     { echo "$as_me:25793: creating $ac_file" >&5
25794 echo "$as_me: creating $ac_file" >&6;}
25795     rm -f "$ac_file"
25796   fi
25797   # Let's still pretend it is `configure' which instantiates (i.e., don't
25798   # use $as_me), people would be surprised to read:
25799   #    /* config.h.  Generated automatically by config.status.  */
25800   configure_input="Generated automatically from `echo $ac_file_in |
25801                                                  sed 's,.*/,,'` by configure."
25802
25803   # First look for the input files in the build tree, otherwise in the
25804   # src tree.
25805   ac_file_inputs=`IFS=:
25806     for f in $ac_file_in; do
25807       case $f in
25808       -) echo $tmp/stdin ;;
25809       [\\/$]*)
25810          # Absolute (can't be DOS-style, as IFS=:)
25811          test -f "$f" || { { echo "$as_me:25811: error: cannot find input file: $f" >&5
25812 echo "$as_me: error: cannot find input file: $f" >&2;}
25813    { (exit 1); exit 1; }; }
25814          echo $f;;
25815       *) # Relative
25816          if test -f "$f"; then
25817            # Build tree
25818            echo $f
25819          elif test -f "$srcdir/$f"; then
25820            # Source tree
25821            echo $srcdir/$f
25822          else
25823            # /dev/null tree
25824            { { echo "$as_me:25824: error: cannot find input file: $f" >&5
25825 echo "$as_me: error: cannot find input file: $f" >&2;}
25826    { (exit 1); exit 1; }; }
25827          fi;;
25828       esac
25829     done` || { (exit 1); exit 1; }
25830 EOF
25831 cat >>$CONFIG_STATUS <<\EOF
25832   ac_warn_datarootdir=no
25833   if test x"$ac_file" != x-; then
25834     for ac_item in $ac_file_inputs
25835     do
25836       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25837       if test -n "$ac_seen"; then
25838         ac_used=`grep '@datarootdir@' $ac_item`
25839         if test -z "$ac_used"; then
25840           { echo "$as_me:25840: WARNING: datarootdir was used implicitly but not set:
25841 $ac_seen" >&5
25842 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25843 $ac_seen" >&2;}
25844           ac_warn_datarootdir=yes
25845         fi
25846       fi
25847       ac_seen=`grep '${datarootdir}' $ac_item`
25848       if test -n "$ac_seen"; then
25849         { echo "$as_me:25849: WARNING: datarootdir was used explicitly but not set:
25850 $ac_seen" >&5
25851 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25852 $ac_seen" >&2;}
25853         ac_warn_datarootdir=yes
25854       fi
25855     done
25856   fi
25857
25858 if test "x$ac_warn_datarootdir" = xyes; then
25859   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25860 fi
25861
25862 EOF
25863 cat >>$CONFIG_STATUS <<EOF
25864   sed "$ac_vpsub
25865 $extrasub
25866 EOF
25867 cat >>$CONFIG_STATUS <<\EOF
25868 :t
25869 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25870 s,@configure_input@,$configure_input,;t t
25871 s,@srcdir@,$ac_srcdir,;t t
25872 s,@top_srcdir@,$ac_top_srcdir,;t t
25873 s,@INSTALL@,$ac_INSTALL,;t t
25874 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25875   rm -f $tmp/stdin
25876   if test x"$ac_file" != x-; then
25877     cp $tmp/out $ac_file
25878
25879     for ac_name in prefix exec_prefix datarootdir
25880     do
25881         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25882         if test -n "$ac_seen"; then
25883             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25884             if test -z "$ac_init"; then
25885               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25886               { echo "$as_me:25886: WARNING: Variable $ac_name is used but was not set:
25887 $ac_seen" >&5
25888 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25889 $ac_seen" >&2;}
25890             fi
25891         fi
25892     done
25893     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25894     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25895     if test -s $tmp/out; then
25896       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25897       { echo "$as_me:25897: WARNING: Some variables may not be substituted:
25898 $ac_seen" >&5
25899 echo "$as_me: WARNING: Some variables may not be substituted:
25900 $ac_seen" >&2;}
25901     fi
25902   else
25903     cat $tmp/out
25904   fi
25905   rm -f $tmp/out
25906
25907 done
25908 EOF
25909 cat >>$CONFIG_STATUS <<\EOF
25910
25911 #
25912 # CONFIG_HEADER section.
25913 #
25914
25915 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25916 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25917 #
25918 # ac_d sets the value in "#define NAME VALUE" lines.
25919 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25920 ac_dB='[        ].*$,\1#\2'
25921 ac_dC=' '
25922 ac_dD=',;t'
25923 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25924 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25925 ac_iB='\([      ]\),\1#\2define\3'
25926 ac_iC=' '
25927 ac_iD='\4,;t'
25928 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25929 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25930 ac_uB='$,\1#\2define\3'
25931 ac_uC=' '
25932 ac_uD=',;t'
25933
25934 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25935   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25936   case $ac_file in
25937   - | *:- | *:-:* ) # input from stdin
25938         cat >$tmp/stdin
25939         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25940         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25941   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25942         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25943   * )   ac_file_in=$ac_file.in ;;
25944   esac
25945
25946   test x"$ac_file" != x- && { echo "$as_me:25946: creating $ac_file" >&5
25947 echo "$as_me: creating $ac_file" >&6;}
25948
25949   # First look for the input files in the build tree, otherwise in the
25950   # src tree.
25951   ac_file_inputs=`IFS=:
25952     for f in $ac_file_in; do
25953       case $f in
25954       -) echo $tmp/stdin ;;
25955       [\\/$]*)
25956          # Absolute (can't be DOS-style, as IFS=:)
25957          test -f "$f" || { { echo "$as_me:25957: error: cannot find input file: $f" >&5
25958 echo "$as_me: error: cannot find input file: $f" >&2;}
25959    { (exit 1); exit 1; }; }
25960          echo $f;;
25961       *) # Relative
25962          if test -f "$f"; then
25963            # Build tree
25964            echo $f
25965          elif test -f "$srcdir/$f"; then
25966            # Source tree
25967            echo $srcdir/$f
25968          else
25969            # /dev/null tree
25970            { { echo "$as_me:25970: error: cannot find input file: $f" >&5
25971 echo "$as_me: error: cannot find input file: $f" >&2;}
25972    { (exit 1); exit 1; }; }
25973          fi;;
25974       esac
25975     done` || { (exit 1); exit 1; }
25976   # Remove the trailing spaces.
25977   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25978
25979 EOF
25980
25981 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25982 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25983 # be either 'cat' or 'sort'.
25984 cat confdefs.h | uniq >conftest.vals
25985
25986 # Break up conftest.vals because some shells have a limit on
25987 # the size of here documents, and old seds have small limits too.
25988
25989 rm -f conftest.tail
25990 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25991 while grep . conftest.vals >/dev/null
25992 do
25993   # Write chunks of a limited-size here document to conftest.frag.
25994   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25995   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25996   echo 'CEOF' >> $CONFIG_STATUS
25997   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25998   rm -f conftest.vals
25999   mv conftest.tail conftest.vals
26000 done
26001 rm -f conftest.vals
26002
26003 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
26004 # marker @DEFS@.
26005 echo '  cat >> conftest.edit <<CEOF
26006 /@DEFS@/r conftest.frag
26007 /@DEFS@/d
26008 CEOF
26009 sed -f conftest.edit $tmp/in > $tmp/out
26010 rm -f $tmp/in
26011 mv $tmp/out $tmp/in
26012 rm -f conftest.edit conftest.frag
26013 ' >> $CONFIG_STATUS
26014
26015 cat >>$CONFIG_STATUS <<\EOF
26016   # Let's still pretend it is `configure' which instantiates (i.e., don't
26017   # use $as_me), people would be surprised to read:
26018   #    /* config.h.  Generated automatically by config.status.  */
26019   if test x"$ac_file" = x-; then
26020     echo "/* Generated automatically by configure.  */" >$tmp/config.h
26021   else
26022     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
26023   fi
26024   cat $tmp/in >>$tmp/config.h
26025   rm -f $tmp/in
26026   if test x"$ac_file" != x-; then
26027     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
26028       { echo "$as_me:26028: $ac_file is unchanged" >&5
26029 echo "$as_me: $ac_file is unchanged" >&6;}
26030     else
26031       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26032          X"$ac_file" : 'X\(//\)[^/]' \| \
26033          X"$ac_file" : 'X\(//\)$' \| \
26034          X"$ac_file" : 'X\(/\)' \| \
26035          .     : '\(.\)' 2>/dev/null ||
26036 echo X"$ac_file" |
26037     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26038           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26039           /^X\(\/\/\)$/{ s//\1/; q; }
26040           /^X\(\/\).*/{ s//\1/; q; }
26041           s/.*/./; q'`
26042       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26043         { case "$ac_dir" in
26044   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26045   *)                      as_incr_dir=.;;
26046 esac
26047 as_dummy="$ac_dir"
26048 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26049   case $as_mkdir_dir in
26050     # Skip DOS drivespec
26051     ?:) as_incr_dir=$as_mkdir_dir ;;
26052     *)
26053       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26054       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26055     ;;
26056   esac
26057 done; }
26058
26059       fi
26060       rm -f $ac_file
26061       mv $tmp/config.h $ac_file
26062     fi
26063   else
26064     cat $tmp/config.h
26065     rm -f $tmp/config.h
26066   fi
26067 done
26068 EOF
26069 cat >>$CONFIG_STATUS <<\EOF
26070 #
26071 # CONFIG_COMMANDS section.
26072 #
26073 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26074   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26075   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26076
26077   case $ac_dest in
26078     default )
26079 if test "x$cf_with_tests" != xno ; then
26080
26081 for cf_dir in test
26082 do
26083         if test ! -d $srcdir/$cf_dir; then
26084                 continue
26085         elif test -f $srcdir/$cf_dir/programs; then
26086                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26087         fi
26088 done
26089
26090 fi
26091
26092 cf_prefix=$LIB_PREFIX
26093
26094 case $cf_cv_shlib_version in
26095 (cygdll|msysdll|mingw)
26096         TINFO_NAME=$TINFO_ARG_SUFFIX
26097         TINFO_SUFFIX=.dll
26098         ;;
26099 esac
26100
26101 if test -n "$TINFO_SUFFIX" ; then
26102         case $TINFO_SUFFIX in
26103         (tw*)
26104                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26105                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26106                 ;;
26107         (t*)
26108                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26109                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26110                 ;;
26111         (w*)
26112                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26113                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26114                 ;;
26115         esac
26116 fi
26117
26118 for cf_dir in $SRC_SUBDIRS
26119 do
26120         if test ! -d $srcdir/$cf_dir ; then
26121                 continue
26122         elif test -f $srcdir/$cf_dir/modules; then
26123
26124                 SHARED_LIB=
26125                 Libs_To_Make=
26126                 cf_awk_program=
26127                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26128                 then
26129                         cf_awk_program="$cf_awk_program\
26130 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26131 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26132 "
26133                 fi
26134
26135                 if test "x$WILDCARD_SYMS" = xno
26136                 then
26137                         cf_awk_program="$cf_awk_program\
26138 /[      ]_\\*;/ { skip=1; next; }\
26139 "
26140                 fi
26141
26142                 if test "x$cf_awk_program" != "x"
26143                 then
26144                         cat >>$cf_dir/Makefile <<CF_EOF
26145
26146 # Generated by CF_LIB_RULES
26147 resulting.map: $UNALTERED_SYMS
26148         $AWK 'BEGIN { skip = 1; last=""; } \
26149 $cf_awk_program \
26150 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26151  skip = 0; last = \$\$0; } \
26152 END { print last; }' < $UNALTERED_SYMS >\$@
26153
26154 distclean::
26155         rm -f resulting.map
26156 CF_EOF
26157                 fi
26158
26159                 for cf_item in $cf_LIST_MODELS
26160                 do
26161
26162         case X$cf_item in
26163         (Xlibtool)
26164                 cf_suffix='.la'
26165                 cf_depsuf=$cf_suffix
26166                 ;;
26167         (Xdebug)
26168                 cf_suffix='_g.a'
26169                 cf_depsuf=$cf_suffix
26170                 ;;
26171         (Xprofile)
26172                 cf_suffix='_p.a'
26173                 cf_depsuf=$cf_suffix
26174                 ;;
26175         (Xshared)
26176                 case $cf_cv_system_name in
26177                 (aix[5-7]*)
26178                         cf_suffix='.so'
26179                         cf_depsuf=$cf_suffix
26180                         ;;
26181                 (cygwin*|msys*|mingw*)
26182                         cf_suffix='.dll'
26183                         cf_depsuf='.dll.a'
26184                         ;;
26185                 (darwin*)
26186                         cf_suffix='.dylib'
26187                         cf_depsuf=$cf_suffix
26188                         ;;
26189                 (hpux*)
26190                         case $target in
26191                         (ia64*)
26192                                 cf_suffix='.so'
26193                                 cf_depsuf=$cf_suffix
26194                                 ;;
26195                         (*)
26196                                 cf_suffix='.sl'
26197                                 cf_depsuf=$cf_suffix
26198                                 ;;
26199                         esac
26200                         ;;
26201                 (*)
26202                         cf_suffix='.so'
26203                         cf_depsuf=$cf_suffix
26204                         ;;
26205                 esac
26206                 ;;
26207         (*)
26208                 cf_suffix='.a'
26209                 cf_depsuf=$cf_suffix
26210                 ;;
26211         esac
26212         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26213         then
26214                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26215                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26216         fi
26217
26218                         cf_libname=$cf_dir
26219                         test "$cf_dir" = c++ && cf_libname=ncurses++
26220                         if test $cf_item = shared ; then
26221                                 if test -n "${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                                 if test "$cf_cv_do_symlinks" = yes ; then
26228                                         cf_version_name=
26229
26230                                         case "$cf_cv_shlib_version" in
26231                                         (rel)
26232                                                 cf_version_name=REL_VERSION
26233                                                 ;;
26234                                         (abi)
26235                                                 cf_version_name=ABI_VERSION
26236                                                 ;;
26237                                         esac
26238
26239                                         if test -n "$cf_version_name"
26240                                         then
26241                                                 case "$cf_cv_system_name" in
26242                                                 (darwin*)
26243                                                         # "w", etc?
26244                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26245                                                         ;;
26246                                                 (*)
26247                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26248                                                         ;;
26249                                                 esac
26250                                         fi
26251                                         if test -n "${USE_LIB_SUFFIX}"
26252                                         then
26253                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26254                                         else
26255                                                 cf_shared_suffix="$cf_suffix"
26256                                         fi
26257                                 fi
26258                                 # cygwin needs import library, and has unique naming convention
26259                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26260                                 # use 'cyg' prefix for shared lib.
26261                                 case $cf_cv_shlib_version in
26262                                 (cygdll)
26263                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26264                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26265                                         ;;
26266                                 (msysdll)
26267                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26268                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26269                                         ;;
26270                                 (mingw)
26271                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26272                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26273                                         ;;
26274                                 (*)
26275                                         cf_add_lib=
26276                                         ;;
26277                                 esac
26278                                 if test -n "$cf_add_lib"
26279                                 then
26280                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26281                                         continue
26282                                 fi
26283                         fi
26284                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26285                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26286                 done
26287
26288                 if test $cf_dir = ncurses ; then
26289                         cf_subsets="$LIB_SUBSETS"
26290                         cf_r_parts="$cf_subsets"
26291                         cf_liblist="$Libs_To_Make"
26292
26293                         while test -n "$cf_r_parts"
26294                         do
26295                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26296                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26297                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26298                                         cf_add_lib=
26299                                         case $cf_l_parts in
26300                                         (*termlib*)
26301                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26302                                                 ;;
26303                                         (*ticlib*)
26304                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26305                                                 ;;
26306                                         (*)
26307                                                 break
26308                                                 ;;
26309                                         esac
26310                                         if test -n "$cf_add_lib"; then
26311                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26312                                         fi
26313                                 else
26314                                         break
26315                                 fi
26316                         done
26317                 else
26318                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26319                 fi
26320
26321                 if test $cf_dir = c++; then
26322                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26323                                 cf_list=
26324                                 for cf_item in $Libs_To_Make
26325                                 do
26326                                         case $cf_item in
26327                                         (*.a)
26328                                                 ;;
26329                                         (*)
26330                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26331                                                 ;;
26332                                         esac
26333                                         for cf_test in $cf_list
26334                                         do
26335                                                 if test "$cf_test" = "$cf_item"
26336                                                 then
26337                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26338                                                         cf_item=
26339                                                         break
26340                                                 fi
26341                                         done
26342                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26343                                 done
26344                                 Libs_To_Make="$cf_list"
26345                         fi
26346                 fi
26347
26348                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26349                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26350                         $cf_dir/Makefile >$cf_dir/Makefile.out
26351                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26352
26353                 $AWK -f $srcdir/mk-0th.awk \
26354                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26355                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26356
26357                 for cf_subset in $cf_subsets
26358                 do
26359                         cf_subdirs=
26360                         for cf_item in $cf_LIST_MODELS
26361                         do
26362
26363                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26364
26365 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26366
26367                         CXX_MODEL=$cf_ITEM
26368                         if test "$CXX_MODEL" = SHARED; then
26369                                 case $cf_cv_shlib_version in
26370                                 (cygdll|msysdll|mingw)
26371                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26372
26373 echo "${as_me:-configure}:26373: testing overriding CXX_MODEL to SHARED ..." 1>&5
26374
26375                                         with_shared_cxx=yes
26376                                         ;;
26377                                 (*)
26378                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26379                                         ;;
26380                                 esac
26381                         fi
26382
26383         case X$cf_item in
26384         (Xlibtool)
26385                 cf_suffix='.la'
26386                 cf_depsuf=$cf_suffix
26387                 ;;
26388         (Xdebug)
26389                 cf_suffix='_g.a'
26390                 cf_depsuf=$cf_suffix
26391                 ;;
26392         (Xprofile)
26393                 cf_suffix='_p.a'
26394                 cf_depsuf=$cf_suffix
26395                 ;;
26396         (Xshared)
26397                 case $cf_cv_system_name in
26398                 (aix[5-7]*)
26399                         cf_suffix='.so'
26400                         cf_depsuf=$cf_suffix
26401                         ;;
26402                 (cygwin*|msys*|mingw*)
26403                         cf_suffix='.dll'
26404                         cf_depsuf='.dll.a'
26405                         ;;
26406                 (darwin*)
26407                         cf_suffix='.dylib'
26408                         cf_depsuf=$cf_suffix
26409                         ;;
26410                 (hpux*)
26411                         case $target in
26412                         (ia64*)
26413                                 cf_suffix='.so'
26414                                 cf_depsuf=$cf_suffix
26415                                 ;;
26416                         (*)
26417                                 cf_suffix='.sl'
26418                                 cf_depsuf=$cf_suffix
26419                                 ;;
26420                         esac
26421                         ;;
26422                 (*)
26423                         cf_suffix='.so'
26424                         cf_depsuf=$cf_suffix
26425                         ;;
26426                 esac
26427                 ;;
26428         (*)
26429                 cf_suffix='.a'
26430                 cf_depsuf=$cf_suffix
26431                 ;;
26432         esac
26433         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26434         then
26435                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26436                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26437         fi
26438
26439         case $cf_item in
26440         (libtool) cf_subdir='obj_lo'  ;;
26441         (normal)  cf_subdir='objects' ;;
26442         (debug)   cf_subdir='obj_g' ;;
26443         (profile) cf_subdir='obj_p' ;;
26444         (shared)
26445                 case $cf_cv_system_name in
26446                 (cygwin|msys)
26447                         cf_subdir='objects' ;;
26448                 (*)
26449                         cf_subdir='obj_s' ;;
26450                 esac
26451         esac
26452
26453                         # Test for case where we build libtinfo with a different name.
26454                         cf_libname=$cf_dir
26455                         if test $cf_dir = ncurses ; then
26456                                 case $cf_subset in
26457                                 (*base*)
26458                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26459                                         ;;
26460                                 (*termlib*)
26461                                         cf_libname=$TINFO_LIB_SUFFIX
26462                                         ;;
26463                                 (ticlib*)
26464                                         cf_libname=$TICS_LIB_SUFFIX
26465                                         ;;
26466                                 esac
26467                         elif test $cf_dir = c++ ; then
26468                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26469                         else
26470                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26471                         fi
26472                         if test -n "${USE_ARG_SUFFIX}" ; then
26473                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26474                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26475                         fi
26476
26477                         # These dependencies really are for development, not
26478                         # builds, but they are useful in porting, too.
26479                         cf_depend="../include/ncurses_cfg.h"
26480                         if test "$srcdir" = "."; then
26481                                 cf_reldir="."
26482                         else
26483                                 cf_reldir="\${srcdir}"
26484                         fi
26485
26486                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26487                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26488                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26489                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26490                         fi
26491
26492                         cf_dir_suffix=
26493                         old_cf_suffix="$cf_suffix"
26494                         if test "$cf_cv_shlib_version_infix" = yes ; then
26495                         if test -n "$USE_LIB_SUFFIX" ; then
26496                                 case $USE_LIB_SUFFIX in
26497                                 (tw*)
26498                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26499                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26500                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26501                                         ;;
26502                                 (t*)
26503                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26504                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26505                                         cf_dir_suffix=t$EXTRA_SUFFIX
26506                                         ;;
26507                                 (w*)
26508                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26509                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26510                                         cf_dir_suffix=w$EXTRA_SUFFIX
26511                                         ;;
26512                                 (*)
26513                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26514                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26515                                         cf_dir_suffix=$EXTRA_SUFFIX
26516                                         ;;
26517                                 esac
26518                         fi
26519                         fi
26520
26521                         $AWK -f $srcdir/mk-1st.awk \
26522                                 name=${cf_libname}${cf_dir_suffix} \
26523                                 traces=$LIB_TRACING \
26524                                 MODEL=$cf_ITEM \
26525                                 CXX_MODEL=$CXX_MODEL \
26526                                 model=$cf_subdir \
26527                                 prefix=$cf_prefix \
26528                                 suffix=$cf_suffix \
26529                                 subset=$cf_subset \
26530                                 driver=$cf_cv_term_driver \
26531                                 SymLink="$LN_S" \
26532                                 TermlibRoot=$TINFO_NAME \
26533                                 TermlibSuffix=$TINFO_SUFFIX \
26534                                 ShlibVer=$cf_cv_shlib_version \
26535                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26536                                 ReLink=${cf_cv_do_relink:-no} \
26537                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26538                                 DoLinks=$cf_cv_do_symlinks \
26539                                 rmSoLocs=$cf_cv_rm_so_locs \
26540                                 ldconfig="$LDCONFIG" \
26541                                 overwrite=$WITH_OVERWRITE \
26542                                 depend="$cf_depend" \
26543                                 host="$host" \
26544                                 libtool_version="$LIBTOOL_VERSION" \
26545                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26546
26547                         cf_suffix="$old_cf_suffix"
26548
26549                         for cf_subdir2 in $cf_subdirs lib
26550                         do
26551                                 test $cf_subdir = $cf_subdir2 && break
26552                         done
26553                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26554                         $AWK -f $srcdir/mk-2nd.awk \
26555                                 name=$cf_dir \
26556                                 traces=$LIB_TRACING \
26557                                 MODEL=$cf_ITEM \
26558                                 model=$cf_subdir \
26559                                 subset=$cf_subset \
26560                                 srcdir=$srcdir \
26561                                 echo=$WITH_ECHO \
26562                                 crenames=$cf_cv_prog_CC_c_o \
26563                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26564                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26565                         cf_subdirs="$cf_subdirs $cf_subdir"
26566                         done
26567                 done
26568         fi
26569
26570         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26571 done
26572
26573 for cf_dir in $SRC_SUBDIRS
26574 do
26575         if test ! -d $srcdir/$cf_dir ; then
26576                 continue
26577         fi
26578
26579         if test -f $cf_dir/Makefile ; then
26580                 case "$cf_dir" in
26581                 (Ada95)
26582                         echo 'libs \' >> Makefile
26583                         echo 'install.libs \' >> Makefile
26584                         echo 'uninstall.libs ::' >> Makefile
26585                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26586                         ;;
26587                 esac
26588         fi
26589
26590         if test -f $srcdir/$cf_dir/modules; then
26591                 echo >> Makefile
26592                 if test -f $srcdir/$cf_dir/headers; then
26593 cat >> Makefile <<CF_EOF
26594 install.includes \\
26595 uninstall.includes \\
26596 CF_EOF
26597                 fi
26598 if test "$cf_dir" != "c++" ; then
26599 echo 'lint \' >> Makefile
26600 fi
26601 cat >> Makefile <<CF_EOF
26602 libs \\
26603 lintlib \\
26604 install.libs \\
26605 uninstall.libs \\
26606 install.$cf_dir \\
26607 uninstall.$cf_dir ::
26608         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26609 CF_EOF
26610         elif test -f $srcdir/$cf_dir/headers; then
26611 cat >> Makefile <<CF_EOF
26612
26613 libs \\
26614 install.libs \\
26615 uninstall.libs \\
26616 install.includes \\
26617 uninstall.includes ::
26618         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26619 CF_EOF
26620 fi
26621 done
26622
26623 if test "x$cf_with_db_install" = xyes; then
26624 cat >> Makefile <<CF_EOF
26625
26626 install.libs uninstall.libs \\
26627 install.data uninstall.data ::
26628 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26629 CF_EOF
26630 else
26631 cat >> Makefile <<CF_EOF
26632
26633 install.libs uninstall.libs ::
26634         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26635 CF_EOF
26636 fi
26637
26638 if test "x$cf_with_manpages" = xyes; then
26639 cat >> Makefile <<CF_EOF
26640
26641 install.man \\
26642 uninstall.man ::
26643         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26644 CF_EOF
26645 fi
26646
26647 cat >> Makefile <<CF_EOF
26648
26649 distclean ::
26650         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26651         rm -f headers.sh headers.sed mk_shared_lib.sh
26652         rm -f edit_man.* man_alias.*
26653         rm -rf \${DIRS_TO_MAKE}
26654 CF_EOF
26655
26656 # Special case: tack's manpage lives in its own directory.
26657 if test "x$cf_with_manpages" = xyes; then
26658 if test "x$cf_with_tack" = "xyes"; then
26659 cat >> Makefile <<CF_EOF
26660
26661 install.man \\
26662 uninstall.man ::
26663         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26664 CF_EOF
26665 fi
26666 fi
26667
26668 rm -f headers.sed headers.sh
26669
26670 echo creating headers.sh
26671 cat >headers.sh <<CF_EOF
26672 #! $SHELL
26673 # This shell script is generated by the 'configure' script.  It is invoked in a
26674 # subdirectory of the build tree.  It generates a sed-script in the parent
26675 # directory that is used to adjust includes for header files that reside in a
26676 # subdirectory of /usr/include, etc.
26677 PRG=""
26678 while test \$# != 3
26679 do
26680 PRG="\$PRG \$1"; shift
26681 done
26682 DST=\$1
26683 REF=\$2
26684 SRC=\$3
26685 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26686 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26687 echo installing \$SRC in \$DST
26688 CF_EOF
26689
26690 if test $WITH_CURSES_H = yes; then
26691         cat >>headers.sh <<CF_EOF
26692 case \$DST in
26693 (/*/include/*)
26694         END=\`basename \$DST\`
26695         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26696         do
26697                 NAME=\`basename \$i\`
26698                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26699         done
26700         ;;
26701 (*)
26702         echo "" >> \$TMPSED
26703         ;;
26704 esac
26705 CF_EOF
26706
26707 else
26708         cat >>headers.sh <<CF_EOF
26709 case \$DST in
26710 (/*/include/*)
26711         END=\`basename \$DST\`
26712         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26713         do
26714                 NAME=\`basename \$i\`
26715                 if test "\$NAME" = "curses.h"
26716                 then
26717                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26718                         NAME=ncurses.h
26719                 fi
26720                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26721         done
26722         ;;
26723 (*)
26724         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26725         ;;
26726 esac
26727 CF_EOF
26728 fi
26729 cat >>headers.sh <<CF_EOF
26730 rm -f \$TMPSRC
26731 sed -f \$TMPSED \$SRC > \$TMPSRC
26732 NAME=\`basename \$SRC\`
26733 CF_EOF
26734 if test $WITH_CURSES_H != yes; then
26735         cat >>headers.sh <<CF_EOF
26736 test "\$NAME" = "curses.h" && NAME=ncurses.h
26737 CF_EOF
26738 fi
26739 cat >>headers.sh <<CF_EOF
26740 # Just in case someone gzip'd manpages, remove the conflicting copy.
26741 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26742
26743 eval \$PRG \$TMPSRC \$DST/\$NAME
26744 rm -f \$TMPSRC \$TMPSED
26745 CF_EOF
26746
26747 chmod 0755 headers.sh
26748
26749 for cf_dir in $SRC_SUBDIRS
26750 do
26751         if test ! -d $srcdir/$cf_dir ; then
26752                 continue
26753         fi
26754
26755         if test -f $srcdir/$cf_dir/headers; then
26756                 $AWK -f $srcdir/mk-hdr.awk \
26757                         subset="$LIB_SUBSETS" \
26758                         compat="$WITH_CURSES_H" \
26759                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26760         fi
26761
26762         if test -f $srcdir/$cf_dir/modules; then
26763                 if test "$cf_dir" != "c++" ; then
26764                         cat >>$cf_dir/Makefile <<"CF_EOF"
26765 depend : ${AUTO_SRC}
26766         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26767
26768 # DO NOT DELETE THIS LINE -- make depend depends on it.
26769 CF_EOF
26770                 fi
26771         fi
26772 done
26773
26774 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26775 if test -z "$USE_OLD_MAKERULES" ; then
26776         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26777 fi
26778 fi
26779  ;;
26780   esac
26781 done
26782 EOF
26783
26784 cat >>$CONFIG_STATUS <<\EOF
26785
26786 { (exit 0); exit 0; }
26787 EOF
26788 chmod +x $CONFIG_STATUS
26789 ac_clean_files=$ac_clean_files_save
26790
26791 # configure is writing to config.log, and then calls config.status.
26792 # config.status does its own redirection, appending to config.log.
26793 # Unfortunately, on DOS this fails, as config.log is still kept open
26794 # by configure, so config.status won't be able to write to it; its
26795 # output is simply discarded.  So we exec the FD to /dev/null,
26796 # effectively closing config.log, so it can be properly (re)opened and
26797 # appended to by config.status.  When coming back to configure, we
26798 # need to make the FD available again.
26799 if test "$no_create" != yes; then
26800   ac_cs_success=:
26801   exec 5>/dev/null
26802   $SHELL $CONFIG_STATUS || ac_cs_success=false
26803   exec 5>>config.log
26804   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26805   # would make configure fail if this is the last instruction.
26806   $ac_cs_success || { (exit 1); exit 1; }
26807 fi
26808 ${MAKE:-make} preinstall