]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
0d73aa2f14188245a68f118f0fa263368a380034
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.671 .
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 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7907
7908 echo "$as_me:7908: checking if you want modern xterm or antique" >&5
7909 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7910
7911 # Check whether --with-xterm-new or --without-xterm-new was given.
7912 if test "${with_xterm_new+set}" = set; then
7913   withval="$with_xterm_new"
7914   with_xterm_new=$withval
7915 else
7916   with_xterm_new=yes
7917 fi;
7918 case $with_xterm_new in
7919 (no) with_xterm_new=xterm-old;;
7920 (*)      with_xterm_new=xterm-new;;
7921 esac
7922 echo "$as_me:7922: result: $with_xterm_new" >&5
7923 echo "${ECHO_T}$with_xterm_new" >&6
7924 WHICH_XTERM=$with_xterm_new
7925
7926 echo "$as_me:7926: checking if xterm backspace sends BS or DEL" >&5
7927 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7928
7929 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7930 if test "${with_xterm_kbs+set}" = set; then
7931   withval="$with_xterm_kbs"
7932   with_xterm_kbs=$withval
7933 else
7934   with_xterm_kbs=BS
7935 fi;
7936 case x$with_xterm_kbs in
7937 (xyes|xno|xBS|xbs|x8)
7938         with_xterm_kbs=BS
7939         ;;
7940 (xDEL|xdel|x127)
7941         with_xterm_kbs=DEL
7942         ;;
7943 (*)
7944         with_xterm_kbs=$withval
7945         ;;
7946 esac
7947 echo "$as_me:7947: result: $with_xterm_kbs" >&5
7948 echo "${ECHO_T}$with_xterm_kbs" >&6
7949 XTERM_KBS=$with_xterm_kbs
7950
7951 MAKE_TERMINFO=
7952 if test "$use_database" = no ; then
7953         TERMINFO="${datadir}/terminfo"
7954         MAKE_TERMINFO="#"
7955 else
7956
7957 echo "$as_me:7957: checking for list of terminfo directories" >&5
7958 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7959
7960 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7961 if test "${with_terminfo_dirs+set}" = set; then
7962   withval="$with_terminfo_dirs"
7963
7964 else
7965   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7966 fi;
7967 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7968 cf_dst_path=
7969 for cf_src_path in $withval
7970 do
7971
7972 if test "x$prefix" != xNONE; then
7973         cf_path_syntax="$prefix"
7974 else
7975         cf_path_syntax="$ac_default_prefix"
7976 fi
7977
7978 case ".$cf_src_path" in
7979 (.\$\(*\)*|.\'*\'*)
7980         ;;
7981 (..|./*|.\\*)
7982         ;;
7983 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7984         ;;
7985 (.\${*prefix}*|.\${*dir}*)
7986         eval cf_src_path="$cf_src_path"
7987         case ".$cf_src_path" in
7988         (.NONE/*)
7989                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7990                 ;;
7991         esac
7992         ;;
7993 (.no|.NONE/*)
7994         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7995         ;;
7996 (*)
7997         { { echo "$as_me:7997: error: expected a pathname, not \"$cf_src_path\"" >&5
7998 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7999    { (exit 1); exit 1; }; }
8000         ;;
8001 esac
8002
8003   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8004   cf_dst_path="${cf_dst_path}${cf_src_path}"
8005 done
8006 IFS="$ac_save_ifs"
8007
8008 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8009 # so we have to check/work around.  We do prefer the result of "eval"...
8010 eval cf_dst_eval="$cf_dst_path"
8011 case "x$cf_dst_eval" in
8012 (xNONE*)
8013         TERMINFO_DIRS=$cf_dst_path
8014         ;;
8015 (*)
8016         TERMINFO_DIRS="$cf_dst_eval"
8017         ;;
8018 esac
8019
8020 echo "$as_me:8020: result: $TERMINFO_DIRS" >&5
8021 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8022 test -n "$TERMINFO_DIRS" &&
8023 cat >>confdefs.h <<EOF
8024 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8025 EOF
8026
8027 case "x$TERMINFO" in
8028 x???:*)
8029         { echo "$as_me:8029: WARNING: ignoring non-directory/file TERMINFO value" >&5
8030 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8031         unset TERMINFO
8032         ;;
8033 esac
8034
8035 echo "$as_me:8035: checking for default terminfo directory" >&5
8036 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8037
8038 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8039 if test "${with_default_terminfo_dir+set}" = set; then
8040   withval="$with_default_terminfo_dir"
8041
8042 else
8043   withval="${TERMINFO:-${datadir}/terminfo}"
8044 fi; if test -n "${datadir}/terminfo" ; then
8045
8046 if test "x$prefix" != xNONE; then
8047         cf_path_syntax="$prefix"
8048 else
8049         cf_path_syntax="$ac_default_prefix"
8050 fi
8051
8052 case ".$withval" in
8053 (.\$\(*\)*|.\'*\'*)
8054         ;;
8055 (..|./*|.\\*)
8056         ;;
8057 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8058         ;;
8059 (.\${*prefix}*|.\${*dir}*)
8060         eval withval="$withval"
8061         case ".$withval" in
8062         (.NONE/*)
8063                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8064                 ;;
8065         esac
8066         ;;
8067 (.no|.NONE/*)
8068         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8069         ;;
8070 (*)
8071         { { echo "$as_me:8071: error: expected a pathname, not \"$withval\"" >&5
8072 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8073    { (exit 1); exit 1; }; }
8074         ;;
8075 esac
8076
8077 fi
8078 eval TERMINFO="$withval"
8079
8080 echo "$as_me:8080: result: $TERMINFO" >&5
8081 echo "${ECHO_T}$TERMINFO" >&6
8082
8083 cat >>confdefs.h <<EOF
8084 #define TERMINFO "$TERMINFO"
8085 EOF
8086
8087 fi
8088
8089 ###     use option --disable-big-core to make tic run on small machines
8090 ###     We need 4Mb, check if we can allocate 50% more than that.
8091 echo "$as_me:8091: checking if big-core option selected" >&5
8092 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8093
8094 # Check whether --enable-big-core or --disable-big-core was given.
8095 if test "${enable_big_core+set}" = set; then
8096   enableval="$enable_big_core"
8097   with_big_core=$enableval
8098 else
8099   if test "$cross_compiling" = yes; then
8100   with_big_core=no
8101 else
8102   cat >conftest.$ac_ext <<_ACEOF
8103 #line 8103 "configure"
8104 #include "confdefs.h"
8105
8106 #include <stdlib.h>
8107 #include <string.h>
8108 int main() {
8109         unsigned long n = 6000000L;
8110         char *s = malloc(n);
8111         if (s != 0)
8112                 s[0] = s[n-1] = 0;
8113         ${cf_cv_main_return:-return}(s == 0);
8114 }
8115 _ACEOF
8116 rm -f conftest$ac_exeext
8117 if { (eval echo "$as_me:8117: \"$ac_link\"") >&5
8118   (eval $ac_link) 2>&5
8119   ac_status=$?
8120   echo "$as_me:8120: \$? = $ac_status" >&5
8121   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8122   { (eval echo "$as_me:8122: \"$ac_try\"") >&5
8123   (eval $ac_try) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit $ac_status); }; }; then
8127   with_big_core=yes
8128 else
8129   echo "$as_me: program exited with status $ac_status" >&5
8130 echo "$as_me: failed program was:" >&5
8131 cat conftest.$ac_ext >&5
8132 with_big_core=no
8133 fi
8134 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8135 fi
8136 fi;
8137 echo "$as_me:8137: result: $with_big_core" >&5
8138 echo "${ECHO_T}$with_big_core" >&6
8139 test "x$with_big_core" = "xyes" &&
8140 cat >>confdefs.h <<\EOF
8141 #define HAVE_BIG_CORE 1
8142 EOF
8143
8144 ### ISO C only guarantees 512-char strings, we have tables which load faster
8145 ### when constructed using "big" strings.  More than the C compiler, the awk
8146 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8147 echo "$as_me:8147: checking if big-strings option selected" >&5
8148 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8149
8150 # Check whether --enable-big-strings or --disable-big-strings was given.
8151 if test "${enable_big_strings+set}" = set; then
8152   enableval="$enable_big_strings"
8153   with_big_strings=$enableval
8154 else
8155
8156         case x$AWK in
8157         (x)
8158                 eval with_big_strings=no
8159                 ;;
8160         (*)
8161                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8162                         | $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
8163                         eval with_big_strings=yes
8164                 else
8165                         eval with_big_strings=no
8166                 fi
8167                 ;;
8168         esac
8169
8170 fi;
8171 echo "$as_me:8171: result: $with_big_strings" >&5
8172 echo "${ECHO_T}$with_big_strings" >&6
8173
8174 USE_BIG_STRINGS=0
8175 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8176
8177 ###     use option --enable-termcap to compile in the termcap fallback support
8178 echo "$as_me:8178: checking if you want termcap-fallback support" >&5
8179 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8180
8181 # Check whether --enable-termcap or --disable-termcap was given.
8182 if test "${enable_termcap+set}" = set; then
8183   enableval="$enable_termcap"
8184   with_termcap=$enableval
8185 else
8186   with_termcap=no
8187 fi;
8188 echo "$as_me:8188: result: $with_termcap" >&5
8189 echo "${ECHO_T}$with_termcap" >&6
8190
8191 NCURSES_USE_TERMCAP=0
8192 if test "x$with_termcap" != "xyes" ; then
8193         if test "$use_database" = no ; then
8194                 if test -z "$with_fallback" ; then
8195                         { { echo "$as_me:8195: error: You have disabled the database w/o specifying fallbacks" >&5
8196 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8197    { (exit 1); exit 1; }; }
8198                 fi
8199         fi
8200
8201 cat >>confdefs.h <<\EOF
8202 #define PURE_TERMINFO 1
8203 EOF
8204
8205 else
8206
8207         if test "$with_ticlib" != no ; then
8208                 { { echo "$as_me:8208: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8209 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8210    { (exit 1); exit 1; }; }
8211         fi
8212
8213         NCURSES_USE_TERMCAP=1
8214         echo "$as_me:8214: checking for list of termcap files" >&5
8215 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8216
8217 # Check whether --with-termpath or --without-termpath was given.
8218 if test "${with_termpath+set}" = set; then
8219   withval="$with_termpath"
8220
8221 else
8222   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8223 fi;
8224 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8225 cf_dst_path=
8226 for cf_src_path in $withval
8227 do
8228
8229 if test "x$prefix" != xNONE; then
8230         cf_path_syntax="$prefix"
8231 else
8232         cf_path_syntax="$ac_default_prefix"
8233 fi
8234
8235 case ".$cf_src_path" in
8236 (.\$\(*\)*|.\'*\'*)
8237         ;;
8238 (..|./*|.\\*)
8239         ;;
8240 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8241         ;;
8242 (.\${*prefix}*|.\${*dir}*)
8243         eval cf_src_path="$cf_src_path"
8244         case ".$cf_src_path" in
8245         (.NONE/*)
8246                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8247                 ;;
8248         esac
8249         ;;
8250 (.no|.NONE/*)
8251         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8252         ;;
8253 (*)
8254         { { echo "$as_me:8254: error: expected a pathname, not \"$cf_src_path\"" >&5
8255 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8256    { (exit 1); exit 1; }; }
8257         ;;
8258 esac
8259
8260   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8261   cf_dst_path="${cf_dst_path}${cf_src_path}"
8262 done
8263 IFS="$ac_save_ifs"
8264
8265 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8266 # so we have to check/work around.  We do prefer the result of "eval"...
8267 eval cf_dst_eval="$cf_dst_path"
8268 case "x$cf_dst_eval" in
8269 (xNONE*)
8270         TERMPATH=$cf_dst_path
8271         ;;
8272 (*)
8273         TERMPATH="$cf_dst_eval"
8274         ;;
8275 esac
8276
8277         echo "$as_me:8277: result: $TERMPATH" >&5
8278 echo "${ECHO_T}$TERMPATH" >&6
8279         test -n "$TERMPATH" &&
8280 cat >>confdefs.h <<EOF
8281 #define TERMPATH "$TERMPATH"
8282 EOF
8283
8284         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8285         echo "$as_me:8285: checking if fast termcap-loader is needed" >&5
8286 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8287
8288 # Check whether --enable-getcap or --disable-getcap was given.
8289 if test "${enable_getcap+set}" = set; then
8290   enableval="$enable_getcap"
8291   with_getcap=$enableval
8292 else
8293   with_getcap=no
8294 fi;
8295         echo "$as_me:8295: result: $with_getcap" >&5
8296 echo "${ECHO_T}$with_getcap" >&6
8297         test "x$with_getcap" = "xyes" &&
8298 cat >>confdefs.h <<\EOF
8299 #define USE_GETCAP 1
8300 EOF
8301
8302         echo "$as_me:8302: checking if translated termcaps will be cached in ~/.terminfo" >&5
8303 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8304
8305 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8306 if test "${enable_getcap_cache+set}" = set; then
8307   enableval="$enable_getcap_cache"
8308   with_getcap_cache=$enableval
8309 else
8310   with_getcap_cache=no
8311 fi;
8312         echo "$as_me:8312: result: $with_getcap_cache" >&5
8313 echo "${ECHO_T}$with_getcap_cache" >&6
8314         test "x$with_getcap_cache" = "xyes" &&
8315 cat >>confdefs.h <<\EOF
8316 #define USE_GETCAP_CACHE 1
8317 EOF
8318
8319 fi
8320
8321 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8322 echo "$as_me:8322: checking if ~/.terminfo is wanted" >&5
8323 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8324
8325 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8326 if test "${enable_home_terminfo+set}" = set; then
8327   enableval="$enable_home_terminfo"
8328   with_home_terminfo=$enableval
8329 else
8330   with_home_terminfo=yes
8331 fi;
8332 echo "$as_me:8332: result: $with_home_terminfo" >&5
8333 echo "${ECHO_T}$with_home_terminfo" >&6
8334 test "x$with_home_terminfo" = "xyes" &&
8335 cat >>confdefs.h <<\EOF
8336 #define USE_HOME_TERMINFO 1
8337 EOF
8338
8339 echo "$as_me:8339: checking if you want to use restricted environment when running as root" >&5
8340 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8341
8342 # Check whether --enable-root-environ or --disable-root-environ was given.
8343 if test "${enable_root_environ+set}" = set; then
8344   enableval="$enable_root_environ"
8345   with_root_environ=$enableval
8346 else
8347   with_root_environ=yes
8348 fi;
8349 echo "$as_me:8349: result: $with_root_environ" >&5
8350 echo "${ECHO_T}$with_root_environ" >&6
8351 test "x$with_root_environ" = xyes &&
8352 cat >>confdefs.h <<\EOF
8353 #define USE_ROOT_ENVIRON 1
8354 EOF
8355
8356 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8357 ###   to reduce storage requirements for the terminfo database.
8358
8359 for ac_header in \
8360 unistd.h \
8361
8362 do
8363 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8364 echo "$as_me:8364: checking for $ac_header" >&5
8365 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8366 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8367   echo $ECHO_N "(cached) $ECHO_C" >&6
8368 else
8369   cat >conftest.$ac_ext <<_ACEOF
8370 #line 8370 "configure"
8371 #include "confdefs.h"
8372 #include <$ac_header>
8373 _ACEOF
8374 if { (eval echo "$as_me:8374: \"$ac_cpp conftest.$ac_ext\"") >&5
8375   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8376   ac_status=$?
8377   egrep -v '^ *\+' conftest.er1 >conftest.err
8378   rm -f conftest.er1
8379   cat conftest.err >&5
8380   echo "$as_me:8380: \$? = $ac_status" >&5
8381   (exit $ac_status); } >/dev/null; then
8382   if test -s conftest.err; then
8383     ac_cpp_err=$ac_c_preproc_warn_flag
8384   else
8385     ac_cpp_err=
8386   fi
8387 else
8388   ac_cpp_err=yes
8389 fi
8390 if test -z "$ac_cpp_err"; then
8391   eval "$as_ac_Header=yes"
8392 else
8393   echo "$as_me: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   eval "$as_ac_Header=no"
8396 fi
8397 rm -f conftest.err conftest.$ac_ext
8398 fi
8399 echo "$as_me:8399: result: `eval echo '${'$as_ac_Header'}'`" >&5
8400 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8401 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8402   cat >>confdefs.h <<EOF
8403 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8404 EOF
8405
8406 fi
8407 done
8408
8409 for ac_func in \
8410         remove \
8411         unlink
8412 do
8413 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8414 echo "$as_me:8414: checking for $ac_func" >&5
8415 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8416 if eval "test \"\${$as_ac_var+set}\" = set"; then
8417   echo $ECHO_N "(cached) $ECHO_C" >&6
8418 else
8419   cat >conftest.$ac_ext <<_ACEOF
8420 #line 8420 "configure"
8421 #include "confdefs.h"
8422 #define $ac_func autoconf_temporary
8423 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8424 #undef $ac_func
8425
8426 #ifdef __cplusplus
8427 extern "C"
8428 #endif
8429
8430 /* We use char because int might match the return type of a gcc2
8431    builtin and then its argument prototype would still apply.  */
8432 char $ac_func (void);
8433
8434 int
8435 main (void)
8436 {
8437
8438 /* The GNU C library defines stubs for functions which it implements
8439     to always fail with ENOSYS.  Some functions are actually named
8440     something starting with __ and the normal name is an alias.  */
8441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8442 #error found stub for $ac_func
8443 #endif
8444
8445         return $ac_func ();
8446   ;
8447   return 0;
8448 }
8449 _ACEOF
8450 rm -f conftest.$ac_objext conftest$ac_exeext
8451 if { (eval echo "$as_me:8451: \"$ac_link\"") >&5
8452   (eval $ac_link) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit $ac_status); } &&
8456          { ac_try='test -s conftest$ac_exeext'
8457   { (eval echo "$as_me:8457: \"$ac_try\"") >&5
8458   (eval $ac_try) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); }; }; then
8462   eval "$as_ac_var=yes"
8463 else
8464   echo "$as_me: failed program was:" >&5
8465 cat conftest.$ac_ext >&5
8466 eval "$as_ac_var=no"
8467 fi
8468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8469 fi
8470 echo "$as_me:8470: result: `eval echo '${'$as_ac_var'}'`" >&5
8471 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8472 if test `eval echo '${'$as_ac_var'}'` = yes; then
8473   cat >>confdefs.h <<EOF
8474 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8475 EOF
8476
8477 fi
8478 done
8479
8480 if test "$cross_compiling" = yes ; then
8481
8482 for ac_func in \
8483                 link \
8484                 symlink
8485 do
8486 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8487 echo "$as_me:8487: checking for $ac_func" >&5
8488 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8489 if eval "test \"\${$as_ac_var+set}\" = set"; then
8490   echo $ECHO_N "(cached) $ECHO_C" >&6
8491 else
8492   cat >conftest.$ac_ext <<_ACEOF
8493 #line 8493 "configure"
8494 #include "confdefs.h"
8495 #define $ac_func autoconf_temporary
8496 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8497 #undef $ac_func
8498
8499 #ifdef __cplusplus
8500 extern "C"
8501 #endif
8502
8503 /* We use char because int might match the return type of a gcc2
8504    builtin and then its argument prototype would still apply.  */
8505 char $ac_func (void);
8506
8507 int
8508 main (void)
8509 {
8510
8511 /* The GNU C library defines stubs for functions which it implements
8512     to always fail with ENOSYS.  Some functions are actually named
8513     something starting with __ and the normal name is an alias.  */
8514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8515 #error found stub for $ac_func
8516 #endif
8517
8518         return $ac_func ();
8519   ;
8520   return 0;
8521 }
8522 _ACEOF
8523 rm -f conftest.$ac_objext conftest$ac_exeext
8524 if { (eval echo "$as_me:8524: \"$ac_link\"") >&5
8525   (eval $ac_link) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); } &&
8529          { ac_try='test -s conftest$ac_exeext'
8530   { (eval echo "$as_me:8530: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   eval "$as_ac_var=yes"
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 cat conftest.$ac_ext >&5
8539 eval "$as_ac_var=no"
8540 fi
8541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8542 fi
8543 echo "$as_me:8543: result: `eval echo '${'$as_ac_var'}'`" >&5
8544 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8545 if test `eval echo '${'$as_ac_var'}'` = yes; then
8546   cat >>confdefs.h <<EOF
8547 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8548 EOF
8549
8550 fi
8551 done
8552
8553 else
8554         echo "$as_me:8554: checking if link/symlink functions work" >&5
8555 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8556 if test "${cf_cv_link_funcs+set}" = set; then
8557   echo $ECHO_N "(cached) $ECHO_C" >&6
8558 else
8559
8560                 cf_cv_link_funcs=
8561                 for cf_func in link symlink ; do
8562                         if test "$cross_compiling" = yes; then
8563
8564                         eval 'ac_cv_func_'$cf_func'=error'
8565 else
8566   cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569
8570 #include <sys/types.h>
8571 #include <sys/stat.h>
8572 #ifdef HAVE_UNISTD_H
8573 #include <unistd.h>
8574 #endif
8575 int main(void)
8576 {
8577         int fail = 0;
8578         char *src = "config.log";
8579         char *dst = "conftest.chk";
8580         struct stat src_sb;
8581         struct stat dst_sb;
8582
8583         stat(src, &src_sb);
8584         fail = ($cf_func("config.log", "conftest.chk") < 0)
8585             || (stat(dst, &dst_sb) < 0)
8586             || (dst_sb.st_mtime != src_sb.st_mtime);
8587 #ifdef HAVE_UNLINK
8588         unlink(dst);
8589 #else
8590         remove(dst);
8591 #endif
8592         ${cf_cv_main_return:-return} (fail);
8593 }
8594
8595 _ACEOF
8596 rm -f conftest$ac_exeext
8597 if { (eval echo "$as_me:8597: \"$ac_link\"") >&5
8598   (eval $ac_link) 2>&5
8599   ac_status=$?
8600   echo "$as_me:8600: \$? = $ac_status" >&5
8601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8602   { (eval echo "$as_me:8602: \"$ac_try\"") >&5
8603   (eval $ac_try) 2>&5
8604   ac_status=$?
8605   echo "$as_me:8605: \$? = $ac_status" >&5
8606   (exit $ac_status); }; }; then
8607
8608                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8609                         eval 'ac_cv_func_'$cf_func'=yes'
8610 else
8611   echo "$as_me: program exited with status $ac_status" >&5
8612 echo "$as_me: failed program was:" >&5
8613 cat conftest.$ac_ext >&5
8614
8615                         eval 'ac_cv_func_'$cf_func'=no'
8616 fi
8617 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8618 fi
8619                 done
8620                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8621
8622 fi
8623 echo "$as_me:8623: result: $cf_cv_link_funcs" >&5
8624 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8625         test "$ac_cv_func_link"    = yes &&
8626 cat >>confdefs.h <<\EOF
8627 #define HAVE_LINK 1
8628 EOF
8629
8630         test "$ac_cv_func_symlink" = yes &&
8631 cat >>confdefs.h <<\EOF
8632 #define HAVE_SYMLINK 1
8633 EOF
8634
8635 fi
8636
8637 with_links=no
8638 with_symlinks=no
8639
8640 # soft links (symbolic links) are useful for some systems where hard links do
8641 # not work, or to make it simpler to copy terminfo trees around.
8642 if test "x$ac_cv_func_symlink" = xyes ; then
8643         echo "$as_me:8643: checking if tic should use symbolic links" >&5
8644 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8645
8646 # Check whether --enable-symlinks or --disable-symlinks was given.
8647 if test "${enable_symlinks+set}" = set; then
8648   enableval="$enable_symlinks"
8649   with_symlinks=$enableval
8650 else
8651   with_symlinks=no
8652 fi;
8653         echo "$as_me:8653: result: $with_symlinks" >&5
8654 echo "${ECHO_T}$with_symlinks" >&6
8655 fi
8656
8657 # If we have hard links and did not choose to use soft links instead, there is
8658 # no reason to make this choice optional - use the hard links.
8659 if test "$with_symlinks" = no ; then
8660         echo "$as_me:8660: checking if tic should use hard links" >&5
8661 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8662         if test "x$ac_cv_func_link" = xyes ; then
8663                 with_links=yes
8664         else
8665                 with_links=no
8666         fi
8667         echo "$as_me:8667: result: $with_links" >&5
8668 echo "${ECHO_T}$with_links" >&6
8669 fi
8670
8671 test "x$with_links" = xyes &&
8672 cat >>confdefs.h <<\EOF
8673 #define USE_LINKS 1
8674 EOF
8675
8676 test "x$with_symlinks" = xyes &&
8677 cat >>confdefs.h <<\EOF
8678 #define USE_SYMLINKS 1
8679 EOF
8680
8681 ###   use option --enable-broken-linker to force on use of broken-linker support
8682 echo "$as_me:8682: checking if you want broken-linker support code" >&5
8683 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8684
8685 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8686 if test "${enable_broken_linker+set}" = set; then
8687   enableval="$enable_broken_linker"
8688   with_broken_linker=$enableval
8689 else
8690   with_broken_linker=${BROKEN_LINKER:-no}
8691 fi;
8692 echo "$as_me:8692: result: $with_broken_linker" >&5
8693 echo "${ECHO_T}$with_broken_linker" >&6
8694
8695 BROKEN_LINKER=0
8696 if test "x$with_broken_linker" = xyes ; then
8697
8698 cat >>confdefs.h <<\EOF
8699 #define BROKEN_LINKER 1
8700 EOF
8701
8702         BROKEN_LINKER=1
8703 elif test "$DFT_LWR_MODEL" = shared ; then
8704         case $cf_cv_system_name in
8705         (cygwin*)
8706
8707 cat >>confdefs.h <<\EOF
8708 #define BROKEN_LINKER 1
8709 EOF
8710
8711                 BROKEN_LINKER=1
8712                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8713
8714 echo "${as_me:-configure}:8714: testing cygwin linker is broken anyway ..." 1>&5
8715
8716                 ;;
8717         esac
8718 fi
8719
8720 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8721 echo "$as_me:8721: checking if tputs should process BSD-style prefix padding" >&5
8722 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8723
8724 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8725 if test "${enable_bsdpad+set}" = set; then
8726   enableval="$enable_bsdpad"
8727   with_bsdpad=$enableval
8728 else
8729   with_bsdpad=no
8730 fi;
8731 echo "$as_me:8731: result: $with_bsdpad" >&5
8732 echo "${ECHO_T}$with_bsdpad" >&6
8733 test "x$with_bsdpad" = xyes &&
8734 cat >>confdefs.h <<\EOF
8735 #define BSD_TPUTS 1
8736 EOF
8737
8738 ###   use option --enable-widec to turn on use of wide-character support
8739 NCURSES_CH_T=chtype
8740 NCURSES_LIBUTF8=0
8741
8742 NEED_WCHAR_H=0
8743 NCURSES_MBSTATE_T=0
8744 NCURSES_WCHAR_T=0
8745 NCURSES_WINT_T=0
8746
8747 # Check to define _XOPEN_SOURCE "automatically"
8748 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8749
8750 cf_XOPEN_SOURCE=600
8751 cf_POSIX_C_SOURCE=199506L
8752 cf_xopen_source=
8753
8754 case $host_os in
8755 (aix[4-7]*)
8756         cf_xopen_source="-D_ALL_SOURCE"
8757         ;;
8758 (msys)
8759         cf_XOPEN_SOURCE=600
8760         ;;
8761 (darwin[0-8].*)
8762         cf_xopen_source="-D_APPLE_C_SOURCE"
8763         ;;
8764 (darwin*)
8765         cf_xopen_source="-D_DARWIN_C_SOURCE"
8766         cf_XOPEN_SOURCE=
8767         ;;
8768 (freebsd*|dragonfly*)
8769         # 5.x headers associate
8770         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8771         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8772         cf_POSIX_C_SOURCE=200112L
8773         cf_XOPEN_SOURCE=600
8774         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8775         ;;
8776 (hpux11*)
8777         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8778         ;;
8779 (hpux*)
8780         cf_xopen_source="-D_HPUX_SOURCE"
8781         ;;
8782 (irix[56].*)
8783         cf_xopen_source="-D_SGI_SOURCE"
8784         cf_XOPEN_SOURCE=
8785         ;;
8786 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8787
8788 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8789
8790 echo "$as_me:8790: checking if this is the GNU C library" >&5
8791 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8792 if test "${cf_cv_gnu_library+set}" = set; then
8793   echo $ECHO_N "(cached) $ECHO_C" >&6
8794 else
8795
8796 cat >conftest.$ac_ext <<_ACEOF
8797 #line 8797 "configure"
8798 #include "confdefs.h"
8799 #include <sys/types.h>
8800 int
8801 main (void)
8802 {
8803
8804         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8805                 return 0;
8806         #else
8807         #       error not GNU C library
8808         #endif
8809   ;
8810   return 0;
8811 }
8812 _ACEOF
8813 rm -f conftest.$ac_objext
8814 if { (eval echo "$as_me:8814: \"$ac_compile\"") >&5
8815   (eval $ac_compile) 2>&5
8816   ac_status=$?
8817   echo "$as_me:8817: \$? = $ac_status" >&5
8818   (exit $ac_status); } &&
8819          { ac_try='test -s conftest.$ac_objext'
8820   { (eval echo "$as_me:8820: \"$ac_try\"") >&5
8821   (eval $ac_try) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); }; }; then
8825   cf_cv_gnu_library=yes
8826 else
8827   echo "$as_me: failed program was:" >&5
8828 cat conftest.$ac_ext >&5
8829 cf_cv_gnu_library=no
8830 fi
8831 rm -f conftest.$ac_objext conftest.$ac_ext
8832
8833 fi
8834 echo "$as_me:8834: result: $cf_cv_gnu_library" >&5
8835 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8836
8837 if test x$cf_cv_gnu_library = xyes; then
8838
8839         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8840         # was changed to help a little...
8841         echo "$as_me:8841: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8842 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8843 if test "${cf_cv_gnu_library_219+set}" = set; then
8844   echo $ECHO_N "(cached) $ECHO_C" >&6
8845 else
8846
8847                 cf_save="$CPPFLAGS"
8848
8849         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8850         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8851
8852                 cat >conftest.$ac_ext <<_ACEOF
8853 #line 8853 "configure"
8854 #include "confdefs.h"
8855 #include <sys/types.h>
8856 int
8857 main (void)
8858 {
8859
8860                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8861                                 return 0;
8862                         #else
8863                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8864                         #endif
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 rm -f conftest.$ac_objext
8870 if { (eval echo "$as_me:8870: \"$ac_compile\"") >&5
8871   (eval $ac_compile) 2>&5
8872   ac_status=$?
8873   echo "$as_me:8873: \$? = $ac_status" >&5
8874   (exit $ac_status); } &&
8875          { ac_try='test -s conftest.$ac_objext'
8876   { (eval echo "$as_me:8876: \"$ac_try\"") >&5
8877   (eval $ac_try) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); }; }; then
8881   cf_cv_gnu_library_219=yes
8882 else
8883   echo "$as_me: failed program was:" >&5
8884 cat conftest.$ac_ext >&5
8885 cf_cv_gnu_library_219=no
8886 fi
8887 rm -f conftest.$ac_objext conftest.$ac_ext
8888                 CPPFLAGS="$cf_save"
8889
8890 fi
8891 echo "$as_me:8891: result: $cf_cv_gnu_library_219" >&5
8892 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8893
8894         if test "x$cf_cv_gnu_library_219" = xyes; then
8895                 cf_save="$CPPFLAGS"
8896                 echo "$as_me:8896: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8897 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8898 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8899   echo $ECHO_N "(cached) $ECHO_C" >&6
8900 else
8901
8902 cf_fix_cppflags=no
8903 cf_new_cflags=
8904 cf_new_cppflags=
8905 cf_new_extra_cppflags=
8906
8907 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8908 do
8909 case $cf_fix_cppflags in
8910 (no)
8911         case $cf_add_cflags in
8912         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8913                 case $cf_add_cflags in
8914                 (-D*)
8915                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8916
8917                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8918                                 && test -z "${cf_tst_cflags}" \
8919                                 && cf_fix_cppflags=yes
8920
8921                         if test $cf_fix_cppflags = yes ; then
8922
8923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8925
8926                                 continue
8927                         elif test "${cf_tst_cflags}" = "\"'" ; then
8928
8929         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8930         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8931
8932                                 continue
8933                         fi
8934                         ;;
8935                 esac
8936                 case "$CPPFLAGS" in
8937                 (*$cf_add_cflags)
8938                         ;;
8939                 (*)
8940                         case $cf_add_cflags in
8941                         (-D*)
8942                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8943
8944 CPPFLAGS=`echo "$CPPFLAGS" | \
8945         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8946                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8947
8948                                 ;;
8949                         esac
8950
8951         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8952         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8953
8954                         ;;
8955                 esac
8956                 ;;
8957         (*)
8958
8959         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8960         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8961
8962                 ;;
8963         esac
8964         ;;
8965 (yes)
8966
8967         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8968         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8969
8970         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8971
8972         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8973                 && test -z "${cf_tst_cflags}" \
8974                 && cf_fix_cppflags=no
8975         ;;
8976 esac
8977 done
8978
8979 if test -n "$cf_new_cflags" ; then
8980
8981         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8982         CFLAGS="${CFLAGS}$cf_new_cflags"
8983
8984 fi
8985
8986 if test -n "$cf_new_cppflags" ; then
8987
8988         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8989         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8990
8991 fi
8992
8993 if test -n "$cf_new_extra_cppflags" ; then
8994
8995         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8996         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8997
8998 fi
8999
9000                         cat >conftest.$ac_ext <<_ACEOF
9001 #line 9001 "configure"
9002 #include "confdefs.h"
9003
9004                                 #include <limits.h>
9005                                 #include <sys/types.h>
9006
9007 int
9008 main (void)
9009 {
9010
9011                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9012                                         return 0;
9013                                 #else
9014                                 #       error GNU C library is too old
9015                                 #endif
9016   ;
9017   return 0;
9018 }
9019 _ACEOF
9020 rm -f conftest.$ac_objext
9021 if { (eval echo "$as_me:9021: \"$ac_compile\"") >&5
9022   (eval $ac_compile) 2>&5
9023   ac_status=$?
9024   echo "$as_me:9024: \$? = $ac_status" >&5
9025   (exit $ac_status); } &&
9026          { ac_try='test -s conftest.$ac_objext'
9027   { (eval echo "$as_me:9027: \"$ac_try\"") >&5
9028   (eval $ac_try) 2>&5
9029   ac_status=$?
9030   echo "$as_me:9030: \$? = $ac_status" >&5
9031   (exit $ac_status); }; }; then
9032   cf_cv_gnu_dftsrc_219=yes
9033 else
9034   echo "$as_me: failed program was:" >&5
9035 cat conftest.$ac_ext >&5
9036 cf_cv_gnu_dftsrc_219=no
9037 fi
9038 rm -f conftest.$ac_objext conftest.$ac_ext
9039
9040 fi
9041 echo "$as_me:9041: result: $cf_cv_gnu_dftsrc_219" >&5
9042 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9043                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9044         else
9045                 cf_cv_gnu_dftsrc_219=maybe
9046         fi
9047
9048         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9049
9050                 echo "$as_me:9050: checking if we must define _GNU_SOURCE" >&5
9051 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9052 if test "${cf_cv_gnu_source+set}" = set; then
9053   echo $ECHO_N "(cached) $ECHO_C" >&6
9054 else
9055
9056                 cat >conftest.$ac_ext <<_ACEOF
9057 #line 9057 "configure"
9058 #include "confdefs.h"
9059 #include <sys/types.h>
9060 int
9061 main (void)
9062 {
9063
9064                         #ifndef _XOPEN_SOURCE
9065                         #error  expected _XOPEN_SOURCE to be defined
9066                         #endif
9067   ;
9068   return 0;
9069 }
9070 _ACEOF
9071 rm -f conftest.$ac_objext
9072 if { (eval echo "$as_me:9072: \"$ac_compile\"") >&5
9073   (eval $ac_compile) 2>&5
9074   ac_status=$?
9075   echo "$as_me:9075: \$? = $ac_status" >&5
9076   (exit $ac_status); } &&
9077          { ac_try='test -s conftest.$ac_objext'
9078   { (eval echo "$as_me:9078: \"$ac_try\"") >&5
9079   (eval $ac_try) 2>&5
9080   ac_status=$?
9081   echo "$as_me:9081: \$? = $ac_status" >&5
9082   (exit $ac_status); }; }; then
9083   cf_cv_gnu_source=no
9084 else
9085   echo "$as_me: failed program was:" >&5
9086 cat conftest.$ac_ext >&5
9087 cf_save="$CPPFLAGS"
9088
9089 cf_fix_cppflags=no
9090 cf_new_cflags=
9091 cf_new_cppflags=
9092 cf_new_extra_cppflags=
9093
9094 for cf_add_cflags in -D_GNU_SOURCE
9095 do
9096 case $cf_fix_cppflags in
9097 (no)
9098         case $cf_add_cflags in
9099         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9100                 case $cf_add_cflags in
9101                 (-D*)
9102                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9103
9104                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9105                                 && test -z "${cf_tst_cflags}" \
9106                                 && cf_fix_cppflags=yes
9107
9108                         if test $cf_fix_cppflags = yes ; then
9109
9110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9112
9113                                 continue
9114                         elif test "${cf_tst_cflags}" = "\"'" ; then
9115
9116         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9117         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9118
9119                                 continue
9120                         fi
9121                         ;;
9122                 esac
9123                 case "$CPPFLAGS" in
9124                 (*$cf_add_cflags)
9125                         ;;
9126                 (*)
9127                         case $cf_add_cflags in
9128                         (-D*)
9129                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9130
9131 CPPFLAGS=`echo "$CPPFLAGS" | \
9132         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9133                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9134
9135                                 ;;
9136                         esac
9137
9138         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9139         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9140
9141                         ;;
9142                 esac
9143                 ;;
9144         (*)
9145
9146         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9147         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9148
9149                 ;;
9150         esac
9151         ;;
9152 (yes)
9153
9154         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9155         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9156
9157         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9158
9159         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9160                 && test -z "${cf_tst_cflags}" \
9161                 && cf_fix_cppflags=no
9162         ;;
9163 esac
9164 done
9165
9166 if test -n "$cf_new_cflags" ; then
9167
9168         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9169         CFLAGS="${CFLAGS}$cf_new_cflags"
9170
9171 fi
9172
9173 if test -n "$cf_new_cppflags" ; then
9174
9175         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9176         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9177
9178 fi
9179
9180 if test -n "$cf_new_extra_cppflags" ; then
9181
9182         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9183         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9184
9185 fi
9186
9187                          cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190 #include <sys/types.h>
9191 int
9192 main (void)
9193 {
9194
9195                                 #ifdef _XOPEN_SOURCE
9196                                 #error  expected _XOPEN_SOURCE to be undefined
9197                                 #endif
9198   ;
9199   return 0;
9200 }
9201 _ACEOF
9202 rm -f conftest.$ac_objext
9203 if { (eval echo "$as_me:9203: \"$ac_compile\"") >&5
9204   (eval $ac_compile) 2>&5
9205   ac_status=$?
9206   echo "$as_me:9206: \$? = $ac_status" >&5
9207   (exit $ac_status); } &&
9208          { ac_try='test -s conftest.$ac_objext'
9209   { (eval echo "$as_me:9209: \"$ac_try\"") >&5
9210   (eval $ac_try) 2>&5
9211   ac_status=$?
9212   echo "$as_me:9212: \$? = $ac_status" >&5
9213   (exit $ac_status); }; }; then
9214   cf_cv_gnu_source=no
9215 else
9216   echo "$as_me: failed program was:" >&5
9217 cat conftest.$ac_ext >&5
9218 cf_cv_gnu_source=yes
9219 fi
9220 rm -f conftest.$ac_objext conftest.$ac_ext
9221                         CPPFLAGS="$cf_save"
9222
9223 fi
9224 rm -f conftest.$ac_objext conftest.$ac_ext
9225
9226 fi
9227 echo "$as_me:9227: result: $cf_cv_gnu_source" >&5
9228 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9229
9230                 if test "$cf_cv_gnu_source" = yes
9231                 then
9232                 echo "$as_me:9232: checking if we should also define _DEFAULT_SOURCE" >&5
9233 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9234 if test "${cf_cv_default_source+set}" = set; then
9235   echo $ECHO_N "(cached) $ECHO_C" >&6
9236 else
9237
9238         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9239         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9240
9241                         cat >conftest.$ac_ext <<_ACEOF
9242 #line 9242 "configure"
9243 #include "confdefs.h"
9244 #include <sys/types.h>
9245 int
9246 main (void)
9247 {
9248
9249                                 #ifdef _DEFAULT_SOURCE
9250                                 #error  expected _DEFAULT_SOURCE to be undefined
9251                                 #endif
9252   ;
9253   return 0;
9254 }
9255 _ACEOF
9256 rm -f conftest.$ac_objext
9257 if { (eval echo "$as_me:9257: \"$ac_compile\"") >&5
9258   (eval $ac_compile) 2>&5
9259   ac_status=$?
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); } &&
9262          { ac_try='test -s conftest.$ac_objext'
9263   { (eval echo "$as_me:9263: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:9266: \$? = $ac_status" >&5
9267   (exit $ac_status); }; }; then
9268   cf_cv_default_source=no
9269 else
9270   echo "$as_me: failed program was:" >&5
9271 cat conftest.$ac_ext >&5
9272 cf_cv_default_source=yes
9273 fi
9274 rm -f conftest.$ac_objext conftest.$ac_ext
9275
9276 fi
9277 echo "$as_me:9277: result: $cf_cv_default_source" >&5
9278 echo "${ECHO_T}$cf_cv_default_source" >&6
9279                         if test "$cf_cv_default_source" = yes
9280                         then
9281
9282         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9283         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9284
9285                         fi
9286                 fi
9287         fi
9288
9289 fi
9290
9291         ;;
9292 (minix*)
9293         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9294         ;;
9295 (mirbsd*)
9296         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9297         cf_XOPEN_SOURCE=
9298
9299 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9300
9301 cf_save_CFLAGS="$CFLAGS"
9302 cf_save_CPPFLAGS="$CPPFLAGS"
9303
9304 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9305         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9306                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9307
9308 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9309         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9310                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9311
9312 echo "$as_me:9312: checking if we should define _POSIX_C_SOURCE" >&5
9313 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9314 if test "${cf_cv_posix_c_source+set}" = set; then
9315   echo $ECHO_N "(cached) $ECHO_C" >&6
9316 else
9317
9318 echo "${as_me:-configure}:9318: testing if the symbol is already defined go no further ..." 1>&5
9319
9320         cat >conftest.$ac_ext <<_ACEOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323 #include <sys/types.h>
9324 int
9325 main (void)
9326 {
9327
9328 #ifndef _POSIX_C_SOURCE
9329 make an error
9330 #endif
9331   ;
9332   return 0;
9333 }
9334 _ACEOF
9335 rm -f conftest.$ac_objext
9336 if { (eval echo "$as_me:9336: \"$ac_compile\"") >&5
9337   (eval $ac_compile) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); } &&
9341          { ac_try='test -s conftest.$ac_objext'
9342   { (eval echo "$as_me:9342: \"$ac_try\"") >&5
9343   (eval $ac_try) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); }; }; then
9347   cf_cv_posix_c_source=no
9348 else
9349   echo "$as_me: failed program was:" >&5
9350 cat conftest.$ac_ext >&5
9351 cf_want_posix_source=no
9352          case .$cf_POSIX_C_SOURCE in
9353          (.[12]??*)
9354                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9355                 ;;
9356          (.2)
9357                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9358                 cf_want_posix_source=yes
9359                 ;;
9360          (.*)
9361                 cf_want_posix_source=yes
9362                 ;;
9363          esac
9364          if test "$cf_want_posix_source" = yes ; then
9365                 cat >conftest.$ac_ext <<_ACEOF
9366 #line 9366 "configure"
9367 #include "confdefs.h"
9368 #include <sys/types.h>
9369 int
9370 main (void)
9371 {
9372
9373 #ifdef _POSIX_SOURCE
9374 make an error
9375 #endif
9376   ;
9377   return 0;
9378 }
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:9390: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   :
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9397 fi
9398 rm -f conftest.$ac_objext conftest.$ac_ext
9399          fi
9400
9401 echo "${as_me:-configure}:9401: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9402
9403          CFLAGS="$cf_trim_CFLAGS"
9404          CPPFLAGS="$cf_trim_CPPFLAGS"
9405
9406         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9407         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9408
9409 echo "${as_me:-configure}:9409: testing if the second compile does not leave our definition intact error ..." 1>&5
9410
9411          cat >conftest.$ac_ext <<_ACEOF
9412 #line 9412 "configure"
9413 #include "confdefs.h"
9414 #include <sys/types.h>
9415 int
9416 main (void)
9417 {
9418
9419 #ifndef _POSIX_C_SOURCE
9420 make an error
9421 #endif
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   :
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 cf_cv_posix_c_source=no
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445          CFLAGS="$cf_save_CFLAGS"
9446          CPPFLAGS="$cf_save_CPPFLAGS"
9447
9448 fi
9449 rm -f conftest.$ac_objext conftest.$ac_ext
9450
9451 fi
9452 echo "$as_me:9452: result: $cf_cv_posix_c_source" >&5
9453 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9454
9455 if test "$cf_cv_posix_c_source" != no ; then
9456         CFLAGS="$cf_trim_CFLAGS"
9457         CPPFLAGS="$cf_trim_CPPFLAGS"
9458
9459 cf_fix_cppflags=no
9460 cf_new_cflags=
9461 cf_new_cppflags=
9462 cf_new_extra_cppflags=
9463
9464 for cf_add_cflags in $cf_cv_posix_c_source
9465 do
9466 case $cf_fix_cppflags in
9467 (no)
9468         case $cf_add_cflags in
9469         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9470                 case $cf_add_cflags in
9471                 (-D*)
9472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9473
9474                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9475                                 && test -z "${cf_tst_cflags}" \
9476                                 && cf_fix_cppflags=yes
9477
9478                         if test $cf_fix_cppflags = yes ; then
9479
9480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9482
9483                                 continue
9484                         elif test "${cf_tst_cflags}" = "\"'" ; then
9485
9486         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9487         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9488
9489                                 continue
9490                         fi
9491                         ;;
9492                 esac
9493                 case "$CPPFLAGS" in
9494                 (*$cf_add_cflags)
9495                         ;;
9496                 (*)
9497                         case $cf_add_cflags in
9498                         (-D*)
9499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9500
9501 CPPFLAGS=`echo "$CPPFLAGS" | \
9502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9504
9505                                 ;;
9506                         esac
9507
9508         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9509         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9510
9511                         ;;
9512                 esac
9513                 ;;
9514         (*)
9515
9516         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9517         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9518
9519                 ;;
9520         esac
9521         ;;
9522 (yes)
9523
9524         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9525         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9526
9527         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9528
9529         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9530                 && test -z "${cf_tst_cflags}" \
9531                 && cf_fix_cppflags=no
9532         ;;
9533 esac
9534 done
9535
9536 if test -n "$cf_new_cflags" ; then
9537
9538         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9539         CFLAGS="${CFLAGS}$cf_new_cflags"
9540
9541 fi
9542
9543 if test -n "$cf_new_cppflags" ; then
9544
9545         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9546         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9547
9548 fi
9549
9550 if test -n "$cf_new_extra_cppflags" ; then
9551
9552         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9553         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9554
9555 fi
9556
9557 fi
9558
9559         ;;
9560 (netbsd*)
9561         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9562         ;;
9563 (openbsd[4-9]*)
9564         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9565         cf_xopen_source="-D_BSD_SOURCE"
9566         cf_XOPEN_SOURCE=600
9567         ;;
9568 (openbsd*)
9569         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9570         ;;
9571 (osf[45]*)
9572         cf_xopen_source="-D_OSF_SOURCE"
9573         ;;
9574 (nto-qnx*)
9575         cf_xopen_source="-D_QNX_SOURCE"
9576         ;;
9577 (sco*)
9578         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9579         ;;
9580 (solaris2.*)
9581         cf_xopen_source="-D__EXTENSIONS__"
9582         cf_cv_xopen_source=broken
9583         ;;
9584 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9585         cf_XOPEN_SOURCE=
9586         cf_POSIX_C_SOURCE=
9587         ;;
9588 (*)
9589
9590 echo "$as_me:9590: checking if we should define _XOPEN_SOURCE" >&5
9591 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9592 if test "${cf_cv_xopen_source+set}" = set; then
9593   echo $ECHO_N "(cached) $ECHO_C" >&6
9594 else
9595
9596         cat >conftest.$ac_ext <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9599
9600 #include <stdlib.h>
9601 #include <string.h>
9602 #include <sys/types.h>
9603
9604 int
9605 main (void)
9606 {
9607
9608 #ifndef _XOPEN_SOURCE
9609 make an error
9610 #endif
9611   ;
9612   return 0;
9613 }
9614 _ACEOF
9615 rm -f conftest.$ac_objext
9616 if { (eval echo "$as_me:9616: \"$ac_compile\"") >&5
9617   (eval $ac_compile) 2>&5
9618   ac_status=$?
9619   echo "$as_me:9619: \$? = $ac_status" >&5
9620   (exit $ac_status); } &&
9621          { ac_try='test -s conftest.$ac_objext'
9622   { (eval echo "$as_me:9622: \"$ac_try\"") >&5
9623   (eval $ac_try) 2>&5
9624   ac_status=$?
9625   echo "$as_me:9625: \$? = $ac_status" >&5
9626   (exit $ac_status); }; }; then
9627   cf_cv_xopen_source=no
9628 else
9629   echo "$as_me: failed program was:" >&5
9630 cat conftest.$ac_ext >&5
9631 cf_save="$CPPFLAGS"
9632
9633         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9634         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9635
9636          cat >conftest.$ac_ext <<_ACEOF
9637 #line 9637 "configure"
9638 #include "confdefs.h"
9639
9640 #include <stdlib.h>
9641 #include <string.h>
9642 #include <sys/types.h>
9643
9644 int
9645 main (void)
9646 {
9647
9648 #ifdef _XOPEN_SOURCE
9649 make an error
9650 #endif
9651   ;
9652   return 0;
9653 }
9654 _ACEOF
9655 rm -f conftest.$ac_objext
9656 if { (eval echo "$as_me:9656: \"$ac_compile\"") >&5
9657   (eval $ac_compile) 2>&5
9658   ac_status=$?
9659   echo "$as_me:9659: \$? = $ac_status" >&5
9660   (exit $ac_status); } &&
9661          { ac_try='test -s conftest.$ac_objext'
9662   { (eval echo "$as_me:9662: \"$ac_try\"") >&5
9663   (eval $ac_try) 2>&5
9664   ac_status=$?
9665   echo "$as_me:9665: \$? = $ac_status" >&5
9666   (exit $ac_status); }; }; then
9667   cf_cv_xopen_source=no
9668 else
9669   echo "$as_me: failed program was:" >&5
9670 cat conftest.$ac_ext >&5
9671 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9672 fi
9673 rm -f conftest.$ac_objext conftest.$ac_ext
9674         CPPFLAGS="$cf_save"
9675
9676 fi
9677 rm -f conftest.$ac_objext conftest.$ac_ext
9678
9679 fi
9680 echo "$as_me:9680: result: $cf_cv_xopen_source" >&5
9681 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9682
9683 if test "$cf_cv_xopen_source" != no ; then
9684
9685 CFLAGS=`echo "$CFLAGS" | \
9686         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9687                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9688
9689 CPPFLAGS=`echo "$CPPFLAGS" | \
9690         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9691                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9692
9693         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9694
9695 cf_fix_cppflags=no
9696 cf_new_cflags=
9697 cf_new_cppflags=
9698 cf_new_extra_cppflags=
9699
9700 for cf_add_cflags in $cf_temp_xopen_source
9701 do
9702 case $cf_fix_cppflags in
9703 (no)
9704         case $cf_add_cflags in
9705         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9706                 case $cf_add_cflags in
9707                 (-D*)
9708                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9709
9710                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9711                                 && test -z "${cf_tst_cflags}" \
9712                                 && cf_fix_cppflags=yes
9713
9714                         if test $cf_fix_cppflags = yes ; then
9715
9716         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9717         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9718
9719                                 continue
9720                         elif test "${cf_tst_cflags}" = "\"'" ; then
9721
9722         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9723         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9724
9725                                 continue
9726                         fi
9727                         ;;
9728                 esac
9729                 case "$CPPFLAGS" in
9730                 (*$cf_add_cflags)
9731                         ;;
9732                 (*)
9733                         case $cf_add_cflags in
9734                         (-D*)
9735                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9736
9737 CPPFLAGS=`echo "$CPPFLAGS" | \
9738         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9739                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9740
9741                                 ;;
9742                         esac
9743
9744         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9745         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9746
9747                         ;;
9748                 esac
9749                 ;;
9750         (*)
9751
9752         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9753         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9754
9755                 ;;
9756         esac
9757         ;;
9758 (yes)
9759
9760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9762
9763         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9764
9765         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9766                 && test -z "${cf_tst_cflags}" \
9767                 && cf_fix_cppflags=no
9768         ;;
9769 esac
9770 done
9771
9772 if test -n "$cf_new_cflags" ; then
9773
9774         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9775         CFLAGS="${CFLAGS}$cf_new_cflags"
9776
9777 fi
9778
9779 if test -n "$cf_new_cppflags" ; then
9780
9781         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9782         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9783
9784 fi
9785
9786 if test -n "$cf_new_extra_cppflags" ; then
9787
9788         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9789         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9790
9791 fi
9792
9793 fi
9794
9795 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9796
9797 cf_save_CFLAGS="$CFLAGS"
9798 cf_save_CPPFLAGS="$CPPFLAGS"
9799
9800 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9801         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9802                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9803
9804 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9805         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9806                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9807
9808 echo "$as_me:9808: checking if we should define _POSIX_C_SOURCE" >&5
9809 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9810 if test "${cf_cv_posix_c_source+set}" = set; then
9811   echo $ECHO_N "(cached) $ECHO_C" >&6
9812 else
9813
9814 echo "${as_me:-configure}:9814: testing if the symbol is already defined go no further ..." 1>&5
9815
9816         cat >conftest.$ac_ext <<_ACEOF
9817 #line 9817 "configure"
9818 #include "confdefs.h"
9819 #include <sys/types.h>
9820 int
9821 main (void)
9822 {
9823
9824 #ifndef _POSIX_C_SOURCE
9825 make an error
9826 #endif
9827   ;
9828   return 0;
9829 }
9830 _ACEOF
9831 rm -f conftest.$ac_objext
9832 if { (eval echo "$as_me:9832: \"$ac_compile\"") >&5
9833   (eval $ac_compile) 2>&5
9834   ac_status=$?
9835   echo "$as_me:9835: \$? = $ac_status" >&5
9836   (exit $ac_status); } &&
9837          { ac_try='test -s conftest.$ac_objext'
9838   { (eval echo "$as_me:9838: \"$ac_try\"") >&5
9839   (eval $ac_try) 2>&5
9840   ac_status=$?
9841   echo "$as_me:9841: \$? = $ac_status" >&5
9842   (exit $ac_status); }; }; then
9843   cf_cv_posix_c_source=no
9844 else
9845   echo "$as_me: failed program was:" >&5
9846 cat conftest.$ac_ext >&5
9847 cf_want_posix_source=no
9848          case .$cf_POSIX_C_SOURCE in
9849          (.[12]??*)
9850                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9851                 ;;
9852          (.2)
9853                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9854                 cf_want_posix_source=yes
9855                 ;;
9856          (.*)
9857                 cf_want_posix_source=yes
9858                 ;;
9859          esac
9860          if test "$cf_want_posix_source" = yes ; then
9861                 cat >conftest.$ac_ext <<_ACEOF
9862 #line 9862 "configure"
9863 #include "confdefs.h"
9864 #include <sys/types.h>
9865 int
9866 main (void)
9867 {
9868
9869 #ifdef _POSIX_SOURCE
9870 make an error
9871 #endif
9872   ;
9873   return 0;
9874 }
9875 _ACEOF
9876 rm -f conftest.$ac_objext
9877 if { (eval echo "$as_me:9877: \"$ac_compile\"") >&5
9878   (eval $ac_compile) 2>&5
9879   ac_status=$?
9880   echo "$as_me:9880: \$? = $ac_status" >&5
9881   (exit $ac_status); } &&
9882          { ac_try='test -s conftest.$ac_objext'
9883   { (eval echo "$as_me:9883: \"$ac_try\"") >&5
9884   (eval $ac_try) 2>&5
9885   ac_status=$?
9886   echo "$as_me:9886: \$? = $ac_status" >&5
9887   (exit $ac_status); }; }; then
9888   :
9889 else
9890   echo "$as_me: failed program was:" >&5
9891 cat conftest.$ac_ext >&5
9892 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9893 fi
9894 rm -f conftest.$ac_objext conftest.$ac_ext
9895          fi
9896
9897 echo "${as_me:-configure}:9897: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9898
9899          CFLAGS="$cf_trim_CFLAGS"
9900          CPPFLAGS="$cf_trim_CPPFLAGS"
9901
9902         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9903         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9904
9905 echo "${as_me:-configure}:9905: testing if the second compile does not leave our definition intact error ..." 1>&5
9906
9907          cat >conftest.$ac_ext <<_ACEOF
9908 #line 9908 "configure"
9909 #include "confdefs.h"
9910 #include <sys/types.h>
9911 int
9912 main (void)
9913 {
9914
9915 #ifndef _POSIX_C_SOURCE
9916 make an error
9917 #endif
9918   ;
9919   return 0;
9920 }
9921 _ACEOF
9922 rm -f conftest.$ac_objext
9923 if { (eval echo "$as_me:9923: \"$ac_compile\"") >&5
9924   (eval $ac_compile) 2>&5
9925   ac_status=$?
9926   echo "$as_me:9926: \$? = $ac_status" >&5
9927   (exit $ac_status); } &&
9928          { ac_try='test -s conftest.$ac_objext'
9929   { (eval echo "$as_me:9929: \"$ac_try\"") >&5
9930   (eval $ac_try) 2>&5
9931   ac_status=$?
9932   echo "$as_me:9932: \$? = $ac_status" >&5
9933   (exit $ac_status); }; }; then
9934   :
9935 else
9936   echo "$as_me: failed program was:" >&5
9937 cat conftest.$ac_ext >&5
9938 cf_cv_posix_c_source=no
9939 fi
9940 rm -f conftest.$ac_objext conftest.$ac_ext
9941          CFLAGS="$cf_save_CFLAGS"
9942          CPPFLAGS="$cf_save_CPPFLAGS"
9943
9944 fi
9945 rm -f conftest.$ac_objext conftest.$ac_ext
9946
9947 fi
9948 echo "$as_me:9948: result: $cf_cv_posix_c_source" >&5
9949 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9950
9951 if test "$cf_cv_posix_c_source" != no ; then
9952         CFLAGS="$cf_trim_CFLAGS"
9953         CPPFLAGS="$cf_trim_CPPFLAGS"
9954
9955 cf_fix_cppflags=no
9956 cf_new_cflags=
9957 cf_new_cppflags=
9958 cf_new_extra_cppflags=
9959
9960 for cf_add_cflags in $cf_cv_posix_c_source
9961 do
9962 case $cf_fix_cppflags in
9963 (no)
9964         case $cf_add_cflags in
9965         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9966                 case $cf_add_cflags in
9967                 (-D*)
9968                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9969
9970                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9971                                 && test -z "${cf_tst_cflags}" \
9972                                 && cf_fix_cppflags=yes
9973
9974                         if test $cf_fix_cppflags = yes ; then
9975
9976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9978
9979                                 continue
9980                         elif test "${cf_tst_cflags}" = "\"'" ; then
9981
9982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9984
9985                                 continue
9986                         fi
9987                         ;;
9988                 esac
9989                 case "$CPPFLAGS" in
9990                 (*$cf_add_cflags)
9991                         ;;
9992                 (*)
9993                         case $cf_add_cflags in
9994                         (-D*)
9995                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9996
9997 CPPFLAGS=`echo "$CPPFLAGS" | \
9998         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9999                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10000
10001                                 ;;
10002                         esac
10003
10004         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10005         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10006
10007                         ;;
10008                 esac
10009                 ;;
10010         (*)
10011
10012         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10013         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10014
10015                 ;;
10016         esac
10017         ;;
10018 (yes)
10019
10020         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10021         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10022
10023         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10024
10025         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10026                 && test -z "${cf_tst_cflags}" \
10027                 && cf_fix_cppflags=no
10028         ;;
10029 esac
10030 done
10031
10032 if test -n "$cf_new_cflags" ; then
10033
10034         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10035         CFLAGS="${CFLAGS}$cf_new_cflags"
10036
10037 fi
10038
10039 if test -n "$cf_new_cppflags" ; then
10040
10041         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10042         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10043
10044 fi
10045
10046 if test -n "$cf_new_extra_cppflags" ; then
10047
10048         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10049         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10050
10051 fi
10052
10053 fi
10054
10055         ;;
10056 esac
10057
10058 if test -n "$cf_xopen_source" ; then
10059
10060 cf_fix_cppflags=no
10061 cf_new_cflags=
10062 cf_new_cppflags=
10063 cf_new_extra_cppflags=
10064
10065 for cf_add_cflags in $cf_xopen_source
10066 do
10067 case $cf_fix_cppflags in
10068 (no)
10069         case $cf_add_cflags in
10070         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10071                 case $cf_add_cflags in
10072                 (-D*)
10073                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10074
10075                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10076                                 && test -z "${cf_tst_cflags}" \
10077                                 && cf_fix_cppflags=yes
10078
10079                         if test $cf_fix_cppflags = yes ; then
10080
10081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10083
10084                                 continue
10085                         elif test "${cf_tst_cflags}" = "\"'" ; then
10086
10087         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10088         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10089
10090                                 continue
10091                         fi
10092                         ;;
10093                 esac
10094                 case "$CPPFLAGS" in
10095                 (*$cf_add_cflags)
10096                         ;;
10097                 (*)
10098                         case $cf_add_cflags in
10099                         (-D*)
10100                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10101
10102 CPPFLAGS=`echo "$CPPFLAGS" | \
10103         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10104                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10105
10106                                 ;;
10107                         esac
10108
10109         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10110         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10111
10112                         ;;
10113                 esac
10114                 ;;
10115         (*)
10116
10117         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10118         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10119
10120                 ;;
10121         esac
10122         ;;
10123 (yes)
10124
10125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10127
10128         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10129
10130         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10131                 && test -z "${cf_tst_cflags}" \
10132                 && cf_fix_cppflags=no
10133         ;;
10134 esac
10135 done
10136
10137 if test -n "$cf_new_cflags" ; then
10138         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10139
10140 echo "${as_me:-configure}:10140: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10141
10142         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10143         CFLAGS="${CFLAGS}$cf_new_cflags"
10144
10145 fi
10146
10147 if test -n "$cf_new_cppflags" ; then
10148         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10149
10150 echo "${as_me:-configure}:10150: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10151
10152         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10153         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10154
10155 fi
10156
10157 if test -n "$cf_new_extra_cppflags" ; then
10158         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10159
10160 echo "${as_me:-configure}:10160: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10161
10162         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10163         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10164
10165 fi
10166
10167 fi
10168
10169 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10170         echo "$as_me:10170: checking if _XOPEN_SOURCE really is set" >&5
10171 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10172         cat >conftest.$ac_ext <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175 #include <stdlib.h>
10176 int
10177 main (void)
10178 {
10179
10180 #ifndef _XOPEN_SOURCE
10181 make an error
10182 #endif
10183   ;
10184   return 0;
10185 }
10186 _ACEOF
10187 rm -f conftest.$ac_objext
10188 if { (eval echo "$as_me:10188: \"$ac_compile\"") >&5
10189   (eval $ac_compile) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); } &&
10193          { ac_try='test -s conftest.$ac_objext'
10194   { (eval echo "$as_me:10194: \"$ac_try\"") >&5
10195   (eval $ac_try) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit $ac_status); }; }; then
10199   cf_XOPEN_SOURCE_set=yes
10200 else
10201   echo "$as_me: failed program was:" >&5
10202 cat conftest.$ac_ext >&5
10203 cf_XOPEN_SOURCE_set=no
10204 fi
10205 rm -f conftest.$ac_objext conftest.$ac_ext
10206         echo "$as_me:10206: result: $cf_XOPEN_SOURCE_set" >&5
10207 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10208         if test $cf_XOPEN_SOURCE_set = yes
10209         then
10210                 cat >conftest.$ac_ext <<_ACEOF
10211 #line 10211 "configure"
10212 #include "confdefs.h"
10213 #include <stdlib.h>
10214 int
10215 main (void)
10216 {
10217
10218 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10219 make an error
10220 #endif
10221   ;
10222   return 0;
10223 }
10224 _ACEOF
10225 rm -f conftest.$ac_objext
10226 if { (eval echo "$as_me:10226: \"$ac_compile\"") >&5
10227   (eval $ac_compile) 2>&5
10228   ac_status=$?
10229   echo "$as_me:10229: \$? = $ac_status" >&5
10230   (exit $ac_status); } &&
10231          { ac_try='test -s conftest.$ac_objext'
10232   { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233   (eval $ac_try) 2>&5
10234   ac_status=$?
10235   echo "$as_me:10235: \$? = $ac_status" >&5
10236   (exit $ac_status); }; }; then
10237   cf_XOPEN_SOURCE_set_ok=yes
10238 else
10239   echo "$as_me: failed program was:" >&5
10240 cat conftest.$ac_ext >&5
10241 cf_XOPEN_SOURCE_set_ok=no
10242 fi
10243 rm -f conftest.$ac_objext conftest.$ac_ext
10244                 if test $cf_XOPEN_SOURCE_set_ok = no
10245                 then
10246                         { echo "$as_me:10246: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10247 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10248                 fi
10249         else
10250
10251 echo "$as_me:10251: checking if we should define _XOPEN_SOURCE" >&5
10252 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10253 if test "${cf_cv_xopen_source+set}" = set; then
10254   echo $ECHO_N "(cached) $ECHO_C" >&6
10255 else
10256
10257         cat >conftest.$ac_ext <<_ACEOF
10258 #line 10258 "configure"
10259 #include "confdefs.h"
10260
10261 #include <stdlib.h>
10262 #include <string.h>
10263 #include <sys/types.h>
10264
10265 int
10266 main (void)
10267 {
10268
10269 #ifndef _XOPEN_SOURCE
10270 make an error
10271 #endif
10272   ;
10273   return 0;
10274 }
10275 _ACEOF
10276 rm -f conftest.$ac_objext
10277 if { (eval echo "$as_me:10277: \"$ac_compile\"") >&5
10278   (eval $ac_compile) 2>&5
10279   ac_status=$?
10280   echo "$as_me:10280: \$? = $ac_status" >&5
10281   (exit $ac_status); } &&
10282          { ac_try='test -s conftest.$ac_objext'
10283   { (eval echo "$as_me:10283: \"$ac_try\"") >&5
10284   (eval $ac_try) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); }; }; then
10288   cf_cv_xopen_source=no
10289 else
10290   echo "$as_me: failed program was:" >&5
10291 cat conftest.$ac_ext >&5
10292 cf_save="$CPPFLAGS"
10293
10294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10295         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10296
10297          cat >conftest.$ac_ext <<_ACEOF
10298 #line 10298 "configure"
10299 #include "confdefs.h"
10300
10301 #include <stdlib.h>
10302 #include <string.h>
10303 #include <sys/types.h>
10304
10305 int
10306 main (void)
10307 {
10308
10309 #ifdef _XOPEN_SOURCE
10310 make an error
10311 #endif
10312   ;
10313   return 0;
10314 }
10315 _ACEOF
10316 rm -f conftest.$ac_objext
10317 if { (eval echo "$as_me:10317: \"$ac_compile\"") >&5
10318   (eval $ac_compile) 2>&5
10319   ac_status=$?
10320   echo "$as_me:10320: \$? = $ac_status" >&5
10321   (exit $ac_status); } &&
10322          { ac_try='test -s conftest.$ac_objext'
10323   { (eval echo "$as_me:10323: \"$ac_try\"") >&5
10324   (eval $ac_try) 2>&5
10325   ac_status=$?
10326   echo "$as_me:10326: \$? = $ac_status" >&5
10327   (exit $ac_status); }; }; then
10328   cf_cv_xopen_source=no
10329 else
10330   echo "$as_me: failed program was:" >&5
10331 cat conftest.$ac_ext >&5
10332 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10333 fi
10334 rm -f conftest.$ac_objext conftest.$ac_ext
10335         CPPFLAGS="$cf_save"
10336
10337 fi
10338 rm -f conftest.$ac_objext conftest.$ac_ext
10339
10340 fi
10341 echo "$as_me:10341: result: $cf_cv_xopen_source" >&5
10342 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10343
10344 if test "$cf_cv_xopen_source" != no ; then
10345
10346 CFLAGS=`echo "$CFLAGS" | \
10347         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10348                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10349
10350 CPPFLAGS=`echo "$CPPFLAGS" | \
10351         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10352                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10353
10354         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10355
10356 cf_fix_cppflags=no
10357 cf_new_cflags=
10358 cf_new_cppflags=
10359 cf_new_extra_cppflags=
10360
10361 for cf_add_cflags in $cf_temp_xopen_source
10362 do
10363 case $cf_fix_cppflags in
10364 (no)
10365         case $cf_add_cflags in
10366         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10367                 case $cf_add_cflags in
10368                 (-D*)
10369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10370
10371                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10372                                 && test -z "${cf_tst_cflags}" \
10373                                 && cf_fix_cppflags=yes
10374
10375                         if test $cf_fix_cppflags = yes ; then
10376
10377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10379
10380                                 continue
10381                         elif test "${cf_tst_cflags}" = "\"'" ; then
10382
10383         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10384         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10385
10386                                 continue
10387                         fi
10388                         ;;
10389                 esac
10390                 case "$CPPFLAGS" in
10391                 (*$cf_add_cflags)
10392                         ;;
10393                 (*)
10394                         case $cf_add_cflags in
10395                         (-D*)
10396                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10397
10398 CPPFLAGS=`echo "$CPPFLAGS" | \
10399         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10400                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10401
10402                                 ;;
10403                         esac
10404
10405         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10406         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10407
10408                         ;;
10409                 esac
10410                 ;;
10411         (*)
10412
10413         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10414         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10415
10416                 ;;
10417         esac
10418         ;;
10419 (yes)
10420
10421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10423
10424         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10425
10426         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10427                 && test -z "${cf_tst_cflags}" \
10428                 && cf_fix_cppflags=no
10429         ;;
10430 esac
10431 done
10432
10433 if test -n "$cf_new_cflags" ; then
10434
10435         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10436         CFLAGS="${CFLAGS}$cf_new_cflags"
10437
10438 fi
10439
10440 if test -n "$cf_new_cppflags" ; then
10441
10442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10443         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10444
10445 fi
10446
10447 if test -n "$cf_new_extra_cppflags" ; then
10448
10449         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10450         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10451
10452 fi
10453
10454 fi
10455
10456         fi
10457 fi
10458
10459 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10460
10461 # Work around breakage on OS X
10462
10463 echo "$as_me:10463: checking if SIGWINCH is defined" >&5
10464 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10465 if test "${cf_cv_define_sigwinch+set}" = set; then
10466   echo $ECHO_N "(cached) $ECHO_C" >&6
10467 else
10468
10469         cat >conftest.$ac_ext <<_ACEOF
10470 #line 10470 "configure"
10471 #include "confdefs.h"
10472
10473 #include <sys/types.h>
10474 #include <sys/signal.h>
10475
10476 int
10477 main (void)
10478 {
10479 int x = SIGWINCH
10480   ;
10481   return 0;
10482 }
10483 _ACEOF
10484 rm -f conftest.$ac_objext
10485 if { (eval echo "$as_me:10485: \"$ac_compile\"") >&5
10486   (eval $ac_compile) 2>&5
10487   ac_status=$?
10488   echo "$as_me:10488: \$? = $ac_status" >&5
10489   (exit $ac_status); } &&
10490          { ac_try='test -s conftest.$ac_objext'
10491   { (eval echo "$as_me:10491: \"$ac_try\"") >&5
10492   (eval $ac_try) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit $ac_status); }; }; then
10496   cf_cv_define_sigwinch=yes
10497 else
10498   echo "$as_me: failed program was:" >&5
10499 cat conftest.$ac_ext >&5
10500 cat >conftest.$ac_ext <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503
10504 #undef _XOPEN_SOURCE
10505 #undef _POSIX_SOURCE
10506 #undef _POSIX_C_SOURCE
10507 #include <sys/types.h>
10508 #include <sys/signal.h>
10509
10510 int
10511 main (void)
10512 {
10513 int x = SIGWINCH
10514   ;
10515   return 0;
10516 }
10517 _ACEOF
10518 rm -f conftest.$ac_objext
10519 if { (eval echo "$as_me:10519: \"$ac_compile\"") >&5
10520   (eval $ac_compile) 2>&5
10521   ac_status=$?
10522   echo "$as_me:10522: \$? = $ac_status" >&5
10523   (exit $ac_status); } &&
10524          { ac_try='test -s conftest.$ac_objext'
10525   { (eval echo "$as_me:10525: \"$ac_try\"") >&5
10526   (eval $ac_try) 2>&5
10527   ac_status=$?
10528   echo "$as_me:10528: \$? = $ac_status" >&5
10529   (exit $ac_status); }; }; then
10530   cf_cv_define_sigwinch=maybe
10531 else
10532   echo "$as_me: failed program was:" >&5
10533 cat conftest.$ac_ext >&5
10534 cf_cv_define_sigwinch=no
10535 fi
10536 rm -f conftest.$ac_objext conftest.$ac_ext
10537
10538 fi
10539 rm -f conftest.$ac_objext conftest.$ac_ext
10540
10541 fi
10542 echo "$as_me:10542: result: $cf_cv_define_sigwinch" >&5
10543 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10544
10545 if test "$cf_cv_define_sigwinch" = maybe ; then
10546 echo "$as_me:10546: checking for actual SIGWINCH definition" >&5
10547 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10548 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10549   echo $ECHO_N "(cached) $ECHO_C" >&6
10550 else
10551
10552 cf_cv_fixup_sigwinch=unknown
10553 cf_sigwinch=32
10554 while test $cf_sigwinch != 1
10555 do
10556         cat >conftest.$ac_ext <<_ACEOF
10557 #line 10557 "configure"
10558 #include "confdefs.h"
10559
10560 #undef _XOPEN_SOURCE
10561 #undef _POSIX_SOURCE
10562 #undef _POSIX_C_SOURCE
10563 #include <sys/types.h>
10564 #include <sys/signal.h>
10565
10566 int
10567 main (void)
10568 {
10569
10570 #if SIGWINCH != $cf_sigwinch
10571 make an error
10572 #endif
10573 int x = SIGWINCH
10574   ;
10575   return 0;
10576 }
10577 _ACEOF
10578 rm -f conftest.$ac_objext
10579 if { (eval echo "$as_me:10579: \"$ac_compile\"") >&5
10580   (eval $ac_compile) 2>&5
10581   ac_status=$?
10582   echo "$as_me:10582: \$? = $ac_status" >&5
10583   (exit $ac_status); } &&
10584          { ac_try='test -s conftest.$ac_objext'
10585   { (eval echo "$as_me:10585: \"$ac_try\"") >&5
10586   (eval $ac_try) 2>&5
10587   ac_status=$?
10588   echo "$as_me:10588: \$? = $ac_status" >&5
10589   (exit $ac_status); }; }; then
10590   cf_cv_fixup_sigwinch=$cf_sigwinch
10591          break
10592 else
10593   echo "$as_me: failed program was:" >&5
10594 cat conftest.$ac_ext >&5
10595 fi
10596 rm -f conftest.$ac_objext conftest.$ac_ext
10597
10598 cf_sigwinch=`expr $cf_sigwinch - 1`
10599 done
10600
10601 fi
10602 echo "$as_me:10602: result: $cf_cv_fixup_sigwinch" >&5
10603 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10604
10605         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10606                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10607         fi
10608 fi
10609
10610 # Checks for CODESET support.
10611
10612 echo "$as_me:10612: checking for nl_langinfo and CODESET" >&5
10613 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10614 if test "${am_cv_langinfo_codeset+set}" = set; then
10615   echo $ECHO_N "(cached) $ECHO_C" >&6
10616 else
10617   cat >conftest.$ac_ext <<_ACEOF
10618 #line 10618 "configure"
10619 #include "confdefs.h"
10620 #include <langinfo.h>
10621 int
10622 main (void)
10623 {
10624 char* cs = nl_langinfo(CODESET);
10625   ;
10626   return 0;
10627 }
10628 _ACEOF
10629 rm -f conftest.$ac_objext conftest$ac_exeext
10630 if { (eval echo "$as_me:10630: \"$ac_link\"") >&5
10631   (eval $ac_link) 2>&5
10632   ac_status=$?
10633   echo "$as_me:10633: \$? = $ac_status" >&5
10634   (exit $ac_status); } &&
10635          { ac_try='test -s conftest$ac_exeext'
10636   { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637   (eval $ac_try) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit $ac_status); }; }; then
10641   am_cv_langinfo_codeset=yes
10642 else
10643   echo "$as_me: failed program was:" >&5
10644 cat conftest.$ac_ext >&5
10645 am_cv_langinfo_codeset=no
10646 fi
10647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10648
10649 fi
10650 echo "$as_me:10650: result: $am_cv_langinfo_codeset" >&5
10651 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10652         if test $am_cv_langinfo_codeset = yes; then
10653
10654 cat >>confdefs.h <<\EOF
10655 #define HAVE_LANGINFO_CODESET 1
10656 EOF
10657
10658         fi
10659
10660 # use these variables to work around a defect in gcc's fixincludes.
10661 NCURSES_OK_WCHAR_T=
10662 NCURSES_OK_WINT_T=
10663
10664 echo "$as_me:10664: checking if you want wide-character code" >&5
10665 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10666
10667 # Check whether --enable-widec or --disable-widec was given.
10668 if test "${enable_widec+set}" = set; then
10669   enableval="$enable_widec"
10670   with_widec=$enableval
10671 else
10672   with_widec=no
10673 fi;
10674 echo "$as_me:10674: result: $with_widec" >&5
10675 echo "${ECHO_T}$with_widec" >&6
10676
10677 NCURSES_WCWIDTH_GRAPHICS=1
10678
10679 if test "x$with_widec" = xyes ; then
10680         if test "x$disable_lib_suffixes" = xno ; then
10681                 LIB_SUFFIX="w${LIB_SUFFIX}"
10682         fi
10683
10684 cat >>confdefs.h <<\EOF
10685 #define USE_WIDEC_SUPPORT 1
10686 EOF
10687
10688 cat >>confdefs.h <<\EOF
10689 #define NCURSES_WIDECHAR 1
10690 EOF
10691
10692 for ac_header in \
10693 wchar.h \
10694 wctype.h \
10695
10696 do
10697 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10698 echo "$as_me:10698: checking for $ac_header" >&5
10699 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10700 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10701   echo $ECHO_N "(cached) $ECHO_C" >&6
10702 else
10703   cat >conftest.$ac_ext <<_ACEOF
10704 #line 10704 "configure"
10705 #include "confdefs.h"
10706 #include <$ac_header>
10707 _ACEOF
10708 if { (eval echo "$as_me:10708: \"$ac_cpp conftest.$ac_ext\"") >&5
10709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10710   ac_status=$?
10711   egrep -v '^ *\+' conftest.er1 >conftest.err
10712   rm -f conftest.er1
10713   cat conftest.err >&5
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit $ac_status); } >/dev/null; then
10716   if test -s conftest.err; then
10717     ac_cpp_err=$ac_c_preproc_warn_flag
10718   else
10719     ac_cpp_err=
10720   fi
10721 else
10722   ac_cpp_err=yes
10723 fi
10724 if test -z "$ac_cpp_err"; then
10725   eval "$as_ac_Header=yes"
10726 else
10727   echo "$as_me: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   eval "$as_ac_Header=no"
10730 fi
10731 rm -f conftest.err conftest.$ac_ext
10732 fi
10733 echo "$as_me:10733: result: `eval echo '${'$as_ac_Header'}'`" >&5
10734 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10735 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10736   cat >>confdefs.h <<EOF
10737 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10738 EOF
10739
10740 fi
10741 done
10742
10743 echo "$as_me:10743: checking if wchar.h can be used as is" >&5
10744 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10745 if test "${cf_cv_wchar_h_okay+set}" = set; then
10746   echo $ECHO_N "(cached) $ECHO_C" >&6
10747 else
10748
10749 cat >conftest.$ac_ext <<_ACEOF
10750 #line 10750 "configure"
10751 #include "confdefs.h"
10752
10753 #include <stdlib.h>
10754 #ifdef HAVE_WCHAR_H
10755 #include <wchar.h>
10756 #endif
10757 #ifdef HAVE_WCTYPE_H
10758 #include <wctype.h>
10759 #endif
10760
10761 int
10762 main (void)
10763 {
10764
10765         wint_t foo = 0;
10766         int bar = iswpunct(foo)
10767   ;
10768   return 0;
10769 }
10770 _ACEOF
10771 rm -f conftest.$ac_objext
10772 if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5
10773   (eval $ac_compile) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); } &&
10777          { ac_try='test -s conftest.$ac_objext'
10778   { (eval echo "$as_me:10778: \"$ac_try\"") >&5
10779   (eval $ac_try) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); }; }; then
10783   cf_cv_wchar_h_okay=yes
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 cat conftest.$ac_ext >&5
10787 cf_cv_wchar_h_okay=no
10788 fi
10789 rm -f conftest.$ac_objext conftest.$ac_ext
10790 fi
10791 echo "$as_me:10791: result: $cf_cv_wchar_h_okay" >&5
10792 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10793
10794 if test $cf_cv_wchar_h_okay = no
10795 then
10796
10797 echo "$as_me:10797: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10798 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10799 cat >conftest.$ac_ext <<_ACEOF
10800 #line 10800 "configure"
10801 #include "confdefs.h"
10802 #include <sys/types.h>
10803
10804 int
10805 main (void)
10806 {
10807
10808 #ifndef _XOPEN_SOURCE_EXTENDED
10809 make an error
10810 #endif
10811   ;
10812   return 0;
10813 }
10814 _ACEOF
10815 rm -f conftest.$ac_objext
10816 if { (eval echo "$as_me:10816: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); } &&
10821          { ac_try='test -s conftest.$ac_objext'
10822   { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823   (eval $ac_try) 2>&5
10824   ac_status=$?
10825   echo "$as_me:10825: \$? = $ac_status" >&5
10826   (exit $ac_status); }; }; then
10827   cf_result=no
10828 else
10829   echo "$as_me: failed program was:" >&5
10830 cat conftest.$ac_ext >&5
10831 cf_result=yes
10832 fi
10833 rm -f conftest.$ac_objext conftest.$ac_ext
10834 echo "$as_me:10834: result: $cf_result" >&5
10835 echo "${ECHO_T}$cf_result" >&6
10836
10837 if test "$cf_result" = yes ; then
10838         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10839 elif test "x" != "x" ; then
10840         echo "$as_me:10840: checking checking for compatible value versus " >&5
10841 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10842         cat >conftest.$ac_ext <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10845 #include <sys/types.h>
10846
10847 int
10848 main (void)
10849 {
10850
10851 #if _XOPEN_SOURCE_EXTENDED- < 0
10852 make an error
10853 #endif
10854   ;
10855   return 0;
10856 }
10857 _ACEOF
10858 rm -f conftest.$ac_objext
10859 if { (eval echo "$as_me:10859: \"$ac_compile\"") >&5
10860   (eval $ac_compile) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit $ac_status); } &&
10864          { ac_try='test -s conftest.$ac_objext'
10865   { (eval echo "$as_me:10865: \"$ac_try\"") >&5
10866   (eval $ac_try) 2>&5
10867   ac_status=$?
10868   echo "$as_me:10868: \$? = $ac_status" >&5
10869   (exit $ac_status); }; }; then
10870   cf_result=yes
10871 else
10872   echo "$as_me: failed program was:" >&5
10873 cat conftest.$ac_ext >&5
10874 cf_result=no
10875 fi
10876 rm -f conftest.$ac_objext conftest.$ac_ext
10877         echo "$as_me:10877: result: $cf_result" >&5
10878 echo "${ECHO_T}$cf_result" >&6
10879         if test "$cf_result" = no ; then
10880                 # perhaps we can override it - try...
10881                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10882         fi
10883 fi
10884
10885 fi
10886
10887 echo "$as_me:10887: checking if wcwidth agrees graphics are single-width" >&5
10888 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10889 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10890   echo $ECHO_N "(cached) $ECHO_C" >&6
10891 else
10892
10893 cat >conftest.in <<CF_EOF
10894 -       VT100 symbols
10895 0x250c  upper left corner
10896 0x2514  lower left corner
10897 0x2510  upper right corner
10898 0x2518  lower right corner
10899 0x251c  tee pointing left
10900 0x2524  tee pointing right
10901 0x2534  tee pointing up
10902 0x252c  tee pointing down
10903 0x2500  horizontal line
10904 0x2502  vertical line
10905 0x253c  large plus or crossover
10906 0x23ba  scan line 1
10907 0x23bd  scan line 9
10908 0x25c6  diamond
10909 0x2592  checker board (stipple)
10910 0x00b0  degree symbol
10911 0x00b1  plus/minus
10912 0x00b7  bullet
10913 -       Teletype 5410v1 symbols
10914 0x2190  arrow pointing left
10915 0x2192  arrow pointing right
10916 0x2193  arrow pointing down
10917 0x2191  arrow pointing up
10918 0x2592  board of squares
10919 0x2603  lantern symbol
10920 0x25ae  solid square block
10921 -       these defaults were invented for ncurses
10922 0x23bb  scan line 3
10923 0x23bc  scan line 7
10924 0x2264  less-than-or-equal-to
10925 0x2265  greater-than-or-equal-to
10926 0x03c0  greek pi
10927 0x2260  not-equal
10928 0x00a3  pound-sterling symbol
10929 -       thick-line-drawing
10930 0x250f  upper left corner
10931 0x2517  lower left corner
10932 0x2513  upper right corner
10933 0x251b  lower right corner
10934 0x2523  tee pointing left
10935 0x252b  tee pointing right
10936 0x253b  tee pointing up
10937 0x2533  tee pointing down
10938 0x2501  horizontal line
10939 0x2503  vertical line
10940 0x254b  large plus or crossover
10941 -       double-line-drawing
10942 0x2554  upper left corner
10943 0x255a  lower left corner
10944 0x2557  upper right corner
10945 0x255d  lower right corner
10946 0x2563  tee pointing left
10947 0x2560  tee pointing right
10948 0x2569  tee pointing up
10949 0x2566  tee pointing down
10950 0x2550  horizontal line
10951 0x2551  vertical line
10952 0x256c  large plus or crossover
10953 CF_EOF
10954 if test "$cross_compiling" = yes; then
10955   cf_cv_wcwidth_graphics=unknown
10956 else
10957   cat >conftest.$ac_ext <<_ACEOF
10958 #line 10958 "configure"
10959 #include "confdefs.h"
10960
10961 #include <locale.h>
10962 #include <stdio.h>
10963 #include <wchar.h>
10964
10965 #define MY_LEN 80
10966
10967 int
10968 main(void)
10969 {
10970         FILE *fp;
10971         int value;
10972         char buffer[MY_LEN + 1];
10973         char notes[MY_LEN + 1];
10974         int totals = 0;
10975         int passed = 0;
10976
10977         if (setlocale(LC_ALL, "en_US.UTF8") ||
10978                 setlocale(LC_ALL, "en_US.UTF-8") ||
10979                 setlocale(LC_ALL, "en_US.utf8") ||
10980                 setlocale(LC_ALL, "en_US.utf-8")) {
10981                 if ((fp = fopen("conftest.in", "r")) != 0) {
10982                         while (fgets(buffer, MY_LEN, fp) != 0) {
10983                                 if (*buffer == '-') {
10984                                         fprintf(stderr, "\t%s", buffer);
10985                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10986                                         ++totals;
10987                                         if (wcwidth(value) == 1)
10988                                                 ++passed;
10989                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10990                                 } else {
10991                                         fprintf(stderr, "?\t%s", buffer);
10992                                 }
10993                         }
10994                 }
10995         }
10996         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10997         return (totals == passed) ? 0 : 1;
10998 }
10999
11000 _ACEOF
11001 rm -f conftest$ac_exeext
11002 if { (eval echo "$as_me:11002: \"$ac_link\"") >&5
11003   (eval $ac_link) 2>&5
11004   ac_status=$?
11005   echo "$as_me:11005: \$? = $ac_status" >&5
11006   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11007   { (eval echo "$as_me:11007: \"$ac_try\"") >&5
11008   (eval $ac_try) 2>&5
11009   ac_status=$?
11010   echo "$as_me:11010: \$? = $ac_status" >&5
11011   (exit $ac_status); }; }; then
11012   cf_cv_wcwidth_graphics=yes
11013 else
11014   echo "$as_me: program exited with status $ac_status" >&5
11015 echo "$as_me: failed program was:" >&5
11016 cat conftest.$ac_ext >&5
11017 cf_cv_wcwidth_graphics=no
11018 fi
11019 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11020 fi
11021
11022 fi
11023 echo "$as_me:11023: result: $cf_cv_wcwidth_graphics" >&5
11024 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11025
11026         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11027
11028         # with_overwrite=no
11029         NCURSES_CH_T=cchar_t
11030
11031 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11032 do
11033 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11034 echo "$as_me:11034: checking for $ac_func" >&5
11035 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11036 if eval "test \"\${$as_ac_var+set}\" = set"; then
11037   echo $ECHO_N "(cached) $ECHO_C" >&6
11038 else
11039   cat >conftest.$ac_ext <<_ACEOF
11040 #line 11040 "configure"
11041 #include "confdefs.h"
11042 #define $ac_func autoconf_temporary
11043 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11044 #undef $ac_func
11045
11046 #ifdef __cplusplus
11047 extern "C"
11048 #endif
11049
11050 /* We use char because int might match the return type of a gcc2
11051    builtin and then its argument prototype would still apply.  */
11052 char $ac_func (void);
11053
11054 int
11055 main (void)
11056 {
11057
11058 /* The GNU C library defines stubs for functions which it implements
11059     to always fail with ENOSYS.  Some functions are actually named
11060     something starting with __ and the normal name is an alias.  */
11061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11062 #error found stub for $ac_func
11063 #endif
11064
11065         return $ac_func ();
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest.$ac_objext conftest$ac_exeext
11071 if { (eval echo "$as_me:11071: \"$ac_link\"") >&5
11072   (eval $ac_link) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); } &&
11076          { ac_try='test -s conftest$ac_exeext'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   eval "$as_ac_var=yes"
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 eval "$as_ac_var=no"
11087 fi
11088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11089 fi
11090 echo "$as_me:11090: result: `eval echo '${'$as_ac_var'}'`" >&5
11091 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11092 if test `eval echo '${'$as_ac_var'}'` = yes; then
11093   cat >>confdefs.h <<EOF
11094 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11095 EOF
11096
11097 fi
11098 done
11099
11100         if test "x$ac_cv_func_putwc" != xyes ; then
11101
11102 echo "$as_me:11102: checking for multibyte character support" >&5
11103 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11104 if test "${cf_cv_utf8_lib+set}" = set; then
11105   echo $ECHO_N "(cached) $ECHO_C" >&6
11106 else
11107
11108         cf_save_LIBS="$LIBS"
11109         cat >conftest.$ac_ext <<_ACEOF
11110 #line 11110 "configure"
11111 #include "confdefs.h"
11112
11113 #include <stdlib.h>
11114 int
11115 main (void)
11116 {
11117 putwc(0,0);
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext conftest$ac_exeext
11123 if { (eval echo "$as_me:11123: \"$ac_link\"") >&5
11124   (eval $ac_link) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest$ac_exeext'
11129   { (eval echo "$as_me:11129: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   cf_cv_utf8_lib=yes
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138
11139 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11140 # will be set on completion of the AC_TRY_LINK below.
11141 cf_cv_header_path_utf8=
11142 cf_cv_library_path_utf8=
11143
11144 echo "${as_me:-configure}:11144: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11145
11146 cf_save_LIBS="$LIBS"
11147
11148 cat >conftest.$ac_ext <<_ACEOF
11149 #line 11149 "configure"
11150 #include "confdefs.h"
11151
11152 #include <libutf8.h>
11153 int
11154 main (void)
11155 {
11156 putwc(0,0);
11157   ;
11158   return 0;
11159 }
11160 _ACEOF
11161 rm -f conftest.$ac_objext conftest$ac_exeext
11162 if { (eval echo "$as_me:11162: \"$ac_link\"") >&5
11163   (eval $ac_link) 2>&5
11164   ac_status=$?
11165   echo "$as_me:11165: \$? = $ac_status" >&5
11166   (exit $ac_status); } &&
11167          { ac_try='test -s conftest$ac_exeext'
11168   { (eval echo "$as_me:11168: \"$ac_try\"") >&5
11169   (eval $ac_try) 2>&5
11170   ac_status=$?
11171   echo "$as_me:11171: \$? = $ac_status" >&5
11172   (exit $ac_status); }; }; then
11173
11174         cf_cv_find_linkage_utf8=yes
11175         cf_cv_header_path_utf8=/usr/include
11176         cf_cv_library_path_utf8=/usr/lib
11177
11178 else
11179   echo "$as_me: failed program was:" >&5
11180 cat conftest.$ac_ext >&5
11181
11182 LIBS="-lutf8  $cf_save_LIBS"
11183
11184 cat >conftest.$ac_ext <<_ACEOF
11185 #line 11185 "configure"
11186 #include "confdefs.h"
11187
11188 #include <libutf8.h>
11189 int
11190 main (void)
11191 {
11192 putwc(0,0);
11193   ;
11194   return 0;
11195 }
11196 _ACEOF
11197 rm -f conftest.$ac_objext conftest$ac_exeext
11198 if { (eval echo "$as_me:11198: \"$ac_link\"") >&5
11199   (eval $ac_link) 2>&5
11200   ac_status=$?
11201   echo "$as_me:11201: \$? = $ac_status" >&5
11202   (exit $ac_status); } &&
11203          { ac_try='test -s conftest$ac_exeext'
11204   { (eval echo "$as_me:11204: \"$ac_try\"") >&5
11205   (eval $ac_try) 2>&5
11206   ac_status=$?
11207   echo "$as_me:11207: \$? = $ac_status" >&5
11208   (exit $ac_status); }; }; then
11209
11210         cf_cv_find_linkage_utf8=yes
11211         cf_cv_header_path_utf8=/usr/include
11212         cf_cv_library_path_utf8=/usr/lib
11213         cf_cv_library_file_utf8="-lutf8"
11214
11215 else
11216   echo "$as_me: failed program was:" >&5
11217 cat conftest.$ac_ext >&5
11218
11219         cf_cv_find_linkage_utf8=no
11220         LIBS="$cf_save_LIBS"
11221
11222         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11223
11224 echo "${as_me:-configure}:11224: testing find linkage for utf8 library ..." 1>&5
11225
11226 echo "${as_me:-configure}:11226: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11227
11228         cf_save_CPPFLAGS="$CPPFLAGS"
11229         cf_test_CPPFLAGS="$CPPFLAGS"
11230
11231 cf_search=
11232
11233 # collect the current set of include-directories from compiler flags
11234 cf_header_path_list=""
11235 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11236         for cf_header_path in $CPPFLAGS $CFLAGS
11237         do
11238                 case $cf_header_path in
11239                 (-I*)
11240                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11241
11242 test "x$cf_header_path" != "xNONE" && \
11243 test -d "$cf_header_path" && \
11244  {
11245         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11246         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11247         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11248         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11249         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11250         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11251 }
11252
11253                         cf_header_path_list="$cf_header_path_list $cf_search"
11254                         ;;
11255                 esac
11256         done
11257 fi
11258
11259 # add the variations for the package we are looking for
11260
11261 cf_search=
11262
11263 test "x$prefix" != "xNONE" && \
11264 test -d "$prefix" && \
11265  {
11266         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11267         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11268         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11269         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11270         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11271         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11272 }
11273
11274 for cf_subdir_prefix in \
11275         /usr \
11276         /usr/local \
11277         /usr/pkg \
11278         /opt \
11279         /opt/local \
11280         $HOME
11281 do
11282
11283 test "x$cf_subdir_prefix" != "x$prefix" && \
11284 test -d "$cf_subdir_prefix" && \
11285 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11286         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11287         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11288         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11289         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11290         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11291         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11292 }
11293
11294 done
11295
11296 test "$includedir" != NONE && \
11297 test "$includedir" != "/usr/include" && \
11298 test -d "$includedir" && {
11299         test -d $includedir &&    cf_search="$cf_search $includedir"
11300         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11301 }
11302
11303 test "$oldincludedir" != NONE && \
11304 test "$oldincludedir" != "/usr/include" && \
11305 test -d "$oldincludedir" && {
11306         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11307         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11308 }
11309
11310 cf_search="$cf_search $cf_header_path_list"
11311
11312         for cf_cv_header_path_utf8 in $cf_search
11313         do
11314                 if test -d $cf_cv_header_path_utf8 ; then
11315                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11316
11317 echo "${as_me:-configure}:11317: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11318
11319                         CPPFLAGS="$cf_save_CPPFLAGS"
11320
11321         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11322         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11323
11324                         cat >conftest.$ac_ext <<_ACEOF
11325 #line 11325 "configure"
11326 #include "confdefs.h"
11327
11328 #include <libutf8.h>
11329 int
11330 main (void)
11331 {
11332 putwc(0,0);
11333   ;
11334   return 0;
11335 }
11336 _ACEOF
11337 rm -f conftest.$ac_objext
11338 if { (eval echo "$as_me:11338: \"$ac_compile\"") >&5
11339   (eval $ac_compile) 2>&5
11340   ac_status=$?
11341   echo "$as_me:11341: \$? = $ac_status" >&5
11342   (exit $ac_status); } &&
11343          { ac_try='test -s conftest.$ac_objext'
11344   { (eval echo "$as_me:11344: \"$ac_try\"") >&5
11345   (eval $ac_try) 2>&5
11346   ac_status=$?
11347   echo "$as_me:11347: \$? = $ac_status" >&5
11348   (exit $ac_status); }; }; then
11349
11350                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11351
11352 echo "${as_me:-configure}:11352: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11353
11354                                 cf_cv_find_linkage_utf8=maybe
11355                                 cf_test_CPPFLAGS="$CPPFLAGS"
11356                                 break
11357 else
11358   echo "$as_me: failed program was:" >&5
11359 cat conftest.$ac_ext >&5
11360
11361                                 CPPFLAGS="$cf_save_CPPFLAGS"
11362
11363 fi
11364 rm -f conftest.$ac_objext conftest.$ac_ext
11365                 fi
11366         done
11367
11368         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11369
11370 echo "${as_me:-configure}:11370: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11371
11372                 cf_save_LIBS="$LIBS"
11373                 cf_save_LDFLAGS="$LDFLAGS"
11374
11375                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11376
11377 cf_search=
11378 cf_library_path_list=""
11379 if test -n "${LDFLAGS}${LIBS}" ; then
11380         for cf_library_path in $LDFLAGS $LIBS
11381         do
11382                 case $cf_library_path in
11383                 (-L*)
11384                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11385
11386 test "x$cf_library_path" != "xNONE" && \
11387 test -d "$cf_library_path" && \
11388  {
11389         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11390         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11391         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11392         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11393         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11394         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11395 }
11396
11397                         cf_library_path_list="$cf_library_path_list $cf_search"
11398                         ;;
11399                 esac
11400         done
11401 fi
11402
11403 cf_search=
11404
11405 test "x$prefix" != "xNONE" && \
11406 test -d "$prefix" && \
11407  {
11408         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11409         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11410         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11411         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11412         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11413         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11414 }
11415
11416 for cf_subdir_prefix in \
11417         /usr \
11418         /usr/local \
11419         /usr/pkg \
11420         /opt \
11421         /opt/local \
11422         $HOME
11423 do
11424
11425 test "x$cf_subdir_prefix" != "x$prefix" && \
11426 test -d "$cf_subdir_prefix" && \
11427 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11428         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11429         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11430         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11431         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11432         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11433         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11434 }
11435
11436 done
11437
11438 cf_search="$cf_library_path_list $cf_search"
11439
11440                         for cf_cv_library_path_utf8 in $cf_search
11441                         do
11442                                 if test -d $cf_cv_library_path_utf8 ; then
11443                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11444
11445 echo "${as_me:-configure}:11445: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11446
11447                                         CPPFLAGS="$cf_test_CPPFLAGS"
11448                                         LIBS="-lutf8  $cf_save_LIBS"
11449                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11450                                         cat >conftest.$ac_ext <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453
11454 #include <libutf8.h>
11455 int
11456 main (void)
11457 {
11458 putwc(0,0);
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 rm -f conftest.$ac_objext conftest$ac_exeext
11464 if { (eval echo "$as_me:11464: \"$ac_link\"") >&5
11465   (eval $ac_link) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit $ac_status); } &&
11469          { ac_try='test -s conftest$ac_exeext'
11470   { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit $ac_status); }; }; then
11475
11476                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11477
11478 echo "${as_me:-configure}:11478: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11479
11480                                         cf_cv_find_linkage_utf8=yes
11481                                         cf_cv_library_file_utf8="-lutf8"
11482                                         break
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486
11487                                         CPPFLAGS="$cf_save_CPPFLAGS"
11488                                         LIBS="$cf_save_LIBS"
11489                                         LDFLAGS="$cf_save_LDFLAGS"
11490
11491 fi
11492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11493                                 fi
11494                         done
11495                         CPPFLAGS="$cf_save_CPPFLAGS"
11496                         LDFLAGS="$cf_save_LDFLAGS"
11497                 fi
11498
11499         else
11500                 cf_cv_find_linkage_utf8=no
11501         fi
11502
11503 fi
11504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11505
11506 fi
11507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11508
11509 LIBS="$cf_save_LIBS"
11510
11511 if test "$cf_cv_find_linkage_utf8" = yes ; then
11512 cf_cv_utf8_lib=add-on
11513 else
11514 cf_cv_utf8_lib=no
11515 fi
11516
11517 fi
11518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11519 fi
11520 echo "$as_me:11520: result: $cf_cv_utf8_lib" >&5
11521 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11522
11523 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11524 # ncurses/ncursesw:
11525 if test "$cf_cv_utf8_lib" = "add-on" ; then
11526
11527 cat >>confdefs.h <<\EOF
11528 #define HAVE_LIBUTF8_H 1
11529 EOF
11530
11531 if test -n "$cf_cv_header_path_utf8" ; then
11532   for cf_add_incdir in $cf_cv_header_path_utf8
11533   do
11534         while test $cf_add_incdir != /usr/include
11535         do
11536           if test -d $cf_add_incdir
11537           then
11538                 cf_have_incdir=no
11539                 if test -n "$CFLAGS$CPPFLAGS" ; then
11540                   # a loop is needed to ensure we can add subdirs of existing dirs
11541                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11542                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11543                           cf_have_incdir=yes; break
11544                         fi
11545                   done
11546                 fi
11547
11548                 if test "$cf_have_incdir" = no ; then
11549                   if test "$cf_add_incdir" = /usr/local/include ; then
11550                         if test "$GCC" = yes
11551                         then
11552                           cf_save_CPPFLAGS=$CPPFLAGS
11553
11554         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11555         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11556
11557                           cat >conftest.$ac_ext <<_ACEOF
11558 #line 11558 "configure"
11559 #include "confdefs.h"
11560 #include <stdio.h>
11561 int
11562 main (void)
11563 {
11564 printf("Hello")
11565   ;
11566   return 0;
11567 }
11568 _ACEOF
11569 rm -f conftest.$ac_objext
11570 if { (eval echo "$as_me:11570: \"$ac_compile\"") >&5
11571   (eval $ac_compile) 2>&5
11572   ac_status=$?
11573   echo "$as_me:11573: \$? = $ac_status" >&5
11574   (exit $ac_status); } &&
11575          { ac_try='test -s conftest.$ac_objext'
11576   { (eval echo "$as_me:11576: \"$ac_try\"") >&5
11577   (eval $ac_try) 2>&5
11578   ac_status=$?
11579   echo "$as_me:11579: \$? = $ac_status" >&5
11580   (exit $ac_status); }; }; then
11581   :
11582 else
11583   echo "$as_me: failed program was:" >&5
11584 cat conftest.$ac_ext >&5
11585 cf_have_incdir=yes
11586 fi
11587 rm -f conftest.$ac_objext conftest.$ac_ext
11588                           CPPFLAGS=$cf_save_CPPFLAGS
11589                         fi
11590                   fi
11591                 fi
11592
11593                 if test "$cf_have_incdir" = no ; then
11594                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11595
11596 echo "${as_me:-configure}:11596: testing adding $cf_add_incdir to include-path ..." 1>&5
11597
11598                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11599
11600                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11601                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11602                   cf_add_incdir="$cf_top_incdir"
11603                 else
11604                   break
11605                 fi
11606           else
11607                 break
11608           fi
11609         done
11610   done
11611 fi
11612
11613 if test -n "$cf_cv_library_path_utf8" ; then
11614         for cf_add_libdir in $cf_cv_library_path_utf8
11615         do
11616                 if test $cf_add_libdir = /usr/lib ; then
11617                         :
11618                 elif test -d $cf_add_libdir
11619                 then
11620                         cf_have_libdir=no
11621                         if test -n "$LDFLAGS$LIBS" ; then
11622                                 # a loop is needed to ensure we can add subdirs of existing dirs
11623                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11624                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11625                                                 cf_have_libdir=yes; break
11626                                         fi
11627                                 done
11628                         fi
11629                         if test "$cf_have_libdir" = no ; then
11630                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11631
11632 echo "${as_me:-configure}:11632: testing adding $cf_add_libdir to library-path ..." 1>&5
11633
11634                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11635                         fi
11636                 fi
11637         done
11638 fi
11639
11640 cf_add_libs="$cf_cv_library_file_utf8"
11641 # Filter out duplicates - this happens with badly-designed ".pc" files...
11642 for cf_add_1lib in $LIBS
11643 do
11644         for cf_add_2lib in $cf_add_libs
11645         do
11646                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11647                 then
11648                         cf_add_1lib=
11649                         break
11650                 fi
11651         done
11652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11653 done
11654 LIBS="$cf_add_libs"
11655
11656 fi
11657
11658                 if test "$cf_cv_utf8_lib" != no ; then
11659                         NCURSES_LIBUTF8=1
11660                 fi
11661         fi
11662
11663 # This is needed on Tru64 5.0 to declare mbstate_t
11664 echo "$as_me:11664: checking if we must include wchar.h to declare mbstate_t" >&5
11665 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11666 if test "${cf_cv_mbstate_t+set}" = set; then
11667   echo $ECHO_N "(cached) $ECHO_C" >&6
11668 else
11669
11670 cat >conftest.$ac_ext <<_ACEOF
11671 #line 11671 "configure"
11672 #include "confdefs.h"
11673
11674 #include <stdlib.h>
11675 #include <stdarg.h>
11676 #include <stdio.h>
11677 #ifdef HAVE_LIBUTF8_H
11678 #include <libutf8.h>
11679 #endif
11680 int
11681 main (void)
11682 {
11683 mbstate_t state
11684   ;
11685   return 0;
11686 }
11687 _ACEOF
11688 rm -f conftest.$ac_objext
11689 if { (eval echo "$as_me:11689: \"$ac_compile\"") >&5
11690   (eval $ac_compile) 2>&5
11691   ac_status=$?
11692   echo "$as_me:11692: \$? = $ac_status" >&5
11693   (exit $ac_status); } &&
11694          { ac_try='test -s conftest.$ac_objext'
11695   { (eval echo "$as_me:11695: \"$ac_try\"") >&5
11696   (eval $ac_try) 2>&5
11697   ac_status=$?
11698   echo "$as_me:11698: \$? = $ac_status" >&5
11699   (exit $ac_status); }; }; then
11700   cf_cv_mbstate_t=no
11701 else
11702   echo "$as_me: failed program was:" >&5
11703 cat conftest.$ac_ext >&5
11704 cat >conftest.$ac_ext <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #include <stdlib.h>
11709 #include <stdarg.h>
11710 #include <stdio.h>
11711 #include <wchar.h>
11712 #ifdef HAVE_LIBUTF8_H
11713 #include <libutf8.h>
11714 #endif
11715 int
11716 main (void)
11717 {
11718 mbstate_t value
11719   ;
11720   return 0;
11721 }
11722 _ACEOF
11723 rm -f conftest.$ac_objext
11724 if { (eval echo "$as_me:11724: \"$ac_compile\"") >&5
11725   (eval $ac_compile) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); } &&
11729          { ac_try='test -s conftest.$ac_objext'
11730   { (eval echo "$as_me:11730: \"$ac_try\"") >&5
11731   (eval $ac_try) 2>&5
11732   ac_status=$?
11733   echo "$as_me:11733: \$? = $ac_status" >&5
11734   (exit $ac_status); }; }; then
11735   cf_cv_mbstate_t=yes
11736 else
11737   echo "$as_me: failed program was:" >&5
11738 cat conftest.$ac_ext >&5
11739 cf_cv_mbstate_t=unknown
11740 fi
11741 rm -f conftest.$ac_objext conftest.$ac_ext
11742 fi
11743 rm -f conftest.$ac_objext conftest.$ac_ext
11744 fi
11745 echo "$as_me:11745: result: $cf_cv_mbstate_t" >&5
11746 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11747
11748 if test "$cf_cv_mbstate_t" = yes ; then
11749
11750 cat >>confdefs.h <<\EOF
11751 #define NEED_WCHAR_H 1
11752 EOF
11753
11754         NEED_WCHAR_H=1
11755 fi
11756
11757 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11758 if test "$cf_cv_mbstate_t" = unknown ; then
11759         NCURSES_MBSTATE_T=1
11760 fi
11761
11762 # This is needed on Tru64 5.0 to declare wchar_t
11763 echo "$as_me:11763: checking if we must include wchar.h to declare wchar_t" >&5
11764 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11765 if test "${cf_cv_wchar_t+set}" = set; then
11766   echo $ECHO_N "(cached) $ECHO_C" >&6
11767 else
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770 #line 11770 "configure"
11771 #include "confdefs.h"
11772
11773 #include <stdlib.h>
11774 #include <stdarg.h>
11775 #include <stdio.h>
11776 #ifdef HAVE_LIBUTF8_H
11777 #include <libutf8.h>
11778 #endif
11779 int
11780 main (void)
11781 {
11782 wchar_t state
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 rm -f conftest.$ac_objext
11788 if { (eval echo "$as_me:11788: \"$ac_compile\"") >&5
11789   (eval $ac_compile) 2>&5
11790   ac_status=$?
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); } &&
11793          { ac_try='test -s conftest.$ac_objext'
11794   { (eval echo "$as_me:11794: \"$ac_try\"") >&5
11795   (eval $ac_try) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); }; }; then
11799   cf_cv_wchar_t=no
11800 else
11801   echo "$as_me: failed program was:" >&5
11802 cat conftest.$ac_ext >&5
11803 cat >conftest.$ac_ext <<_ACEOF
11804 #line 11804 "configure"
11805 #include "confdefs.h"
11806
11807 #include <stdlib.h>
11808 #include <stdarg.h>
11809 #include <stdio.h>
11810 #include <wchar.h>
11811 #ifdef HAVE_LIBUTF8_H
11812 #include <libutf8.h>
11813 #endif
11814 int
11815 main (void)
11816 {
11817 wchar_t value
11818   ;
11819   return 0;
11820 }
11821 _ACEOF
11822 rm -f conftest.$ac_objext
11823 if { (eval echo "$as_me:11823: \"$ac_compile\"") >&5
11824   (eval $ac_compile) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); } &&
11828          { ac_try='test -s conftest.$ac_objext'
11829   { (eval echo "$as_me:11829: \"$ac_try\"") >&5
11830   (eval $ac_try) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); }; }; then
11834   cf_cv_wchar_t=yes
11835 else
11836   echo "$as_me: failed program was:" >&5
11837 cat conftest.$ac_ext >&5
11838 cf_cv_wchar_t=unknown
11839 fi
11840 rm -f conftest.$ac_objext conftest.$ac_ext
11841 fi
11842 rm -f conftest.$ac_objext conftest.$ac_ext
11843 fi
11844 echo "$as_me:11844: result: $cf_cv_wchar_t" >&5
11845 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11846
11847 if test "$cf_cv_wchar_t" = yes ; then
11848
11849 cat >>confdefs.h <<\EOF
11850 #define NEED_WCHAR_H 1
11851 EOF
11852
11853         NEED_WCHAR_H=1
11854 fi
11855
11856 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11857 if test "$cf_cv_wchar_t" = unknown ; then
11858         NCURSES_WCHAR_T=1
11859 fi
11860
11861 # if we find wchar_t in either place, use substitution to provide a fallback.
11862 if test "$cf_cv_wchar_t" != unknown ; then
11863         NCURSES_OK_WCHAR_T=1
11864 fi
11865
11866 # This is needed on Tru64 5.0 to declare wint_t
11867 echo "$as_me:11867: checking if we must include wchar.h to declare wint_t" >&5
11868 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11869 if test "${cf_cv_wint_t+set}" = set; then
11870   echo $ECHO_N "(cached) $ECHO_C" >&6
11871 else
11872
11873 cat >conftest.$ac_ext <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876
11877 #include <stdlib.h>
11878 #include <stdarg.h>
11879 #include <stdio.h>
11880 #ifdef HAVE_LIBUTF8_H
11881 #include <libutf8.h>
11882 #endif
11883 int
11884 main (void)
11885 {
11886 wint_t state
11887   ;
11888   return 0;
11889 }
11890 _ACEOF
11891 rm -f conftest.$ac_objext
11892 if { (eval echo "$as_me:11892: \"$ac_compile\"") >&5
11893   (eval $ac_compile) 2>&5
11894   ac_status=$?
11895   echo "$as_me:11895: \$? = $ac_status" >&5
11896   (exit $ac_status); } &&
11897          { ac_try='test -s conftest.$ac_objext'
11898   { (eval echo "$as_me:11898: \"$ac_try\"") >&5
11899   (eval $ac_try) 2>&5
11900   ac_status=$?
11901   echo "$as_me:11901: \$? = $ac_status" >&5
11902   (exit $ac_status); }; }; then
11903   cf_cv_wint_t=no
11904 else
11905   echo "$as_me: failed program was:" >&5
11906 cat conftest.$ac_ext >&5
11907 cat >conftest.$ac_ext <<_ACEOF
11908 #line 11908 "configure"
11909 #include "confdefs.h"
11910
11911 #include <stdlib.h>
11912 #include <stdarg.h>
11913 #include <stdio.h>
11914 #include <wchar.h>
11915 #ifdef HAVE_LIBUTF8_H
11916 #include <libutf8.h>
11917 #endif
11918 int
11919 main (void)
11920 {
11921 wint_t value
11922   ;
11923   return 0;
11924 }
11925 _ACEOF
11926 rm -f conftest.$ac_objext
11927 if { (eval echo "$as_me:11927: \"$ac_compile\"") >&5
11928   (eval $ac_compile) 2>&5
11929   ac_status=$?
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit $ac_status); } &&
11932          { ac_try='test -s conftest.$ac_objext'
11933   { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   cf_cv_wint_t=yes
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 cat conftest.$ac_ext >&5
11942 cf_cv_wint_t=unknown
11943 fi
11944 rm -f conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 rm -f conftest.$ac_objext conftest.$ac_ext
11947 fi
11948 echo "$as_me:11948: result: $cf_cv_wint_t" >&5
11949 echo "${ECHO_T}$cf_cv_wint_t" >&6
11950
11951 if test "$cf_cv_wint_t" = yes ; then
11952
11953 cat >>confdefs.h <<\EOF
11954 #define NEED_WCHAR_H 1
11955 EOF
11956
11957         NEED_WCHAR_H=1
11958 fi
11959
11960 # if we do not find wint_t in either place, use substitution to provide a fallback.
11961 if test "$cf_cv_wint_t" = unknown ; then
11962         NCURSES_WINT_T=1
11963 fi
11964
11965 # if we find wint_t in either place, use substitution to provide a fallback.
11966 if test "$cf_cv_wint_t" != unknown ; then
11967         NCURSES_OK_WINT_T=1
11968 fi
11969
11970         if test "$NCURSES_MBSTATE_T" != 0; then
11971
11972 cat >>confdefs.h <<\EOF
11973 #define NEED_MBSTATE_T_DEF 1
11974 EOF
11975
11976         fi
11977 fi
11978
11979 ###   use option --disable-lp64 to allow long chtype
11980 echo "$as_me:11980: checking whether to enable _LP64 definition in curses.h" >&5
11981 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11982
11983 # Check whether --enable-lp64 or --disable-lp64 was given.
11984 if test "${enable_lp64+set}" = set; then
11985   enableval="$enable_lp64"
11986   with_lp64=$enableval
11987 else
11988   with_lp64=$cf_dft_with_lp64
11989 fi;
11990 echo "$as_me:11990: result: $with_lp64" >&5
11991 echo "${ECHO_T}$with_lp64" >&6
11992
11993 if test "x$with_lp64" = xyes ; then
11994         cf_cv_enable_lp64=1
11995 else
11996         cf_cv_enable_lp64=0
11997 fi
11998
11999 # Check whether --enable-largefile or --disable-largefile was given.
12000 if test "${enable_largefile+set}" = set; then
12001   enableval="$enable_largefile"
12002
12003 fi;
12004 if test "$enable_largefile" != no; then
12005
12006   echo "$as_me:12006: checking for special C compiler options needed for large files" >&5
12007 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12008 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12009   echo $ECHO_N "(cached) $ECHO_C" >&6
12010 else
12011   ac_cv_sys_largefile_CC=no
12012      if test "$GCC" != yes; then
12013        ac_save_CC=$CC
12014        while :; do
12015          # IRIX 6.2 and later do not support large files by default,
12016          # so use the C compiler's -n32 option if that helps.
12017          cat >conftest.$ac_ext <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020 #include <sys/types.h>
12021  /* Check that off_t can represent 2**63 - 1 correctly.
12022     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12023     since some C++ compilers masquerading as C compilers
12024     incorrectly reject 9223372036854775807.  */
12025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12026   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12027                        && LARGE_OFF_T % 2147483647 == 1)
12028                       ? 1 : -1];
12029 int
12030 main (void)
12031 {
12032
12033   ;
12034   return 0;
12035 }
12036 _ACEOF
12037          rm -f conftest.$ac_objext
12038 if { (eval echo "$as_me:12038: \"$ac_compile\"") >&5
12039   (eval $ac_compile) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit $ac_status); } &&
12043          { ac_try='test -s conftest.$ac_objext'
12044   { (eval echo "$as_me:12044: \"$ac_try\"") >&5
12045   (eval $ac_try) 2>&5
12046   ac_status=$?
12047   echo "$as_me:12047: \$? = $ac_status" >&5
12048   (exit $ac_status); }; }; then
12049   break
12050 else
12051   echo "$as_me: failed program was:" >&5
12052 cat conftest.$ac_ext >&5
12053 fi
12054 rm -f conftest.$ac_objext
12055          CC="$CC -n32"
12056          rm -f conftest.$ac_objext
12057 if { (eval echo "$as_me:12057: \"$ac_compile\"") >&5
12058   (eval $ac_compile) 2>&5
12059   ac_status=$?
12060   echo "$as_me:12060: \$? = $ac_status" >&5
12061   (exit $ac_status); } &&
12062          { ac_try='test -s conftest.$ac_objext'
12063   { (eval echo "$as_me:12063: \"$ac_try\"") >&5
12064   (eval $ac_try) 2>&5
12065   ac_status=$?
12066   echo "$as_me:12066: \$? = $ac_status" >&5
12067   (exit $ac_status); }; }; then
12068   ac_cv_sys_largefile_CC=' -n32'; break
12069 else
12070   echo "$as_me: failed program was:" >&5
12071 cat conftest.$ac_ext >&5
12072 fi
12073 rm -f conftest.$ac_objext
12074          break
12075        done
12076        CC=$ac_save_CC
12077        rm -f conftest.$ac_ext
12078     fi
12079 fi
12080 echo "$as_me:12080: result: $ac_cv_sys_largefile_CC" >&5
12081 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12082   if test "$ac_cv_sys_largefile_CC" != no; then
12083     CC=$CC$ac_cv_sys_largefile_CC
12084   fi
12085
12086   echo "$as_me:12086: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12087 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12088 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12089   echo $ECHO_N "(cached) $ECHO_C" >&6
12090 else
12091   while :; do
12092   ac_cv_sys_file_offset_bits=no
12093   cat >conftest.$ac_ext <<_ACEOF
12094 #line 12094 "configure"
12095 #include "confdefs.h"
12096 #include <sys/types.h>
12097  /* Check that off_t can represent 2**63 - 1 correctly.
12098     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12099     since some C++ compilers masquerading as C compilers
12100     incorrectly reject 9223372036854775807.  */
12101 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12102   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12103                        && LARGE_OFF_T % 2147483647 == 1)
12104                       ? 1 : -1];
12105 int
12106 main (void)
12107 {
12108
12109   ;
12110   return 0;
12111 }
12112 _ACEOF
12113 rm -f conftest.$ac_objext
12114 if { (eval echo "$as_me:12114: \"$ac_compile\"") >&5
12115   (eval $ac_compile) 2>&5
12116   ac_status=$?
12117   echo "$as_me:12117: \$? = $ac_status" >&5
12118   (exit $ac_status); } &&
12119          { ac_try='test -s conftest.$ac_objext'
12120   { (eval echo "$as_me:12120: \"$ac_try\"") >&5
12121   (eval $ac_try) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit $ac_status); }; }; then
12125   break
12126 else
12127   echo "$as_me: failed program was:" >&5
12128 cat conftest.$ac_ext >&5
12129 fi
12130 rm -f conftest.$ac_objext conftest.$ac_ext
12131   cat >conftest.$ac_ext <<_ACEOF
12132 #line 12132 "configure"
12133 #include "confdefs.h"
12134 #define _FILE_OFFSET_BITS 64
12135 #include <sys/types.h>
12136  /* Check that off_t can represent 2**63 - 1 correctly.
12137     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12138     since some C++ compilers masquerading as C compilers
12139     incorrectly reject 9223372036854775807.  */
12140 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12141   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12142                        && LARGE_OFF_T % 2147483647 == 1)
12143                       ? 1 : -1];
12144 int
12145 main (void)
12146 {
12147
12148   ;
12149   return 0;
12150 }
12151 _ACEOF
12152 rm -f conftest.$ac_objext
12153 if { (eval echo "$as_me:12153: \"$ac_compile\"") >&5
12154   (eval $ac_compile) 2>&5
12155   ac_status=$?
12156   echo "$as_me:12156: \$? = $ac_status" >&5
12157   (exit $ac_status); } &&
12158          { ac_try='test -s conftest.$ac_objext'
12159   { (eval echo "$as_me:12159: \"$ac_try\"") >&5
12160   (eval $ac_try) 2>&5
12161   ac_status=$?
12162   echo "$as_me:12162: \$? = $ac_status" >&5
12163   (exit $ac_status); }; }; then
12164   ac_cv_sys_file_offset_bits=64; break
12165 else
12166   echo "$as_me: failed program was:" >&5
12167 cat conftest.$ac_ext >&5
12168 fi
12169 rm -f conftest.$ac_objext conftest.$ac_ext
12170   break
12171 done
12172 fi
12173 echo "$as_me:12173: result: $ac_cv_sys_file_offset_bits" >&5
12174 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12175 if test "$ac_cv_sys_file_offset_bits" != no; then
12176
12177 cat >>confdefs.h <<EOF
12178 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12179 EOF
12180
12181 fi
12182 rm -rf conftest*
12183   echo "$as_me:12183: checking for _LARGE_FILES value needed for large files" >&5
12184 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12185 if test "${ac_cv_sys_large_files+set}" = set; then
12186   echo $ECHO_N "(cached) $ECHO_C" >&6
12187 else
12188   while :; do
12189   ac_cv_sys_large_files=no
12190   cat >conftest.$ac_ext <<_ACEOF
12191 #line 12191 "configure"
12192 #include "confdefs.h"
12193 #include <sys/types.h>
12194  /* Check that off_t can represent 2**63 - 1 correctly.
12195     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12196     since some C++ compilers masquerading as C compilers
12197     incorrectly reject 9223372036854775807.  */
12198 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12199   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12200                        && LARGE_OFF_T % 2147483647 == 1)
12201                       ? 1 : -1];
12202 int
12203 main (void)
12204 {
12205
12206   ;
12207   return 0;
12208 }
12209 _ACEOF
12210 rm -f conftest.$ac_objext
12211 if { (eval echo "$as_me:12211: \"$ac_compile\"") >&5
12212   (eval $ac_compile) 2>&5
12213   ac_status=$?
12214   echo "$as_me:12214: \$? = $ac_status" >&5
12215   (exit $ac_status); } &&
12216          { ac_try='test -s conftest.$ac_objext'
12217   { (eval echo "$as_me:12217: \"$ac_try\"") >&5
12218   (eval $ac_try) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); }; }; then
12222   break
12223 else
12224   echo "$as_me: failed program was:" >&5
12225 cat conftest.$ac_ext >&5
12226 fi
12227 rm -f conftest.$ac_objext conftest.$ac_ext
12228   cat >conftest.$ac_ext <<_ACEOF
12229 #line 12229 "configure"
12230 #include "confdefs.h"
12231 #define _LARGE_FILES 1
12232 #include <sys/types.h>
12233  /* Check that off_t can represent 2**63 - 1 correctly.
12234     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12235     since some C++ compilers masquerading as C compilers
12236     incorrectly reject 9223372036854775807.  */
12237 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12238   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12239                        && LARGE_OFF_T % 2147483647 == 1)
12240                       ? 1 : -1];
12241 int
12242 main (void)
12243 {
12244
12245   ;
12246   return 0;
12247 }
12248 _ACEOF
12249 rm -f conftest.$ac_objext
12250 if { (eval echo "$as_me:12250: \"$ac_compile\"") >&5
12251   (eval $ac_compile) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); } &&
12255          { ac_try='test -s conftest.$ac_objext'
12256   { (eval echo "$as_me:12256: \"$ac_try\"") >&5
12257   (eval $ac_try) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit $ac_status); }; }; then
12261   ac_cv_sys_large_files=1; break
12262 else
12263   echo "$as_me: failed program was:" >&5
12264 cat conftest.$ac_ext >&5
12265 fi
12266 rm -f conftest.$ac_objext conftest.$ac_ext
12267   break
12268 done
12269 fi
12270 echo "$as_me:12270: result: $ac_cv_sys_large_files" >&5
12271 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12272 if test "$ac_cv_sys_large_files" != no; then
12273
12274 cat >>confdefs.h <<EOF
12275 #define _LARGE_FILES $ac_cv_sys_large_files
12276 EOF
12277
12278 fi
12279 rm -rf conftest*
12280 fi
12281
12282         if test "$enable_largefile" != no ; then
12283         echo "$as_me:12283: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12284 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12285 if test "${ac_cv_sys_largefile_source+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288   while :; do
12289   ac_cv_sys_largefile_source=no
12290   cat >conftest.$ac_ext <<_ACEOF
12291 #line 12291 "configure"
12292 #include "confdefs.h"
12293 #include <stdio.h>
12294 int
12295 main (void)
12296 {
12297 return !fseeko;
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f conftest.$ac_objext
12303 if { (eval echo "$as_me:12303: \"$ac_compile\"") >&5
12304   (eval $ac_compile) 2>&5
12305   ac_status=$?
12306   echo "$as_me:12306: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -s conftest.$ac_objext'
12309   { (eval echo "$as_me:12309: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit $ac_status); }; }; then
12314   break
12315 else
12316   echo "$as_me: failed program was:" >&5
12317 cat conftest.$ac_ext >&5
12318 fi
12319 rm -f conftest.$ac_objext conftest.$ac_ext
12320   cat >conftest.$ac_ext <<_ACEOF
12321 #line 12321 "configure"
12322 #include "confdefs.h"
12323 #define _LARGEFILE_SOURCE 1
12324 #include <stdio.h>
12325 int
12326 main (void)
12327 {
12328 return !fseeko;
12329   ;
12330   return 0;
12331 }
12332 _ACEOF
12333 rm -f conftest.$ac_objext
12334 if { (eval echo "$as_me:12334: \"$ac_compile\"") >&5
12335   (eval $ac_compile) 2>&5
12336   ac_status=$?
12337   echo "$as_me:12337: \$? = $ac_status" >&5
12338   (exit $ac_status); } &&
12339          { ac_try='test -s conftest.$ac_objext'
12340   { (eval echo "$as_me:12340: \"$ac_try\"") >&5
12341   (eval $ac_try) 2>&5
12342   ac_status=$?
12343   echo "$as_me:12343: \$? = $ac_status" >&5
12344   (exit $ac_status); }; }; then
12345   ac_cv_sys_largefile_source=1; break
12346 else
12347   echo "$as_me: failed program was:" >&5
12348 cat conftest.$ac_ext >&5
12349 fi
12350 rm -f conftest.$ac_objext conftest.$ac_ext
12351   break
12352 done
12353 fi
12354 echo "$as_me:12354: result: $ac_cv_sys_largefile_source" >&5
12355 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12356 if test "$ac_cv_sys_largefile_source" != no; then
12357
12358 cat >>confdefs.h <<EOF
12359 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12360 EOF
12361
12362 fi
12363 rm -rf conftest*
12364
12365 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12366 # in glibc 2.1.3, but that breaks too many other things.
12367 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12368 echo "$as_me:12368: checking for fseeko" >&5
12369 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12370 if test "${ac_cv_func_fseeko+set}" = set; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373   cat >conftest.$ac_ext <<_ACEOF
12374 #line 12374 "configure"
12375 #include "confdefs.h"
12376 #include <stdio.h>
12377 int
12378 main (void)
12379 {
12380 return fseeko && fseeko (stdin, 0, 0);
12381   ;
12382   return 0;
12383 }
12384 _ACEOF
12385 rm -f conftest.$ac_objext conftest$ac_exeext
12386 if { (eval echo "$as_me:12386: \"$ac_link\"") >&5
12387   (eval $ac_link) 2>&5
12388   ac_status=$?
12389   echo "$as_me:12389: \$? = $ac_status" >&5
12390   (exit $ac_status); } &&
12391          { ac_try='test -s conftest$ac_exeext'
12392   { (eval echo "$as_me:12392: \"$ac_try\"") >&5
12393   (eval $ac_try) 2>&5
12394   ac_status=$?
12395   echo "$as_me:12395: \$? = $ac_status" >&5
12396   (exit $ac_status); }; }; then
12397   ac_cv_func_fseeko=yes
12398 else
12399   echo "$as_me: failed program was:" >&5
12400 cat conftest.$ac_ext >&5
12401 ac_cv_func_fseeko=no
12402 fi
12403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12404 fi
12405 echo "$as_me:12405: result: $ac_cv_func_fseeko" >&5
12406 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12407 if test $ac_cv_func_fseeko = yes; then
12408
12409 cat >>confdefs.h <<\EOF
12410 #define HAVE_FSEEKO 1
12411 EOF
12412
12413 fi
12414
12415         # Normally we would collect these definitions in the config.h,
12416         # but (like _XOPEN_SOURCE), some environments rely on having these
12417         # defined before any of the system headers are included.  Another
12418         # case comes up with C++, e.g., on AIX the compiler compiles the
12419         # header files by themselves before looking at the body files it is
12420         # told to compile.  For ncurses, those header files do not include
12421         # the config.h
12422         if test "$ac_cv_sys_large_files" != no
12423         then
12424
12425         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12426         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12427
12428         fi
12429         if test "$ac_cv_sys_largefile_source" != no
12430         then
12431
12432         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12433         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12434
12435         fi
12436         if test "$ac_cv_sys_file_offset_bits" != no
12437         then
12438
12439         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12440         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12441
12442         fi
12443
12444         echo "$as_me:12444: checking whether to use struct dirent64" >&5
12445 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12446 if test "${cf_cv_struct_dirent64+set}" = set; then
12447   echo $ECHO_N "(cached) $ECHO_C" >&6
12448 else
12449
12450                 cat >conftest.$ac_ext <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453
12454 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12455 #include <sys/types.h>
12456 #include <dirent.h>
12457
12458 int
12459 main (void)
12460 {
12461
12462                 /* if transitional largefile support is setup, this is true */
12463                 extern struct dirent64 * readdir(DIR *);
12464                 struct dirent64 *x = readdir((DIR *)0);
12465                 struct dirent *y = readdir((DIR *)0);
12466                 int z = x - y;
12467
12468   ;
12469   return 0;
12470 }
12471 _ACEOF
12472 rm -f conftest.$ac_objext
12473 if { (eval echo "$as_me:12473: \"$ac_compile\"") >&5
12474   (eval $ac_compile) 2>&5
12475   ac_status=$?
12476   echo "$as_me:12476: \$? = $ac_status" >&5
12477   (exit $ac_status); } &&
12478          { ac_try='test -s conftest.$ac_objext'
12479   { (eval echo "$as_me:12479: \"$ac_try\"") >&5
12480   (eval $ac_try) 2>&5
12481   ac_status=$?
12482   echo "$as_me:12482: \$? = $ac_status" >&5
12483   (exit $ac_status); }; }; then
12484   cf_cv_struct_dirent64=yes
12485 else
12486   echo "$as_me: failed program was:" >&5
12487 cat conftest.$ac_ext >&5
12488 cf_cv_struct_dirent64=no
12489 fi
12490 rm -f conftest.$ac_objext conftest.$ac_ext
12491
12492 fi
12493 echo "$as_me:12493: result: $cf_cv_struct_dirent64" >&5
12494 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12495         test "$cf_cv_struct_dirent64" = yes &&
12496 cat >>confdefs.h <<\EOF
12497 #define HAVE_STRUCT_DIRENT64 1
12498 EOF
12499
12500         fi
12501
12502 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12503 echo "$as_me:12503: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12504 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12505
12506 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12507 if test "${enable_tparm_varargs+set}" = set; then
12508   enableval="$enable_tparm_varargs"
12509   with_tparm_varargs=$enableval
12510 else
12511   with_tparm_varargs=yes
12512 fi;
12513 echo "$as_me:12513: result: $with_tparm_varargs" >&5
12514 echo "${ECHO_T}$with_tparm_varargs" >&6
12515 NCURSES_TPARM_VARARGS=0
12516 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12517
12518 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12519 if test "$with_ticlib" != no ; then
12520 echo "$as_me:12520: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12521 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12522
12523 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12524 if test "${enable_tic_depends+set}" = set; then
12525   enableval="$enable_tic_depends"
12526   with_tic_depends=$enableval
12527 else
12528   with_tic_depends=yes
12529 fi;
12530 echo "$as_me:12530: result: $with_tic_depends" >&5
12531 echo "${ECHO_T}$with_tic_depends" >&6
12532 else
12533         with_tic_depends=no
12534 fi
12535
12536 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12537 echo "$as_me:12537: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12538 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12539
12540 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12541 if test "${enable_wattr_macros+set}" = set; then
12542   enableval="$enable_wattr_macros"
12543   with_wattr_macros=$enableval
12544 else
12545   with_wattr_macros=yes
12546 fi;
12547 if [ "x$with_wattr_macros" != xyes ]; then
12548         NCURSES_WATTR_MACROS=0
12549         echo "$as_me:12549: result: yes" >&5
12550 echo "${ECHO_T}yes" >&6
12551 else
12552         NCURSES_WATTR_MACROS=1
12553         echo "$as_me:12553: result: no" >&5
12554 echo "${ECHO_T}no" >&6
12555 fi
12556
12557 echo "$as_me:12557: checking for X11 rgb file" >&5
12558 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12559
12560 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12561 if test "${with_x11_rgb+set}" = set; then
12562   withval="$with_x11_rgb"
12563   RGB_PATH=$withval
12564 else
12565   RGB_PATH=auto
12566 fi;
12567
12568 if test "x$RGB_PATH" = xauto
12569 then
12570         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12571         for cf_path in \
12572                 /opt/local/share/X11/rgb.txt \
12573                 /opt/X11/share/X11/rgb.txt \
12574                 /usr/share/X11/rgb.txt \
12575                 /usr/X11/share/X11/rgb.txt \
12576                 /usr/X11/lib/X11/rgb.txt \
12577                 /usr/lib/X11/rgb.txt \
12578                 /etc/X11/rgb.txt \
12579                 /usr/pkg/lib/X11/rgb.txt \
12580                 /usr/X11R7/lib/X11/rgb.txt \
12581                 /usr/X11R6/lib/X11/rgb.txt \
12582                 /usr/X11R5/lib/X11/rgb.txt \
12583                 /usr/X11R4/lib/X11/rgb.txt \
12584                 /usr/local/lib/X11/rgb.txt \
12585                 /usr/local/share/X11/rgb.txt \
12586                 /usr/lib64/X11/rgb.txt
12587         do
12588                 if test -f "$cf_path" ; then
12589                         RGB_PATH="$cf_path"
12590                         break
12591                 fi
12592         done
12593 else
12594         cf_path=$RGB_PATH
12595
12596 if test "x$prefix" != xNONE; then
12597         cf_path_syntax="$prefix"
12598 else
12599         cf_path_syntax="$ac_default_prefix"
12600 fi
12601
12602 case ".$cf_path" in
12603 (.\$\(*\)*|.\'*\'*)
12604         ;;
12605 (..|./*|.\\*)
12606         ;;
12607 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12608         ;;
12609 (.\${*prefix}*|.\${*dir}*)
12610         eval cf_path="$cf_path"
12611         case ".$cf_path" in
12612         (.NONE/*)
12613                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12614                 ;;
12615         esac
12616         ;;
12617 (.no|.NONE/*)
12618         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12619         ;;
12620 (*)
12621         { { echo "$as_me:12621: error: expected a pathname, not \"$cf_path\"" >&5
12622 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12623    { (exit 1); exit 1; }; }
12624         ;;
12625 esac
12626
12627 fi
12628
12629 echo "$as_me:12629: result: $RGB_PATH" >&5
12630 echo "${ECHO_T}$RGB_PATH" >&6
12631
12632 cat >>confdefs.h <<EOF
12633 #define RGB_PATH "$cf_path"
12634 EOF
12635
12636 no_x11_rgb=
12637 if test "$RGB_PATH" = no
12638 then
12639         no_x11_rgb="#"
12640 fi
12641
12642 ###   use option --with-bool to override bool's type
12643 echo "$as_me:12643: checking for type of bool" >&5
12644 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12645
12646 # Check whether --with-bool or --without-bool was given.
12647 if test "${with_bool+set}" = set; then
12648   withval="$with_bool"
12649   NCURSES_BOOL="$withval"
12650 else
12651   NCURSES_BOOL=auto
12652 fi;
12653 echo "$as_me:12653: result: $NCURSES_BOOL" >&5
12654 echo "${ECHO_T}$NCURSES_BOOL" >&6
12655
12656 echo "$as_me:12656: checking for alternate terminal capabilities file" >&5
12657 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12658
12659 # Check whether --with-caps or --without-caps was given.
12660 if test "${with_caps+set}" = set; then
12661   withval="$with_caps"
12662   TERMINFO_CAPS=Caps.$withval
12663 else
12664   TERMINFO_CAPS=Caps
12665 fi;
12666 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12667 echo "$as_me:12667: result: $TERMINFO_CAPS" >&5
12668 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12669
12670 ###   use option --with-chtype to override chtype's type
12671 echo "$as_me:12671: checking for type of chtype" >&5
12672 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12673
12674 # Check whether --with-chtype or --without-chtype was given.
12675 if test "${with_chtype+set}" = set; then
12676   withval="$with_chtype"
12677   NCURSES_CHTYPE="$withval"
12678 else
12679   NCURSES_CHTYPE=$cf_dft_chtype
12680 fi;
12681 echo "$as_me:12681: result: $NCURSES_CHTYPE" >&5
12682 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12683
12684 ###   use option --with-ospeed to override ospeed's type
12685 echo "$as_me:12685: checking for type of ospeed" >&5
12686 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12687
12688 # Check whether --with-ospeed or --without-ospeed was given.
12689 if test "${with_ospeed+set}" = set; then
12690   withval="$with_ospeed"
12691   NCURSES_OSPEED="$withval"
12692 else
12693   NCURSES_OSPEED=short
12694 fi;
12695 echo "$as_me:12695: result: $NCURSES_OSPEED" >&5
12696 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12697
12698 ###   use option --with-mmask-t to override mmask_t's type
12699 echo "$as_me:12699: checking for type of mmask_t" >&5
12700 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12701
12702 # Check whether --with-mmask-t or --without-mmask-t was given.
12703 if test "${with_mmask_t+set}" = set; then
12704   withval="$with_mmask_t"
12705   NCURSES_MMASK_T="$withval"
12706 else
12707   NCURSES_MMASK_T=$cf_dft_mmask_t
12708 fi;
12709 echo "$as_me:12709: result: $NCURSES_MMASK_T" >&5
12710 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12711
12712 ###   use option --with-ccharw-max to override CCHARW_MAX size
12713 echo "$as_me:12713: checking for size CCHARW_MAX" >&5
12714 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12715
12716 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12717 if test "${with_ccharw_max+set}" = set; then
12718   withval="$with_ccharw_max"
12719   NCURSES_CCHARW_MAX="$withval"
12720 else
12721   NCURSES_CCHARW_MAX=5
12722 fi;
12723 echo "$as_me:12723: result: $NCURSES_CCHARW_MAX" >&5
12724 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12725
12726 echo "$as_me:12726: checking for ANSI C header files" >&5
12727 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12728 if test "${ac_cv_header_stdc+set}" = set; then
12729   echo $ECHO_N "(cached) $ECHO_C" >&6
12730 else
12731   cat >conftest.$ac_ext <<_ACEOF
12732 #line 12732 "configure"
12733 #include "confdefs.h"
12734 #include <stdlib.h>
12735 #include <stdarg.h>
12736 #include <string.h>
12737 #include <float.h>
12738
12739 _ACEOF
12740 if { (eval echo "$as_me:12740: \"$ac_cpp conftest.$ac_ext\"") >&5
12741   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12742   ac_status=$?
12743   egrep -v '^ *\+' conftest.er1 >conftest.err
12744   rm -f conftest.er1
12745   cat conftest.err >&5
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); } >/dev/null; then
12748   if test -s conftest.err; then
12749     ac_cpp_err=$ac_c_preproc_warn_flag
12750   else
12751     ac_cpp_err=
12752   fi
12753 else
12754   ac_cpp_err=yes
12755 fi
12756 if test -z "$ac_cpp_err"; then
12757   ac_cv_header_stdc=yes
12758 else
12759   echo "$as_me: failed program was:" >&5
12760   cat conftest.$ac_ext >&5
12761   ac_cv_header_stdc=no
12762 fi
12763 rm -f conftest.err conftest.$ac_ext
12764
12765 if test $ac_cv_header_stdc = yes; then
12766   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12767   cat >conftest.$ac_ext <<_ACEOF
12768 #line 12768 "configure"
12769 #include "confdefs.h"
12770 #include <string.h>
12771
12772 _ACEOF
12773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12774   egrep "memchr" >/dev/null 2>&1; then
12775   :
12776 else
12777   ac_cv_header_stdc=no
12778 fi
12779 rm -rf conftest*
12780
12781 fi
12782
12783 if test $ac_cv_header_stdc = yes; then
12784   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12785   cat >conftest.$ac_ext <<_ACEOF
12786 #line 12786 "configure"
12787 #include "confdefs.h"
12788 #include <stdlib.h>
12789
12790 _ACEOF
12791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12792   egrep "free" >/dev/null 2>&1; then
12793   :
12794 else
12795   ac_cv_header_stdc=no
12796 fi
12797 rm -rf conftest*
12798
12799 fi
12800
12801 if test $ac_cv_header_stdc = yes; then
12802   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12803   if test "$cross_compiling" = yes; then
12804   :
12805 else
12806   cat >conftest.$ac_ext <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809 #include <ctype.h>
12810 #if ((' ' & 0x0FF) == 0x020)
12811 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12812 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12813 #else
12814 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12815                      || ('j' <= (c) && (c) <= 'r') \
12816                      || ('s' <= (c) && (c) <= 'z'))
12817 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12818 #endif
12819
12820 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12821 int
12822 main (void)
12823 {
12824   int i;
12825   for (i = 0; i < 256; i++)
12826     if (XOR (islower (i), ISLOWER (i))
12827         || toupper (i) != TOUPPER (i))
12828       $ac_main_return(2);
12829   $ac_main_return (0);
12830 }
12831 _ACEOF
12832 rm -f conftest$ac_exeext
12833 if { (eval echo "$as_me:12833: \"$ac_link\"") >&5
12834   (eval $ac_link) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12838   { (eval echo "$as_me:12838: \"$ac_try\"") >&5
12839   (eval $ac_try) 2>&5
12840   ac_status=$?
12841   echo "$as_me:12841: \$? = $ac_status" >&5
12842   (exit $ac_status); }; }; then
12843   :
12844 else
12845   echo "$as_me: program exited with status $ac_status" >&5
12846 echo "$as_me: failed program was:" >&5
12847 cat conftest.$ac_ext >&5
12848 ac_cv_header_stdc=no
12849 fi
12850 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12851 fi
12852 fi
12853 fi
12854 echo "$as_me:12854: result: $ac_cv_header_stdc" >&5
12855 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12856 if test $ac_cv_header_stdc = yes; then
12857
12858 cat >>confdefs.h <<\EOF
12859 #define STDC_HEADERS 1
12860 EOF
12861
12862 fi
12863
12864 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12865
12866 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12867                   inttypes.h stdint.h unistd.h
12868 do
12869 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12870 echo "$as_me:12870: checking for $ac_header" >&5
12871 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12872 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12873   echo $ECHO_N "(cached) $ECHO_C" >&6
12874 else
12875   cat >conftest.$ac_ext <<_ACEOF
12876 #line 12876 "configure"
12877 #include "confdefs.h"
12878 $ac_includes_default
12879 #include <$ac_header>
12880 _ACEOF
12881 rm -f conftest.$ac_objext
12882 if { (eval echo "$as_me:12882: \"$ac_compile\"") >&5
12883   (eval $ac_compile) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest.$ac_objext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   eval "$as_ac_Header=yes"
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 eval "$as_ac_Header=no"
12898 fi
12899 rm -f conftest.$ac_objext conftest.$ac_ext
12900 fi
12901 echo "$as_me:12901: result: `eval echo '${'$as_ac_Header'}'`" >&5
12902 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12903 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12904   cat >>confdefs.h <<EOF
12905 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12906 EOF
12907
12908 fi
12909 done
12910
12911 echo "$as_me:12911: checking for signed char" >&5
12912 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12913 if test "${ac_cv_type_signed_char+set}" = set; then
12914   echo $ECHO_N "(cached) $ECHO_C" >&6
12915 else
12916   cat >conftest.$ac_ext <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12919 $ac_includes_default
12920 int
12921 main (void)
12922 {
12923 if ((signed char *) 0)
12924   return 0;
12925 if (sizeof (signed char))
12926   return 0;
12927   ;
12928   return 0;
12929 }
12930 _ACEOF
12931 rm -f conftest.$ac_objext
12932 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933   (eval $ac_compile) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); } &&
12937          { ac_try='test -s conftest.$ac_objext'
12938   { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939   (eval $ac_try) 2>&5
12940   ac_status=$?
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit $ac_status); }; }; then
12943   ac_cv_type_signed_char=yes
12944 else
12945   echo "$as_me: failed program was:" >&5
12946 cat conftest.$ac_ext >&5
12947 ac_cv_type_signed_char=no
12948 fi
12949 rm -f conftest.$ac_objext conftest.$ac_ext
12950 fi
12951 echo "$as_me:12951: result: $ac_cv_type_signed_char" >&5
12952 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12953
12954 echo "$as_me:12954: checking size of signed char" >&5
12955 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12956 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12957   echo $ECHO_N "(cached) $ECHO_C" >&6
12958 else
12959   if test "$ac_cv_type_signed_char" = yes; then
12960   if test "$cross_compiling" = yes; then
12961   # Depending upon the size, compute the lo and hi bounds.
12962 cat >conftest.$ac_ext <<_ACEOF
12963 #line 12963 "configure"
12964 #include "confdefs.h"
12965 $ac_includes_default
12966 int
12967 main (void)
12968 {
12969 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   ac_lo=0 ac_mid=0
12987   while :; do
12988     cat >conftest.$ac_ext <<_ACEOF
12989 #line 12989 "configure"
12990 #include "confdefs.h"
12991 $ac_includes_default
12992 int
12993 main (void)
12994 {
12995 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12996   ;
12997   return 0;
12998 }
12999 _ACEOF
13000 rm -f conftest.$ac_objext
13001 if { (eval echo "$as_me:13001: \"$ac_compile\"") >&5
13002   (eval $ac_compile) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); } &&
13006          { ac_try='test -s conftest.$ac_objext'
13007   { (eval echo "$as_me:13007: \"$ac_try\"") >&5
13008   (eval $ac_try) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit $ac_status); }; }; then
13012   ac_hi=$ac_mid; break
13013 else
13014   echo "$as_me: failed program was:" >&5
13015 cat conftest.$ac_ext >&5
13016 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13017 fi
13018 rm -f conftest.$ac_objext conftest.$ac_ext
13019   done
13020 else
13021   echo "$as_me: failed program was:" >&5
13022 cat conftest.$ac_ext >&5
13023 ac_hi=-1 ac_mid=-1
13024   while :; do
13025     cat >conftest.$ac_ext <<_ACEOF
13026 #line 13026 "configure"
13027 #include "confdefs.h"
13028 $ac_includes_default
13029 int
13030 main (void)
13031 {
13032 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13033   ;
13034   return 0;
13035 }
13036 _ACEOF
13037 rm -f conftest.$ac_objext
13038 if { (eval echo "$as_me:13038: \"$ac_compile\"") >&5
13039   (eval $ac_compile) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); } &&
13043          { ac_try='test -s conftest.$ac_objext'
13044   { (eval echo "$as_me:13044: \"$ac_try\"") >&5
13045   (eval $ac_try) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); }; }; then
13049   ac_lo=$ac_mid; break
13050 else
13051   echo "$as_me: failed program was:" >&5
13052 cat conftest.$ac_ext >&5
13053 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13054 fi
13055 rm -f conftest.$ac_objext conftest.$ac_ext
13056   done
13057 fi
13058 rm -f conftest.$ac_objext conftest.$ac_ext
13059 # Binary search between lo and hi bounds.
13060 while test "x$ac_lo" != "x$ac_hi"; do
13061   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13062   cat >conftest.$ac_ext <<_ACEOF
13063 #line 13063 "configure"
13064 #include "confdefs.h"
13065 $ac_includes_default
13066 int
13067 main (void)
13068 {
13069 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13070   ;
13071   return 0;
13072 }
13073 _ACEOF
13074 rm -f conftest.$ac_objext
13075 if { (eval echo "$as_me:13075: \"$ac_compile\"") >&5
13076   (eval $ac_compile) 2>&5
13077   ac_status=$?
13078   echo "$as_me:13078: \$? = $ac_status" >&5
13079   (exit $ac_status); } &&
13080          { ac_try='test -s conftest.$ac_objext'
13081   { (eval echo "$as_me:13081: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:13084: \$? = $ac_status" >&5
13085   (exit $ac_status); }; }; then
13086   ac_hi=$ac_mid
13087 else
13088   echo "$as_me: failed program was:" >&5
13089 cat conftest.$ac_ext >&5
13090 ac_lo=`expr $ac_mid + 1`
13091 fi
13092 rm -f conftest.$ac_objext conftest.$ac_ext
13093 done
13094 ac_cv_sizeof_signed_char=$ac_lo
13095 else
13096   if test "$cross_compiling" = yes; then
13097   { { echo "$as_me:13097: error: cannot run test program while cross compiling" >&5
13098 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13099    { (exit 1); exit 1; }; }
13100 else
13101   cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104 $ac_includes_default
13105 int
13106 main (void)
13107 {
13108 FILE *f = fopen ("conftest.val", "w");
13109 if (!f)
13110   $ac_main_return (1);
13111 fprintf (f, "%d", (sizeof (signed char)));
13112 fclose (f);
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 rm -f conftest$ac_exeext
13118 if { (eval echo "$as_me:13118: \"$ac_link\"") >&5
13119   (eval $ac_link) 2>&5
13120   ac_status=$?
13121   echo "$as_me:13121: \$? = $ac_status" >&5
13122   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13123   { (eval echo "$as_me:13123: \"$ac_try\"") >&5
13124   (eval $ac_try) 2>&5
13125   ac_status=$?
13126   echo "$as_me:13126: \$? = $ac_status" >&5
13127   (exit $ac_status); }; }; then
13128   ac_cv_sizeof_signed_char=`cat conftest.val`
13129 else
13130   echo "$as_me: program exited with status $ac_status" >&5
13131 echo "$as_me: failed program was:" >&5
13132 cat conftest.$ac_ext >&5
13133 fi
13134 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13135 fi
13136 fi
13137 rm -f conftest.val
13138 else
13139   ac_cv_sizeof_signed_char=0
13140 fi
13141 fi
13142 echo "$as_me:13142: result: $ac_cv_sizeof_signed_char" >&5
13143 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13144 cat >>confdefs.h <<EOF
13145 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13146 EOF
13147
13148 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13149         NCURSES_SBOOL="signed char"
13150 else
13151         NCURSES_SBOOL="char"
13152 fi
13153 echo "$as_me:13153: checking if you want to use signed Boolean array in term.h" >&5
13154 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13155
13156 # Check whether --enable-signed-char or --disable-signed-char was given.
13157 if test "${enable_signed_char+set}" = set; then
13158   enableval="$enable_signed_char"
13159   with_signed_char=$enableval
13160 else
13161   with_signed_char=no
13162 fi;
13163 echo "$as_me:13163: result: $with_signed_char" >&5
13164 echo "${ECHO_T}$with_signed_char" >&6
13165 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13166
13167 ###   use option --with-tparm-arg to override tparm's argument type
13168 echo "$as_me:13168: checking for type of tparm args" >&5
13169 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13170
13171 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13172 if test "${with_tparm_arg+set}" = set; then
13173   withval="$with_tparm_arg"
13174   NCURSES_TPARM_ARG="$withval"
13175 else
13176   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13177 fi;
13178 echo "$as_me:13178: result: $NCURSES_TPARM_ARG" >&5
13179 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13180
13181 ### Enable compiling-in rcs id's
13182 echo "$as_me:13182: checking if RCS identifiers should be compiled-in" >&5
13183 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13184
13185 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13186 if test "${with_rcs_ids+set}" = set; then
13187   withval="$with_rcs_ids"
13188   with_rcs_ids=$withval
13189 else
13190   with_rcs_ids=no
13191 fi;
13192 echo "$as_me:13192: result: $with_rcs_ids" >&5
13193 echo "${ECHO_T}$with_rcs_ids" >&6
13194 test "x$with_rcs_ids" = xyes &&
13195 cat >>confdefs.h <<\EOF
13196 #define USE_RCS_IDS 1
13197 EOF
13198
13199 ###############################################################################
13200
13201 echo "$as_me:13201: checking format of man-pages" >&5
13202 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13203
13204 # Check whether --with-manpage-format or --without-manpage-format was given.
13205 if test "${with_manpage_format+set}" = set; then
13206   withval="$with_manpage_format"
13207   MANPAGE_FORMAT=$withval
13208 else
13209   MANPAGE_FORMAT=unknown
13210 fi;
13211
13212 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13213 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13214
13215 cf_unknown=
13216
13217 case $MANPAGE_FORMAT in
13218 (unknown)
13219         if test -z "$MANPATH" ; then
13220                 MANPATH="/usr/man:/usr/share/man"
13221         fi
13222
13223         # look for the 'date' man-page (it's most likely to be installed!)
13224         MANPAGE_FORMAT=
13225         cf_preform=no
13226         cf_catonly=yes
13227         cf_example=date
13228
13229         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13230         for cf_dir in $MANPATH; do
13231                 test -z "$cf_dir" && cf_dir=/usr/man
13232                 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
13233                 do
13234                         cf_test=`echo $cf_name | sed -e 's/*//'`
13235                         if test "x$cf_test" = "x$cf_name" ; then
13236
13237                                 case "$cf_name" in
13238                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13239                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13240                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13241                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13242                                 esac
13243
13244                                 case "$cf_name" in
13245                                 ($cf_dir/man*)
13246                                         cf_catonly=no
13247                                         ;;
13248                                 ($cf_dir/cat*)
13249                                         cf_preform=yes
13250                                         ;;
13251                                 esac
13252                                 break
13253                         fi
13254
13255                         # if we found a match in either man* or cat*, stop looking
13256                         if test -n "$MANPAGE_FORMAT" ; then
13257                                 cf_found=no
13258                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13259                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13260                                 case "$cf_name" in
13261                                 ($cf_dir/cat*)
13262                                         cf_found=yes
13263                                         ;;
13264                                 esac
13265                                 test $cf_found=yes && break
13266                         fi
13267                 done
13268                 # only check the first directory in $MANPATH where we find manpages
13269                 if test -n "$MANPAGE_FORMAT" ; then
13270                         break
13271                 fi
13272         done
13273         # if we did not find the example, just assume it is normal
13274         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13275         IFS="$ac_save_ifs"
13276         ;;
13277 (*)
13278         for cf_option in $MANPAGE_FORMAT; do
13279         case $cf_option in
13280         (gzip|compress|BSDI|normal|formatted|catonly)
13281                 ;;
13282         (*)
13283                 cf_unknown="$cf_unknown $cf_option"
13284                 ;;
13285         esac
13286         done
13287         ;;
13288 esac
13289
13290 echo "$as_me:13290: result: $MANPAGE_FORMAT" >&5
13291 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13292 if test -n "$cf_unknown" ; then
13293         { echo "$as_me:13293: WARNING: Unexpected manpage-format $cf_unknown" >&5
13294 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13295 fi
13296
13297 echo "$as_me:13297: checking for manpage renaming" >&5
13298 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13299
13300 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13301 if test "${with_manpage_renames+set}" = set; then
13302   withval="$with_manpage_renames"
13303   MANPAGE_RENAMES=$withval
13304 else
13305   MANPAGE_RENAMES=yes
13306 fi;
13307
13308 case ".$MANPAGE_RENAMES" in
13309 (.no)
13310         ;;
13311 (.|.yes)
13312         # Debian 'man' program?
13313         if test -f /etc/debian_version ; then
13314                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13315         else
13316                 MANPAGE_RENAMES=no
13317         fi
13318         ;;
13319 esac
13320
13321 if test "$MANPAGE_RENAMES" != no ; then
13322         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13323                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13324         elif test ! -f $MANPAGE_RENAMES ; then
13325                 { { echo "$as_me:13325: error: not a filename: $MANPAGE_RENAMES" >&5
13326 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13327    { (exit 1); exit 1; }; }
13328         fi
13329
13330         test ! -d man && mkdir man
13331
13332         # Construct a sed-script to perform renaming within man-pages
13333         if test -n "$MANPAGE_RENAMES" ; then
13334                 test ! -d man && mkdir man
13335                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13336         fi
13337 fi
13338
13339 echo "$as_me:13339: result: $MANPAGE_RENAMES" >&5
13340 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13341
13342 echo "$as_me:13342: checking if manpage aliases will be installed" >&5
13343 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13344
13345 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13346 if test "${with_manpage_aliases+set}" = set; then
13347   withval="$with_manpage_aliases"
13348   MANPAGE_ALIASES=$withval
13349 else
13350   MANPAGE_ALIASES=yes
13351 fi;
13352
13353 echo "$as_me:13353: result: $MANPAGE_ALIASES" >&5
13354 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13355
13356 case "x$LN_S" in
13357 (xln*)
13358         cf_use_symlinks=yes
13359         ;;
13360 (*)
13361         cf_use_symlinks=no
13362         ;;
13363 esac
13364
13365 MANPAGE_SYMLINKS=no
13366 if test "$MANPAGE_ALIASES" = yes ; then
13367 echo "$as_me:13367: checking if manpage symlinks should be used" >&5
13368 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13369
13370 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13371 if test "${with_manpage_symlinks+set}" = set; then
13372   withval="$with_manpage_symlinks"
13373   MANPAGE_SYMLINKS=$withval
13374 else
13375   MANPAGE_SYMLINKS=$cf_use_symlinks
13376 fi;
13377
13378 if test "$$cf_use_symlinks" = no; then
13379 if test "$MANPAGE_SYMLINKS" = yes ; then
13380         { echo "$as_me:13380: WARNING: cannot make symlinks" >&5
13381 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13382         MANPAGE_SYMLINKS=no
13383 fi
13384 fi
13385
13386 echo "$as_me:13386: result: $MANPAGE_SYMLINKS" >&5
13387 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13388 fi
13389
13390 echo "$as_me:13390: checking for manpage tbl" >&5
13391 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13392
13393 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13394 if test "${with_manpage_tbl+set}" = set; then
13395   withval="$with_manpage_tbl"
13396   MANPAGE_TBL=$withval
13397 else
13398   MANPAGE_TBL=no
13399 fi;
13400
13401 echo "$as_me:13401: result: $MANPAGE_TBL" >&5
13402 echo "${ECHO_T}$MANPAGE_TBL" >&6
13403
13404 if test "$prefix" = "NONE" ; then
13405         cf_prefix="$ac_default_prefix"
13406 else
13407         cf_prefix="$prefix"
13408 fi
13409
13410 case "$MANPAGE_FORMAT" in
13411 (*catonly*)
13412         cf_format=yes
13413         cf_inboth=no
13414         ;;
13415 (*formatted*)
13416         cf_format=yes
13417         cf_inboth=yes
13418         ;;
13419 (*)
13420         cf_format=no
13421         cf_inboth=no
13422         ;;
13423 esac
13424
13425 test ! -d man && mkdir man
13426
13427 cf_so_strip=
13428 cf_compress=
13429 case "$MANPAGE_FORMAT" in
13430 (*compress*)
13431         cf_so_strip="Z"
13432         cf_compress=compress
13433         ;;
13434 (*gzip*)
13435         cf_so_strip="gz"
13436         cf_compress=gzip
13437         ;;
13438 esac
13439
13440 cf_edit_man=./edit_man.sh
13441 cf_man_alias=`pwd`/man_alias.sed
13442
13443 cat >$cf_edit_man <<CF_EOF
13444 #! $SHELL
13445 # this script is generated by the configure-script CF_MAN_PAGES macro.
13446
13447 prefix="$cf_prefix"
13448 datarootdir="$datarootdir"
13449 datadir="$datadir"
13450
13451 NCURSES_MAJOR="$NCURSES_MAJOR"
13452 NCURSES_MINOR="$NCURSES_MINOR"
13453 NCURSES_PATCH="$NCURSES_PATCH"
13454
13455 NCURSES_OSPEED="$NCURSES_OSPEED"
13456 TERMINFO="$TERMINFO"
13457
13458 INSTALL="$INSTALL"
13459 INSTALL_DATA="$INSTALL_DATA"
13460
13461 transform="$program_transform_name"
13462
13463 TMP=\${TMPDIR:=/tmp}/man\$\$
13464 trap "rm -f \$TMP" 0 1 2 3 15
13465
13466 form=\$1
13467 shift || exit 1
13468
13469 verb=\$1
13470 shift || exit 1
13471
13472 mandir=\$1
13473 shift || exit 1
13474
13475 srcdir=\$1
13476 top_srcdir=\$srcdir/..
13477 shift || exit 1
13478
13479 if test "\$form" = normal ; then
13480         if test "$cf_format" = yes ; then
13481         if test "$cf_inboth" = no ; then
13482                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13483                 exit $?
13484         fi
13485         fi
13486         cf_subdir=\$mandir/man
13487         cf_tables=$MANPAGE_TBL
13488 else
13489         cf_subdir=\$mandir/cat
13490         cf_tables=yes
13491 fi
13492
13493 # process the list of source-files
13494 for i in \$* ; do
13495 case \$i in
13496 (*.orig|*.rej) ;;
13497 (*.[0-9]*)
13498         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13499         if test \$verb = installing ; then
13500         if test ! -d \$cf_subdir\${section} ; then
13501                 mkdir -p \$cf_subdir\$section
13502         fi
13503         fi
13504
13505         # replace variables in man page
13506         if test ! -f $cf_man_alias ; then
13507 cat >>$cf_man_alias <<-CF_EOF2
13508                 s,@DATADIR@,\$datadir,g
13509                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13510                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13511                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13512                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13513                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13514                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13515 CF_EOF
13516
13517         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13518         do
13519                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13520                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13521 cat >>$cf_edit_man <<-CF_EOF
13522                 s,@$cf_NAME@,$cf_name,g
13523 CF_EOF
13524         done
13525
13526 cat >>$cf_edit_man <<CF_EOF
13527 CF_EOF2
13528                 echo "...made $cf_man_alias"
13529         fi
13530
13531         aliases=
13532         cf_source=\`basename \$i\`
13533         inalias=\$cf_source
13534         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13535         if test ! -f \$inalias ; then
13536                 echo .. skipped \$cf_source
13537                 continue
13538         fi
13539 CF_EOF
13540
13541 if test "$MANPAGE_ALIASES" != no ; then
13542 cat >>$cf_edit_man <<CF_EOF
13543         nCurses=ignore.3x
13544         test $with_curses_h = yes && nCurses=ncurses.3x
13545         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13546 CF_EOF
13547 fi
13548
13549 if test "$MANPAGE_RENAMES" = no ; then
13550 cat >>$cf_edit_man <<CF_EOF
13551         # perform program transformations for section 1 man pages
13552         if test \$section = 1 ; then
13553                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13554         else
13555                 cf_target=\$cf_subdir\${section}/\$cf_source
13556         fi
13557 CF_EOF
13558 else
13559 cat >>$cf_edit_man <<CF_EOF
13560         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13561         if test -z "\$cf_target" ; then
13562                 echo '? missing rename for '\$cf_source
13563                 cf_target="\$cf_source"
13564         fi
13565         cf_target="\$cf_subdir\${section}/\${cf_target}"
13566
13567 CF_EOF
13568 fi
13569
13570 cat >>$cf_edit_man <<CF_EOF
13571         sed     -f $cf_man_alias \\
13572 CF_EOF
13573
13574 if test -f $MANPAGE_RENAMES ; then
13575 cat >>$cf_edit_man <<CF_EOF
13576                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13577 CF_EOF
13578 else
13579 cat >>$cf_edit_man <<CF_EOF
13580                 < \$i >\$TMP
13581 CF_EOF
13582 fi
13583
13584 cat >>$cf_edit_man <<CF_EOF
13585 if test \$cf_tables = yes ; then
13586         tbl \$TMP >\$TMP.out
13587         mv \$TMP.out \$TMP
13588 fi
13589 CF_EOF
13590
13591 if test $with_overwrite != yes ; then
13592 cat >>$cf_edit_man <<CF_EOF
13593         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13594         mv \$TMP.out \$TMP
13595 CF_EOF
13596 fi
13597
13598 if test $with_curses_h != yes ; then
13599 cat >>$cf_edit_man <<CF_EOF
13600         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13601         mv \$TMP.out \$TMP
13602 CF_EOF
13603 fi
13604
13605 cat >>$cf_edit_man <<CF_EOF
13606         if test \$form = format ; then
13607                 nroff -man \$TMP >\$TMP.out
13608                 mv \$TMP.out \$TMP
13609         fi
13610 CF_EOF
13611
13612 if test -n "$cf_compress" ; then
13613 cat >>$cf_edit_man <<CF_EOF
13614         if test \$verb = installing ; then
13615         if ( $cf_compress -f \$TMP )
13616         then
13617                 mv \$TMP.$cf_so_strip \$TMP
13618         fi
13619         fi
13620         cf_target="\$cf_target.$cf_so_strip"
13621 CF_EOF
13622 fi
13623
13624 case "$MANPAGE_FORMAT" in
13625 (*BSDI*)
13626 cat >>$cf_edit_man <<CF_EOF
13627         if test \$form = format ; then
13628                 # BSDI installs only .0 suffixes in the cat directories
13629                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13630         fi
13631 CF_EOF
13632   ;;
13633 esac
13634
13635 cat >>$cf_edit_man <<CF_EOF
13636         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13637         if test \$verb = installing ; then
13638                 echo \$verb \$cf_target
13639                 \$INSTALL_DATA \$TMP \$cf_target
13640                 test -d \$cf_subdir\${section} &&
13641                 test -n "\$aliases" && (
13642                         cd \$cf_subdir\${section} && (
13643                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13644                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13645                                 cf_target=\`basename \$cf_target\`
13646                                 for cf_alias in \$aliases
13647                                 do
13648                                         if test \$section = 1 ; then
13649                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13650                                         fi
13651
13652                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13653                                                 if test -f \$cf_alias\${suffix} ; then
13654                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13655                                                         then
13656                                                                 continue
13657                                                         fi
13658                                                 fi
13659                                                 echo .. \$verb alias \$cf_alias\${suffix}
13660 CF_EOF
13661 case "x$LN_S" in
13662 (*-f)
13663 cat >>$cf_edit_man <<CF_EOF
13664                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13665 CF_EOF
13666         ;;
13667 (*)
13668 cat >>$cf_edit_man <<CF_EOF
13669                                                 rm -f \$cf_alias\${suffix}
13670                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13671 CF_EOF
13672         ;;
13673 esac
13674 cat >>$cf_edit_man <<CF_EOF
13675                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13676                                                 echo ".so \$cf_source" >\$TMP
13677 CF_EOF
13678 if test -n "$cf_compress" ; then
13679 cat >>$cf_edit_man <<CF_EOF
13680                                                 if test -n "$cf_so_strip" ; then
13681                                                         $cf_compress -f \$TMP
13682                                                         mv \$TMP.$cf_so_strip \$TMP
13683                                                 fi
13684 CF_EOF
13685 fi
13686 cat >>$cf_edit_man <<CF_EOF
13687                                                 echo .. \$verb alias \$cf_alias\${suffix}
13688                                                 rm -f \$cf_alias\${suffix}
13689                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13690                                         fi
13691                                 done
13692                         )
13693                 )
13694         elif test \$verb = removing ; then
13695                 test -f \$cf_target && (
13696                         echo \$verb \$cf_target
13697                         rm -f \$cf_target
13698                 )
13699                 test -d \$cf_subdir\${section} &&
13700                 test -n "\$aliases" && (
13701                         cd \$cf_subdir\${section} && (
13702                                 for cf_alias in \$aliases
13703                                 do
13704                                         if test \$section = 1 ; then
13705                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13706                                         fi
13707
13708                                         echo .. \$verb alias \$cf_alias\${suffix}
13709                                         rm -f \$cf_alias\${suffix}
13710                                 done
13711                         )
13712                 )
13713         else
13714 #               echo ".hy 0"
13715                 cat \$TMP
13716         fi
13717         ;;
13718 esac
13719 done
13720
13721 if test $cf_inboth = yes ; then
13722 if test \$form != format ; then
13723         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13724 fi
13725 fi
13726
13727 exit 0
13728 CF_EOF
13729 chmod 755 $cf_edit_man
13730
13731 ###############################################################################
13732
13733 ### Note that some functions (such as const) are normally disabled anyway.
13734 echo "$as_me:13734: checking if you want to build with function extensions" >&5
13735 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13736
13737 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13738 if test "${enable_ext_funcs+set}" = set; then
13739   enableval="$enable_ext_funcs"
13740   with_ext_funcs=$enableval
13741 else
13742   with_ext_funcs=yes
13743 fi;
13744 echo "$as_me:13744: result: $with_ext_funcs" >&5
13745 echo "${ECHO_T}$with_ext_funcs" >&6
13746 if test "x$with_ext_funcs" = xyes ; then
13747         NCURSES_EXT_FUNCS=1
13748
13749 cat >>confdefs.h <<\EOF
13750 #define NCURSES_EXT_FUNCS 1
13751 EOF
13752
13753 cat >>confdefs.h <<\EOF
13754 #define HAVE_ASSUME_DEFAULT_COLORS 1
13755 EOF
13756
13757 cat >>confdefs.h <<\EOF
13758 #define HAVE_CURSES_VERSION 1
13759 EOF
13760
13761 cat >>confdefs.h <<\EOF
13762 #define HAVE_HAS_KEY 1
13763 EOF
13764
13765 cat >>confdefs.h <<\EOF
13766 #define HAVE_RESIZETERM 1
13767 EOF
13768
13769 cat >>confdefs.h <<\EOF
13770 #define HAVE_RESIZE_TERM 1
13771 EOF
13772
13773 cat >>confdefs.h <<\EOF
13774 #define HAVE_TERM_ENTRY_H 1
13775 EOF
13776
13777 cat >>confdefs.h <<\EOF
13778 #define HAVE_USE_DEFAULT_COLORS 1
13779 EOF
13780
13781 cat >>confdefs.h <<\EOF
13782 #define HAVE_USE_EXTENDED_NAMES 1
13783 EOF
13784
13785 cat >>confdefs.h <<\EOF
13786 #define HAVE_USE_SCREEN 1
13787 EOF
13788
13789 cat >>confdefs.h <<\EOF
13790 #define HAVE_USE_WINDOW 1
13791 EOF
13792
13793 cat >>confdefs.h <<\EOF
13794 #define HAVE_WRESIZE 1
13795 EOF
13796
13797         GENERATED_EXT_FUNCS=generated
13798         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13799 else
13800         NCURSES_EXT_FUNCS=0
13801         GENERATED_EXT_FUNCS=
13802 fi
13803
13804 echo "$as_me:13804: checking if you want to build with SCREEN extensions" >&5
13805 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13806
13807 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13808 if test "${enable_sp_funcs+set}" = set; then
13809   enableval="$enable_sp_funcs"
13810   with_sp_funcs=$enableval
13811 else
13812   with_sp_funcs=$cf_dft_ext_spfuncs
13813 fi;
13814 echo "$as_me:13814: result: $with_sp_funcs" >&5
13815 echo "${ECHO_T}$with_sp_funcs" >&6
13816 if test "x$with_sp_funcs" = xyes ; then
13817         NCURSES_SP_FUNCS=1
13818
13819 cat >>confdefs.h <<\EOF
13820 #define NCURSES_SP_FUNCS 1
13821 EOF
13822
13823 cat >>confdefs.h <<\EOF
13824 #define HAVE_TPUTS_SP 1
13825 EOF
13826
13827         GENERATED_SP_FUNCS=generated
13828 else
13829         NCURSES_SP_FUNCS=0
13830         GENERATED_SP_FUNCS=
13831 fi
13832
13833 echo "$as_me:13833: checking if you want to build with terminal-driver" >&5
13834 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13835
13836 # Check whether --enable-term-driver or --disable-term-driver was given.
13837 if test "${enable_term_driver+set}" = set; then
13838   enableval="$enable_term_driver"
13839   with_term_driver=$enableval
13840 else
13841   with_term_driver=no
13842 fi;
13843 echo "$as_me:13843: result: $with_term_driver" >&5
13844 echo "${ECHO_T}$with_term_driver" >&6
13845 if test "x$with_term_driver" = xyes ; then
13846
13847 cat >>confdefs.h <<\EOF
13848 #define USE_TERM_DRIVER 1
13849 EOF
13850
13851         if test "x$with_termlib" != xno ; then
13852                 { { echo "$as_me:13852: error: The term-driver option conflicts with the termlib option" >&5
13853 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13854    { (exit 1); exit 1; }; }
13855         fi
13856         if test "x$with_sp_funcs" != xyes ; then
13857                 { { echo "$as_me:13857: error: The term-driver option relies upon sp-funcs" >&5
13858 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13859    { (exit 1); exit 1; }; }
13860         fi
13861 fi
13862
13863 ###   use option --enable-const to turn on use of const beyond that in XSI.
13864 echo "$as_me:13864: checking for extended use of const keyword" >&5
13865 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13866
13867 # Check whether --enable-const or --disable-const was given.
13868 if test "${enable_const+set}" = set; then
13869   enableval="$enable_const"
13870   with_ext_const=$enableval
13871 else
13872   with_ext_const=$cf_dft_ext_const
13873 fi;
13874 echo "$as_me:13874: result: $with_ext_const" >&5
13875 echo "${ECHO_T}$with_ext_const" >&6
13876 NCURSES_CONST='/*nothing*/'
13877 if test "x$with_ext_const" = xyes ; then
13878         NCURSES_CONST=const
13879 fi
13880
13881 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13882 echo "$as_me:13882: checking if you want to use extended colors" >&5
13883 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13884
13885 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13886 if test "${enable_ext_colors+set}" = set; then
13887   enableval="$enable_ext_colors"
13888   with_ext_colors=$enableval
13889 else
13890   with_ext_colors=$cf_dft_ext_colors
13891 fi;
13892 echo "$as_me:13892: result: $with_ext_colors" >&5
13893 echo "${ECHO_T}$with_ext_colors" >&6
13894 NCURSES_EXT_COLORS=0
13895 if test "x$with_ext_colors" = xyes ; then
13896         if test "x$with_widec" != xyes ; then
13897                 { echo "$as_me:13897: WARNING: This option applies only to wide-character library" >&5
13898 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13899         else
13900                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13901
13902 if test "${with_abi_version+set}" != set; then
13903         case $cf_cv_rel_version in
13904         (5.*)
13905                 cf_cv_rel_version=6.0
13906                 cf_cv_abi_version=6
13907                 { echo "$as_me:13907: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13908 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13909                 ;;
13910         esac
13911 fi
13912
13913                 NCURSES_EXT_COLORS=1
13914
13915 cat >>confdefs.h <<\EOF
13916 #define NCURSES_EXT_COLORS 1
13917 EOF
13918
13919 cat >>confdefs.h <<\EOF
13920 #define HAVE_ALLOC_PAIR 1
13921 EOF
13922
13923 cat >>confdefs.h <<\EOF
13924 #define HAVE_INIT_EXTENDED_COLOR 1
13925 EOF
13926
13927 cat >>confdefs.h <<\EOF
13928 #define HAVE_RESET_COLOR_PAIRS 1
13929 EOF
13930
13931         fi
13932 fi
13933
13934 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13935 echo "$as_me:13935: checking if you want to use extended mouse encoding" >&5
13936 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13937
13938 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13939 if test "${enable_ext_mouse+set}" = set; then
13940   enableval="$enable_ext_mouse"
13941   with_ext_mouse=$enableval
13942 else
13943   with_ext_mouse=$cf_dft_ext_mouse
13944 fi;
13945 echo "$as_me:13945: result: $with_ext_mouse" >&5
13946 echo "${ECHO_T}$with_ext_mouse" >&6
13947 NCURSES_MOUSE_VERSION=1
13948 if test "x$with_ext_mouse" = xyes ; then
13949         NCURSES_MOUSE_VERSION=2
13950
13951 if test "${with_abi_version+set}" != set; then
13952         case $cf_cv_rel_version in
13953         (5.*)
13954                 cf_cv_rel_version=6.0
13955                 cf_cv_abi_version=6
13956                 { echo "$as_me:13956: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13957 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13958                 ;;
13959         esac
13960 fi
13961
13962 fi
13963
13964 ###   use option --enable-ext-putwin to turn on extended screendumps
13965 echo "$as_me:13965: checking if you want to use extended putwin/screendump" >&5
13966 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13967
13968 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13969 if test "${enable_ext_putwin+set}" = set; then
13970   enableval="$enable_ext_putwin"
13971   with_ext_putwin=$enableval
13972 else
13973   with_ext_putwin=$cf_dft_ext_putwin
13974 fi;
13975 echo "$as_me:13975: result: $with_ext_putwin" >&5
13976 echo "${ECHO_T}$with_ext_putwin" >&6
13977 if test "x$with_ext_putwin" = xyes ; then
13978
13979 cat >>confdefs.h <<\EOF
13980 #define NCURSES_EXT_PUTWIN 1
13981 EOF
13982
13983 fi
13984
13985 echo "$as_me:13985: checking if you want \$NCURSES_NO_PADDING code" >&5
13986 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13987
13988 # Check whether --enable-no-padding or --disable-no-padding was given.
13989 if test "${enable_no_padding+set}" = set; then
13990   enableval="$enable_no_padding"
13991   with_no_padding=$enableval
13992 else
13993   with_no_padding=$with_ext_funcs
13994 fi;
13995 echo "$as_me:13995: result: $with_no_padding" >&5
13996 echo "${ECHO_T}$with_no_padding" >&6
13997 test "x$with_no_padding" = xyes &&
13998 cat >>confdefs.h <<\EOF
13999 #define NCURSES_NO_PADDING 1
14000 EOF
14001
14002 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14003 echo "$as_me:14003: checking if you want SIGWINCH handler" >&5
14004 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14005
14006 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14007 if test "${enable_sigwinch+set}" = set; then
14008   enableval="$enable_sigwinch"
14009   with_sigwinch=$enableval
14010 else
14011   with_sigwinch=$with_ext_funcs
14012 fi;
14013 echo "$as_me:14013: result: $with_sigwinch" >&5
14014 echo "${ECHO_T}$with_sigwinch" >&6
14015 test "x$with_sigwinch" = xyes &&
14016 cat >>confdefs.h <<\EOF
14017 #define USE_SIGWINCH 1
14018 EOF
14019
14020 ###   use option --enable-tcap-names to allow user to define new capabilities
14021 echo "$as_me:14021: checking if you want user-definable terminal capabilities like termcap" >&5
14022 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14023
14024 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14025 if test "${enable_tcap_names+set}" = set; then
14026   enableval="$enable_tcap_names"
14027   with_tcap_names=$enableval
14028 else
14029   with_tcap_names=$with_ext_funcs
14030 fi;
14031 echo "$as_me:14031: result: $with_tcap_names" >&5
14032 echo "${ECHO_T}$with_tcap_names" >&6
14033 NCURSES_XNAMES=0
14034 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14035
14036 ##############################################################################
14037
14038 echo "$as_me:14038: checking if you want to link with the pthread library" >&5
14039 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14040
14041 # Check whether --with-pthread or --without-pthread was given.
14042 if test "${with_pthread+set}" = set; then
14043   withval="$with_pthread"
14044   with_pthread=$withval
14045 else
14046   with_pthread=no
14047 fi;
14048 echo "$as_me:14048: result: $with_pthread" >&5
14049 echo "${ECHO_T}$with_pthread" >&6
14050
14051 if test "$with_pthread" != no ; then
14052         echo "$as_me:14052: checking for pthread.h" >&5
14053 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14054 if test "${ac_cv_header_pthread_h+set}" = set; then
14055   echo $ECHO_N "(cached) $ECHO_C" >&6
14056 else
14057   cat >conftest.$ac_ext <<_ACEOF
14058 #line 14058 "configure"
14059 #include "confdefs.h"
14060 #include <pthread.h>
14061 _ACEOF
14062 if { (eval echo "$as_me:14062: \"$ac_cpp conftest.$ac_ext\"") >&5
14063   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14064   ac_status=$?
14065   egrep -v '^ *\+' conftest.er1 >conftest.err
14066   rm -f conftest.er1
14067   cat conftest.err >&5
14068   echo "$as_me:14068: \$? = $ac_status" >&5
14069   (exit $ac_status); } >/dev/null; then
14070   if test -s conftest.err; then
14071     ac_cpp_err=$ac_c_preproc_warn_flag
14072   else
14073     ac_cpp_err=
14074   fi
14075 else
14076   ac_cpp_err=yes
14077 fi
14078 if test -z "$ac_cpp_err"; then
14079   ac_cv_header_pthread_h=yes
14080 else
14081   echo "$as_me: failed program was:" >&5
14082   cat conftest.$ac_ext >&5
14083   ac_cv_header_pthread_h=no
14084 fi
14085 rm -f conftest.err conftest.$ac_ext
14086 fi
14087 echo "$as_me:14087: result: $ac_cv_header_pthread_h" >&5
14088 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14089 if test $ac_cv_header_pthread_h = yes; then
14090
14091 cat >>confdefs.h <<\EOF
14092 #define HAVE_PTHREADS_H 1
14093 EOF
14094
14095         for cf_lib_pthread in pthread c_r
14096         do
14097             echo "$as_me:14097: checking if we can link with the $cf_lib_pthread library" >&5
14098 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14099             cf_save_LIBS="$LIBS"
14100
14101 cf_add_libs="-l$cf_lib_pthread"
14102 # Filter out duplicates - this happens with badly-designed ".pc" files...
14103 for cf_add_1lib in $LIBS
14104 do
14105         for cf_add_2lib in $cf_add_libs
14106         do
14107                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14108                 then
14109                         cf_add_1lib=
14110                         break
14111                 fi
14112         done
14113         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14114 done
14115 LIBS="$cf_add_libs"
14116
14117             cat >conftest.$ac_ext <<_ACEOF
14118 #line 14118 "configure"
14119 #include "confdefs.h"
14120
14121 #include <pthread.h>
14122
14123 int
14124 main (void)
14125 {
14126
14127                 int rc = pthread_create(0,0,0,0);
14128                 int r2 = pthread_mutexattr_settype(0, 0);
14129
14130   ;
14131   return 0;
14132 }
14133 _ACEOF
14134 rm -f conftest.$ac_objext conftest$ac_exeext
14135 if { (eval echo "$as_me:14135: \"$ac_link\"") >&5
14136   (eval $ac_link) 2>&5
14137   ac_status=$?
14138   echo "$as_me:14138: \$? = $ac_status" >&5
14139   (exit $ac_status); } &&
14140          { ac_try='test -s conftest$ac_exeext'
14141   { (eval echo "$as_me:14141: \"$ac_try\"") >&5
14142   (eval $ac_try) 2>&5
14143   ac_status=$?
14144   echo "$as_me:14144: \$? = $ac_status" >&5
14145   (exit $ac_status); }; }; then
14146   with_pthread=yes
14147 else
14148   echo "$as_me: failed program was:" >&5
14149 cat conftest.$ac_ext >&5
14150 with_pthread=no
14151 fi
14152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14153             LIBS="$cf_save_LIBS"
14154             echo "$as_me:14154: result: $with_pthread" >&5
14155 echo "${ECHO_T}$with_pthread" >&6
14156             test "$with_pthread" = yes && break
14157         done
14158
14159         if test "$with_pthread" = yes ; then
14160
14161 cf_add_libs="-l$cf_lib_pthread"
14162 # Filter out duplicates - this happens with badly-designed ".pc" files...
14163 for cf_add_1lib in $LIBS
14164 do
14165         for cf_add_2lib in $cf_add_libs
14166         do
14167                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14168                 then
14169                         cf_add_1lib=
14170                         break
14171                 fi
14172         done
14173         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14174 done
14175 LIBS="$cf_add_libs"
14176
14177 cat >>confdefs.h <<\EOF
14178 #define HAVE_LIBPTHREADS 1
14179 EOF
14180
14181         else
14182             { { echo "$as_me:14182: error: Cannot link with pthread library" >&5
14183 echo "$as_me: error: Cannot link with pthread library" >&2;}
14184    { (exit 1); exit 1; }; }
14185         fi
14186
14187 fi
14188
14189 fi
14190
14191 if test "x$with_pthread" != xno; then
14192         echo "$as_me:14192: checking for pthread_kill" >&5
14193 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14194 if test "${ac_cv_func_pthread_kill+set}" = set; then
14195   echo $ECHO_N "(cached) $ECHO_C" >&6
14196 else
14197   cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200 #define pthread_kill autoconf_temporary
14201 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14202 #undef pthread_kill
14203
14204 #ifdef __cplusplus
14205 extern "C"
14206 #endif
14207
14208 /* We use char because int might match the return type of a gcc2
14209    builtin and then its argument prototype would still apply.  */
14210 char pthread_kill (void);
14211
14212 int
14213 main (void)
14214 {
14215
14216 /* The GNU C library defines stubs for functions which it implements
14217     to always fail with ENOSYS.  Some functions are actually named
14218     something starting with __ and the normal name is an alias.  */
14219 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14220 #error found stub for pthread_kill
14221 #endif
14222
14223         return pthread_kill ();
14224   ;
14225   return 0;
14226 }
14227 _ACEOF
14228 rm -f conftest.$ac_objext conftest$ac_exeext
14229 if { (eval echo "$as_me:14229: \"$ac_link\"") >&5
14230   (eval $ac_link) 2>&5
14231   ac_status=$?
14232   echo "$as_me:14232: \$? = $ac_status" >&5
14233   (exit $ac_status); } &&
14234          { ac_try='test -s conftest$ac_exeext'
14235   { (eval echo "$as_me:14235: \"$ac_try\"") >&5
14236   (eval $ac_try) 2>&5
14237   ac_status=$?
14238   echo "$as_me:14238: \$? = $ac_status" >&5
14239   (exit $ac_status); }; }; then
14240   ac_cv_func_pthread_kill=yes
14241 else
14242   echo "$as_me: failed program was:" >&5
14243 cat conftest.$ac_ext >&5
14244 ac_cv_func_pthread_kill=no
14245 fi
14246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14247 fi
14248 echo "$as_me:14248: result: $ac_cv_func_pthread_kill" >&5
14249 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14250 if test $ac_cv_func_pthread_kill = yes; then
14251
14252                 echo "$as_me:14252: checking if you want to allow EINTR in wgetch with pthreads" >&5
14253 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14254
14255 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14256 if test "${enable_pthreads_eintr+set}" = set; then
14257   enableval="$enable_pthreads_eintr"
14258   use_pthreads_eintr=$enableval
14259 else
14260   use_pthreads_eintr=no
14261 fi;
14262                 echo "$as_me:14262: result: $use_pthreads_eintr" >&5
14263 echo "${ECHO_T}$use_pthreads_eintr" >&6
14264                 if test "x$use_pthreads_eintr" = xyes ; then
14265
14266 cat >>confdefs.h <<\EOF
14267 #define USE_PTHREADS_EINTR 1
14268 EOF
14269
14270                 fi
14271 fi
14272
14273         echo "$as_me:14273: checking if you want to use weak-symbols for pthreads" >&5
14274 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14275
14276 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14277 if test "${enable_weak_symbols+set}" = set; then
14278   enableval="$enable_weak_symbols"
14279   use_weak_symbols=$enableval
14280 else
14281   use_weak_symbols=no
14282 fi;
14283         echo "$as_me:14283: result: $use_weak_symbols" >&5
14284 echo "${ECHO_T}$use_weak_symbols" >&6
14285         if test "x$use_weak_symbols" = xyes ; then
14286
14287 echo "$as_me:14287: checking if $CC supports weak symbols" >&5
14288 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14289 if test "${cf_cv_weak_symbols+set}" = set; then
14290   echo $ECHO_N "(cached) $ECHO_C" >&6
14291 else
14292
14293 cat >conftest.$ac_ext <<_ACEOF
14294 #line 14294 "configure"
14295 #include "confdefs.h"
14296
14297 #include <stdio.h>
14298 int
14299 main (void)
14300 {
14301
14302 #if defined(__GNUC__)
14303 #  if defined __USE_ISOC99
14304 #    define _cat_pragma(exp)    _Pragma(#exp)
14305 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14306 #  else
14307 #    define _weak_pragma(exp)
14308 #  endif
14309 #  define _declare(name)        __extension__ extern __typeof__(name) name
14310 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14311 #endif
14312
14313 weak_symbol(fopen);
14314
14315   ;
14316   return 0;
14317 }
14318 _ACEOF
14319 rm -f conftest.$ac_objext
14320 if { (eval echo "$as_me:14320: \"$ac_compile\"") >&5
14321   (eval $ac_compile) 2>&5
14322   ac_status=$?
14323   echo "$as_me:14323: \$? = $ac_status" >&5
14324   (exit $ac_status); } &&
14325          { ac_try='test -s conftest.$ac_objext'
14326   { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327   (eval $ac_try) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit $ac_status); }; }; then
14331   cf_cv_weak_symbols=yes
14332 else
14333   echo "$as_me: failed program was:" >&5
14334 cat conftest.$ac_ext >&5
14335 cf_cv_weak_symbols=no
14336 fi
14337 rm -f conftest.$ac_objext conftest.$ac_ext
14338
14339 fi
14340 echo "$as_me:14340: result: $cf_cv_weak_symbols" >&5
14341 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14342
14343         else
14344                 cf_cv_weak_symbols=no
14345         fi
14346
14347         if test "x$cf_cv_weak_symbols" = xyes ; then
14348
14349 cat >>confdefs.h <<\EOF
14350 #define USE_WEAK_SYMBOLS 1
14351 EOF
14352
14353         fi
14354 fi
14355
14356 PTHREAD=
14357 if test "x$with_pthread" = "xyes" ; then
14358
14359 cat >>confdefs.h <<\EOF
14360 #define USE_PTHREADS 1
14361 EOF
14362
14363         enable_reentrant=yes
14364         if test "x$cf_cv_weak_symbols" = xyes ; then
14365                 PTHREAD=-lpthread
14366
14367 cf_add_libs="-lpthread"
14368 # Filter out duplicates - this happens with badly-designed ".pc" files...
14369 for cf_add_1lib in $PRIVATE_LIBS
14370 do
14371         for cf_add_2lib in $cf_add_libs
14372         do
14373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14374                 then
14375                         cf_add_1lib=
14376                         break
14377                 fi
14378         done
14379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14380 done
14381 PRIVATE_LIBS="$cf_add_libs"
14382
14383         fi
14384 fi
14385
14386 # Reentrant code has to be opaque; there's little advantage to making ncurses
14387 # opaque outside of that, so there is no --enable-opaque option.  We can use
14388 # this option without --with-pthreads, but this will be always set for
14389 # pthreads.
14390 echo "$as_me:14390: checking if you want reentrant code" >&5
14391 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14392
14393 # Check whether --enable-reentrant or --disable-reentrant was given.
14394 if test "${enable_reentrant+set}" = set; then
14395   enableval="$enable_reentrant"
14396   with_reentrant=$enableval
14397 else
14398   with_reentrant=no
14399 fi;
14400 echo "$as_me:14400: result: $with_reentrant" >&5
14401 echo "${ECHO_T}$with_reentrant" >&6
14402 if test "x$with_reentrant" = xyes ; then
14403         cf_cv_enable_reentrant=1
14404         cf_cv_enable_opaque="NCURSES_INTERNALS"
14405         NCURSES_SIZE_T=int
14406         if test "x$cf_cv_weak_symbols" = xyes ; then
14407
14408 # remove pthread library from $LIBS
14409 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14410
14411 cf_add_libs="-lpthread"
14412 # Filter out duplicates - this happens with badly-designed ".pc" files...
14413 for cf_add_1lib in $TEST_LIBS
14414 do
14415         for cf_add_2lib in $cf_add_libs
14416         do
14417                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14418                 then
14419                         cf_add_1lib=
14420                         break
14421                 fi
14422         done
14423         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14424 done
14425 TEST_LIBS="$cf_add_libs"
14426
14427 cf_add_libs="-lpthread"
14428 # Filter out duplicates - this happens with badly-designed ".pc" files...
14429 for cf_add_1lib in $TEST_LIBS2
14430 do
14431         for cf_add_2lib in $cf_add_libs
14432         do
14433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14434                 then
14435                         cf_add_1lib=
14436                         break
14437                 fi
14438         done
14439         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14440 done
14441 TEST_LIBS2="$cf_add_libs"
14442
14443 cf_add_libs="-lpthread"
14444 # Filter out duplicates - this happens with badly-designed ".pc" files...
14445 for cf_add_1lib in $PRIVATE_LIBS
14446 do
14447         for cf_add_2lib in $cf_add_libs
14448         do
14449                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14450                 then
14451                         cf_add_1lib=
14452                         break
14453                 fi
14454         done
14455         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14456 done
14457 PRIVATE_LIBS="$cf_add_libs"
14458
14459         else
14460                 # when not using weak symbols but with_reentrant,
14461                 # add 't' to the library suffix on all platforms
14462                 # except cygwin, where we only do that if ALSO
14463                 # compiling with full thread support.
14464                 case "$host" in
14465                 (*cygwin* | *msys*)
14466                         if test "$with_pthread" = "yes" ; then
14467                                 if test "x$disable_lib_suffixes" = "xno" ; then
14468                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14469                                 fi
14470                         fi ;;
14471                 (*)
14472                         if test "x$disable_lib_suffixes" = "xno" ; then
14473                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14474                         fi
14475                         ;;
14476                 esac
14477         fi
14478
14479 cat >>confdefs.h <<\EOF
14480 #define USE_REENTRANT 1
14481 EOF
14482
14483 if test "${with_abi_version+set}" != set; then
14484         case $cf_cv_rel_version in
14485         (5.*)
14486                 cf_cv_rel_version=6.0
14487                 cf_cv_abi_version=6
14488                 { echo "$as_me:14488: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14489 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14490                 ;;
14491         esac
14492 fi
14493
14494 else
14495         cf_cv_enable_reentrant=0
14496         cf_cv_enable_opaque="NCURSES_OPAQUE"
14497         NCURSES_SIZE_T=short
14498 fi
14499
14500 echo "$as_me:14500: checking if you want opaque curses-library structures" >&5
14501 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14502
14503 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14504 if test "${enable_opaque_curses+set}" = set; then
14505   enableval="$enable_opaque_curses"
14506   test "$enableval" != yes && enableval=no
14507         if test "$enableval" != "no" ; then
14508     enable_opaque_curses=yes
14509         else
14510
14511          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14512          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14513
14514         fi
14515 else
14516   enableval=no
14517
14518          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14519          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14520
14521 fi;
14522 echo "$as_me:14522: result: $enable_opaque_curses" >&5
14523 echo "${ECHO_T}$enable_opaque_curses" >&6
14524
14525 test "$cf_cv_enable_reentrant" = 1 && \
14526 test "$enable_opaque_curses" = no && \
14527 { { echo "$as_me:14527: error: reentrant configuration requires opaque library" >&5
14528 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14529    { (exit 1); exit 1; }; }
14530
14531 echo "$as_me:14531: checking if you want opaque form-library structures" >&5
14532 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14533
14534 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14535 if test "${enable_opaque_form+set}" = set; then
14536   enableval="$enable_opaque_form"
14537   enable_opaque_form=yes
14538 else
14539   enable_opaque_form=no
14540 fi;
14541 echo "$as_me:14541: result: $enable_opaque_form" >&5
14542 echo "${ECHO_T}$enable_opaque_form" >&6
14543
14544 echo "$as_me:14544: checking if you want opaque menu-library structures" >&5
14545 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14546
14547 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14548 if test "${enable_opaque_menu+set}" = set; then
14549   enableval="$enable_opaque_menu"
14550   enable_opaque_menu=yes
14551 else
14552   enable_opaque_menu=no
14553 fi;
14554 echo "$as_me:14554: result: $enable_opaque_menu" >&5
14555 echo "${ECHO_T}$enable_opaque_menu" >&6
14556
14557 echo "$as_me:14557: checking if you want opaque panel-library structures" >&5
14558 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14559
14560 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14561 if test "${enable_opaque_panel+set}" = set; then
14562   enableval="$enable_opaque_panel"
14563   enable_opaque_panel=yes
14564 else
14565   enable_opaque_panel=no
14566 fi;
14567 echo "$as_me:14567: result: $enable_opaque_panel" >&5
14568 echo "${ECHO_T}$enable_opaque_panel" >&6
14569
14570 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14571 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14572 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14573 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14574
14575 ### Allow using a different wrap-prefix
14576 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14577         echo "$as_me:14577: checking for prefix used to wrap public variables" >&5
14578 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14579
14580 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14581 if test "${with_wrap_prefix+set}" = set; then
14582   withval="$with_wrap_prefix"
14583   NCURSES_WRAP_PREFIX=$withval
14584 else
14585   NCURSES_WRAP_PREFIX=_nc_
14586 fi;
14587         echo "$as_me:14587: result: $NCURSES_WRAP_PREFIX" >&5
14588 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14589 else
14590         NCURSES_WRAP_PREFIX=_nc_
14591 fi
14592
14593 cat >>confdefs.h <<EOF
14594 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14595 EOF
14596
14597 ###############################################################################
14598 # These options are relatively safe to experiment with.
14599
14600 echo "$as_me:14600: checking if you want all development code" >&5
14601 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14602
14603 # Check whether --with-develop or --without-develop was given.
14604 if test "${with_develop+set}" = set; then
14605   withval="$with_develop"
14606   with_develop=$withval
14607 else
14608   with_develop=no
14609 fi;
14610 echo "$as_me:14610: result: $with_develop" >&5
14611 echo "${ECHO_T}$with_develop" >&6
14612
14613 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14614 echo "$as_me:14614: checking if you want hard-tabs code" >&5
14615 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14616
14617 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14618 if test "${enable_hard_tabs+set}" = set; then
14619   enableval="$enable_hard_tabs"
14620
14621 else
14622   enable_hard_tabs=$with_develop
14623 fi;
14624 echo "$as_me:14624: result: $enable_hard_tabs" >&5
14625 echo "${ECHO_T}$enable_hard_tabs" >&6
14626 test "x$enable_hard_tabs" = xyes &&
14627 cat >>confdefs.h <<\EOF
14628 #define USE_HARD_TABS 1
14629 EOF
14630
14631 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14632 echo "$as_me:14632: checking if you want limited support for xmc" >&5
14633 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14634
14635 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14636 if test "${enable_xmc_glitch+set}" = set; then
14637   enableval="$enable_xmc_glitch"
14638
14639 else
14640   enable_xmc_glitch=$with_develop
14641 fi;
14642 echo "$as_me:14642: result: $enable_xmc_glitch" >&5
14643 echo "${ECHO_T}$enable_xmc_glitch" >&6
14644 test "x$enable_xmc_glitch" = xyes &&
14645 cat >>confdefs.h <<\EOF
14646 #define USE_XMC_SUPPORT 1
14647 EOF
14648
14649 ###############################################################################
14650 # These are just experimental, probably should not be in a package:
14651
14652 echo "$as_me:14652: checking if you do not want to assume colors are white-on-black" >&5
14653 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14654
14655 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14656 if test "${enable_assumed_color+set}" = set; then
14657   enableval="$enable_assumed_color"
14658   with_assumed_color=$enableval
14659 else
14660   with_assumed_color=yes
14661 fi;
14662 echo "$as_me:14662: result: $with_assumed_color" >&5
14663 echo "${ECHO_T}$with_assumed_color" >&6
14664 test "x$with_assumed_color" = xyes &&
14665 cat >>confdefs.h <<\EOF
14666 #define USE_ASSUMED_COLOR 1
14667 EOF
14668
14669 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14670 echo "$as_me:14670: checking if you want hashmap scrolling-optimization code" >&5
14671 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14672
14673 # Check whether --enable-hashmap or --disable-hashmap was given.
14674 if test "${enable_hashmap+set}" = set; then
14675   enableval="$enable_hashmap"
14676   with_hashmap=$enableval
14677 else
14678   with_hashmap=yes
14679 fi;
14680 echo "$as_me:14680: result: $with_hashmap" >&5
14681 echo "${ECHO_T}$with_hashmap" >&6
14682 test "x$with_hashmap" = xyes &&
14683 cat >>confdefs.h <<\EOF
14684 #define USE_HASHMAP 1
14685 EOF
14686
14687 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14688 echo "$as_me:14688: checking if you want colorfgbg code" >&5
14689 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14690
14691 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14692 if test "${enable_colorfgbg+set}" = set; then
14693   enableval="$enable_colorfgbg"
14694   with_colorfgbg=$enableval
14695 else
14696   with_colorfgbg=no
14697 fi;
14698 echo "$as_me:14698: result: $with_colorfgbg" >&5
14699 echo "${ECHO_T}$with_colorfgbg" >&6
14700 test "x$with_colorfgbg" = xyes &&
14701 cat >>confdefs.h <<\EOF
14702 #define USE_COLORFGBG 1
14703 EOF
14704
14705 ###   use option --enable-interop to turn on use of bindings used for interop
14706 echo "$as_me:14706: checking if you want interop bindings" >&5
14707 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14708
14709 # Check whether --enable-interop or --disable-interop was given.
14710 if test "${enable_interop+set}" = set; then
14711   enableval="$enable_interop"
14712   with_exp_interop=$enableval
14713 else
14714   with_exp_interop=$cf_dft_interop
14715 fi;
14716 echo "$as_me:14716: result: $with_exp_interop" >&5
14717 echo "${ECHO_T}$with_exp_interop" >&6
14718
14719 NCURSES_INTEROP_FUNCS=0
14720 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14721
14722 echo "$as_me:14722: checking if you want experimental safe-sprintf code" >&5
14723 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14724
14725 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14726 if test "${enable_safe_sprintf+set}" = set; then
14727   enableval="$enable_safe_sprintf"
14728   with_safe_sprintf=$enableval
14729 else
14730   with_safe_sprintf=no
14731 fi;
14732 echo "$as_me:14732: result: $with_safe_sprintf" >&5
14733 echo "${ECHO_T}$with_safe_sprintf" >&6
14734
14735 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14736 # when hashmap is used scroll hints are useless
14737 if test "$with_hashmap" = no ; then
14738 echo "$as_me:14738: checking if you want to experiment without scrolling-hints code" >&5
14739 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14740
14741 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14742 if test "${enable_scroll_hints+set}" = set; then
14743   enableval="$enable_scroll_hints"
14744   with_scroll_hints=$enableval
14745 else
14746   with_scroll_hints=yes
14747 fi;
14748 echo "$as_me:14748: result: $with_scroll_hints" >&5
14749 echo "${ECHO_T}$with_scroll_hints" >&6
14750 test "x$with_scroll_hints" = xyes &&
14751 cat >>confdefs.h <<\EOF
14752 #define USE_SCROLL_HINTS 1
14753 EOF
14754
14755 fi
14756
14757 echo "$as_me:14757: checking if you want wgetch-events code" >&5
14758 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14759
14760 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14761 if test "${enable_wgetch_events+set}" = set; then
14762   enableval="$enable_wgetch_events"
14763   with_wgetch_events=$enableval
14764 else
14765   with_wgetch_events=no
14766 fi;
14767 echo "$as_me:14767: result: $with_wgetch_events" >&5
14768 echo "${ECHO_T}$with_wgetch_events" >&6
14769 test "x$with_wgetch_events" = xyes &&
14770 cat >>confdefs.h <<\EOF
14771 #define NCURSES_WGETCH_EVENTS 1
14772 EOF
14773
14774 ###############################################################################
14775
14776 ###     use option --disable-echo to suppress full display compiling commands
14777
14778 echo "$as_me:14778: checking if you want to see long compiling messages" >&5
14779 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14780
14781 # Check whether --enable-echo or --disable-echo was given.
14782 if test "${enable_echo+set}" = set; then
14783   enableval="$enable_echo"
14784   test "$enableval" != no && enableval=yes
14785         if test "$enableval" != "yes" ; then
14786
14787         ECHO_LT='--silent'
14788         ECHO_LD='@echo linking $@;'
14789         RULE_CC='@echo compiling $<'
14790         SHOW_CC='@echo compiling $@'
14791         ECHO_CC='@'
14792
14793         else
14794
14795         ECHO_LT=''
14796         ECHO_LD=''
14797         RULE_CC=''
14798         SHOW_CC=''
14799         ECHO_CC=''
14800
14801         fi
14802 else
14803   enableval=yes
14804
14805         ECHO_LT=''
14806         ECHO_LD=''
14807         RULE_CC=''
14808         SHOW_CC=''
14809         ECHO_CC=''
14810
14811 fi;
14812 echo "$as_me:14812: result: $enableval" >&5
14813 echo "${ECHO_T}$enableval" >&6
14814
14815 if test "x$enable_echo" = xyes; then
14816         ECHO_LINK=
14817 else
14818         ECHO_LINK='@ echo linking $@ ... ;'
14819         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14820         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14821 fi
14822
14823 # --disable-stripping is used for debugging
14824
14825 echo "$as_me:14825: checking if you want to install stripped executables" >&5
14826 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14827
14828 # Check whether --enable-stripping or --disable-stripping was given.
14829 if test "${enable_stripping+set}" = set; then
14830   enableval="$enable_stripping"
14831   test "$enableval" != no && enableval=yes
14832         if test "$enableval" != "yes" ; then
14833     with_stripping=no
14834         else
14835                 with_stripping=yes
14836         fi
14837 else
14838   enableval=yes
14839         with_stripping=yes
14840
14841 fi;
14842 echo "$as_me:14842: result: $with_stripping" >&5
14843 echo "${ECHO_T}$with_stripping" >&6
14844
14845 if test "$with_stripping" = yes
14846 then
14847         INSTALL_OPT_S="-s"
14848 else
14849         INSTALL_OPT_S=
14850 fi
14851
14852 : ${INSTALL:=install}
14853 echo "$as_me:14853: checking if install accepts -p option" >&5
14854 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14855 if test "${cf_cv_install_p+set}" = set; then
14856   echo $ECHO_N "(cached) $ECHO_C" >&6
14857 else
14858
14859         rm -rf conftest*
14860         date >conftest.in
14861         mkdir conftest.out
14862         sleep 3
14863         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14864         then
14865                 if test -f conftest.out/conftest.in
14866                 then
14867                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14868                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14869                         if test -s conftest.err
14870                         then
14871                                 cf_cv_install_p=no
14872                         else
14873                                 cf_cv_install_p=yes
14874                         fi
14875                 else
14876                         cf_cv_install_p=no
14877                 fi
14878         else
14879                 cf_cv_install_p=no
14880         fi
14881         rm -rf conftest*
14882
14883 fi
14884 echo "$as_me:14884: result: $cf_cv_install_p" >&5
14885 echo "${ECHO_T}$cf_cv_install_p" >&6
14886
14887 echo "$as_me:14887: checking if install needs to be told about ownership" >&5
14888 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14889 case `$ac_config_guess` in
14890 (*minix)
14891         with_install_o=yes
14892         ;;
14893 (*)
14894         with_install_o=no
14895         ;;
14896 esac
14897
14898 echo "$as_me:14898: result: $with_install_o" >&5
14899 echo "${ECHO_T}$with_install_o" >&6
14900 if test "x$with_install_o" = xyes
14901 then
14902         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'`
14903 else
14904         INSTALL_OPT_O=
14905 fi
14906
14907 # If we're avoiding relinking of shared libraries during install, that is to
14908 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14909 # the install program has "-p" (for preserving timestamps).
14910 cf_cv_do_reranlib=yes
14911 if test "x$cf_cv_install_p" = xyes
14912 then
14913         if test "x$cf_cv_do_relink" != xyes
14914         then
14915                 cf_cv_do_reranlib=no
14916                 INSTALL_OPT_P="-p"
14917                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14918         fi
14919 fi
14920
14921 ###     use option --enable-warnings to turn on all gcc warnings
14922 echo "$as_me:14922: checking if you want to see compiler warnings" >&5
14923 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14924
14925 # Check whether --enable-warnings or --disable-warnings was given.
14926 if test "${enable_warnings+set}" = set; then
14927   enableval="$enable_warnings"
14928   with_warnings=$enableval
14929 fi;
14930 echo "$as_me:14930: result: $with_warnings" >&5
14931 echo "${ECHO_T}$with_warnings" >&6
14932
14933 if test "x$with_warnings" = "xyes"; then
14934
14935         ADAFLAGS="$ADAFLAGS -gnatg"
14936
14937 INTEL_COMPILER=no
14938
14939 if test "$GCC" = yes ; then
14940         case $host_os in
14941         (linux*|gnu*)
14942                 echo "$as_me:14942: checking if this is really Intel C compiler" >&5
14943 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14944                 cf_save_CFLAGS="$CFLAGS"
14945                 CFLAGS="$CFLAGS -no-gcc"
14946                 cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14949
14950 int
14951 main (void)
14952 {
14953
14954 #ifdef __INTEL_COMPILER
14955 #else
14956 make an error
14957 #endif
14958
14959   ;
14960   return 0;
14961 }
14962 _ACEOF
14963 rm -f conftest.$ac_objext
14964 if { (eval echo "$as_me:14964: \"$ac_compile\"") >&5
14965   (eval $ac_compile) 2>&5
14966   ac_status=$?
14967   echo "$as_me:14967: \$? = $ac_status" >&5
14968   (exit $ac_status); } &&
14969          { ac_try='test -s conftest.$ac_objext'
14970   { (eval echo "$as_me:14970: \"$ac_try\"") >&5
14971   (eval $ac_try) 2>&5
14972   ac_status=$?
14973   echo "$as_me:14973: \$? = $ac_status" >&5
14974   (exit $ac_status); }; }; then
14975   INTEL_COMPILER=yes
14976 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14977
14978 else
14979   echo "$as_me: failed program was:" >&5
14980 cat conftest.$ac_ext >&5
14981 fi
14982 rm -f conftest.$ac_objext conftest.$ac_ext
14983                 CFLAGS="$cf_save_CFLAGS"
14984                 echo "$as_me:14984: result: $INTEL_COMPILER" >&5
14985 echo "${ECHO_T}$INTEL_COMPILER" >&6
14986                 ;;
14987         esac
14988 fi
14989
14990 CLANG_COMPILER=no
14991
14992 if test "$GCC" = yes ; then
14993         echo "$as_me:14993: checking if this is really Clang C compiler" >&5
14994 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14995         cf_save_CFLAGS="$CFLAGS"
14996         CFLAGS="$CFLAGS -Qunused-arguments"
14997         cat >conftest.$ac_ext <<_ACEOF
14998 #line 14998 "configure"
14999 #include "confdefs.h"
15000
15001 int
15002 main (void)
15003 {
15004
15005 #ifdef __clang__
15006 #else
15007 make an error
15008 #endif
15009
15010   ;
15011   return 0;
15012 }
15013 _ACEOF
15014 rm -f conftest.$ac_objext
15015 if { (eval echo "$as_me:15015: \"$ac_compile\"") >&5
15016   (eval $ac_compile) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); } &&
15020          { ac_try='test -s conftest.$ac_objext'
15021   { (eval echo "$as_me:15021: \"$ac_try\"") >&5
15022   (eval $ac_try) 2>&5
15023   ac_status=$?
15024   echo "$as_me:15024: \$? = $ac_status" >&5
15025   (exit $ac_status); }; }; then
15026   CLANG_COMPILER=yes
15027 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15028
15029 else
15030   echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 fi
15033 rm -f conftest.$ac_objext conftest.$ac_ext
15034         CFLAGS="$cf_save_CFLAGS"
15035         echo "$as_me:15035: result: $CLANG_COMPILER" >&5
15036 echo "${ECHO_T}$CLANG_COMPILER" >&6
15037 fi
15038
15039 cat > conftest.$ac_ext <<EOF
15040 #line 15040 "${as_me:-configure}"
15041 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15042 EOF
15043
15044 if test "$INTEL_COMPILER" = yes
15045 then
15046 # The "-wdXXX" options suppress warnings:
15047 # remark #1419: external declaration in primary source file
15048 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15049 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15050 # remark #193: zero used for undefined preprocessing identifier
15051 # remark #593: variable "curs_sb_left_arrow" was set but never used
15052 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15053 # remark #869: parameter "tw" was never referenced
15054 # remark #981: operands are evaluated in unspecified order
15055 # warning #279: controlling expression is constant
15056
15057         { echo "$as_me:15057: checking for $CC warning options..." >&5
15058 echo "$as_me: checking for $CC warning options..." >&6;}
15059         cf_save_CFLAGS="$CFLAGS"
15060         EXTRA_CFLAGS="-Wall"
15061         for cf_opt in \
15062                 wd1419 \
15063                 wd1683 \
15064                 wd1684 \
15065                 wd193 \
15066                 wd593 \
15067                 wd279 \
15068                 wd810 \
15069                 wd869 \
15070                 wd981
15071         do
15072                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15073                 if { (eval echo "$as_me:15073: \"$ac_compile\"") >&5
15074   (eval $ac_compile) 2>&5
15075   ac_status=$?
15076   echo "$as_me:15076: \$? = $ac_status" >&5
15077   (exit $ac_status); }; then
15078                         test -n "$verbose" && echo "$as_me:15078: result: ... -$cf_opt" >&5
15079 echo "${ECHO_T}... -$cf_opt" >&6
15080                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15081                 fi
15082         done
15083         CFLAGS="$cf_save_CFLAGS"
15084
15085 elif test "$GCC" = yes
15086 then
15087         { echo "$as_me:15087: checking for $CC warning options..." >&5
15088 echo "$as_me: checking for $CC warning options..." >&6;}
15089         cf_save_CFLAGS="$CFLAGS"
15090         EXTRA_CFLAGS=
15091         cf_warn_CONST=""
15092         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15093         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15094         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15095         for cf_opt in W Wall \
15096                 Wbad-function-cast \
15097                 Wcast-align \
15098                 Wcast-qual \
15099                 Wdeclaration-after-statement \
15100                 Wextra \
15101                 Winline \
15102                 Wmissing-declarations \
15103                 Wmissing-prototypes \
15104                 Wnested-externs \
15105                 Wpointer-arith \
15106                 Wshadow \
15107                 Wstrict-prototypes \
15108                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15109         do
15110                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15111                 if { (eval echo "$as_me:15111: \"$ac_compile\"") >&5
15112   (eval $ac_compile) 2>&5
15113   ac_status=$?
15114   echo "$as_me:15114: \$? = $ac_status" >&5
15115   (exit $ac_status); }; then
15116                         test -n "$verbose" && echo "$as_me:15116: result: ... -$cf_opt" >&5
15117 echo "${ECHO_T}... -$cf_opt" >&6
15118                         case $cf_opt in
15119                         (Wcast-qual)
15120
15121         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15122         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15123
15124                                 ;;
15125                         (Winline)
15126                                 case $GCC_VERSION in
15127                                 ([34].*)
15128                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15129
15130 echo "${as_me:-configure}:15130: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15131
15132                                         continue;;
15133                                 esac
15134                                 ;;
15135                         (Wpointer-arith)
15136                                 case $GCC_VERSION in
15137                                 ([12].*)
15138                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15139
15140 echo "${as_me:-configure}:15140: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15141
15142                                         continue;;
15143                                 esac
15144                                 ;;
15145                         esac
15146                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15147                 fi
15148         done
15149         CFLAGS="$cf_save_CFLAGS"
15150 fi
15151 rm -rf conftest*
15152
15153         if test "x$cf_with_cxx" = xyes ; then
15154
15155 INTEL_CPLUSPLUS=no
15156
15157 if test "$GCC" = yes ; then
15158         case $host_os in
15159         (linux*|gnu*)
15160                 echo "$as_me:15160: checking if this is really Intel C++ compiler" >&5
15161 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15162                 cf_save_CFLAGS="$CXXFLAGS"
15163                 CXXFLAGS="$CXXFLAGS -no-gcc"
15164                 cat >conftest.$ac_ext <<_ACEOF
15165 #line 15165 "configure"
15166 #include "confdefs.h"
15167
15168 int
15169 main (void)
15170 {
15171
15172 #ifdef __INTEL_COMPILER
15173 #else
15174 make an error
15175 #endif
15176
15177   ;
15178   return 0;
15179 }
15180 _ACEOF
15181 rm -f conftest.$ac_objext
15182 if { (eval echo "$as_me:15182: \"$ac_compile\"") >&5
15183   (eval $ac_compile) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit $ac_status); } &&
15187          { ac_try='test -s conftest.$ac_objext'
15188   { (eval echo "$as_me:15188: \"$ac_try\"") >&5
15189   (eval $ac_try) 2>&5
15190   ac_status=$?
15191   echo "$as_me:15191: \$? = $ac_status" >&5
15192   (exit $ac_status); }; }; then
15193   INTEL_CPLUSPLUS=yes
15194 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15195
15196 else
15197   echo "$as_me: failed program was:" >&5
15198 cat conftest.$ac_ext >&5
15199 fi
15200 rm -f conftest.$ac_objext conftest.$ac_ext
15201                 CXXFLAGS="$cf_save_CFLAGS"
15202                 echo "$as_me:15202: result: $INTEL_CPLUSPLUS" >&5
15203 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15204                 ;;
15205         esac
15206 fi
15207
15208 CLANG_CPLUSPLUS=no
15209
15210 if test "$GCC" = yes ; then
15211         echo "$as_me:15211: checking if this is really Clang C++ compiler" >&5
15212 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15213         cf_save_CFLAGS="$CXXFLAGS"
15214         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15215         cat >conftest.$ac_ext <<_ACEOF
15216 #line 15216 "configure"
15217 #include "confdefs.h"
15218
15219 int
15220 main (void)
15221 {
15222
15223 #ifdef __clang__
15224 #else
15225 make an error
15226 #endif
15227
15228   ;
15229   return 0;
15230 }
15231 _ACEOF
15232 rm -f conftest.$ac_objext
15233 if { (eval echo "$as_me:15233: \"$ac_compile\"") >&5
15234   (eval $ac_compile) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); } &&
15238          { ac_try='test -s conftest.$ac_objext'
15239   { (eval echo "$as_me:15239: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   CLANG_CPLUSPLUS=yes
15245 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15246
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 cat conftest.$ac_ext >&5
15250 fi
15251 rm -f conftest.$ac_objext conftest.$ac_ext
15252         CXXFLAGS="$cf_save_CFLAGS"
15253         echo "$as_me:15253: result: $CLANG_CPLUSPLUS" >&5
15254 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15255 fi
15256
15257 ac_ext=cc
15258 ac_cpp='$CXXCPP $CPPFLAGS'
15259 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15260 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15261 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15262 ac_main_return=return
15263
15264 cat > conftest.$ac_ext <<EOF
15265 #line 15265 "configure"
15266 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15267 EOF
15268
15269 if test "$INTEL_CPLUSPLUS" = yes
15270 then
15271 # The "-wdXXX" options suppress warnings:
15272 # remark #1419: external declaration in primary source file
15273 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15274 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15275 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15276 # remark #193: zero used for undefined preprocessing identifier
15277 # remark #593: variable "curs_sb_left_arrow" was set but never used
15278 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15279 # remark #869: parameter "tw" was never referenced
15280 # remark #981: operands are evaluated in unspecified order
15281 # warning #269: invalid format string conversion
15282
15283         { echo "$as_me:15283: checking for $CC warning options..." >&5
15284 echo "$as_me: checking for $CC warning options..." >&6;}
15285         cf_save_CXXFLAGS="$CXXFLAGS"
15286         EXTRA_CXXFLAGS="-Wall"
15287         for cf_opt in \
15288                 wd1419 \
15289                 wd1682 \
15290                 wd1683 \
15291                 wd1684 \
15292                 wd193 \
15293                 wd279 \
15294                 wd593 \
15295                 wd810 \
15296                 wd869 \
15297                 wd981
15298         do
15299                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15300                 if { (eval echo "$as_me:15300: \"$ac_compile\"") >&5
15301   (eval $ac_compile) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; then
15305                         test -n "$verbose" && echo "$as_me:15305: result: ... -$cf_opt" >&5
15306 echo "${ECHO_T}... -$cf_opt" >&6
15307                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15308                 fi
15309         done
15310         CXXFLAGS="$cf_save_CXXFLAGS"
15311
15312 elif test "$GXX" = yes
15313 then
15314         { echo "$as_me:15314: checking for $CXX warning options..." >&5
15315 echo "$as_me: checking for $CXX warning options..." >&6;}
15316         cf_save_CXXFLAGS="$CXXFLAGS"
15317         EXTRA_CXXFLAGS="-W -Wall"
15318         cf_gxx_extra_warnings=""
15319         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15320         case "$GCC_VERSION" in
15321         ([1-2].*)
15322                 ;;
15323         (*)
15324                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15325                 ;;
15326         esac
15327         for cf_opt in \
15328                 Wabi \
15329                 fabi-version=0 \
15330                 Wextra \
15331                 Wignored-qualifiers \
15332                 Wlogical-op \
15333                 Woverloaded-virtual \
15334                 Wsign-promo \
15335                 Wsynth \
15336                 Wold-style-cast \
15337                 Wcast-align \
15338                 Wcast-qual \
15339                 Wpointer-arith \
15340                 Wshadow \
15341                 Wundef $cf_gxx_extra_warnings Wno-unused
15342         do
15343                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15344                 if { (eval echo "$as_me:15344: \"$ac_compile\"") >&5
15345   (eval $ac_compile) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); }; then
15349                         test -n "$verbose" && echo "$as_me:15349: result: ... -$cf_opt" >&5
15350 echo "${ECHO_T}... -$cf_opt" >&6
15351                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15352                 else
15353                         test -n "$verbose" && echo "$as_me:15353: result: ... no -$cf_opt" >&5
15354 echo "${ECHO_T}... no -$cf_opt" >&6
15355                 fi
15356         done
15357         CXXFLAGS="$cf_save_CXXFLAGS"
15358 fi
15359
15360 rm -rf conftest*
15361 ac_ext=c
15362 ac_cpp='$CPP $CPPFLAGS'
15363 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15364 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15365 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15366 ac_main_return=return
15367
15368         fi
15369 fi
15370
15371 if test "$GCC" = yes
15372 then
15373 cat > conftest.i <<EOF
15374 #ifndef GCC_PRINTF
15375 #define GCC_PRINTF 0
15376 #endif
15377 #ifndef GCC_SCANF
15378 #define GCC_SCANF 0
15379 #endif
15380 #ifndef GCC_NORETURN
15381 #define GCC_NORETURN /* nothing */
15382 #endif
15383 #ifndef GCC_UNUSED
15384 #define GCC_UNUSED /* nothing */
15385 #endif
15386 EOF
15387 if test "$GCC" = yes
15388 then
15389         { echo "$as_me:15389: checking for $CC __attribute__ directives..." >&5
15390 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15391 cat > conftest.$ac_ext <<EOF
15392 #line 15392 "${as_me:-configure}"
15393 #include "confdefs.h"
15394 #include "conftest.h"
15395 #include "conftest.i"
15396 #if     GCC_PRINTF
15397 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15398 #else
15399 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15400 #endif
15401 #if     GCC_SCANF
15402 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15403 #else
15404 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15405 #endif
15406 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15407 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15408 extern void foo(void) GCC_NORETURN;
15409 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15410 EOF
15411         cf_printf_attribute=no
15412         cf_scanf_attribute=no
15413         for cf_attribute in scanf printf unused noreturn
15414         do
15415
15416 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15417
15418                 cf_directive="__attribute__(($cf_attribute))"
15419                 echo "checking for $CC $cf_directive" 1>&5
15420
15421                 case $cf_attribute in
15422                 (printf)
15423                         cf_printf_attribute=yes
15424                         cat >conftest.h <<EOF
15425 #define GCC_$cf_ATTRIBUTE 1
15426 EOF
15427                         ;;
15428                 (scanf)
15429                         cf_scanf_attribute=yes
15430                         cat >conftest.h <<EOF
15431 #define GCC_$cf_ATTRIBUTE 1
15432 EOF
15433                         ;;
15434                 (*)
15435                         cat >conftest.h <<EOF
15436 #define GCC_$cf_ATTRIBUTE $cf_directive
15437 EOF
15438                         ;;
15439                 esac
15440
15441                 if { (eval echo "$as_me:15441: \"$ac_compile\"") >&5
15442   (eval $ac_compile) 2>&5
15443   ac_status=$?
15444   echo "$as_me:15444: \$? = $ac_status" >&5
15445   (exit $ac_status); }; then
15446                         test -n "$verbose" && echo "$as_me:15446: result: ... $cf_attribute" >&5
15447 echo "${ECHO_T}... $cf_attribute" >&6
15448                         cat conftest.h >>confdefs.h
15449                         case $cf_attribute in
15450                         (noreturn)
15451
15452 cat >>confdefs.h <<EOF
15453 #define GCC_NORETURN $cf_directive
15454 EOF
15455
15456                                 ;;
15457                         (printf)
15458                                 cf_value='/* nothing */'
15459                                 if test "$cf_printf_attribute" != no ; then
15460                                         cf_value='__attribute__((format(printf,fmt,var)))'
15461
15462 cat >>confdefs.h <<\EOF
15463 #define GCC_PRINTF 1
15464 EOF
15465
15466                                 fi
15467
15468 cat >>confdefs.h <<EOF
15469 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15470 EOF
15471
15472                                 ;;
15473                         (scanf)
15474                                 cf_value='/* nothing */'
15475                                 if test "$cf_scanf_attribute" != no ; then
15476                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15477
15478 cat >>confdefs.h <<\EOF
15479 #define GCC_SCANF 1
15480 EOF
15481
15482                                 fi
15483
15484 cat >>confdefs.h <<EOF
15485 #define GCC_SCANFLIKE(fmt,var) $cf_value
15486 EOF
15487
15488                                 ;;
15489                         (unused)
15490
15491 cat >>confdefs.h <<EOF
15492 #define GCC_UNUSED $cf_directive
15493 EOF
15494
15495                                 ;;
15496                         esac
15497                 fi
15498         done
15499 else
15500         fgrep define conftest.i >>confdefs.h
15501 fi
15502 rm -rf conftest*
15503 fi
15504
15505 echo "$as_me:15505: checking if you want to work around bogus compiler/loader warnings" >&5
15506 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15507
15508 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15509 if test "${enable_string_hacks+set}" = set; then
15510   enableval="$enable_string_hacks"
15511   with_string_hacks=$enableval
15512 else
15513   with_string_hacks=no
15514 fi;
15515 echo "$as_me:15515: result: $with_string_hacks" >&5
15516 echo "${ECHO_T}$with_string_hacks" >&6
15517
15518 if test "x$with_string_hacks" = "xyes"; then
15519
15520 cat >>confdefs.h <<\EOF
15521 #define USE_STRING_HACKS 1
15522 EOF
15523
15524         { echo "$as_me:15524: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15525 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15526         echo "$as_me:15526: checking for strlcat" >&5
15527 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15528 if test "${ac_cv_func_strlcat+set}" = set; then
15529   echo $ECHO_N "(cached) $ECHO_C" >&6
15530 else
15531   cat >conftest.$ac_ext <<_ACEOF
15532 #line 15532 "configure"
15533 #include "confdefs.h"
15534 #define strlcat autoconf_temporary
15535 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15536 #undef strlcat
15537
15538 #ifdef __cplusplus
15539 extern "C"
15540 #endif
15541
15542 /* We use char because int might match the return type of a gcc2
15543    builtin and then its argument prototype would still apply.  */
15544 char strlcat (void);
15545
15546 int
15547 main (void)
15548 {
15549
15550 /* The GNU C library defines stubs for functions which it implements
15551     to always fail with ENOSYS.  Some functions are actually named
15552     something starting with __ and the normal name is an alias.  */
15553 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15554 #error found stub for strlcat
15555 #endif
15556
15557         return strlcat ();
15558   ;
15559   return 0;
15560 }
15561 _ACEOF
15562 rm -f conftest.$ac_objext conftest$ac_exeext
15563 if { (eval echo "$as_me:15563: \"$ac_link\"") >&5
15564   (eval $ac_link) 2>&5
15565   ac_status=$?
15566   echo "$as_me:15566: \$? = $ac_status" >&5
15567   (exit $ac_status); } &&
15568          { ac_try='test -s conftest$ac_exeext'
15569   { (eval echo "$as_me:15569: \"$ac_try\"") >&5
15570   (eval $ac_try) 2>&5
15571   ac_status=$?
15572   echo "$as_me:15572: \$? = $ac_status" >&5
15573   (exit $ac_status); }; }; then
15574   ac_cv_func_strlcat=yes
15575 else
15576   echo "$as_me: failed program was:" >&5
15577 cat conftest.$ac_ext >&5
15578 ac_cv_func_strlcat=no
15579 fi
15580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15581 fi
15582 echo "$as_me:15582: result: $ac_cv_func_strlcat" >&5
15583 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15584 if test $ac_cv_func_strlcat = yes; then
15585
15586 cat >>confdefs.h <<\EOF
15587 #define HAVE_STRLCAT 1
15588 EOF
15589
15590 else
15591
15592                 echo "$as_me:15592: checking for strlcat in -lbsd" >&5
15593 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15594 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15595   echo $ECHO_N "(cached) $ECHO_C" >&6
15596 else
15597   ac_check_lib_save_LIBS=$LIBS
15598 LIBS="-lbsd  $LIBS"
15599 cat >conftest.$ac_ext <<_ACEOF
15600 #line 15600 "configure"
15601 #include "confdefs.h"
15602
15603 /* Override any gcc2 internal prototype to avoid an error.  */
15604 #ifdef __cplusplus
15605 extern "C"
15606 #endif
15607 /* We use char because int might match the return type of a gcc2
15608    builtin and then its argument prototype would still apply.  */
15609 char strlcat ();
15610 int
15611 main (void)
15612 {
15613 strlcat ();
15614   ;
15615   return 0;
15616 }
15617 _ACEOF
15618 rm -f conftest.$ac_objext conftest$ac_exeext
15619 if { (eval echo "$as_me:15619: \"$ac_link\"") >&5
15620   (eval $ac_link) 2>&5
15621   ac_status=$?
15622   echo "$as_me:15622: \$? = $ac_status" >&5
15623   (exit $ac_status); } &&
15624          { ac_try='test -s conftest$ac_exeext'
15625   { (eval echo "$as_me:15625: \"$ac_try\"") >&5
15626   (eval $ac_try) 2>&5
15627   ac_status=$?
15628   echo "$as_me:15628: \$? = $ac_status" >&5
15629   (exit $ac_status); }; }; then
15630   ac_cv_lib_bsd_strlcat=yes
15631 else
15632   echo "$as_me: failed program was:" >&5
15633 cat conftest.$ac_ext >&5
15634 ac_cv_lib_bsd_strlcat=no
15635 fi
15636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15637 LIBS=$ac_check_lib_save_LIBS
15638 fi
15639 echo "$as_me:15639: result: $ac_cv_lib_bsd_strlcat" >&5
15640 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15641 if test $ac_cv_lib_bsd_strlcat = yes; then
15642
15643 cf_add_libs="-lbsd"
15644 # Filter out duplicates - this happens with badly-designed ".pc" files...
15645 for cf_add_1lib in $LIBS
15646 do
15647         for cf_add_2lib in $cf_add_libs
15648         do
15649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15650                 then
15651                         cf_add_1lib=
15652                         break
15653                 fi
15654         done
15655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15656 done
15657 LIBS="$cf_add_libs"
15658
15659 for ac_header in bsd/string.h
15660 do
15661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15662 echo "$as_me:15662: checking for $ac_header" >&5
15663 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15665   echo $ECHO_N "(cached) $ECHO_C" >&6
15666 else
15667   cat >conftest.$ac_ext <<_ACEOF
15668 #line 15668 "configure"
15669 #include "confdefs.h"
15670 #include <$ac_header>
15671 _ACEOF
15672 if { (eval echo "$as_me:15672: \"$ac_cpp conftest.$ac_ext\"") >&5
15673   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15674   ac_status=$?
15675   egrep -v '^ *\+' conftest.er1 >conftest.err
15676   rm -f conftest.er1
15677   cat conftest.err >&5
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); } >/dev/null; then
15680   if test -s conftest.err; then
15681     ac_cpp_err=$ac_c_preproc_warn_flag
15682   else
15683     ac_cpp_err=
15684   fi
15685 else
15686   ac_cpp_err=yes
15687 fi
15688 if test -z "$ac_cpp_err"; then
15689   eval "$as_ac_Header=yes"
15690 else
15691   echo "$as_me: failed program was:" >&5
15692   cat conftest.$ac_ext >&5
15693   eval "$as_ac_Header=no"
15694 fi
15695 rm -f conftest.err conftest.$ac_ext
15696 fi
15697 echo "$as_me:15697: result: `eval echo '${'$as_ac_Header'}'`" >&5
15698 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15699 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15700   cat >>confdefs.h <<EOF
15701 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15702 EOF
15703
15704 fi
15705 done
15706
15707 cat >>confdefs.h <<\EOF
15708 #define HAVE_STRLCAT 1
15709 EOF
15710
15711 fi
15712
15713 fi
15714
15715 for ac_func in strlcpy snprintf
15716 do
15717 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15718 echo "$as_me:15718: checking for $ac_func" >&5
15719 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15720 if eval "test \"\${$as_ac_var+set}\" = set"; then
15721   echo $ECHO_N "(cached) $ECHO_C" >&6
15722 else
15723   cat >conftest.$ac_ext <<_ACEOF
15724 #line 15724 "configure"
15725 #include "confdefs.h"
15726 #define $ac_func autoconf_temporary
15727 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15728 #undef $ac_func
15729
15730 #ifdef __cplusplus
15731 extern "C"
15732 #endif
15733
15734 /* We use char because int might match the return type of a gcc2
15735    builtin and then its argument prototype would still apply.  */
15736 char $ac_func (void);
15737
15738 int
15739 main (void)
15740 {
15741
15742 /* The GNU C library defines stubs for functions which it implements
15743     to always fail with ENOSYS.  Some functions are actually named
15744     something starting with __ and the normal name is an alias.  */
15745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15746 #error found stub for $ac_func
15747 #endif
15748
15749         return $ac_func ();
15750   ;
15751   return 0;
15752 }
15753 _ACEOF
15754 rm -f conftest.$ac_objext conftest$ac_exeext
15755 if { (eval echo "$as_me:15755: \"$ac_link\"") >&5
15756   (eval $ac_link) 2>&5
15757   ac_status=$?
15758   echo "$as_me:15758: \$? = $ac_status" >&5
15759   (exit $ac_status); } &&
15760          { ac_try='test -s conftest$ac_exeext'
15761   { (eval echo "$as_me:15761: \"$ac_try\"") >&5
15762   (eval $ac_try) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); }; }; then
15766   eval "$as_ac_var=yes"
15767 else
15768   echo "$as_me: failed program was:" >&5
15769 cat conftest.$ac_ext >&5
15770 eval "$as_ac_var=no"
15771 fi
15772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15773 fi
15774 echo "$as_me:15774: result: `eval echo '${'$as_ac_var'}'`" >&5
15775 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15776 if test `eval echo '${'$as_ac_var'}'` = yes; then
15777   cat >>confdefs.h <<EOF
15778 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15779 EOF
15780
15781 fi
15782 done
15783
15784 fi
15785
15786 ###     use option --enable-assertions to turn on generation of assertion code
15787 echo "$as_me:15787: checking if you want to enable runtime assertions" >&5
15788 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15789
15790 # Check whether --enable-assertions or --disable-assertions was given.
15791 if test "${enable_assertions+set}" = set; then
15792   enableval="$enable_assertions"
15793   with_assertions=$enableval
15794 else
15795   with_assertions=no
15796 fi;
15797 echo "$as_me:15797: result: $with_assertions" >&5
15798 echo "${ECHO_T}$with_assertions" >&6
15799 if test -n "$GCC"
15800 then
15801         if test "$with_assertions" = no
15802         then
15803                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15804         else
15805
15806         ADAFLAGS="$ADAFLAGS -gnata"
15807
15808         fi
15809 fi
15810
15811 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15812
15813 echo "$as_me:15813: checking if you want to use dmalloc for testing" >&5
15814 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15815
15816 # Check whether --with-dmalloc or --without-dmalloc was given.
15817 if test "${with_dmalloc+set}" = set; then
15818   withval="$with_dmalloc"
15819
15820 cat >>confdefs.h <<EOF
15821 #define USE_DMALLOC 1
15822 EOF
15823
15824         : ${with_cflags:=-g}
15825         : ${with_no_leaks:=yes}
15826          with_dmalloc=yes
15827 else
15828   with_dmalloc=
15829 fi;
15830 echo "$as_me:15830: result: ${with_dmalloc:-no}" >&5
15831 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15832
15833 case .$with_cflags in
15834 (.*-g*)
15835         case .$CFLAGS in
15836         (.*-g*)
15837                 ;;
15838         (*)
15839
15840 cf_fix_cppflags=no
15841 cf_new_cflags=
15842 cf_new_cppflags=
15843 cf_new_extra_cppflags=
15844
15845 for cf_add_cflags in -g
15846 do
15847 case $cf_fix_cppflags in
15848 (no)
15849         case $cf_add_cflags in
15850         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15851                 case $cf_add_cflags in
15852                 (-D*)
15853                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15854
15855                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15856                                 && test -z "${cf_tst_cflags}" \
15857                                 && cf_fix_cppflags=yes
15858
15859                         if test $cf_fix_cppflags = yes ; then
15860
15861         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15862         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15863
15864                                 continue
15865                         elif test "${cf_tst_cflags}" = "\"'" ; then
15866
15867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15869
15870                                 continue
15871                         fi
15872                         ;;
15873                 esac
15874                 case "$CPPFLAGS" in
15875                 (*$cf_add_cflags)
15876                         ;;
15877                 (*)
15878                         case $cf_add_cflags in
15879                         (-D*)
15880                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15881
15882 CPPFLAGS=`echo "$CPPFLAGS" | \
15883         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15884                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15885
15886                                 ;;
15887                         esac
15888
15889         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15890         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15891
15892                         ;;
15893                 esac
15894                 ;;
15895         (*)
15896
15897         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15898         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15899
15900                 ;;
15901         esac
15902         ;;
15903 (yes)
15904
15905         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15906         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15907
15908         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15909
15910         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15911                 && test -z "${cf_tst_cflags}" \
15912                 && cf_fix_cppflags=no
15913         ;;
15914 esac
15915 done
15916
15917 if test -n "$cf_new_cflags" ; then
15918
15919         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15920         CFLAGS="${CFLAGS}$cf_new_cflags"
15921
15922 fi
15923
15924 if test -n "$cf_new_cppflags" ; then
15925
15926         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15927         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15928
15929 fi
15930
15931 if test -n "$cf_new_extra_cppflags" ; then
15932
15933         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15934         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15935
15936 fi
15937
15938                 ;;
15939         esac
15940         ;;
15941 esac
15942
15943 if test "$with_dmalloc" = yes ; then
15944         echo "$as_me:15944: checking for dmalloc.h" >&5
15945 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15946 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15947   echo $ECHO_N "(cached) $ECHO_C" >&6
15948 else
15949   cat >conftest.$ac_ext <<_ACEOF
15950 #line 15950 "configure"
15951 #include "confdefs.h"
15952 #include <dmalloc.h>
15953 _ACEOF
15954 if { (eval echo "$as_me:15954: \"$ac_cpp conftest.$ac_ext\"") >&5
15955   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15956   ac_status=$?
15957   egrep -v '^ *\+' conftest.er1 >conftest.err
15958   rm -f conftest.er1
15959   cat conftest.err >&5
15960   echo "$as_me:15960: \$? = $ac_status" >&5
15961   (exit $ac_status); } >/dev/null; then
15962   if test -s conftest.err; then
15963     ac_cpp_err=$ac_c_preproc_warn_flag
15964   else
15965     ac_cpp_err=
15966   fi
15967 else
15968   ac_cpp_err=yes
15969 fi
15970 if test -z "$ac_cpp_err"; then
15971   ac_cv_header_dmalloc_h=yes
15972 else
15973   echo "$as_me: failed program was:" >&5
15974   cat conftest.$ac_ext >&5
15975   ac_cv_header_dmalloc_h=no
15976 fi
15977 rm -f conftest.err conftest.$ac_ext
15978 fi
15979 echo "$as_me:15979: result: $ac_cv_header_dmalloc_h" >&5
15980 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15981 if test $ac_cv_header_dmalloc_h = yes; then
15982
15983 echo "$as_me:15983: checking for dmalloc_debug in -ldmalloc" >&5
15984 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15985 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15986   echo $ECHO_N "(cached) $ECHO_C" >&6
15987 else
15988   ac_check_lib_save_LIBS=$LIBS
15989 LIBS="-ldmalloc  $LIBS"
15990 cat >conftest.$ac_ext <<_ACEOF
15991 #line 15991 "configure"
15992 #include "confdefs.h"
15993
15994 /* Override any gcc2 internal prototype to avoid an error.  */
15995 #ifdef __cplusplus
15996 extern "C"
15997 #endif
15998 /* We use char because int might match the return type of a gcc2
15999    builtin and then its argument prototype would still apply.  */
16000 char dmalloc_debug ();
16001 int
16002 main (void)
16003 {
16004 dmalloc_debug ();
16005   ;
16006   return 0;
16007 }
16008 _ACEOF
16009 rm -f conftest.$ac_objext conftest$ac_exeext
16010 if { (eval echo "$as_me:16010: \"$ac_link\"") >&5
16011   (eval $ac_link) 2>&5
16012   ac_status=$?
16013   echo "$as_me:16013: \$? = $ac_status" >&5
16014   (exit $ac_status); } &&
16015          { ac_try='test -s conftest$ac_exeext'
16016   { (eval echo "$as_me:16016: \"$ac_try\"") >&5
16017   (eval $ac_try) 2>&5
16018   ac_status=$?
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); }; }; then
16021   ac_cv_lib_dmalloc_dmalloc_debug=yes
16022 else
16023   echo "$as_me: failed program was:" >&5
16024 cat conftest.$ac_ext >&5
16025 ac_cv_lib_dmalloc_dmalloc_debug=no
16026 fi
16027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16028 LIBS=$ac_check_lib_save_LIBS
16029 fi
16030 echo "$as_me:16030: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16031 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16032 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16033   cat >>confdefs.h <<EOF
16034 #define HAVE_LIBDMALLOC 1
16035 EOF
16036
16037   LIBS="-ldmalloc $LIBS"
16038
16039 fi
16040
16041 fi
16042
16043 fi
16044
16045 echo "$as_me:16045: checking if you want to use dbmalloc for testing" >&5
16046 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16047
16048 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16049 if test "${with_dbmalloc+set}" = set; then
16050   withval="$with_dbmalloc"
16051
16052 cat >>confdefs.h <<EOF
16053 #define USE_DBMALLOC 1
16054 EOF
16055
16056         : ${with_cflags:=-g}
16057         : ${with_no_leaks:=yes}
16058          with_dbmalloc=yes
16059 else
16060   with_dbmalloc=
16061 fi;
16062 echo "$as_me:16062: result: ${with_dbmalloc:-no}" >&5
16063 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16064
16065 case .$with_cflags in
16066 (.*-g*)
16067         case .$CFLAGS in
16068         (.*-g*)
16069                 ;;
16070         (*)
16071
16072 cf_fix_cppflags=no
16073 cf_new_cflags=
16074 cf_new_cppflags=
16075 cf_new_extra_cppflags=
16076
16077 for cf_add_cflags in -g
16078 do
16079 case $cf_fix_cppflags in
16080 (no)
16081         case $cf_add_cflags in
16082         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16083                 case $cf_add_cflags in
16084                 (-D*)
16085                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16086
16087                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16088                                 && test -z "${cf_tst_cflags}" \
16089                                 && cf_fix_cppflags=yes
16090
16091                         if test $cf_fix_cppflags = yes ; then
16092
16093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16095
16096                                 continue
16097                         elif test "${cf_tst_cflags}" = "\"'" ; then
16098
16099         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16100         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16101
16102                                 continue
16103                         fi
16104                         ;;
16105                 esac
16106                 case "$CPPFLAGS" in
16107                 (*$cf_add_cflags)
16108                         ;;
16109                 (*)
16110                         case $cf_add_cflags in
16111                         (-D*)
16112                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16113
16114 CPPFLAGS=`echo "$CPPFLAGS" | \
16115         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16116                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16117
16118                                 ;;
16119                         esac
16120
16121         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16122         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16123
16124                         ;;
16125                 esac
16126                 ;;
16127         (*)
16128
16129         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16130         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16131
16132                 ;;
16133         esac
16134         ;;
16135 (yes)
16136
16137         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16138         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16139
16140         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16141
16142         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16143                 && test -z "${cf_tst_cflags}" \
16144                 && cf_fix_cppflags=no
16145         ;;
16146 esac
16147 done
16148
16149 if test -n "$cf_new_cflags" ; then
16150
16151         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16152         CFLAGS="${CFLAGS}$cf_new_cflags"
16153
16154 fi
16155
16156 if test -n "$cf_new_cppflags" ; then
16157
16158         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16159         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16160
16161 fi
16162
16163 if test -n "$cf_new_extra_cppflags" ; then
16164
16165         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16166         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16167
16168 fi
16169
16170                 ;;
16171         esac
16172         ;;
16173 esac
16174
16175 if test "$with_dbmalloc" = yes ; then
16176         echo "$as_me:16176: checking for dbmalloc.h" >&5
16177 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16178 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16179   echo $ECHO_N "(cached) $ECHO_C" >&6
16180 else
16181   cat >conftest.$ac_ext <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184 #include <dbmalloc.h>
16185 _ACEOF
16186 if { (eval echo "$as_me:16186: \"$ac_cpp conftest.$ac_ext\"") >&5
16187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16188   ac_status=$?
16189   egrep -v '^ *\+' conftest.er1 >conftest.err
16190   rm -f conftest.er1
16191   cat conftest.err >&5
16192   echo "$as_me:16192: \$? = $ac_status" >&5
16193   (exit $ac_status); } >/dev/null; then
16194   if test -s conftest.err; then
16195     ac_cpp_err=$ac_c_preproc_warn_flag
16196   else
16197     ac_cpp_err=
16198   fi
16199 else
16200   ac_cpp_err=yes
16201 fi
16202 if test -z "$ac_cpp_err"; then
16203   ac_cv_header_dbmalloc_h=yes
16204 else
16205   echo "$as_me: failed program was:" >&5
16206   cat conftest.$ac_ext >&5
16207   ac_cv_header_dbmalloc_h=no
16208 fi
16209 rm -f conftest.err conftest.$ac_ext
16210 fi
16211 echo "$as_me:16211: result: $ac_cv_header_dbmalloc_h" >&5
16212 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16213 if test $ac_cv_header_dbmalloc_h = yes; then
16214
16215 echo "$as_me:16215: checking for debug_malloc in -ldbmalloc" >&5
16216 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16217 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16218   echo $ECHO_N "(cached) $ECHO_C" >&6
16219 else
16220   ac_check_lib_save_LIBS=$LIBS
16221 LIBS="-ldbmalloc  $LIBS"
16222 cat >conftest.$ac_ext <<_ACEOF
16223 #line 16223 "configure"
16224 #include "confdefs.h"
16225
16226 /* Override any gcc2 internal prototype to avoid an error.  */
16227 #ifdef __cplusplus
16228 extern "C"
16229 #endif
16230 /* We use char because int might match the return type of a gcc2
16231    builtin and then its argument prototype would still apply.  */
16232 char debug_malloc ();
16233 int
16234 main (void)
16235 {
16236 debug_malloc ();
16237   ;
16238   return 0;
16239 }
16240 _ACEOF
16241 rm -f conftest.$ac_objext conftest$ac_exeext
16242 if { (eval echo "$as_me:16242: \"$ac_link\"") >&5
16243   (eval $ac_link) 2>&5
16244   ac_status=$?
16245   echo "$as_me:16245: \$? = $ac_status" >&5
16246   (exit $ac_status); } &&
16247          { ac_try='test -s conftest$ac_exeext'
16248   { (eval echo "$as_me:16248: \"$ac_try\"") >&5
16249   (eval $ac_try) 2>&5
16250   ac_status=$?
16251   echo "$as_me:16251: \$? = $ac_status" >&5
16252   (exit $ac_status); }; }; then
16253   ac_cv_lib_dbmalloc_debug_malloc=yes
16254 else
16255   echo "$as_me: failed program was:" >&5
16256 cat conftest.$ac_ext >&5
16257 ac_cv_lib_dbmalloc_debug_malloc=no
16258 fi
16259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16260 LIBS=$ac_check_lib_save_LIBS
16261 fi
16262 echo "$as_me:16262: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16263 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16264 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16265   cat >>confdefs.h <<EOF
16266 #define HAVE_LIBDBMALLOC 1
16267 EOF
16268
16269   LIBS="-ldbmalloc $LIBS"
16270
16271 fi
16272
16273 fi
16274
16275 fi
16276
16277 echo "$as_me:16277: checking if you want to use valgrind for testing" >&5
16278 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16279
16280 # Check whether --with-valgrind or --without-valgrind was given.
16281 if test "${with_valgrind+set}" = set; then
16282   withval="$with_valgrind"
16283
16284 cat >>confdefs.h <<EOF
16285 #define USE_VALGRIND 1
16286 EOF
16287
16288         : ${with_cflags:=-g}
16289         : ${with_no_leaks:=yes}
16290          with_valgrind=yes
16291 else
16292   with_valgrind=
16293 fi;
16294 echo "$as_me:16294: result: ${with_valgrind:-no}" >&5
16295 echo "${ECHO_T}${with_valgrind:-no}" >&6
16296
16297 case .$with_cflags in
16298 (.*-g*)
16299         case .$CFLAGS in
16300         (.*-g*)
16301                 ;;
16302         (*)
16303
16304 cf_fix_cppflags=no
16305 cf_new_cflags=
16306 cf_new_cppflags=
16307 cf_new_extra_cppflags=
16308
16309 for cf_add_cflags in -g
16310 do
16311 case $cf_fix_cppflags in
16312 (no)
16313         case $cf_add_cflags in
16314         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16315                 case $cf_add_cflags in
16316                 (-D*)
16317                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16318
16319                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16320                                 && test -z "${cf_tst_cflags}" \
16321                                 && cf_fix_cppflags=yes
16322
16323                         if test $cf_fix_cppflags = yes ; then
16324
16325         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16326         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16327
16328                                 continue
16329                         elif test "${cf_tst_cflags}" = "\"'" ; then
16330
16331         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16332         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16333
16334                                 continue
16335                         fi
16336                         ;;
16337                 esac
16338                 case "$CPPFLAGS" in
16339                 (*$cf_add_cflags)
16340                         ;;
16341                 (*)
16342                         case $cf_add_cflags in
16343                         (-D*)
16344                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16345
16346 CPPFLAGS=`echo "$CPPFLAGS" | \
16347         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16348                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16349
16350                                 ;;
16351                         esac
16352
16353         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16354         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16355
16356                         ;;
16357                 esac
16358                 ;;
16359         (*)
16360
16361         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16362         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16363
16364                 ;;
16365         esac
16366         ;;
16367 (yes)
16368
16369         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16370         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16371
16372         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16373
16374         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16375                 && test -z "${cf_tst_cflags}" \
16376                 && cf_fix_cppflags=no
16377         ;;
16378 esac
16379 done
16380
16381 if test -n "$cf_new_cflags" ; then
16382
16383         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16384         CFLAGS="${CFLAGS}$cf_new_cflags"
16385
16386 fi
16387
16388 if test -n "$cf_new_cppflags" ; then
16389
16390         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16391         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16392
16393 fi
16394
16395 if test -n "$cf_new_extra_cppflags" ; then
16396
16397         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16398         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16399
16400 fi
16401
16402                 ;;
16403         esac
16404         ;;
16405 esac
16406
16407 echo "$as_me:16407: checking if you want to perform memory-leak testing" >&5
16408 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16409
16410 # Check whether --enable-leaks or --disable-leaks was given.
16411 if test "${enable_leaks+set}" = set; then
16412   enableval="$enable_leaks"
16413   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16414 else
16415   : ${with_no_leaks:=no}
16416 fi;
16417 echo "$as_me:16417: result: $with_no_leaks" >&5
16418 echo "${ECHO_T}$with_no_leaks" >&6
16419
16420 if test "$with_no_leaks" = yes ; then
16421
16422 cat >>confdefs.h <<\EOF
16423 #define NO_LEAKS 1
16424 EOF
16425
16426 cat >>confdefs.h <<\EOF
16427 #define YY_NO_LEAKS 1
16428 EOF
16429
16430 fi
16431
16432 cat >>confdefs.h <<\EOF
16433 #define HAVE_NC_ALLOC_H 1
16434 EOF
16435
16436 ###     use option --enable-expanded to generate certain macros as functions
16437
16438 # Check whether --enable-expanded or --disable-expanded was given.
16439 if test "${enable_expanded+set}" = set; then
16440   enableval="$enable_expanded"
16441   test "x$enableval" = xyes &&
16442 cat >>confdefs.h <<\EOF
16443 #define NCURSES_EXPANDED 1
16444 EOF
16445
16446 fi;
16447
16448 ###     use option --disable-macros to suppress macros in favor of functions
16449
16450 # Check whether --enable-macros or --disable-macros was given.
16451 if test "${enable_macros+set}" = set; then
16452   enableval="$enable_macros"
16453   test "$enableval" = no &&
16454 cat >>confdefs.h <<\EOF
16455 #define NCURSES_NOMACROS 1
16456 EOF
16457
16458 fi;
16459
16460 # Normally we only add trace() to the debug-library.  Allow this to be
16461 # extended to all models of the ncurses library:
16462 cf_all_traces=no
16463 case "$CFLAGS $CPPFLAGS" in
16464 (*-DTRACE*)
16465         cf_all_traces=yes
16466         ;;
16467 esac
16468
16469 echo "$as_me:16469: checking whether to add trace feature to all models" >&5
16470 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16471
16472 # Check whether --with-trace or --without-trace was given.
16473 if test "${with_trace+set}" = set; then
16474   withval="$with_trace"
16475   cf_with_trace=$withval
16476 else
16477   cf_with_trace=$cf_all_traces
16478 fi;
16479 echo "$as_me:16479: result: $cf_with_trace" >&5
16480 echo "${ECHO_T}$cf_with_trace" >&6
16481
16482 if test "x$cf_with_trace" = xyes ; then
16483         LIB_TRACING=all
16484         ADA_TRACE=TRUE
16485
16486 cf_fix_cppflags=no
16487 cf_new_cflags=
16488 cf_new_cppflags=
16489 cf_new_extra_cppflags=
16490
16491 for cf_add_cflags in -DTRACE
16492 do
16493 case $cf_fix_cppflags in
16494 (no)
16495         case $cf_add_cflags in
16496         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16497                 case $cf_add_cflags in
16498                 (-D*)
16499                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16500
16501                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16502                                 && test -z "${cf_tst_cflags}" \
16503                                 && cf_fix_cppflags=yes
16504
16505                         if test $cf_fix_cppflags = yes ; then
16506
16507         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16508         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16509
16510                                 continue
16511                         elif test "${cf_tst_cflags}" = "\"'" ; then
16512
16513         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16514         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16515
16516                                 continue
16517                         fi
16518                         ;;
16519                 esac
16520                 case "$CPPFLAGS" in
16521                 (*$cf_add_cflags)
16522                         ;;
16523                 (*)
16524                         case $cf_add_cflags in
16525                         (-D*)
16526                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16527
16528 CPPFLAGS=`echo "$CPPFLAGS" | \
16529         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16530                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16531
16532                                 ;;
16533                         esac
16534
16535         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16536         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16537
16538                         ;;
16539                 esac
16540                 ;;
16541         (*)
16542
16543         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16544         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16545
16546                 ;;
16547         esac
16548         ;;
16549 (yes)
16550
16551         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16552         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16553
16554         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16555
16556         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16557                 && test -z "${cf_tst_cflags}" \
16558                 && cf_fix_cppflags=no
16559         ;;
16560 esac
16561 done
16562
16563 if test -n "$cf_new_cflags" ; then
16564
16565         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16566         CFLAGS="${CFLAGS}$cf_new_cflags"
16567
16568 fi
16569
16570 if test -n "$cf_new_cppflags" ; then
16571
16572         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16573         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16574
16575 fi
16576
16577 if test -n "$cf_new_extra_cppflags" ; then
16578
16579         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16580         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16581
16582 fi
16583
16584 cat >>confdefs.h <<\EOF
16585 #define HAVE__TRACEF 1
16586 EOF
16587
16588 else
16589         LIB_TRACING=DEBUG
16590         ADA_TRACE=FALSE
16591 fi
16592
16593 echo "$as_me:16593: checking if we want to use GNAT projects" >&5
16594 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16595
16596 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16597 if test "${enable_gnat_projects+set}" = set; then
16598   enableval="$enable_gnat_projects"
16599   test "$enableval" != no && enableval=yes
16600         if test "$enableval" != "yes" ; then
16601     enable_gnat_projects=no
16602         else
16603                 enable_gnat_projects=yes
16604         fi
16605 else
16606   enableval=yes
16607         enable_gnat_projects=yes
16608
16609 fi;
16610 echo "$as_me:16610: result: $enable_gnat_projects" >&5
16611 echo "${ECHO_T}$enable_gnat_projects" >&6
16612
16613 ###     Checks for libraries.
16614 case $cf_cv_system_name in
16615 (*mingw32*|*mingw64*)
16616         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16617         LIBS=" -lpsapi $LIBS"
16618         ;;
16619 (*)
16620 echo "$as_me:16620: checking for gettimeofday" >&5
16621 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16622 if test "${ac_cv_func_gettimeofday+set}" = set; then
16623   echo $ECHO_N "(cached) $ECHO_C" >&6
16624 else
16625   cat >conftest.$ac_ext <<_ACEOF
16626 #line 16626 "configure"
16627 #include "confdefs.h"
16628 #define gettimeofday autoconf_temporary
16629 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16630 #undef gettimeofday
16631
16632 #ifdef __cplusplus
16633 extern "C"
16634 #endif
16635
16636 /* We use char because int might match the return type of a gcc2
16637    builtin and then its argument prototype would still apply.  */
16638 char gettimeofday (void);
16639
16640 int
16641 main (void)
16642 {
16643
16644 /* The GNU C library defines stubs for functions which it implements
16645     to always fail with ENOSYS.  Some functions are actually named
16646     something starting with __ and the normal name is an alias.  */
16647 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16648 #error found stub for gettimeofday
16649 #endif
16650
16651         return gettimeofday ();
16652   ;
16653   return 0;
16654 }
16655 _ACEOF
16656 rm -f conftest.$ac_objext conftest$ac_exeext
16657 if { (eval echo "$as_me:16657: \"$ac_link\"") >&5
16658   (eval $ac_link) 2>&5
16659   ac_status=$?
16660   echo "$as_me:16660: \$? = $ac_status" >&5
16661   (exit $ac_status); } &&
16662          { ac_try='test -s conftest$ac_exeext'
16663   { (eval echo "$as_me:16663: \"$ac_try\"") >&5
16664   (eval $ac_try) 2>&5
16665   ac_status=$?
16666   echo "$as_me:16666: \$? = $ac_status" >&5
16667   (exit $ac_status); }; }; then
16668   ac_cv_func_gettimeofday=yes
16669 else
16670   echo "$as_me: failed program was:" >&5
16671 cat conftest.$ac_ext >&5
16672 ac_cv_func_gettimeofday=no
16673 fi
16674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16675 fi
16676 echo "$as_me:16676: result: $ac_cv_func_gettimeofday" >&5
16677 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16678 if test $ac_cv_func_gettimeofday = yes; then
16679
16680 cat >>confdefs.h <<\EOF
16681 #define HAVE_GETTIMEOFDAY 1
16682 EOF
16683
16684 else
16685
16686 echo "$as_me:16686: checking for gettimeofday in -lbsd" >&5
16687 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16688 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16689   echo $ECHO_N "(cached) $ECHO_C" >&6
16690 else
16691   ac_check_lib_save_LIBS=$LIBS
16692 LIBS="-lbsd  $LIBS"
16693 cat >conftest.$ac_ext <<_ACEOF
16694 #line 16694 "configure"
16695 #include "confdefs.h"
16696
16697 /* Override any gcc2 internal prototype to avoid an error.  */
16698 #ifdef __cplusplus
16699 extern "C"
16700 #endif
16701 /* We use char because int might match the return type of a gcc2
16702    builtin and then its argument prototype would still apply.  */
16703 char gettimeofday ();
16704 int
16705 main (void)
16706 {
16707 gettimeofday ();
16708   ;
16709   return 0;
16710 }
16711 _ACEOF
16712 rm -f conftest.$ac_objext conftest$ac_exeext
16713 if { (eval echo "$as_me:16713: \"$ac_link\"") >&5
16714   (eval $ac_link) 2>&5
16715   ac_status=$?
16716   echo "$as_me:16716: \$? = $ac_status" >&5
16717   (exit $ac_status); } &&
16718          { ac_try='test -s conftest$ac_exeext'
16719   { (eval echo "$as_me:16719: \"$ac_try\"") >&5
16720   (eval $ac_try) 2>&5
16721   ac_status=$?
16722   echo "$as_me:16722: \$? = $ac_status" >&5
16723   (exit $ac_status); }; }; then
16724   ac_cv_lib_bsd_gettimeofday=yes
16725 else
16726   echo "$as_me: failed program was:" >&5
16727 cat conftest.$ac_ext >&5
16728 ac_cv_lib_bsd_gettimeofday=no
16729 fi
16730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16731 LIBS=$ac_check_lib_save_LIBS
16732 fi
16733 echo "$as_me:16733: result: $ac_cv_lib_bsd_gettimeofday" >&5
16734 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16735 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16736
16737 cat >>confdefs.h <<\EOF
16738 #define HAVE_GETTIMEOFDAY 1
16739 EOF
16740
16741 cf_add_libs="-lbsd"
16742 # Filter out duplicates - this happens with badly-designed ".pc" files...
16743 for cf_add_1lib in $LIBS
16744 do
16745         for cf_add_2lib in $cf_add_libs
16746         do
16747                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16748                 then
16749                         cf_add_1lib=
16750                         break
16751                 fi
16752         done
16753         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16754 done
16755 LIBS="$cf_add_libs"
16756
16757 fi
16758
16759 fi
16760         ;;
16761 esac
16762
16763 echo "$as_me:16763: checking if -lm needed for math functions" >&5
16764 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16765 if test "${cf_cv_need_libm+set}" = set; then
16766   echo $ECHO_N "(cached) $ECHO_C" >&6
16767 else
16768
16769         cat >conftest.$ac_ext <<_ACEOF
16770 #line 16770 "configure"
16771 #include "confdefs.h"
16772
16773         #include <stdio.h>
16774         #include <stdlib.h>
16775         #include <math.h>
16776
16777 int
16778 main (void)
16779 {
16780 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16781   ;
16782   return 0;
16783 }
16784 _ACEOF
16785 rm -f conftest.$ac_objext conftest$ac_exeext
16786 if { (eval echo "$as_me:16786: \"$ac_link\"") >&5
16787   (eval $ac_link) 2>&5
16788   ac_status=$?
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); } &&
16791          { ac_try='test -s conftest$ac_exeext'
16792   { (eval echo "$as_me:16792: \"$ac_try\"") >&5
16793   (eval $ac_try) 2>&5
16794   ac_status=$?
16795   echo "$as_me:16795: \$? = $ac_status" >&5
16796   (exit $ac_status); }; }; then
16797   cf_cv_need_libm=no
16798 else
16799   echo "$as_me: failed program was:" >&5
16800 cat conftest.$ac_ext >&5
16801 cf_cv_need_libm=yes
16802 fi
16803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16804 fi
16805 echo "$as_me:16805: result: $cf_cv_need_libm" >&5
16806 echo "${ECHO_T}$cf_cv_need_libm" >&6
16807 if test "$cf_cv_need_libm" = yes
16808 then
16809 MATH_LIB=-lm
16810 fi
16811
16812 ###     Checks for header files.
16813 echo "$as_me:16813: checking for ANSI C header files" >&5
16814 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16815 if test "${ac_cv_header_stdc+set}" = set; then
16816   echo $ECHO_N "(cached) $ECHO_C" >&6
16817 else
16818   cat >conftest.$ac_ext <<_ACEOF
16819 #line 16819 "configure"
16820 #include "confdefs.h"
16821 #include <stdlib.h>
16822 #include <stdarg.h>
16823 #include <string.h>
16824 #include <float.h>
16825
16826 _ACEOF
16827 if { (eval echo "$as_me:16827: \"$ac_cpp conftest.$ac_ext\"") >&5
16828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16829   ac_status=$?
16830   egrep -v '^ *\+' conftest.er1 >conftest.err
16831   rm -f conftest.er1
16832   cat conftest.err >&5
16833   echo "$as_me:16833: \$? = $ac_status" >&5
16834   (exit $ac_status); } >/dev/null; then
16835   if test -s conftest.err; then
16836     ac_cpp_err=$ac_c_preproc_warn_flag
16837   else
16838     ac_cpp_err=
16839   fi
16840 else
16841   ac_cpp_err=yes
16842 fi
16843 if test -z "$ac_cpp_err"; then
16844   ac_cv_header_stdc=yes
16845 else
16846   echo "$as_me: failed program was:" >&5
16847   cat conftest.$ac_ext >&5
16848   ac_cv_header_stdc=no
16849 fi
16850 rm -f conftest.err conftest.$ac_ext
16851
16852 if test $ac_cv_header_stdc = yes; then
16853   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16854   cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857 #include <string.h>
16858
16859 _ACEOF
16860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16861   egrep "memchr" >/dev/null 2>&1; then
16862   :
16863 else
16864   ac_cv_header_stdc=no
16865 fi
16866 rm -rf conftest*
16867
16868 fi
16869
16870 if test $ac_cv_header_stdc = yes; then
16871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16872   cat >conftest.$ac_ext <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 #include <stdlib.h>
16876
16877 _ACEOF
16878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16879   egrep "free" >/dev/null 2>&1; then
16880   :
16881 else
16882   ac_cv_header_stdc=no
16883 fi
16884 rm -rf conftest*
16885
16886 fi
16887
16888 if test $ac_cv_header_stdc = yes; then
16889   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16890   if test "$cross_compiling" = yes; then
16891   :
16892 else
16893   cat >conftest.$ac_ext <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16896 #include <ctype.h>
16897 #if ((' ' & 0x0FF) == 0x020)
16898 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16899 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16900 #else
16901 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16902                      || ('j' <= (c) && (c) <= 'r') \
16903                      || ('s' <= (c) && (c) <= 'z'))
16904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16905 #endif
16906
16907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16908 int
16909 main (void)
16910 {
16911   int i;
16912   for (i = 0; i < 256; i++)
16913     if (XOR (islower (i), ISLOWER (i))
16914         || toupper (i) != TOUPPER (i))
16915       $ac_main_return(2);
16916   $ac_main_return (0);
16917 }
16918 _ACEOF
16919 rm -f conftest$ac_exeext
16920 if { (eval echo "$as_me:16920: \"$ac_link\"") >&5
16921   (eval $ac_link) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16925   { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926   (eval $ac_try) 2>&5
16927   ac_status=$?
16928   echo "$as_me:16928: \$? = $ac_status" >&5
16929   (exit $ac_status); }; }; then
16930   :
16931 else
16932   echo "$as_me: program exited with status $ac_status" >&5
16933 echo "$as_me: failed program was:" >&5
16934 cat conftest.$ac_ext >&5
16935 ac_cv_header_stdc=no
16936 fi
16937 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16938 fi
16939 fi
16940 fi
16941 echo "$as_me:16941: result: $ac_cv_header_stdc" >&5
16942 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16943 if test $ac_cv_header_stdc = yes; then
16944
16945 cat >>confdefs.h <<\EOF
16946 #define STDC_HEADERS 1
16947 EOF
16948
16949 fi
16950
16951 ac_header_dirent=no
16952 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16953   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16954 echo "$as_me:16954: checking for $ac_hdr that defines DIR" >&5
16955 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16957   echo $ECHO_N "(cached) $ECHO_C" >&6
16958 else
16959   cat >conftest.$ac_ext <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16962 #include <sys/types.h>
16963 #include <$ac_hdr>
16964
16965 int
16966 main (void)
16967 {
16968 if ((DIR *) 0)
16969 return 0;
16970   ;
16971   return 0;
16972 }
16973 _ACEOF
16974 rm -f conftest.$ac_objext
16975 if { (eval echo "$as_me:16975: \"$ac_compile\"") >&5
16976   (eval $ac_compile) 2>&5
16977   ac_status=$?
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit $ac_status); } &&
16980          { ac_try='test -s conftest.$ac_objext'
16981   { (eval echo "$as_me:16981: \"$ac_try\"") >&5
16982   (eval $ac_try) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit $ac_status); }; }; then
16986   eval "$as_ac_Header=yes"
16987 else
16988   echo "$as_me: failed program was:" >&5
16989 cat conftest.$ac_ext >&5
16990 eval "$as_ac_Header=no"
16991 fi
16992 rm -f conftest.$ac_objext conftest.$ac_ext
16993 fi
16994 echo "$as_me:16994: result: `eval echo '${'$as_ac_Header'}'`" >&5
16995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16997   cat >>confdefs.h <<EOF
16998 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16999 EOF
17000
17001 ac_header_dirent=$ac_hdr; break
17002 fi
17003
17004 done
17005 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17006 if test $ac_header_dirent = dirent.h; then
17007   echo "$as_me:17007: checking for opendir in -ldir" >&5
17008 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17009 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17010   echo $ECHO_N "(cached) $ECHO_C" >&6
17011 else
17012   ac_check_lib_save_LIBS=$LIBS
17013 LIBS="-ldir  $LIBS"
17014 cat >conftest.$ac_ext <<_ACEOF
17015 #line 17015 "configure"
17016 #include "confdefs.h"
17017
17018 /* Override any gcc2 internal prototype to avoid an error.  */
17019 #ifdef __cplusplus
17020 extern "C"
17021 #endif
17022 /* We use char because int might match the return type of a gcc2
17023    builtin and then its argument prototype would still apply.  */
17024 char opendir ();
17025 int
17026 main (void)
17027 {
17028 opendir ();
17029   ;
17030   return 0;
17031 }
17032 _ACEOF
17033 rm -f conftest.$ac_objext conftest$ac_exeext
17034 if { (eval echo "$as_me:17034: \"$ac_link\"") >&5
17035   (eval $ac_link) 2>&5
17036   ac_status=$?
17037   echo "$as_me:17037: \$? = $ac_status" >&5
17038   (exit $ac_status); } &&
17039          { ac_try='test -s conftest$ac_exeext'
17040   { (eval echo "$as_me:17040: \"$ac_try\"") >&5
17041   (eval $ac_try) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); }; }; then
17045   ac_cv_lib_dir_opendir=yes
17046 else
17047   echo "$as_me: failed program was:" >&5
17048 cat conftest.$ac_ext >&5
17049 ac_cv_lib_dir_opendir=no
17050 fi
17051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17052 LIBS=$ac_check_lib_save_LIBS
17053 fi
17054 echo "$as_me:17054: result: $ac_cv_lib_dir_opendir" >&5
17055 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17056 if test $ac_cv_lib_dir_opendir = yes; then
17057   LIBS="$LIBS -ldir"
17058 fi
17059
17060 else
17061   echo "$as_me:17061: checking for opendir in -lx" >&5
17062 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17063 if test "${ac_cv_lib_x_opendir+set}" = set; then
17064   echo $ECHO_N "(cached) $ECHO_C" >&6
17065 else
17066   ac_check_lib_save_LIBS=$LIBS
17067 LIBS="-lx  $LIBS"
17068 cat >conftest.$ac_ext <<_ACEOF
17069 #line 17069 "configure"
17070 #include "confdefs.h"
17071
17072 /* Override any gcc2 internal prototype to avoid an error.  */
17073 #ifdef __cplusplus
17074 extern "C"
17075 #endif
17076 /* We use char because int might match the return type of a gcc2
17077    builtin and then its argument prototype would still apply.  */
17078 char opendir ();
17079 int
17080 main (void)
17081 {
17082 opendir ();
17083   ;
17084   return 0;
17085 }
17086 _ACEOF
17087 rm -f conftest.$ac_objext conftest$ac_exeext
17088 if { (eval echo "$as_me:17088: \"$ac_link\"") >&5
17089   (eval $ac_link) 2>&5
17090   ac_status=$?
17091   echo "$as_me:17091: \$? = $ac_status" >&5
17092   (exit $ac_status); } &&
17093          { ac_try='test -s conftest$ac_exeext'
17094   { (eval echo "$as_me:17094: \"$ac_try\"") >&5
17095   (eval $ac_try) 2>&5
17096   ac_status=$?
17097   echo "$as_me:17097: \$? = $ac_status" >&5
17098   (exit $ac_status); }; }; then
17099   ac_cv_lib_x_opendir=yes
17100 else
17101   echo "$as_me: failed program was:" >&5
17102 cat conftest.$ac_ext >&5
17103 ac_cv_lib_x_opendir=no
17104 fi
17105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17106 LIBS=$ac_check_lib_save_LIBS
17107 fi
17108 echo "$as_me:17108: result: $ac_cv_lib_x_opendir" >&5
17109 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17110 if test $ac_cv_lib_x_opendir = yes; then
17111   LIBS="$LIBS -lx"
17112 fi
17113
17114 fi
17115
17116 echo "$as_me:17116: checking whether time.h and sys/time.h may both be included" >&5
17117 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17118 if test "${ac_cv_header_time+set}" = set; then
17119   echo $ECHO_N "(cached) $ECHO_C" >&6
17120 else
17121   cat >conftest.$ac_ext <<_ACEOF
17122 #line 17122 "configure"
17123 #include "confdefs.h"
17124 #include <sys/types.h>
17125 #include <sys/time.h>
17126 #include <time.h>
17127
17128 int
17129 main (void)
17130 {
17131 if ((struct tm *) 0)
17132 return 0;
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 rm -f conftest.$ac_objext
17138 if { (eval echo "$as_me:17138: \"$ac_compile\"") >&5
17139   (eval $ac_compile) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); } &&
17143          { ac_try='test -s conftest.$ac_objext'
17144   { (eval echo "$as_me:17144: \"$ac_try\"") >&5
17145   (eval $ac_try) 2>&5
17146   ac_status=$?
17147   echo "$as_me:17147: \$? = $ac_status" >&5
17148   (exit $ac_status); }; }; then
17149   ac_cv_header_time=yes
17150 else
17151   echo "$as_me: failed program was:" >&5
17152 cat conftest.$ac_ext >&5
17153 ac_cv_header_time=no
17154 fi
17155 rm -f conftest.$ac_objext conftest.$ac_ext
17156 fi
17157 echo "$as_me:17157: result: $ac_cv_header_time" >&5
17158 echo "${ECHO_T}$ac_cv_header_time" >&6
17159 if test $ac_cv_header_time = yes; then
17160
17161 cat >>confdefs.h <<\EOF
17162 #define TIME_WITH_SYS_TIME 1
17163 EOF
17164
17165 fi
17166
17167 cf_regex_func=no
17168
17169 cf_regex_libs="regex re"
17170 case $host_os in
17171 (mingw*)
17172         cf_regex_libs="gnurx $cf_regex_libs"
17173         ;;
17174 esac
17175
17176 echo "$as_me:17176: checking for regcomp" >&5
17177 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17178 if test "${ac_cv_func_regcomp+set}" = set; then
17179   echo $ECHO_N "(cached) $ECHO_C" >&6
17180 else
17181   cat >conftest.$ac_ext <<_ACEOF
17182 #line 17182 "configure"
17183 #include "confdefs.h"
17184 #define regcomp autoconf_temporary
17185 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17186 #undef regcomp
17187
17188 #ifdef __cplusplus
17189 extern "C"
17190 #endif
17191
17192 /* We use char because int might match the return type of a gcc2
17193    builtin and then its argument prototype would still apply.  */
17194 char regcomp (void);
17195
17196 int
17197 main (void)
17198 {
17199
17200 /* The GNU C library defines stubs for functions which it implements
17201     to always fail with ENOSYS.  Some functions are actually named
17202     something starting with __ and the normal name is an alias.  */
17203 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17204 #error found stub for regcomp
17205 #endif
17206
17207         return regcomp ();
17208   ;
17209   return 0;
17210 }
17211 _ACEOF
17212 rm -f conftest.$ac_objext conftest$ac_exeext
17213 if { (eval echo "$as_me:17213: \"$ac_link\"") >&5
17214   (eval $ac_link) 2>&5
17215   ac_status=$?
17216   echo "$as_me:17216: \$? = $ac_status" >&5
17217   (exit $ac_status); } &&
17218          { ac_try='test -s conftest$ac_exeext'
17219   { (eval echo "$as_me:17219: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit $ac_status); }; }; then
17224   ac_cv_func_regcomp=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227 cat conftest.$ac_ext >&5
17228 ac_cv_func_regcomp=no
17229 fi
17230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17231 fi
17232 echo "$as_me:17232: result: $ac_cv_func_regcomp" >&5
17233 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17234 if test $ac_cv_func_regcomp = yes; then
17235   cf_regex_func=regcomp
17236 else
17237
17238         for cf_regex_lib in $cf_regex_libs
17239         do
17240                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17241 echo "$as_me:17241: checking for regcomp in -l$cf_regex_lib" >&5
17242 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17243 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17244   echo $ECHO_N "(cached) $ECHO_C" >&6
17245 else
17246   ac_check_lib_save_LIBS=$LIBS
17247 LIBS="-l$cf_regex_lib  $LIBS"
17248 cat >conftest.$ac_ext <<_ACEOF
17249 #line 17249 "configure"
17250 #include "confdefs.h"
17251
17252 /* Override any gcc2 internal prototype to avoid an error.  */
17253 #ifdef __cplusplus
17254 extern "C"
17255 #endif
17256 /* We use char because int might match the return type of a gcc2
17257    builtin and then its argument prototype would still apply.  */
17258 char regcomp ();
17259 int
17260 main (void)
17261 {
17262 regcomp ();
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 rm -f conftest.$ac_objext conftest$ac_exeext
17268 if { (eval echo "$as_me:17268: \"$ac_link\"") >&5
17269   (eval $ac_link) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); } &&
17273          { ac_try='test -s conftest$ac_exeext'
17274   { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); }; }; then
17279   eval "$as_ac_Lib=yes"
17280 else
17281   echo "$as_me: failed program was:" >&5
17282 cat conftest.$ac_ext >&5
17283 eval "$as_ac_Lib=no"
17284 fi
17285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17286 LIBS=$ac_check_lib_save_LIBS
17287 fi
17288 echo "$as_me:17288: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17289 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17290 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17291
17292 cf_add_libs="-l$cf_regex_lib"
17293 # Filter out duplicates - this happens with badly-designed ".pc" files...
17294 for cf_add_1lib in $LIBS
17295 do
17296         for cf_add_2lib in $cf_add_libs
17297         do
17298                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17299                 then
17300                         cf_add_1lib=
17301                         break
17302                 fi
17303         done
17304         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17305 done
17306 LIBS="$cf_add_libs"
17307
17308                                 cf_regex_func=regcomp
17309                                 break
17310 fi
17311
17312         done
17313
17314 fi
17315
17316 if test "$cf_regex_func" = no ; then
17317         echo "$as_me:17317: checking for compile" >&5
17318 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17319 if test "${ac_cv_func_compile+set}" = set; then
17320   echo $ECHO_N "(cached) $ECHO_C" >&6
17321 else
17322   cat >conftest.$ac_ext <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17325 #define compile autoconf_temporary
17326 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17327 #undef compile
17328
17329 #ifdef __cplusplus
17330 extern "C"
17331 #endif
17332
17333 /* We use char because int might match the return type of a gcc2
17334    builtin and then its argument prototype would still apply.  */
17335 char compile (void);
17336
17337 int
17338 main (void)
17339 {
17340
17341 /* The GNU C library defines stubs for functions which it implements
17342     to always fail with ENOSYS.  Some functions are actually named
17343     something starting with __ and the normal name is an alias.  */
17344 #if defined (__stub_compile) || defined (__stub___compile)
17345 #error found stub for compile
17346 #endif
17347
17348         return compile ();
17349   ;
17350   return 0;
17351 }
17352 _ACEOF
17353 rm -f conftest.$ac_objext conftest$ac_exeext
17354 if { (eval echo "$as_me:17354: \"$ac_link\"") >&5
17355   (eval $ac_link) 2>&5
17356   ac_status=$?
17357   echo "$as_me:17357: \$? = $ac_status" >&5
17358   (exit $ac_status); } &&
17359          { ac_try='test -s conftest$ac_exeext'
17360   { (eval echo "$as_me:17360: \"$ac_try\"") >&5
17361   (eval $ac_try) 2>&5
17362   ac_status=$?
17363   echo "$as_me:17363: \$? = $ac_status" >&5
17364   (exit $ac_status); }; }; then
17365   ac_cv_func_compile=yes
17366 else
17367   echo "$as_me: failed program was:" >&5
17368 cat conftest.$ac_ext >&5
17369 ac_cv_func_compile=no
17370 fi
17371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17372 fi
17373 echo "$as_me:17373: result: $ac_cv_func_compile" >&5
17374 echo "${ECHO_T}$ac_cv_func_compile" >&6
17375 if test $ac_cv_func_compile = yes; then
17376   cf_regex_func=compile
17377 else
17378
17379                 echo "$as_me:17379: checking for compile in -lgen" >&5
17380 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17381 if test "${ac_cv_lib_gen_compile+set}" = set; then
17382   echo $ECHO_N "(cached) $ECHO_C" >&6
17383 else
17384   ac_check_lib_save_LIBS=$LIBS
17385 LIBS="-lgen  $LIBS"
17386 cat >conftest.$ac_ext <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17389
17390 /* Override any gcc2 internal prototype to avoid an error.  */
17391 #ifdef __cplusplus
17392 extern "C"
17393 #endif
17394 /* We use char because int might match the return type of a gcc2
17395    builtin and then its argument prototype would still apply.  */
17396 char compile ();
17397 int
17398 main (void)
17399 {
17400 compile ();
17401   ;
17402   return 0;
17403 }
17404 _ACEOF
17405 rm -f conftest.$ac_objext conftest$ac_exeext
17406 if { (eval echo "$as_me:17406: \"$ac_link\"") >&5
17407   (eval $ac_link) 2>&5
17408   ac_status=$?
17409   echo "$as_me:17409: \$? = $ac_status" >&5
17410   (exit $ac_status); } &&
17411          { ac_try='test -s conftest$ac_exeext'
17412   { (eval echo "$as_me:17412: \"$ac_try\"") >&5
17413   (eval $ac_try) 2>&5
17414   ac_status=$?
17415   echo "$as_me:17415: \$? = $ac_status" >&5
17416   (exit $ac_status); }; }; then
17417   ac_cv_lib_gen_compile=yes
17418 else
17419   echo "$as_me: failed program was:" >&5
17420 cat conftest.$ac_ext >&5
17421 ac_cv_lib_gen_compile=no
17422 fi
17423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17424 LIBS=$ac_check_lib_save_LIBS
17425 fi
17426 echo "$as_me:17426: result: $ac_cv_lib_gen_compile" >&5
17427 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17428 if test $ac_cv_lib_gen_compile = yes; then
17429
17430 cf_add_libs="-lgen"
17431 # Filter out duplicates - this happens with badly-designed ".pc" files...
17432 for cf_add_1lib in $LIBS
17433 do
17434         for cf_add_2lib in $cf_add_libs
17435         do
17436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17437                 then
17438                         cf_add_1lib=
17439                         break
17440                 fi
17441         done
17442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17443 done
17444 LIBS="$cf_add_libs"
17445
17446                                 cf_regex_func=compile
17447 fi
17448
17449 fi
17450
17451 fi
17452
17453 if test "$cf_regex_func" = no ; then
17454         { echo "$as_me:17454: WARNING: cannot find regular expression library" >&5
17455 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17456 fi
17457
17458 echo "$as_me:17458: checking for regular-expression headers" >&5
17459 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17460 if test "${cf_cv_regex_hdrs+set}" = set; then
17461   echo $ECHO_N "(cached) $ECHO_C" >&6
17462 else
17463
17464 cf_cv_regex_hdrs=no
17465 case $cf_regex_func in
17466 (compile)
17467         for cf_regex_hdr in regexp.h regexpr.h
17468         do
17469                 cat >conftest.$ac_ext <<_ACEOF
17470 #line 17470 "configure"
17471 #include "confdefs.h"
17472 #include <$cf_regex_hdr>
17473 int
17474 main (void)
17475 {
17476
17477                         char *p = compile("", "", "", 0);
17478                         int x = step("", "");
17479
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 rm -f conftest.$ac_objext conftest$ac_exeext
17485 if { (eval echo "$as_me:17485: \"$ac_link\"") >&5
17486   (eval $ac_link) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit $ac_status); } &&
17490          { ac_try='test -s conftest$ac_exeext'
17491   { (eval echo "$as_me:17491: \"$ac_try\"") >&5
17492   (eval $ac_try) 2>&5
17493   ac_status=$?
17494   echo "$as_me:17494: \$? = $ac_status" >&5
17495   (exit $ac_status); }; }; then
17496
17497                         cf_cv_regex_hdrs=$cf_regex_hdr
17498                         break
17499
17500 else
17501   echo "$as_me: failed program was:" >&5
17502 cat conftest.$ac_ext >&5
17503 fi
17504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17505         done
17506         ;;
17507 (*)
17508         for cf_regex_hdr in regex.h
17509         do
17510                 cat >conftest.$ac_ext <<_ACEOF
17511 #line 17511 "configure"
17512 #include "confdefs.h"
17513 #include <sys/types.h>
17514 #include <$cf_regex_hdr>
17515 int
17516 main (void)
17517 {
17518
17519                         regex_t *p;
17520                         int x = regcomp(p, "", 0);
17521                         int y = regexec(p, "", 0, 0, 0);
17522                         regfree(p);
17523
17524   ;
17525   return 0;
17526 }
17527 _ACEOF
17528 rm -f conftest.$ac_objext conftest$ac_exeext
17529 if { (eval echo "$as_me:17529: \"$ac_link\"") >&5
17530   (eval $ac_link) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit $ac_status); } &&
17534          { ac_try='test -s conftest$ac_exeext'
17535   { (eval echo "$as_me:17535: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit $ac_status); }; }; then
17540
17541                         cf_cv_regex_hdrs=$cf_regex_hdr
17542                         break
17543
17544 else
17545   echo "$as_me: failed program was:" >&5
17546 cat conftest.$ac_ext >&5
17547 fi
17548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17549         done
17550         ;;
17551 esac
17552
17553 fi
17554 echo "$as_me:17554: result: $cf_cv_regex_hdrs" >&5
17555 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17556
17557 case $cf_cv_regex_hdrs in
17558         (no)            { echo "$as_me:17558: WARNING: no regular expression header found" >&5
17559 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17560         (regex.h)
17561 cat >>confdefs.h <<\EOF
17562 #define HAVE_REGEX_H_FUNCS 1
17563 EOF
17564  ;;
17565         (regexp.h)
17566 cat >>confdefs.h <<\EOF
17567 #define HAVE_REGEXP_H_FUNCS 1
17568 EOF
17569  ;;
17570         (regexpr.h)
17571 cat >>confdefs.h <<\EOF
17572 #define HAVE_REGEXPR_H_FUNCS 1
17573 EOF
17574  ;;
17575 esac
17576
17577 for ac_header in \
17578 fcntl.h \
17579 getopt.h \
17580 limits.h \
17581 locale.h \
17582 math.h \
17583 poll.h \
17584 sys/bsdtypes.h \
17585 sys/ioctl.h \
17586 sys/param.h \
17587 sys/poll.h \
17588 sys/select.h \
17589 sys/time.h \
17590 sys/times.h \
17591 ttyent.h \
17592 unistd.h \
17593 wctype.h \
17594
17595 do
17596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17597 echo "$as_me:17597: checking for $ac_header" >&5
17598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17600   echo $ECHO_N "(cached) $ECHO_C" >&6
17601 else
17602   cat >conftest.$ac_ext <<_ACEOF
17603 #line 17603 "configure"
17604 #include "confdefs.h"
17605 #include <$ac_header>
17606 _ACEOF
17607 if { (eval echo "$as_me:17607: \"$ac_cpp conftest.$ac_ext\"") >&5
17608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17609   ac_status=$?
17610   egrep -v '^ *\+' conftest.er1 >conftest.err
17611   rm -f conftest.er1
17612   cat conftest.err >&5
17613   echo "$as_me:17613: \$? = $ac_status" >&5
17614   (exit $ac_status); } >/dev/null; then
17615   if test -s conftest.err; then
17616     ac_cpp_err=$ac_c_preproc_warn_flag
17617   else
17618     ac_cpp_err=
17619   fi
17620 else
17621   ac_cpp_err=yes
17622 fi
17623 if test -z "$ac_cpp_err"; then
17624   eval "$as_ac_Header=yes"
17625 else
17626   echo "$as_me: failed program was:" >&5
17627   cat conftest.$ac_ext >&5
17628   eval "$as_ac_Header=no"
17629 fi
17630 rm -f conftest.err conftest.$ac_ext
17631 fi
17632 echo "$as_me:17632: result: `eval echo '${'$as_ac_Header'}'`" >&5
17633 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17634 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17635   cat >>confdefs.h <<EOF
17636 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17637 EOF
17638
17639 fi
17640 done
17641
17642 for ac_header in unistd.h getopt.h
17643 do
17644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17645 echo "$as_me:17645: checking for $ac_header" >&5
17646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >conftest.$ac_ext <<_ACEOF
17651 #line 17651 "configure"
17652 #include "confdefs.h"
17653 #include <$ac_header>
17654 _ACEOF
17655 if { (eval echo "$as_me:17655: \"$ac_cpp conftest.$ac_ext\"") >&5
17656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17657   ac_status=$?
17658   egrep -v '^ *\+' conftest.er1 >conftest.err
17659   rm -f conftest.er1
17660   cat conftest.err >&5
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit $ac_status); } >/dev/null; then
17663   if test -s conftest.err; then
17664     ac_cpp_err=$ac_c_preproc_warn_flag
17665   else
17666     ac_cpp_err=
17667   fi
17668 else
17669   ac_cpp_err=yes
17670 fi
17671 if test -z "$ac_cpp_err"; then
17672   eval "$as_ac_Header=yes"
17673 else
17674   echo "$as_me: failed program was:" >&5
17675   cat conftest.$ac_ext >&5
17676   eval "$as_ac_Header=no"
17677 fi
17678 rm -f conftest.err conftest.$ac_ext
17679 fi
17680 echo "$as_me:17680: result: `eval echo '${'$as_ac_Header'}'`" >&5
17681 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17682 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17683   cat >>confdefs.h <<EOF
17684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17685 EOF
17686
17687 fi
17688 done
17689
17690 echo "$as_me:17690: checking for header declaring getopt variables" >&5
17691 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17692 if test "${cf_cv_getopt_header+set}" = set; then
17693   echo $ECHO_N "(cached) $ECHO_C" >&6
17694 else
17695
17696 cf_cv_getopt_header=none
17697 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17698 do
17699 cat >conftest.$ac_ext <<_ACEOF
17700 #line 17700 "configure"
17701 #include "confdefs.h"
17702
17703 #include <$cf_header>
17704 int
17705 main (void)
17706 {
17707 int x = optind; char *y = optarg
17708   ;
17709   return 0;
17710 }
17711 _ACEOF
17712 rm -f conftest.$ac_objext
17713 if { (eval echo "$as_me:17713: \"$ac_compile\"") >&5
17714   (eval $ac_compile) 2>&5
17715   ac_status=$?
17716   echo "$as_me:17716: \$? = $ac_status" >&5
17717   (exit $ac_status); } &&
17718          { ac_try='test -s conftest.$ac_objext'
17719   { (eval echo "$as_me:17719: \"$ac_try\"") >&5
17720   (eval $ac_try) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit $ac_status); }; }; then
17724   cf_cv_getopt_header=$cf_header
17725  break
17726 else
17727   echo "$as_me: failed program was:" >&5
17728 cat conftest.$ac_ext >&5
17729 fi
17730 rm -f conftest.$ac_objext conftest.$ac_ext
17731 done
17732
17733 fi
17734 echo "$as_me:17734: result: $cf_cv_getopt_header" >&5
17735 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17736 if test $cf_cv_getopt_header != none ; then
17737
17738 cat >>confdefs.h <<\EOF
17739 #define HAVE_GETOPT_HEADER 1
17740 EOF
17741
17742 fi
17743 if test $cf_cv_getopt_header = getopt.h ; then
17744
17745 cat >>confdefs.h <<\EOF
17746 #define NEED_GETOPT_H 1
17747 EOF
17748
17749 fi
17750
17751 # check for ISC (this may also define _POSIX_SOURCE)
17752 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17753 if test "x$ISC" = xyes ; then
17754
17755 echo "$as_me:17755: checking for main in -lcposix" >&5
17756 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17757 if test "${ac_cv_lib_cposix_main+set}" = set; then
17758   echo $ECHO_N "(cached) $ECHO_C" >&6
17759 else
17760   ac_check_lib_save_LIBS=$LIBS
17761 LIBS="-lcposix  $LIBS"
17762 cat >conftest.$ac_ext <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765
17766 int
17767 main (void)
17768 {
17769 main ();
17770   ;
17771   return 0;
17772 }
17773 _ACEOF
17774 rm -f conftest.$ac_objext conftest$ac_exeext
17775 if { (eval echo "$as_me:17775: \"$ac_link\"") >&5
17776   (eval $ac_link) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); } &&
17780          { ac_try='test -s conftest$ac_exeext'
17781   { (eval echo "$as_me:17781: \"$ac_try\"") >&5
17782   (eval $ac_try) 2>&5
17783   ac_status=$?
17784   echo "$as_me:17784: \$? = $ac_status" >&5
17785   (exit $ac_status); }; }; then
17786   ac_cv_lib_cposix_main=yes
17787 else
17788   echo "$as_me: failed program was:" >&5
17789 cat conftest.$ac_ext >&5
17790 ac_cv_lib_cposix_main=no
17791 fi
17792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17793 LIBS=$ac_check_lib_save_LIBS
17794 fi
17795 echo "$as_me:17795: result: $ac_cv_lib_cposix_main" >&5
17796 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17797 if test $ac_cv_lib_cposix_main = yes; then
17798   cat >>confdefs.h <<EOF
17799 #define HAVE_LIBCPOSIX 1
17800 EOF
17801
17802   LIBS="-lcposix $LIBS"
17803
17804 fi
17805
17806         echo "$as_me:17806: checking for bzero in -linet" >&5
17807 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17808 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17809   echo $ECHO_N "(cached) $ECHO_C" >&6
17810 else
17811   ac_check_lib_save_LIBS=$LIBS
17812 LIBS="-linet  $LIBS"
17813 cat >conftest.$ac_ext <<_ACEOF
17814 #line 17814 "configure"
17815 #include "confdefs.h"
17816
17817 /* Override any gcc2 internal prototype to avoid an error.  */
17818 #ifdef __cplusplus
17819 extern "C"
17820 #endif
17821 /* We use char because int might match the return type of a gcc2
17822    builtin and then its argument prototype would still apply.  */
17823 char bzero ();
17824 int
17825 main (void)
17826 {
17827 bzero ();
17828   ;
17829   return 0;
17830 }
17831 _ACEOF
17832 rm -f conftest.$ac_objext conftest$ac_exeext
17833 if { (eval echo "$as_me:17833: \"$ac_link\"") >&5
17834   (eval $ac_link) 2>&5
17835   ac_status=$?
17836   echo "$as_me:17836: \$? = $ac_status" >&5
17837   (exit $ac_status); } &&
17838          { ac_try='test -s conftest$ac_exeext'
17839   { (eval echo "$as_me:17839: \"$ac_try\"") >&5
17840   (eval $ac_try) 2>&5
17841   ac_status=$?
17842   echo "$as_me:17842: \$? = $ac_status" >&5
17843   (exit $ac_status); }; }; then
17844   ac_cv_lib_inet_bzero=yes
17845 else
17846   echo "$as_me: failed program was:" >&5
17847 cat conftest.$ac_ext >&5
17848 ac_cv_lib_inet_bzero=no
17849 fi
17850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17851 LIBS=$ac_check_lib_save_LIBS
17852 fi
17853 echo "$as_me:17853: result: $ac_cv_lib_inet_bzero" >&5
17854 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17855 if test $ac_cv_lib_inet_bzero = yes; then
17856
17857 cf_add_libs="-linet"
17858 # Filter out duplicates - this happens with badly-designed ".pc" files...
17859 for cf_add_1lib in $LIBS
17860 do
17861         for cf_add_2lib in $cf_add_libs
17862         do
17863                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17864                 then
17865                         cf_add_1lib=
17866                         break
17867                 fi
17868         done
17869         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17870 done
17871 LIBS="$cf_add_libs"
17872
17873 fi
17874 fi
17875
17876 echo "$as_me:17876: checking if sys/time.h works with sys/select.h" >&5
17877 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17878 if test "${cf_cv_sys_time_select+set}" = set; then
17879   echo $ECHO_N "(cached) $ECHO_C" >&6
17880 else
17881
17882 cat >conftest.$ac_ext <<_ACEOF
17883 #line 17883 "configure"
17884 #include "confdefs.h"
17885
17886 #include <sys/types.h>
17887 #ifdef HAVE_SYS_TIME_H
17888 #include <sys/time.h>
17889 #endif
17890 #ifdef HAVE_SYS_SELECT_H
17891 #include <sys/select.h>
17892 #endif
17893
17894 int
17895 main (void)
17896 {
17897
17898   ;
17899   return 0;
17900 }
17901 _ACEOF
17902 rm -f conftest.$ac_objext
17903 if { (eval echo "$as_me:17903: \"$ac_compile\"") >&5
17904   (eval $ac_compile) 2>&5
17905   ac_status=$?
17906   echo "$as_me:17906: \$? = $ac_status" >&5
17907   (exit $ac_status); } &&
17908          { ac_try='test -s conftest.$ac_objext'
17909   { (eval echo "$as_me:17909: \"$ac_try\"") >&5
17910   (eval $ac_try) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); }; }; then
17914   cf_cv_sys_time_select=yes
17915 else
17916   echo "$as_me: failed program was:" >&5
17917 cat conftest.$ac_ext >&5
17918 cf_cv_sys_time_select=no
17919 fi
17920 rm -f conftest.$ac_objext conftest.$ac_ext
17921
17922 fi
17923
17924 echo "$as_me:17924: result: $cf_cv_sys_time_select" >&5
17925 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17926 test "$cf_cv_sys_time_select" = yes &&
17927 cat >>confdefs.h <<\EOF
17928 #define HAVE_SYS_TIME_SELECT 1
17929 EOF
17930
17931 ###     checks for compiler characteristics
17932 ac_ext=c
17933 ac_cpp='$CPP $CPPFLAGS'
17934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17937 ac_main_return=return
17938
17939 echo "$as_me:17939: checking for an ANSI C-conforming const" >&5
17940 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17941 if test "${ac_cv_c_const+set}" = set; then
17942   echo $ECHO_N "(cached) $ECHO_C" >&6
17943 else
17944   cat >conftest.$ac_ext <<_ACEOF
17945 #line 17945 "configure"
17946 #include "confdefs.h"
17947
17948 int
17949 main (void)
17950 {
17951 /* FIXME: Include the comments suggested by Paul. */
17952 #ifndef __cplusplus
17953   /* Ultrix mips cc rejects this.  */
17954   typedef int charset[2];
17955   const charset x;
17956   /* SunOS 4.1.1 cc rejects this.  */
17957   char const *const *ccp;
17958   char **p;
17959   /* NEC SVR4.0.2 mips cc rejects this.  */
17960   struct point {int x, y;};
17961   static struct point const zero = {0,0};
17962   /* AIX XL C 1.02.0.0 rejects this.
17963      It does not let you subtract one const X* pointer from another in
17964      an arm of an if-expression whose if-part is not a constant
17965      expression */
17966   const char *g = "string";
17967   ccp = &g + (g ? g-g : 0);
17968   /* HPUX 7.0 cc rejects these. */
17969   ++ccp;
17970   p = (char**) ccp;
17971   ccp = (char const *const *) p;
17972   { /* SCO 3.2v4 cc rejects this.  */
17973     char *t;
17974     char const *s = 0 ? (char *) 0 : (char const *) 0;
17975
17976     *t++ = 0;
17977   }
17978   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17979     int x[] = {25, 17};
17980     const int *foo = &x[0];
17981     ++foo;
17982   }
17983   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17984     typedef const int *iptr;
17985     iptr p = 0;
17986     ++p;
17987   }
17988   { /* AIX XL C 1.02.0.0 rejects this saying
17989        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17990     struct s { int j; const int *ap[3]; };
17991     struct s *b; b->j = 5;
17992   }
17993   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17994     const int foo = 10;
17995   }
17996 #endif
17997
17998   ;
17999   return 0;
18000 }
18001 _ACEOF
18002 rm -f conftest.$ac_objext
18003 if { (eval echo "$as_me:18003: \"$ac_compile\"") >&5
18004   (eval $ac_compile) 2>&5
18005   ac_status=$?
18006   echo "$as_me:18006: \$? = $ac_status" >&5
18007   (exit $ac_status); } &&
18008          { ac_try='test -s conftest.$ac_objext'
18009   { (eval echo "$as_me:18009: \"$ac_try\"") >&5
18010   (eval $ac_try) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); }; }; then
18014   ac_cv_c_const=yes
18015 else
18016   echo "$as_me: failed program was:" >&5
18017 cat conftest.$ac_ext >&5
18018 ac_cv_c_const=no
18019 fi
18020 rm -f conftest.$ac_objext conftest.$ac_ext
18021 fi
18022 echo "$as_me:18022: result: $ac_cv_c_const" >&5
18023 echo "${ECHO_T}$ac_cv_c_const" >&6
18024 if test $ac_cv_c_const = no; then
18025
18026 cat >>confdefs.h <<\EOF
18027 #define const
18028 EOF
18029
18030 fi
18031
18032 echo "$as_me:18032: checking for inline" >&5
18033 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18034 if test "${ac_cv_c_inline+set}" = set; then
18035   echo $ECHO_N "(cached) $ECHO_C" >&6
18036 else
18037   ac_cv_c_inline=no
18038 for ac_kw in inline __inline__ __inline; do
18039   cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042 #ifndef __cplusplus
18043 static $ac_kw int static_foo () {return 0; }
18044 $ac_kw int foo () {return 0; }
18045 #endif
18046
18047 _ACEOF
18048 rm -f conftest.$ac_objext
18049 if { (eval echo "$as_me:18049: \"$ac_compile\"") >&5
18050   (eval $ac_compile) 2>&5
18051   ac_status=$?
18052   echo "$as_me:18052: \$? = $ac_status" >&5
18053   (exit $ac_status); } &&
18054          { ac_try='test -s conftest.$ac_objext'
18055   { (eval echo "$as_me:18055: \"$ac_try\"") >&5
18056   (eval $ac_try) 2>&5
18057   ac_status=$?
18058   echo "$as_me:18058: \$? = $ac_status" >&5
18059   (exit $ac_status); }; }; then
18060   ac_cv_c_inline=$ac_kw; break
18061 else
18062   echo "$as_me: failed program was:" >&5
18063 cat conftest.$ac_ext >&5
18064 fi
18065 rm -f conftest.$ac_objext conftest.$ac_ext
18066 done
18067
18068 fi
18069 echo "$as_me:18069: result: $ac_cv_c_inline" >&5
18070 echo "${ECHO_T}$ac_cv_c_inline" >&6
18071 case $ac_cv_c_inline in
18072   inline | yes) ;;
18073   no)
18074 cat >>confdefs.h <<\EOF
18075 #define inline
18076 EOF
18077  ;;
18078   *)  cat >>confdefs.h <<EOF
18079 #define inline $ac_cv_c_inline
18080 EOF
18081  ;;
18082 esac
18083
18084 NCURSES_INLINE=
18085 if test "$ac_cv_c_inline" != no ; then
18086         NCURSES_INLINE=inline
18087         if test "$INTEL_COMPILER" = yes
18088         then
18089                 :
18090         elif test "$CLANG_COMPILER" = yes
18091         then
18092                 :
18093         elif test "$GCC" = yes
18094         then
18095                 echo "$as_me:18095: checking if $CC supports options to tune inlining" >&5
18096 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18097 if test "${cf_cv_gcc_inline+set}" = set; then
18098   echo $ECHO_N "(cached) $ECHO_C" >&6
18099 else
18100
18101                 cf_save_CFLAGS=$CFLAGS
18102                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18103                 cat >conftest.$ac_ext <<_ACEOF
18104 #line 18104 "configure"
18105 #include "confdefs.h"
18106 inline int foo(void) { return 1; }
18107 int
18108 main (void)
18109 {
18110 ${cf_cv_main_return:-return} foo()
18111   ;
18112   return 0;
18113 }
18114 _ACEOF
18115 rm -f conftest.$ac_objext
18116 if { (eval echo "$as_me:18116: \"$ac_compile\"") >&5
18117   (eval $ac_compile) 2>&5
18118   ac_status=$?
18119   echo "$as_me:18119: \$? = $ac_status" >&5
18120   (exit $ac_status); } &&
18121          { ac_try='test -s conftest.$ac_objext'
18122   { (eval echo "$as_me:18122: \"$ac_try\"") >&5
18123   (eval $ac_try) 2>&5
18124   ac_status=$?
18125   echo "$as_me:18125: \$? = $ac_status" >&5
18126   (exit $ac_status); }; }; then
18127   cf_cv_gcc_inline=yes
18128 else
18129   echo "$as_me: failed program was:" >&5
18130 cat conftest.$ac_ext >&5
18131 cf_cv_gcc_inline=no
18132 fi
18133 rm -f conftest.$ac_objext conftest.$ac_ext
18134                 CFLAGS=$cf_save_CFLAGS
18135
18136 fi
18137 echo "$as_me:18137: result: $cf_cv_gcc_inline" >&5
18138 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18139                 if test "$cf_cv_gcc_inline" = yes ; then
18140
18141 cf_fix_cppflags=no
18142 cf_new_cflags=
18143 cf_new_cppflags=
18144 cf_new_extra_cppflags=
18145
18146 for cf_add_cflags in --param max-inline-insns-single=1200
18147 do
18148 case $cf_fix_cppflags in
18149 (no)
18150         case $cf_add_cflags in
18151         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18152                 case $cf_add_cflags in
18153                 (-D*)
18154                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18155
18156                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18157                                 && test -z "${cf_tst_cflags}" \
18158                                 && cf_fix_cppflags=yes
18159
18160                         if test $cf_fix_cppflags = yes ; then
18161
18162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18164
18165                                 continue
18166                         elif test "${cf_tst_cflags}" = "\"'" ; then
18167
18168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18170
18171                                 continue
18172                         fi
18173                         ;;
18174                 esac
18175                 case "$CPPFLAGS" in
18176                 (*$cf_add_cflags)
18177                         ;;
18178                 (*)
18179                         case $cf_add_cflags in
18180                         (-D*)
18181                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18182
18183 CPPFLAGS=`echo "$CPPFLAGS" | \
18184         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18185                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18186
18187                                 ;;
18188                         esac
18189
18190         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18191         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18192
18193                         ;;
18194                 esac
18195                 ;;
18196         (*)
18197
18198         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18199         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18200
18201                 ;;
18202         esac
18203         ;;
18204 (yes)
18205
18206         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18207         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18208
18209         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18210
18211         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18212                 && test -z "${cf_tst_cflags}" \
18213                 && cf_fix_cppflags=no
18214         ;;
18215 esac
18216 done
18217
18218 if test -n "$cf_new_cflags" ; then
18219
18220         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18221         CFLAGS="${CFLAGS}$cf_new_cflags"
18222
18223 fi
18224
18225 if test -n "$cf_new_cppflags" ; then
18226
18227         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18228         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18229
18230 fi
18231
18232 if test -n "$cf_new_extra_cppflags" ; then
18233
18234         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18235         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18236
18237 fi
18238
18239                 fi
18240         fi
18241 fi
18242
18243 echo "$as_me:18243: checking for signal global datatype" >&5
18244 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18245 if test "${cf_cv_sig_atomic_t+set}" = set; then
18246   echo $ECHO_N "(cached) $ECHO_C" >&6
18247 else
18248
18249         for cf_type in \
18250                 "volatile sig_atomic_t" \
18251                 "sig_atomic_t" \
18252                 "int"
18253         do
18254         cat >conftest.$ac_ext <<_ACEOF
18255 #line 18255 "configure"
18256 #include "confdefs.h"
18257
18258 #include <sys/types.h>
18259 #include <signal.h>
18260 #include <stdio.h>
18261
18262 extern $cf_type x;
18263 $cf_type x;
18264 static void handler(int sig)
18265 {
18266         x = 5;
18267 }
18268 int
18269 main (void)
18270 {
18271 signal(SIGINT, handler);
18272                  x = 1
18273   ;
18274   return 0;
18275 }
18276 _ACEOF
18277 rm -f conftest.$ac_objext
18278 if { (eval echo "$as_me:18278: \"$ac_compile\"") >&5
18279   (eval $ac_compile) 2>&5
18280   ac_status=$?
18281   echo "$as_me:18281: \$? = $ac_status" >&5
18282   (exit $ac_status); } &&
18283          { ac_try='test -s conftest.$ac_objext'
18284   { (eval echo "$as_me:18284: \"$ac_try\"") >&5
18285   (eval $ac_try) 2>&5
18286   ac_status=$?
18287   echo "$as_me:18287: \$? = $ac_status" >&5
18288   (exit $ac_status); }; }; then
18289   cf_cv_sig_atomic_t=$cf_type
18290 else
18291   echo "$as_me: failed program was:" >&5
18292 cat conftest.$ac_ext >&5
18293 cf_cv_sig_atomic_t=no
18294 fi
18295 rm -f conftest.$ac_objext conftest.$ac_ext
18296                 test "$cf_cv_sig_atomic_t" != no && break
18297         done
18298
18299 fi
18300
18301 echo "$as_me:18301: result: $cf_cv_sig_atomic_t" >&5
18302 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18303 test "$cf_cv_sig_atomic_t" != no &&
18304 cat >>confdefs.h <<EOF
18305 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18306 EOF
18307
18308 if test $NCURSES_CHTYPE = auto ; then
18309
18310 echo "$as_me:18310: checking for type of chtype" >&5
18311 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18312 if test "${cf_cv_typeof_chtype+set}" = set; then
18313   echo $ECHO_N "(cached) $ECHO_C" >&6
18314 else
18315
18316                 if test "$cross_compiling" = yes; then
18317   cf_cv_typeof_chtype=long
18318 else
18319   cat >conftest.$ac_ext <<_ACEOF
18320 #line 18320 "configure"
18321 #include "confdefs.h"
18322
18323 #define WANT_BITS 31
18324 #include <stdio.h>
18325 int main(void)
18326 {
18327         FILE *fp = fopen("cf_test.out", "w");
18328         if (fp != 0) {
18329                 char *result = "long";
18330                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18331                         int n;
18332                         unsigned int x, y;
18333                         for (n = 0; n < WANT_BITS; n++) {
18334                                 x = (1 << n);
18335                                 y = (x >> n);
18336                                 if (y != 1 || x == 0) {
18337                                         x = 0;
18338                                         break;
18339                                 }
18340                         }
18341                         /*
18342                          * If x is nonzero, an int is big enough for the bits
18343                          * that we want.
18344                          */
18345                         result = (x != 0) ? "int" : "long";
18346                 }
18347                 fputs(result, fp);
18348                 fclose(fp);
18349         }
18350         ${cf_cv_main_return:-return}(0);
18351 }
18352
18353 _ACEOF
18354 rm -f conftest$ac_exeext
18355 if { (eval echo "$as_me:18355: \"$ac_link\"") >&5
18356   (eval $ac_link) 2>&5
18357   ac_status=$?
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18360   { (eval echo "$as_me:18360: \"$ac_try\"") >&5
18361   (eval $ac_try) 2>&5
18362   ac_status=$?
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); }; }; then
18365   cf_cv_typeof_chtype=`cat cf_test.out`
18366 else
18367   echo "$as_me: program exited with status $ac_status" >&5
18368 echo "$as_me: failed program was:" >&5
18369 cat conftest.$ac_ext >&5
18370 cf_cv_typeof_chtype=long
18371 fi
18372 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18373 fi
18374                 rm -f cf_test.out
18375
18376 fi
18377
18378 echo "$as_me:18378: result: $cf_cv_typeof_chtype" >&5
18379 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18380
18381 cat >>confdefs.h <<EOF
18382 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18383 EOF
18384
18385 else
18386         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18387 fi
18388 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18389
18390 echo "$as_me:18390: checking if unsigned literals are legal" >&5
18391 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18392 if test "${cf_cv_unsigned_literals+set}" = set; then
18393   echo $ECHO_N "(cached) $ECHO_C" >&6
18394 else
18395
18396         cat >conftest.$ac_ext <<_ACEOF
18397 #line 18397 "configure"
18398 #include "confdefs.h"
18399
18400 int
18401 main (void)
18402 {
18403 long x = 1L + 1UL + 1U + 1
18404   ;
18405   return 0;
18406 }
18407 _ACEOF
18408 rm -f conftest.$ac_objext
18409 if { (eval echo "$as_me:18409: \"$ac_compile\"") >&5
18410   (eval $ac_compile) 2>&5
18411   ac_status=$?
18412   echo "$as_me:18412: \$? = $ac_status" >&5
18413   (exit $ac_status); } &&
18414          { ac_try='test -s conftest.$ac_objext'
18415   { (eval echo "$as_me:18415: \"$ac_try\"") >&5
18416   (eval $ac_try) 2>&5
18417   ac_status=$?
18418   echo "$as_me:18418: \$? = $ac_status" >&5
18419   (exit $ac_status); }; }; then
18420   cf_cv_unsigned_literals=yes
18421 else
18422   echo "$as_me: failed program was:" >&5
18423 cat conftest.$ac_ext >&5
18424 cf_cv_unsigned_literals=no
18425 fi
18426 rm -f conftest.$ac_objext conftest.$ac_ext
18427
18428 fi
18429
18430 echo "$as_me:18430: result: $cf_cv_unsigned_literals" >&5
18431 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18432
18433 cf_cv_1UL="1"
18434 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18435 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18436
18437 if test $NCURSES_MMASK_T = auto ; then
18438         cf_cv_typeof_mmask_t=long
18439 else
18440         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18441 fi
18442 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18443
18444 ###     Checks for external-data
18445
18446 echo "$as_me:18446: checking if external errno is declared" >&5
18447 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18448 if test "${cf_cv_dcl_errno+set}" = set; then
18449   echo $ECHO_N "(cached) $ECHO_C" >&6
18450 else
18451
18452         cat >conftest.$ac_ext <<_ACEOF
18453 #line 18453 "configure"
18454 #include "confdefs.h"
18455
18456 #ifdef HAVE_STDLIB_H
18457 #include <stdlib.h>
18458 #endif
18459 #include <stdio.h>
18460 #include <sys/types.h>
18461 #include <errno.h>
18462 int
18463 main (void)
18464 {
18465 int x = (int) errno
18466   ;
18467   return 0;
18468 }
18469 _ACEOF
18470 rm -f conftest.$ac_objext
18471 if { (eval echo "$as_me:18471: \"$ac_compile\"") >&5
18472   (eval $ac_compile) 2>&5
18473   ac_status=$?
18474   echo "$as_me:18474: \$? = $ac_status" >&5
18475   (exit $ac_status); } &&
18476          { ac_try='test -s conftest.$ac_objext'
18477   { (eval echo "$as_me:18477: \"$ac_try\"") >&5
18478   (eval $ac_try) 2>&5
18479   ac_status=$?
18480   echo "$as_me:18480: \$? = $ac_status" >&5
18481   (exit $ac_status); }; }; then
18482   cf_cv_dcl_errno=yes
18483 else
18484   echo "$as_me: failed program was:" >&5
18485 cat conftest.$ac_ext >&5
18486 cf_cv_dcl_errno=no
18487 fi
18488 rm -f conftest.$ac_objext conftest.$ac_ext
18489
18490 fi
18491 echo "$as_me:18491: result: $cf_cv_dcl_errno" >&5
18492 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18493
18494 if test "$cf_cv_dcl_errno" = no ; then
18495
18496 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18497
18498         cat >>confdefs.h <<EOF
18499 #define $cf_result 1
18500 EOF
18501
18502 fi
18503
18504 # It's possible (for near-UNIX clones) that the data doesn't exist
18505
18506 echo "$as_me:18506: checking if external errno exists" >&5
18507 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18508 if test "${cf_cv_have_errno+set}" = set; then
18509   echo $ECHO_N "(cached) $ECHO_C" >&6
18510 else
18511
18512         cat >conftest.$ac_ext <<_ACEOF
18513 #line 18513 "configure"
18514 #include "confdefs.h"
18515
18516 #undef errno
18517 extern int errno;
18518
18519 int
18520 main (void)
18521 {
18522 errno = 2
18523   ;
18524   return 0;
18525 }
18526 _ACEOF
18527 rm -f conftest.$ac_objext conftest$ac_exeext
18528 if { (eval echo "$as_me:18528: \"$ac_link\"") >&5
18529   (eval $ac_link) 2>&5
18530   ac_status=$?
18531   echo "$as_me:18531: \$? = $ac_status" >&5
18532   (exit $ac_status); } &&
18533          { ac_try='test -s conftest$ac_exeext'
18534   { (eval echo "$as_me:18534: \"$ac_try\"") >&5
18535   (eval $ac_try) 2>&5
18536   ac_status=$?
18537   echo "$as_me:18537: \$? = $ac_status" >&5
18538   (exit $ac_status); }; }; then
18539   cf_cv_have_errno=yes
18540 else
18541   echo "$as_me: failed program was:" >&5
18542 cat conftest.$ac_ext >&5
18543 cf_cv_have_errno=no
18544 fi
18545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18546
18547 fi
18548 echo "$as_me:18548: result: $cf_cv_have_errno" >&5
18549 echo "${ECHO_T}$cf_cv_have_errno" >&6
18550
18551 if test "$cf_cv_have_errno" = yes ; then
18552
18553 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18554
18555         cat >>confdefs.h <<EOF
18556 #define $cf_result 1
18557 EOF
18558
18559 fi
18560
18561 echo "$as_me:18561: checking if data-only library module links" >&5
18562 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18563 if test "${cf_cv_link_dataonly+set}" = set; then
18564   echo $ECHO_N "(cached) $ECHO_C" >&6
18565 else
18566
18567         rm -f conftest.a
18568         cat >conftest.$ac_ext <<EOF
18569 #line 18569 "configure"
18570 int     testdata[3] = { 123, 456, 789 };
18571 EOF
18572         if { (eval echo "$as_me:18572: \"$ac_compile\"") >&5
18573   (eval $ac_compile) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); } ; then
18577                 mv conftest.o data.o && \
18578                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18579         fi
18580         rm -f conftest.$ac_ext data.o
18581         cat >conftest.$ac_ext <<EOF
18582 #line 18582 "configure"
18583 int     testfunc(void)
18584 {
18585 #if defined(NeXT)
18586         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18587 #else
18588         extern int testdata[3];
18589         return testdata[0] == 123
18590            &&  testdata[1] == 456
18591            &&  testdata[2] == 789;
18592 #endif
18593 }
18594 EOF
18595         if { (eval echo "$as_me:18595: \"$ac_compile\"") >&5
18596   (eval $ac_compile) 2>&5
18597   ac_status=$?
18598   echo "$as_me:18598: \$? = $ac_status" >&5
18599   (exit $ac_status); }; then
18600                 mv conftest.o func.o && \
18601                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18602         fi
18603         rm -f conftest.$ac_ext func.o
18604         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18605         cf_saveLIBS="$LIBS"
18606         LIBS="conftest.a $LIBS"
18607         if test "$cross_compiling" = yes; then
18608   cf_cv_link_dataonly=unknown
18609 else
18610   cat >conftest.$ac_ext <<_ACEOF
18611 #line 18611 "configure"
18612 #include "confdefs.h"
18613
18614         int main(void)
18615         {
18616                 extern int testfunc();
18617                 ${cf_cv_main_return:-return} (!testfunc());
18618         }
18619
18620 _ACEOF
18621 rm -f conftest$ac_exeext
18622 if { (eval echo "$as_me:18622: \"$ac_link\"") >&5
18623   (eval $ac_link) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18627   { (eval echo "$as_me:18627: \"$ac_try\"") >&5
18628   (eval $ac_try) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit $ac_status); }; }; then
18632   cf_cv_link_dataonly=yes
18633 else
18634   echo "$as_me: program exited with status $ac_status" >&5
18635 echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_cv_link_dataonly=no
18638 fi
18639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18640 fi
18641         LIBS="$cf_saveLIBS"
18642
18643 fi
18644
18645 echo "$as_me:18645: result: $cf_cv_link_dataonly" >&5
18646 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18647
18648 if test "$cf_cv_link_dataonly" = no ; then
18649
18650 cat >>confdefs.h <<\EOF
18651 #define BROKEN_LINKER 1
18652 EOF
18653
18654         BROKEN_LINKER=1
18655 fi
18656
18657 ###     Checks for library functions.
18658
18659 for ac_func in \
18660 getcwd \
18661 getegid \
18662 geteuid \
18663 getopt \
18664 getttynam \
18665 issetugid \
18666 poll \
18667 putenv \
18668 remove \
18669 select \
18670 setbuf \
18671 setbuffer \
18672 setenv \
18673 setvbuf \
18674 sigaction \
18675 sigvec \
18676 strdup \
18677 strstr \
18678 sysconf \
18679 tcgetpgrp \
18680 tdestroy \
18681 times \
18682 tsearch \
18683 vsnprintf \
18684
18685 do
18686 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18687 echo "$as_me:18687: checking for $ac_func" >&5
18688 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18689 if eval "test \"\${$as_ac_var+set}\" = set"; then
18690   echo $ECHO_N "(cached) $ECHO_C" >&6
18691 else
18692   cat >conftest.$ac_ext <<_ACEOF
18693 #line 18693 "configure"
18694 #include "confdefs.h"
18695 #define $ac_func autoconf_temporary
18696 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18697 #undef $ac_func
18698
18699 #ifdef __cplusplus
18700 extern "C"
18701 #endif
18702
18703 /* We use char because int might match the return type of a gcc2
18704    builtin and then its argument prototype would still apply.  */
18705 char $ac_func (void);
18706
18707 int
18708 main (void)
18709 {
18710
18711 /* The GNU C library defines stubs for functions which it implements
18712     to always fail with ENOSYS.  Some functions are actually named
18713     something starting with __ and the normal name is an alias.  */
18714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18715 #error found stub for $ac_func
18716 #endif
18717
18718         return $ac_func ();
18719   ;
18720   return 0;
18721 }
18722 _ACEOF
18723 rm -f conftest.$ac_objext conftest$ac_exeext
18724 if { (eval echo "$as_me:18724: \"$ac_link\"") >&5
18725   (eval $ac_link) 2>&5
18726   ac_status=$?
18727   echo "$as_me:18727: \$? = $ac_status" >&5
18728   (exit $ac_status); } &&
18729          { ac_try='test -s conftest$ac_exeext'
18730   { (eval echo "$as_me:18730: \"$ac_try\"") >&5
18731   (eval $ac_try) 2>&5
18732   ac_status=$?
18733   echo "$as_me:18733: \$? = $ac_status" >&5
18734   (exit $ac_status); }; }; then
18735   eval "$as_ac_var=yes"
18736 else
18737   echo "$as_me: failed program was:" >&5
18738 cat conftest.$ac_ext >&5
18739 eval "$as_ac_var=no"
18740 fi
18741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18742 fi
18743 echo "$as_me:18743: result: `eval echo '${'$as_ac_var'}'`" >&5
18744 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18745 if test `eval echo '${'$as_ac_var'}'` = yes; then
18746   cat >>confdefs.h <<EOF
18747 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18748 EOF
18749
18750 fi
18751 done
18752
18753 if test "x$ac_cv_func_getopt" = xno && \
18754    test "x$cf_with_progs$cf_with_tests" != xnono; then
18755         { { echo "$as_me:18755: error: getopt is required for building programs" >&5
18756 echo "$as_me: error: getopt is required for building programs" >&2;}
18757    { (exit 1); exit 1; }; }
18758 fi
18759
18760 if test "x$with_safe_sprintf" = xyes
18761 then
18762         if test "x$ac_cv_func_vsnprintf" = xyes
18763         then
18764                 { echo "$as_me:18764: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18765 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18766         else
18767
18768 cat >>confdefs.h <<\EOF
18769 #define USE_SAFE_SPRINTF 1
18770 EOF
18771
18772         fi
18773 fi
18774
18775 if test "x$with_getcap" = "xyes" ; then
18776
18777 echo "$as_me:18777: checking for terminal-capability database functions" >&5
18778 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18779 if test "${cf_cv_cgetent+set}" = set; then
18780   echo $ECHO_N "(cached) $ECHO_C" >&6
18781 else
18782
18783 cat >conftest.$ac_ext <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787 #include <stdlib.h>
18788 int
18789 main (void)
18790 {
18791
18792         char temp[128];
18793         char *buf = temp;
18794         char *db_array = temp;
18795         cgetent(&buf, &db_array, "vt100");
18796         cgetcap(buf, "tc", '=');
18797         cgetmatch(buf, "tc");
18798
18799   ;
18800   return 0;
18801 }
18802 _ACEOF
18803 rm -f conftest.$ac_objext conftest$ac_exeext
18804 if { (eval echo "$as_me:18804: \"$ac_link\"") >&5
18805   (eval $ac_link) 2>&5
18806   ac_status=$?
18807   echo "$as_me:18807: \$? = $ac_status" >&5
18808   (exit $ac_status); } &&
18809          { ac_try='test -s conftest$ac_exeext'
18810   { (eval echo "$as_me:18810: \"$ac_try\"") >&5
18811   (eval $ac_try) 2>&5
18812   ac_status=$?
18813   echo "$as_me:18813: \$? = $ac_status" >&5
18814   (exit $ac_status); }; }; then
18815   cf_cv_cgetent=yes
18816 else
18817   echo "$as_me: failed program was:" >&5
18818 cat conftest.$ac_ext >&5
18819 cf_cv_cgetent=no
18820 fi
18821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18822
18823 fi
18824 echo "$as_me:18824: result: $cf_cv_cgetent" >&5
18825 echo "${ECHO_T}$cf_cv_cgetent" >&6
18826
18827 if test "$cf_cv_cgetent" = yes
18828 then
18829
18830 cat >>confdefs.h <<\EOF
18831 #define HAVE_BSD_CGETENT 1
18832 EOF
18833
18834 echo "$as_me:18834: checking if cgetent uses const parameter" >&5
18835 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18836 if test "${cf_cv_cgetent_const+set}" = set; then
18837   echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839
18840 cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843
18844 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18845 #include <stdlib.h>
18846 int
18847 main (void)
18848 {
18849
18850         char temp[128];
18851         char *buf = temp;
18852 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18853         const char *db_array = temp;
18854         cgetent(&buf, &db_array, "vt100");
18855 #endif
18856         cgetcap(buf, "tc", '=');
18857         cgetmatch(buf, "tc");
18858
18859   ;
18860   return 0;
18861 }
18862 _ACEOF
18863 rm -f conftest.$ac_objext conftest$ac_exeext
18864 if { (eval echo "$as_me:18864: \"$ac_link\"") >&5
18865   (eval $ac_link) 2>&5
18866   ac_status=$?
18867   echo "$as_me:18867: \$? = $ac_status" >&5
18868   (exit $ac_status); } &&
18869          { ac_try='test -s conftest$ac_exeext'
18870   { (eval echo "$as_me:18870: \"$ac_try\"") >&5
18871   (eval $ac_try) 2>&5
18872   ac_status=$?
18873   echo "$as_me:18873: \$? = $ac_status" >&5
18874   (exit $ac_status); }; }; then
18875   cf_cv_cgetent_const=yes
18876 else
18877   echo "$as_me: failed program was:" >&5
18878 cat conftest.$ac_ext >&5
18879 cf_cv_cgetent_const=no
18880 fi
18881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18882
18883 fi
18884 echo "$as_me:18884: result: $cf_cv_cgetent_const" >&5
18885 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18886         if test "$cf_cv_cgetent_const" = yes
18887         then
18888
18889 cat >>confdefs.h <<EOF
18890 #define CGETENT_CONST const
18891 EOF
18892
18893         fi
18894 fi
18895
18896 fi
18897
18898 echo "$as_me:18898: checking for isascii" >&5
18899 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18900 if test "${cf_cv_have_isascii+set}" = set; then
18901   echo $ECHO_N "(cached) $ECHO_C" >&6
18902 else
18903
18904         cat >conftest.$ac_ext <<_ACEOF
18905 #line 18905 "configure"
18906 #include "confdefs.h"
18907 #include <ctype.h>
18908 int
18909 main (void)
18910 {
18911 int x = isascii(' ')
18912   ;
18913   return 0;
18914 }
18915 _ACEOF
18916 rm -f conftest.$ac_objext conftest$ac_exeext
18917 if { (eval echo "$as_me:18917: \"$ac_link\"") >&5
18918   (eval $ac_link) 2>&5
18919   ac_status=$?
18920   echo "$as_me:18920: \$? = $ac_status" >&5
18921   (exit $ac_status); } &&
18922          { ac_try='test -s conftest$ac_exeext'
18923   { (eval echo "$as_me:18923: \"$ac_try\"") >&5
18924   (eval $ac_try) 2>&5
18925   ac_status=$?
18926   echo "$as_me:18926: \$? = $ac_status" >&5
18927   (exit $ac_status); }; }; then
18928   cf_cv_have_isascii=yes
18929 else
18930   echo "$as_me: failed program was:" >&5
18931 cat conftest.$ac_ext >&5
18932 cf_cv_have_isascii=no
18933 fi
18934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18935
18936 fi
18937 echo "$as_me:18937: result: $cf_cv_have_isascii" >&5
18938 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18939 test "$cf_cv_have_isascii" = yes &&
18940 cat >>confdefs.h <<\EOF
18941 #define HAVE_ISASCII 1
18942 EOF
18943
18944 if test "$ac_cv_func_sigaction" = yes; then
18945 echo "$as_me:18945: checking whether sigaction needs _POSIX_SOURCE" >&5
18946 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18947 cat >conftest.$ac_ext <<_ACEOF
18948 #line 18948 "configure"
18949 #include "confdefs.h"
18950
18951 #include <sys/types.h>
18952 #include <signal.h>
18953 int
18954 main (void)
18955 {
18956 struct sigaction act
18957   ;
18958   return 0;
18959 }
18960 _ACEOF
18961 rm -f conftest.$ac_objext
18962 if { (eval echo "$as_me:18962: \"$ac_compile\"") >&5
18963   (eval $ac_compile) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit $ac_status); } &&
18967          { ac_try='test -s conftest.$ac_objext'
18968   { (eval echo "$as_me:18968: \"$ac_try\"") >&5
18969   (eval $ac_try) 2>&5
18970   ac_status=$?
18971   echo "$as_me:18971: \$? = $ac_status" >&5
18972   (exit $ac_status); }; }; then
18973   sigact_bad=no
18974 else
18975   echo "$as_me: failed program was:" >&5
18976 cat conftest.$ac_ext >&5
18977
18978 cat >conftest.$ac_ext <<_ACEOF
18979 #line 18979 "configure"
18980 #include "confdefs.h"
18981
18982 #define _POSIX_SOURCE
18983 #include <sys/types.h>
18984 #include <signal.h>
18985 int
18986 main (void)
18987 {
18988 struct sigaction act
18989   ;
18990   return 0;
18991 }
18992 _ACEOF
18993 rm -f conftest.$ac_objext
18994 if { (eval echo "$as_me:18994: \"$ac_compile\"") >&5
18995   (eval $ac_compile) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); } &&
18999          { ac_try='test -s conftest.$ac_objext'
19000   { (eval echo "$as_me:19000: \"$ac_try\"") >&5
19001   (eval $ac_try) 2>&5
19002   ac_status=$?
19003   echo "$as_me:19003: \$? = $ac_status" >&5
19004   (exit $ac_status); }; }; then
19005   sigact_bad=yes
19006
19007 cat >>confdefs.h <<\EOF
19008 #define _POSIX_SOURCE 1
19009 EOF
19010
19011 else
19012   echo "$as_me: failed program was:" >&5
19013 cat conftest.$ac_ext >&5
19014 sigact_bad=unknown
19015 fi
19016 rm -f conftest.$ac_objext conftest.$ac_ext
19017 fi
19018 rm -f conftest.$ac_objext conftest.$ac_ext
19019 echo "$as_me:19019: result: $sigact_bad" >&5
19020 echo "${ECHO_T}$sigact_bad" >&6
19021 fi
19022
19023 echo "$as_me:19023: checking if nanosleep really works" >&5
19024 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19025 if test "${cf_cv_func_nanosleep+set}" = set; then
19026   echo $ECHO_N "(cached) $ECHO_C" >&6
19027 else
19028
19029 if test "$cross_compiling" = yes; then
19030   cf_cv_func_nanosleep=unknown
19031 else
19032   cat >conftest.$ac_ext <<_ACEOF
19033 #line 19033 "configure"
19034 #include "confdefs.h"
19035
19036 #include <stdio.h>
19037 #include <errno.h>
19038 #include <time.h>
19039
19040 #ifdef HAVE_SYS_TIME_H
19041 #include <sys/time.h>
19042 #endif
19043
19044 int main(void) {
19045         struct timespec ts1, ts2;
19046         int code;
19047         ts1.tv_sec  = 0;
19048         ts1.tv_nsec = 750000000;
19049         ts2.tv_sec  = 0;
19050         ts2.tv_nsec = 0;
19051         errno = 0;
19052         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19053         ${cf_cv_main_return:-return}(code != 0);
19054 }
19055
19056 _ACEOF
19057 rm -f conftest$ac_exeext
19058 if { (eval echo "$as_me:19058: \"$ac_link\"") >&5
19059   (eval $ac_link) 2>&5
19060   ac_status=$?
19061   echo "$as_me:19061: \$? = $ac_status" >&5
19062   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19063   { (eval echo "$as_me:19063: \"$ac_try\"") >&5
19064   (eval $ac_try) 2>&5
19065   ac_status=$?
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); }; }; then
19068   cf_cv_func_nanosleep=yes
19069 else
19070   echo "$as_me: program exited with status $ac_status" >&5
19071 echo "$as_me: failed program was:" >&5
19072 cat conftest.$ac_ext >&5
19073 cf_cv_func_nanosleep=no
19074 fi
19075 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19076 fi
19077 fi
19078 echo "$as_me:19078: result: $cf_cv_func_nanosleep" >&5
19079 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19080
19081 test "$cf_cv_func_nanosleep" = "yes" &&
19082 cat >>confdefs.h <<\EOF
19083 #define HAVE_NANOSLEEP 1
19084 EOF
19085
19086 for ac_header in \
19087 termio.h \
19088 termios.h \
19089 unistd.h \
19090 sys/ioctl.h \
19091 sys/termio.h \
19092
19093 do
19094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19095 echo "$as_me:19095: checking for $ac_header" >&5
19096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19098   echo $ECHO_N "(cached) $ECHO_C" >&6
19099 else
19100   cat >conftest.$ac_ext <<_ACEOF
19101 #line 19101 "configure"
19102 #include "confdefs.h"
19103 #include <$ac_header>
19104 _ACEOF
19105 if { (eval echo "$as_me:19105: \"$ac_cpp conftest.$ac_ext\"") >&5
19106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19107   ac_status=$?
19108   egrep -v '^ *\+' conftest.er1 >conftest.err
19109   rm -f conftest.er1
19110   cat conftest.err >&5
19111   echo "$as_me:19111: \$? = $ac_status" >&5
19112   (exit $ac_status); } >/dev/null; then
19113   if test -s conftest.err; then
19114     ac_cpp_err=$ac_c_preproc_warn_flag
19115   else
19116     ac_cpp_err=
19117   fi
19118 else
19119   ac_cpp_err=yes
19120 fi
19121 if test -z "$ac_cpp_err"; then
19122   eval "$as_ac_Header=yes"
19123 else
19124   echo "$as_me: failed program was:" >&5
19125   cat conftest.$ac_ext >&5
19126   eval "$as_ac_Header=no"
19127 fi
19128 rm -f conftest.err conftest.$ac_ext
19129 fi
19130 echo "$as_me:19130: result: `eval echo '${'$as_ac_Header'}'`" >&5
19131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19133   cat >>confdefs.h <<EOF
19134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19135 EOF
19136
19137 fi
19138 done
19139
19140 if test "$ac_cv_header_termios_h" = yes ; then
19141         case "$CFLAGS $CPPFLAGS" in
19142         (*-D_POSIX_SOURCE*)
19143                 termios_bad=dunno ;;
19144         (*)     termios_bad=maybe ;;
19145         esac
19146         if test "$termios_bad" = maybe ; then
19147         echo "$as_me:19147: checking whether termios.h needs _POSIX_SOURCE" >&5
19148 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19149         cat >conftest.$ac_ext <<_ACEOF
19150 #line 19150 "configure"
19151 #include "confdefs.h"
19152 #include <termios.h>
19153 int
19154 main (void)
19155 {
19156 struct termios foo; int x = foo.c_iflag
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 rm -f conftest.$ac_objext
19162 if { (eval echo "$as_me:19162: \"$ac_compile\"") >&5
19163   (eval $ac_compile) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); } &&
19167          { ac_try='test -s conftest.$ac_objext'
19168   { (eval echo "$as_me:19168: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:19171: \$? = $ac_status" >&5
19172   (exit $ac_status); }; }; then
19173   termios_bad=no
19174 else
19175   echo "$as_me: failed program was:" >&5
19176 cat conftest.$ac_ext >&5
19177
19178                 cat >conftest.$ac_ext <<_ACEOF
19179 #line 19179 "configure"
19180 #include "confdefs.h"
19181
19182 #define _POSIX_SOURCE
19183 #include <termios.h>
19184 int
19185 main (void)
19186 {
19187 struct termios foo; int x = foo.c_iflag
19188   ;
19189   return 0;
19190 }
19191 _ACEOF
19192 rm -f conftest.$ac_objext
19193 if { (eval echo "$as_me:19193: \"$ac_compile\"") >&5
19194   (eval $ac_compile) 2>&5
19195   ac_status=$?
19196   echo "$as_me:19196: \$? = $ac_status" >&5
19197   (exit $ac_status); } &&
19198          { ac_try='test -s conftest.$ac_objext'
19199   { (eval echo "$as_me:19199: \"$ac_try\"") >&5
19200   (eval $ac_try) 2>&5
19201   ac_status=$?
19202   echo "$as_me:19202: \$? = $ac_status" >&5
19203   (exit $ac_status); }; }; then
19204   termios_bad=unknown
19205 else
19206   echo "$as_me: failed program was:" >&5
19207 cat conftest.$ac_ext >&5
19208 termios_bad=yes
19209 cat >>confdefs.h <<\EOF
19210 #define _POSIX_SOURCE 1
19211 EOF
19212
19213 fi
19214 rm -f conftest.$ac_objext conftest.$ac_ext
19215
19216 fi
19217 rm -f conftest.$ac_objext conftest.$ac_ext
19218         echo "$as_me:19218: result: $termios_bad" >&5
19219 echo "${ECHO_T}$termios_bad" >&6
19220         fi
19221 fi
19222
19223 echo "$as_me:19223: checking for tcgetattr" >&5
19224 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19225 if test "${cf_cv_have_tcgetattr+set}" = set; then
19226   echo $ECHO_N "(cached) $ECHO_C" >&6
19227 else
19228
19229 cat >conftest.$ac_ext <<_ACEOF
19230 #line 19230 "configure"
19231 #include "confdefs.h"
19232
19233 #include <sys/types.h>
19234 #ifdef HAVE_UNISTD_H
19235 #include <unistd.h>
19236 #endif
19237 #ifdef HAVE_TERMIOS_H
19238 #include <termios.h>
19239 #define TTY struct termios
19240 #else
19241 #ifdef HAVE_TERMIO_H
19242 #include <termio.h>
19243 #define TTY struct termio
19244 #endif
19245 #endif
19246
19247 int
19248 main (void)
19249 {
19250
19251 TTY foo;
19252 tcgetattr(1, &foo);
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f conftest.$ac_objext conftest$ac_exeext
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259   (eval $ac_link) 2>&5
19260   ac_status=$?
19261   echo "$as_me:19261: \$? = $ac_status" >&5
19262   (exit $ac_status); } &&
19263          { ac_try='test -s conftest$ac_exeext'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   cf_cv_have_tcgetattr=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 cat conftest.$ac_ext >&5
19273 cf_cv_have_tcgetattr=no
19274 fi
19275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19276 fi
19277 echo "$as_me:19277: result: $cf_cv_have_tcgetattr" >&5
19278 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19279 test "$cf_cv_have_tcgetattr" = yes &&
19280 cat >>confdefs.h <<\EOF
19281 #define HAVE_TCGETATTR 1
19282 EOF
19283
19284 echo "$as_me:19284: checking for vsscanf function or workaround" >&5
19285 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19286 if test "${cf_cv_func_vsscanf+set}" = set; then
19287   echo $ECHO_N "(cached) $ECHO_C" >&6
19288 else
19289
19290 cat >conftest.$ac_ext <<_ACEOF
19291 #line 19291 "configure"
19292 #include "confdefs.h"
19293
19294 #include <stdarg.h>
19295 #include <stdio.h>
19296 int
19297 main (void)
19298 {
19299
19300         va_list ap;
19301         vsscanf("from", "%d", ap)
19302   ;
19303   return 0;
19304 }
19305 _ACEOF
19306 rm -f conftest.$ac_objext conftest$ac_exeext
19307 if { (eval echo "$as_me:19307: \"$ac_link\"") >&5
19308   (eval $ac_link) 2>&5
19309   ac_status=$?
19310   echo "$as_me:19310: \$? = $ac_status" >&5
19311   (exit $ac_status); } &&
19312          { ac_try='test -s conftest$ac_exeext'
19313   { (eval echo "$as_me:19313: \"$ac_try\"") >&5
19314   (eval $ac_try) 2>&5
19315   ac_status=$?
19316   echo "$as_me:19316: \$? = $ac_status" >&5
19317   (exit $ac_status); }; }; then
19318   cf_cv_func_vsscanf=vsscanf
19319 else
19320   echo "$as_me: failed program was:" >&5
19321 cat conftest.$ac_ext >&5
19322
19323 cat >conftest.$ac_ext <<_ACEOF
19324 #line 19324 "configure"
19325 #include "confdefs.h"
19326
19327 #include <stdarg.h>
19328 #include <stdio.h>
19329 int
19330 main (void)
19331 {
19332
19333         FILE strbuf;
19334         char *str = "from";
19335
19336         strbuf._flag = _IOREAD;
19337         strbuf._ptr = strbuf._base = (unsigned char *) str;
19338         strbuf._cnt = strlen(str);
19339         strbuf._file = _NFILE;
19340         return (vfscanf(&strbuf, "%d", ap))
19341   ;
19342   return 0;
19343 }
19344 _ACEOF
19345 rm -f conftest.$ac_objext conftest$ac_exeext
19346 if { (eval echo "$as_me:19346: \"$ac_link\"") >&5
19347   (eval $ac_link) 2>&5
19348   ac_status=$?
19349   echo "$as_me:19349: \$? = $ac_status" >&5
19350   (exit $ac_status); } &&
19351          { ac_try='test -s conftest$ac_exeext'
19352   { (eval echo "$as_me:19352: \"$ac_try\"") >&5
19353   (eval $ac_try) 2>&5
19354   ac_status=$?
19355   echo "$as_me:19355: \$? = $ac_status" >&5
19356   (exit $ac_status); }; }; then
19357   cf_cv_func_vsscanf=vfscanf
19358 else
19359   echo "$as_me: failed program was:" >&5
19360 cat conftest.$ac_ext >&5
19361
19362 cat >conftest.$ac_ext <<_ACEOF
19363 #line 19363 "configure"
19364 #include "confdefs.h"
19365
19366 #include <stdarg.h>
19367 #include <stdio.h>
19368 int
19369 main (void)
19370 {
19371
19372         FILE strbuf;
19373         char *str = "from";
19374
19375         strbuf._flag = _IOREAD;
19376         strbuf._ptr = strbuf._base = (unsigned char *) str;
19377         strbuf._cnt = strlen(str);
19378         strbuf._file = _NFILE;
19379         return (_doscan(&strbuf, "%d", ap))
19380   ;
19381   return 0;
19382 }
19383 _ACEOF
19384 rm -f conftest.$ac_objext conftest$ac_exeext
19385 if { (eval echo "$as_me:19385: \"$ac_link\"") >&5
19386   (eval $ac_link) 2>&5
19387   ac_status=$?
19388   echo "$as_me:19388: \$? = $ac_status" >&5
19389   (exit $ac_status); } &&
19390          { ac_try='test -s conftest$ac_exeext'
19391   { (eval echo "$as_me:19391: \"$ac_try\"") >&5
19392   (eval $ac_try) 2>&5
19393   ac_status=$?
19394   echo "$as_me:19394: \$? = $ac_status" >&5
19395   (exit $ac_status); }; }; then
19396   cf_cv_func_vsscanf=_doscan
19397 else
19398   echo "$as_me: failed program was:" >&5
19399 cat conftest.$ac_ext >&5
19400
19401 cf_cv_func_vsscanf=no
19402 fi
19403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19404 fi
19405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19406 fi
19407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19408 fi
19409 echo "$as_me:19409: result: $cf_cv_func_vsscanf" >&5
19410 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19411
19412 case $cf_cv_func_vsscanf in
19413 (vsscanf)
19414 cat >>confdefs.h <<\EOF
19415 #define HAVE_VSSCANF 1
19416 EOF
19417 ;;
19418 (vfscanf)
19419 cat >>confdefs.h <<\EOF
19420 #define HAVE_VFSCANF 1
19421 EOF
19422 ;;
19423 (_doscan)
19424 cat >>confdefs.h <<\EOF
19425 #define HAVE__DOSCAN 1
19426 EOF
19427 ;;
19428 esac
19429
19430 for ac_header in \
19431 unistd.h \
19432
19433 do
19434 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19435 echo "$as_me:19435: checking for $ac_header" >&5
19436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19437 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19438   echo $ECHO_N "(cached) $ECHO_C" >&6
19439 else
19440   cat >conftest.$ac_ext <<_ACEOF
19441 #line 19441 "configure"
19442 #include "confdefs.h"
19443 #include <$ac_header>
19444 _ACEOF
19445 if { (eval echo "$as_me:19445: \"$ac_cpp conftest.$ac_ext\"") >&5
19446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19447   ac_status=$?
19448   egrep -v '^ *\+' conftest.er1 >conftest.err
19449   rm -f conftest.er1
19450   cat conftest.err >&5
19451   echo "$as_me:19451: \$? = $ac_status" >&5
19452   (exit $ac_status); } >/dev/null; then
19453   if test -s conftest.err; then
19454     ac_cpp_err=$ac_c_preproc_warn_flag
19455   else
19456     ac_cpp_err=
19457   fi
19458 else
19459   ac_cpp_err=yes
19460 fi
19461 if test -z "$ac_cpp_err"; then
19462   eval "$as_ac_Header=yes"
19463 else
19464   echo "$as_me: failed program was:" >&5
19465   cat conftest.$ac_ext >&5
19466   eval "$as_ac_Header=no"
19467 fi
19468 rm -f conftest.err conftest.$ac_ext
19469 fi
19470 echo "$as_me:19470: result: `eval echo '${'$as_ac_Header'}'`" >&5
19471 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19472 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19473   cat >>confdefs.h <<EOF
19474 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19475 EOF
19476
19477 fi
19478 done
19479
19480 echo "$as_me:19480: checking for working mkstemp" >&5
19481 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19482 if test "${cf_cv_func_mkstemp+set}" = set; then
19483   echo $ECHO_N "(cached) $ECHO_C" >&6
19484 else
19485
19486 rm -rf conftest*
19487 if test "$cross_compiling" = yes; then
19488   cf_cv_func_mkstemp=maybe
19489 else
19490   cat >conftest.$ac_ext <<_ACEOF
19491 #line 19491 "configure"
19492 #include "confdefs.h"
19493
19494 #include <sys/types.h>
19495 #ifdef HAVE_UNISTD_H
19496 #include <unistd.h>
19497 #endif
19498 #include <stdlib.h>
19499 #include <stdio.h>
19500 #include <string.h>
19501 #include <sys/stat.h>
19502 int main(void)
19503 {
19504         char *tmpl = "conftestXXXXXX";
19505         char name[2][80];
19506         int n;
19507         int result = 0;
19508         int fd;
19509         struct stat sb;
19510
19511         umask(077);
19512         for (n = 0; n < 2; ++n) {
19513                 strcpy(name[n], tmpl);
19514                 if ((fd = mkstemp(name[n])) >= 0) {
19515                         if (!strcmp(name[n], tmpl)
19516                          || stat(name[n], &sb) != 0
19517                          || (sb.st_mode & S_IFMT) != S_IFREG
19518                          || (sb.st_mode & 077) != 0) {
19519                                 result = 1;
19520                         }
19521                         close(fd);
19522                 }
19523         }
19524         if (result == 0
19525          && !strcmp(name[0], name[1]))
19526                 result = 1;
19527         ${cf_cv_main_return:-return}(result);
19528 }
19529
19530 _ACEOF
19531 rm -f conftest$ac_exeext
19532 if { (eval echo "$as_me:19532: \"$ac_link\"") >&5
19533   (eval $ac_link) 2>&5
19534   ac_status=$?
19535   echo "$as_me:19535: \$? = $ac_status" >&5
19536   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19537   { (eval echo "$as_me:19537: \"$ac_try\"") >&5
19538   (eval $ac_try) 2>&5
19539   ac_status=$?
19540   echo "$as_me:19540: \$? = $ac_status" >&5
19541   (exit $ac_status); }; }; then
19542   cf_cv_func_mkstemp=yes
19543
19544 else
19545   echo "$as_me: program exited with status $ac_status" >&5
19546 echo "$as_me: failed program was:" >&5
19547 cat conftest.$ac_ext >&5
19548 cf_cv_func_mkstemp=no
19549
19550 fi
19551 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19552 fi
19553
19554 fi
19555 echo "$as_me:19555: result: $cf_cv_func_mkstemp" >&5
19556 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19557 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19558         echo "$as_me:19558: checking for mkstemp" >&5
19559 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19560 if test "${ac_cv_func_mkstemp+set}" = set; then
19561   echo $ECHO_N "(cached) $ECHO_C" >&6
19562 else
19563   cat >conftest.$ac_ext <<_ACEOF
19564 #line 19564 "configure"
19565 #include "confdefs.h"
19566 #define mkstemp autoconf_temporary
19567 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19568 #undef mkstemp
19569
19570 #ifdef __cplusplus
19571 extern "C"
19572 #endif
19573
19574 /* We use char because int might match the return type of a gcc2
19575    builtin and then its argument prototype would still apply.  */
19576 char mkstemp (void);
19577
19578 int
19579 main (void)
19580 {
19581
19582 /* The GNU C library defines stubs for functions which it implements
19583     to always fail with ENOSYS.  Some functions are actually named
19584     something starting with __ and the normal name is an alias.  */
19585 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19586 #error found stub for mkstemp
19587 #endif
19588
19589         return mkstemp ();
19590   ;
19591   return 0;
19592 }
19593 _ACEOF
19594 rm -f conftest.$ac_objext conftest$ac_exeext
19595 if { (eval echo "$as_me:19595: \"$ac_link\"") >&5
19596   (eval $ac_link) 2>&5
19597   ac_status=$?
19598   echo "$as_me:19598: \$? = $ac_status" >&5
19599   (exit $ac_status); } &&
19600          { ac_try='test -s conftest$ac_exeext'
19601   { (eval echo "$as_me:19601: \"$ac_try\"") >&5
19602   (eval $ac_try) 2>&5
19603   ac_status=$?
19604   echo "$as_me:19604: \$? = $ac_status" >&5
19605   (exit $ac_status); }; }; then
19606   ac_cv_func_mkstemp=yes
19607 else
19608   echo "$as_me: failed program was:" >&5
19609 cat conftest.$ac_ext >&5
19610 ac_cv_func_mkstemp=no
19611 fi
19612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19613 fi
19614 echo "$as_me:19614: result: $ac_cv_func_mkstemp" >&5
19615 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19616
19617 fi
19618 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19619
19620 cat >>confdefs.h <<\EOF
19621 #define HAVE_MKSTEMP 1
19622 EOF
19623
19624 fi
19625
19626 # setup for prototype of fallback for vsscanf()
19627
19628 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19629         HAVE_VSSCANF=1
19630 else
19631         HAVE_VSSCANF=0
19632 fi
19633
19634 if test "x$cross_compiling" = xyes ; then
19635         { echo "$as_me:19635: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19636 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19637 else
19638         echo "$as_me:19638: checking whether setvbuf arguments are reversed" >&5
19639 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19640 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19641   echo $ECHO_N "(cached) $ECHO_C" >&6
19642 else
19643   if test "$cross_compiling" = yes; then
19644   { { echo "$as_me:19644: error: cannot run test program while cross compiling" >&5
19645 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19646    { (exit 1); exit 1; }; }
19647 else
19648   cat >conftest.$ac_ext <<_ACEOF
19649 #line 19649 "configure"
19650 #include "confdefs.h"
19651 #include <stdio.h>
19652 /* If setvbuf has the reversed format, exit 0. */
19653 int
19654 main (void)
19655 {
19656   /* This call has the arguments reversed.
19657      A reversed system may check and see that the address of main
19658      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19659   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19660     $ac_main_return(1);
19661   putc('\r', stdout);
19662   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19663 }
19664 _ACEOF
19665 rm -f conftest$ac_exeext
19666 if { (eval echo "$as_me:19666: \"$ac_link\"") >&5
19667   (eval $ac_link) 2>&5
19668   ac_status=$?
19669   echo "$as_me:19669: \$? = $ac_status" >&5
19670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19671   { (eval echo "$as_me:19671: \"$ac_try\"") >&5
19672   (eval $ac_try) 2>&5
19673   ac_status=$?
19674   echo "$as_me:19674: \$? = $ac_status" >&5
19675   (exit $ac_status); }; }; then
19676   ac_cv_func_setvbuf_reversed=yes
19677 else
19678   echo "$as_me: program exited with status $ac_status" >&5
19679 echo "$as_me: failed program was:" >&5
19680 cat conftest.$ac_ext >&5
19681 ac_cv_func_setvbuf_reversed=no
19682 fi
19683 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19684 fi
19685 rm -f core core.* *.core
19686 fi
19687 echo "$as_me:19687: result: $ac_cv_func_setvbuf_reversed" >&5
19688 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19689 if test $ac_cv_func_setvbuf_reversed = yes; then
19690
19691 cat >>confdefs.h <<\EOF
19692 #define SETVBUF_REVERSED 1
19693 EOF
19694
19695 fi
19696
19697 fi
19698 echo "$as_me:19698: checking for intptr_t" >&5
19699 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19700 if test "${ac_cv_type_intptr_t+set}" = set; then
19701   echo $ECHO_N "(cached) $ECHO_C" >&6
19702 else
19703   cat >conftest.$ac_ext <<_ACEOF
19704 #line 19704 "configure"
19705 #include "confdefs.h"
19706 $ac_includes_default
19707 int
19708 main (void)
19709 {
19710 if ((intptr_t *) 0)
19711   return 0;
19712 if (sizeof (intptr_t))
19713   return 0;
19714   ;
19715   return 0;
19716 }
19717 _ACEOF
19718 rm -f conftest.$ac_objext
19719 if { (eval echo "$as_me:19719: \"$ac_compile\"") >&5
19720   (eval $ac_compile) 2>&5
19721   ac_status=$?
19722   echo "$as_me:19722: \$? = $ac_status" >&5
19723   (exit $ac_status); } &&
19724          { ac_try='test -s conftest.$ac_objext'
19725   { (eval echo "$as_me:19725: \"$ac_try\"") >&5
19726   (eval $ac_try) 2>&5
19727   ac_status=$?
19728   echo "$as_me:19728: \$? = $ac_status" >&5
19729   (exit $ac_status); }; }; then
19730   ac_cv_type_intptr_t=yes
19731 else
19732   echo "$as_me: failed program was:" >&5
19733 cat conftest.$ac_ext >&5
19734 ac_cv_type_intptr_t=no
19735 fi
19736 rm -f conftest.$ac_objext conftest.$ac_ext
19737 fi
19738 echo "$as_me:19738: result: $ac_cv_type_intptr_t" >&5
19739 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19740 if test $ac_cv_type_intptr_t = yes; then
19741   :
19742 else
19743
19744 cat >>confdefs.h <<EOF
19745 #define intptr_t long
19746 EOF
19747
19748 fi
19749
19750 echo "$as_me:19750: checking for ssize_t" >&5
19751 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19752 if test "${ac_cv_type_ssize_t+set}" = set; then
19753   echo $ECHO_N "(cached) $ECHO_C" >&6
19754 else
19755   cat >conftest.$ac_ext <<_ACEOF
19756 #line 19756 "configure"
19757 #include "confdefs.h"
19758 $ac_includes_default
19759 int
19760 main (void)
19761 {
19762 if ((ssize_t *) 0)
19763   return 0;
19764 if (sizeof (ssize_t))
19765   return 0;
19766   ;
19767   return 0;
19768 }
19769 _ACEOF
19770 rm -f conftest.$ac_objext
19771 if { (eval echo "$as_me:19771: \"$ac_compile\"") >&5
19772   (eval $ac_compile) 2>&5
19773   ac_status=$?
19774   echo "$as_me:19774: \$? = $ac_status" >&5
19775   (exit $ac_status); } &&
19776          { ac_try='test -s conftest.$ac_objext'
19777   { (eval echo "$as_me:19777: \"$ac_try\"") >&5
19778   (eval $ac_try) 2>&5
19779   ac_status=$?
19780   echo "$as_me:19780: \$? = $ac_status" >&5
19781   (exit $ac_status); }; }; then
19782   ac_cv_type_ssize_t=yes
19783 else
19784   echo "$as_me: failed program was:" >&5
19785 cat conftest.$ac_ext >&5
19786 ac_cv_type_ssize_t=no
19787 fi
19788 rm -f conftest.$ac_objext conftest.$ac_ext
19789 fi
19790 echo "$as_me:19790: result: $ac_cv_type_ssize_t" >&5
19791 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19792 if test $ac_cv_type_ssize_t = yes; then
19793   :
19794 else
19795
19796 cat >>confdefs.h <<EOF
19797 #define ssize_t int
19798 EOF
19799
19800 fi
19801
19802 echo "$as_me:19802: checking for type sigaction_t" >&5
19803 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19804 if test "${cf_cv_type_sigaction+set}" = set; then
19805   echo $ECHO_N "(cached) $ECHO_C" >&6
19806 else
19807
19808         cat >conftest.$ac_ext <<_ACEOF
19809 #line 19809 "configure"
19810 #include "confdefs.h"
19811
19812 #include <signal.h>
19813 int
19814 main (void)
19815 {
19816 sigaction_t x
19817   ;
19818   return 0;
19819 }
19820 _ACEOF
19821 rm -f conftest.$ac_objext
19822 if { (eval echo "$as_me:19822: \"$ac_compile\"") >&5
19823   (eval $ac_compile) 2>&5
19824   ac_status=$?
19825   echo "$as_me:19825: \$? = $ac_status" >&5
19826   (exit $ac_status); } &&
19827          { ac_try='test -s conftest.$ac_objext'
19828   { (eval echo "$as_me:19828: \"$ac_try\"") >&5
19829   (eval $ac_try) 2>&5
19830   ac_status=$?
19831   echo "$as_me:19831: \$? = $ac_status" >&5
19832   (exit $ac_status); }; }; then
19833   cf_cv_type_sigaction=yes
19834 else
19835   echo "$as_me: failed program was:" >&5
19836 cat conftest.$ac_ext >&5
19837 cf_cv_type_sigaction=no
19838 fi
19839 rm -f conftest.$ac_objext conftest.$ac_ext
19840 fi
19841
19842 echo "$as_me:19842: result: $cf_cv_type_sigaction" >&5
19843 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19844 test "$cf_cv_type_sigaction" = yes &&
19845 cat >>confdefs.h <<\EOF
19846 #define HAVE_TYPE_SIGACTION 1
19847 EOF
19848
19849 echo "$as_me:19849: checking declaration of size-change" >&5
19850 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19851 if test "${cf_cv_sizechange+set}" = set; then
19852   echo $ECHO_N "(cached) $ECHO_C" >&6
19853 else
19854
19855         cf_cv_sizechange=unknown
19856         cf_save_CPPFLAGS="$CPPFLAGS"
19857
19858 for cf_opts in "" "NEED_PTEM_H"
19859 do
19860
19861         CPPFLAGS="$cf_save_CPPFLAGS"
19862         if test -n "$cf_opts"
19863         then
19864
19865         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19866         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19867
19868         fi
19869         cat >conftest.$ac_ext <<_ACEOF
19870 #line 19870 "configure"
19871 #include "confdefs.h"
19872 #include <sys/types.h>
19873 #ifdef HAVE_TERMIOS_H
19874 #include <termios.h>
19875 #else
19876 #ifdef HAVE_TERMIO_H
19877 #include <termio.h>
19878 #endif
19879 #endif
19880
19881 #ifdef NEED_PTEM_H
19882 /* This is a workaround for SCO:  they neglected to define struct winsize in
19883  * termios.h -- it's only in termio.h and ptem.h
19884  */
19885 #include <sys/stream.h>
19886 #include <sys/ptem.h>
19887 #endif
19888
19889 #ifdef HAVE_SYS_IOCTL_H
19890 #include <sys/ioctl.h>
19891 #endif
19892
19893 int
19894 main (void)
19895 {
19896
19897 #ifdef TIOCGSIZE
19898         struct ttysize win;     /* SunOS 3.0... */
19899         int y = win.ts_lines;
19900         int x = win.ts_cols;
19901 #else
19902 #ifdef TIOCGWINSZ
19903         struct winsize win;     /* everything else */
19904         int y = win.ws_row;
19905         int x = win.ws_col;
19906 #else
19907         no TIOCGSIZE or TIOCGWINSZ
19908 #endif /* TIOCGWINSZ */
19909 #endif /* TIOCGSIZE */
19910
19911   ;
19912   return 0;
19913 }
19914 _ACEOF
19915 rm -f conftest.$ac_objext
19916 if { (eval echo "$as_me:19916: \"$ac_compile\"") >&5
19917   (eval $ac_compile) 2>&5
19918   ac_status=$?
19919   echo "$as_me:19919: \$? = $ac_status" >&5
19920   (exit $ac_status); } &&
19921          { ac_try='test -s conftest.$ac_objext'
19922   { (eval echo "$as_me:19922: \"$ac_try\"") >&5
19923   (eval $ac_try) 2>&5
19924   ac_status=$?
19925   echo "$as_me:19925: \$? = $ac_status" >&5
19926   (exit $ac_status); }; }; then
19927   cf_cv_sizechange=yes
19928 else
19929   echo "$as_me: failed program was:" >&5
19930 cat conftest.$ac_ext >&5
19931 cf_cv_sizechange=no
19932 fi
19933 rm -f conftest.$ac_objext conftest.$ac_ext
19934
19935         CPPFLAGS="$cf_save_CPPFLAGS"
19936         if test "$cf_cv_sizechange" = yes ; then
19937                 echo "size-change succeeded ($cf_opts)" >&5
19938                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19939                 break
19940         fi
19941 done
19942
19943 fi
19944 echo "$as_me:19944: result: $cf_cv_sizechange" >&5
19945 echo "${ECHO_T}$cf_cv_sizechange" >&6
19946 if test "$cf_cv_sizechange" != no ; then
19947
19948 cat >>confdefs.h <<\EOF
19949 #define HAVE_SIZECHANGE 1
19950 EOF
19951
19952         case $cf_cv_sizechange in
19953         (NEED*)
19954                 cat >>confdefs.h <<EOF
19955 #define $cf_cv_sizechange  1
19956 EOF
19957
19958                 ;;
19959         esac
19960 fi
19961
19962 echo "$as_me:19962: checking for memmove" >&5
19963 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19964 if test "${ac_cv_func_memmove+set}" = set; then
19965   echo $ECHO_N "(cached) $ECHO_C" >&6
19966 else
19967   cat >conftest.$ac_ext <<_ACEOF
19968 #line 19968 "configure"
19969 #include "confdefs.h"
19970 #define memmove autoconf_temporary
19971 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19972 #undef memmove
19973
19974 #ifdef __cplusplus
19975 extern "C"
19976 #endif
19977
19978 /* We use char because int might match the return type of a gcc2
19979    builtin and then its argument prototype would still apply.  */
19980 char memmove (void);
19981
19982 int
19983 main (void)
19984 {
19985
19986 /* The GNU C library defines stubs for functions which it implements
19987     to always fail with ENOSYS.  Some functions are actually named
19988     something starting with __ and the normal name is an alias.  */
19989 #if defined (__stub_memmove) || defined (__stub___memmove)
19990 #error found stub for memmove
19991 #endif
19992
19993         return memmove ();
19994   ;
19995   return 0;
19996 }
19997 _ACEOF
19998 rm -f conftest.$ac_objext conftest$ac_exeext
19999 if { (eval echo "$as_me:19999: \"$ac_link\"") >&5
20000   (eval $ac_link) 2>&5
20001   ac_status=$?
20002   echo "$as_me:20002: \$? = $ac_status" >&5
20003   (exit $ac_status); } &&
20004          { ac_try='test -s conftest$ac_exeext'
20005   { (eval echo "$as_me:20005: \"$ac_try\"") >&5
20006   (eval $ac_try) 2>&5
20007   ac_status=$?
20008   echo "$as_me:20008: \$? = $ac_status" >&5
20009   (exit $ac_status); }; }; then
20010   ac_cv_func_memmove=yes
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 cat conftest.$ac_ext >&5
20014 ac_cv_func_memmove=no
20015 fi
20016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20017 fi
20018 echo "$as_me:20018: result: $ac_cv_func_memmove" >&5
20019 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20020 if test $ac_cv_func_memmove = yes; then
20021   :
20022 else
20023
20024 echo "$as_me:20024: checking for bcopy" >&5
20025 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20026 if test "${ac_cv_func_bcopy+set}" = set; then
20027   echo $ECHO_N "(cached) $ECHO_C" >&6
20028 else
20029   cat >conftest.$ac_ext <<_ACEOF
20030 #line 20030 "configure"
20031 #include "confdefs.h"
20032 #define bcopy autoconf_temporary
20033 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20034 #undef bcopy
20035
20036 #ifdef __cplusplus
20037 extern "C"
20038 #endif
20039
20040 /* We use char because int might match the return type of a gcc2
20041    builtin and then its argument prototype would still apply.  */
20042 char bcopy (void);
20043
20044 int
20045 main (void)
20046 {
20047
20048 /* The GNU C library defines stubs for functions which it implements
20049     to always fail with ENOSYS.  Some functions are actually named
20050     something starting with __ and the normal name is an alias.  */
20051 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20052 #error found stub for bcopy
20053 #endif
20054
20055         return bcopy ();
20056   ;
20057   return 0;
20058 }
20059 _ACEOF
20060 rm -f conftest.$ac_objext conftest$ac_exeext
20061 if { (eval echo "$as_me:20061: \"$ac_link\"") >&5
20062   (eval $ac_link) 2>&5
20063   ac_status=$?
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit $ac_status); } &&
20066          { ac_try='test -s conftest$ac_exeext'
20067   { (eval echo "$as_me:20067: \"$ac_try\"") >&5
20068   (eval $ac_try) 2>&5
20069   ac_status=$?
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); }; }; then
20072   ac_cv_func_bcopy=yes
20073 else
20074   echo "$as_me: failed program was:" >&5
20075 cat conftest.$ac_ext >&5
20076 ac_cv_func_bcopy=no
20077 fi
20078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20079 fi
20080 echo "$as_me:20080: result: $ac_cv_func_bcopy" >&5
20081 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20082 if test $ac_cv_func_bcopy = yes; then
20083
20084         echo "$as_me:20084: checking if bcopy does overlapping moves" >&5
20085 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20086 if test "${cf_cv_good_bcopy+set}" = set; then
20087   echo $ECHO_N "(cached) $ECHO_C" >&6
20088 else
20089
20090                 if test "$cross_compiling" = yes; then
20091   cf_cv_good_bcopy=unknown
20092 else
20093   cat >conftest.$ac_ext <<_ACEOF
20094 #line 20094 "configure"
20095 #include "confdefs.h"
20096
20097 int main(void) {
20098         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20099         char temp[40];
20100         bcopy(data, temp, sizeof(data));
20101         bcopy(temp+10, temp, 15);
20102         bcopy(temp+5, temp+15, 10);
20103         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20104 }
20105
20106 _ACEOF
20107 rm -f conftest$ac_exeext
20108 if { (eval echo "$as_me:20108: \"$ac_link\"") >&5
20109   (eval $ac_link) 2>&5
20110   ac_status=$?
20111   echo "$as_me:20111: \$? = $ac_status" >&5
20112   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20113   { (eval echo "$as_me:20113: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   cf_cv_good_bcopy=yes
20119 else
20120   echo "$as_me: program exited with status $ac_status" >&5
20121 echo "$as_me: failed program was:" >&5
20122 cat conftest.$ac_ext >&5
20123 cf_cv_good_bcopy=no
20124 fi
20125 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20126 fi
20127
20128 fi
20129 echo "$as_me:20129: result: $cf_cv_good_bcopy" >&5
20130 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20131
20132 else
20133   cf_cv_good_bcopy=no
20134 fi
20135
20136         if test "$cf_cv_good_bcopy" = yes ; then
20137
20138 cat >>confdefs.h <<\EOF
20139 #define USE_OK_BCOPY 1
20140 EOF
20141
20142         else
20143
20144 cat >>confdefs.h <<\EOF
20145 #define USE_MY_MEMMOVE 1
20146 EOF
20147
20148         fi
20149
20150 fi
20151
20152 tty 2>&1 >/dev/null || {
20153 for ac_func in posix_openpt
20154 do
20155 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20156 echo "$as_me:20156: checking for $ac_func" >&5
20157 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20158 if eval "test \"\${$as_ac_var+set}\" = set"; then
20159   echo $ECHO_N "(cached) $ECHO_C" >&6
20160 else
20161   cat >conftest.$ac_ext <<_ACEOF
20162 #line 20162 "configure"
20163 #include "confdefs.h"
20164 #define $ac_func autoconf_temporary
20165 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20166 #undef $ac_func
20167
20168 #ifdef __cplusplus
20169 extern "C"
20170 #endif
20171
20172 /* We use char because int might match the return type of a gcc2
20173    builtin and then its argument prototype would still apply.  */
20174 char $ac_func (void);
20175
20176 int
20177 main (void)
20178 {
20179
20180 /* The GNU C library defines stubs for functions which it implements
20181     to always fail with ENOSYS.  Some functions are actually named
20182     something starting with __ and the normal name is an alias.  */
20183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20184 #error found stub for $ac_func
20185 #endif
20186
20187         return $ac_func ();
20188   ;
20189   return 0;
20190 }
20191 _ACEOF
20192 rm -f conftest.$ac_objext conftest$ac_exeext
20193 if { (eval echo "$as_me:20193: \"$ac_link\"") >&5
20194   (eval $ac_link) 2>&5
20195   ac_status=$?
20196   echo "$as_me:20196: \$? = $ac_status" >&5
20197   (exit $ac_status); } &&
20198          { ac_try='test -s conftest$ac_exeext'
20199   { (eval echo "$as_me:20199: \"$ac_try\"") >&5
20200   (eval $ac_try) 2>&5
20201   ac_status=$?
20202   echo "$as_me:20202: \$? = $ac_status" >&5
20203   (exit $ac_status); }; }; then
20204   eval "$as_ac_var=yes"
20205 else
20206   echo "$as_me: failed program was:" >&5
20207 cat conftest.$ac_ext >&5
20208 eval "$as_ac_var=no"
20209 fi
20210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20211 fi
20212 echo "$as_me:20212: result: `eval echo '${'$as_ac_var'}'`" >&5
20213 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20214 if test `eval echo '${'$as_ac_var'}'` = yes; then
20215   cat >>confdefs.h <<EOF
20216 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20217 EOF
20218
20219 fi
20220 done
20221  }
20222 echo "$as_me:20222: checking if poll really works" >&5
20223 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20224 if test "${cf_cv_working_poll+set}" = set; then
20225   echo $ECHO_N "(cached) $ECHO_C" >&6
20226 else
20227
20228 if test "$cross_compiling" = yes; then
20229   cf_cv_working_poll=unknown
20230 else
20231   cat >conftest.$ac_ext <<_ACEOF
20232 #line 20232 "configure"
20233 #include "confdefs.h"
20234
20235 #include <stdlib.h>
20236 #include <stdio.h>
20237 #include <unistd.h>
20238 #include <fcntl.h>
20239 #ifdef HAVE_POLL_H
20240 #include <poll.h>
20241 #else
20242 #include <sys/poll.h>
20243 #endif
20244 int main(void) {
20245         struct pollfd myfds;
20246         int ret;
20247
20248         /* check for Darwin bug with respect to "devices" */
20249         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20250         if (myfds.fd < 0)
20251                 myfds.fd = 0;
20252         myfds.events = POLLIN;
20253         myfds.revents = 0;
20254
20255         ret = poll(&myfds, 1, 100);
20256
20257         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20258                 ret = -1;
20259         } else {
20260                 int fd = 0;
20261                 if (!isatty(fd)) {
20262                         fd = open("/dev/tty", 2);       /* O_RDWR */
20263                 }
20264 #ifdef HAVE_POSIX_OPENPT
20265                 if (fd < 0) {
20266                         fd = posix_openpt(O_RDWR);
20267                 }
20268 #endif
20269
20270                 if (fd >= 0) {
20271                         /* also check with standard input */
20272                         myfds.fd = fd;
20273                         myfds.events = POLLIN;
20274                         myfds.revents = 0;
20275                         ret = poll(&myfds, 1, 100);
20276                 } else {
20277                         ret = -1;
20278                 }
20279         }
20280         ${cf_cv_main_return:-return}(ret < 0);
20281 }
20282 _ACEOF
20283 rm -f conftest$ac_exeext
20284 if { (eval echo "$as_me:20284: \"$ac_link\"") >&5
20285   (eval $ac_link) 2>&5
20286   ac_status=$?
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20289   { (eval echo "$as_me:20289: \"$ac_try\"") >&5
20290   (eval $ac_try) 2>&5
20291   ac_status=$?
20292   echo "$as_me:20292: \$? = $ac_status" >&5
20293   (exit $ac_status); }; }; then
20294   cf_cv_working_poll=yes
20295 else
20296   echo "$as_me: program exited with status $ac_status" >&5
20297 echo "$as_me: failed program was:" >&5
20298 cat conftest.$ac_ext >&5
20299 cf_cv_working_poll=no
20300 fi
20301 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20302 fi
20303 fi
20304 echo "$as_me:20304: result: $cf_cv_working_poll" >&5
20305 echo "${ECHO_T}$cf_cv_working_poll" >&6
20306 test "$cf_cv_working_poll" = "yes" &&
20307 cat >>confdefs.h <<\EOF
20308 #define HAVE_WORKING_POLL 1
20309 EOF
20310
20311 echo "$as_me:20311: checking for va_copy" >&5
20312 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20313 if test "${cf_cv_have_va_copy+set}" = set; then
20314   echo $ECHO_N "(cached) $ECHO_C" >&6
20315 else
20316
20317 cat >conftest.$ac_ext <<_ACEOF
20318 #line 20318 "configure"
20319 #include "confdefs.h"
20320
20321 #include <stdarg.h>
20322
20323 int
20324 main (void)
20325 {
20326
20327         static va_list dst;
20328         static va_list src;
20329         va_copy(dst, src)
20330   ;
20331   return 0;
20332 }
20333 _ACEOF
20334 rm -f conftest.$ac_objext conftest$ac_exeext
20335 if { (eval echo "$as_me:20335: \"$ac_link\"") >&5
20336   (eval $ac_link) 2>&5
20337   ac_status=$?
20338   echo "$as_me:20338: \$? = $ac_status" >&5
20339   (exit $ac_status); } &&
20340          { ac_try='test -s conftest$ac_exeext'
20341   { (eval echo "$as_me:20341: \"$ac_try\"") >&5
20342   (eval $ac_try) 2>&5
20343   ac_status=$?
20344   echo "$as_me:20344: \$? = $ac_status" >&5
20345   (exit $ac_status); }; }; then
20346   cf_cv_have_va_copy=yes
20347 else
20348   echo "$as_me: failed program was:" >&5
20349 cat conftest.$ac_ext >&5
20350 cf_cv_have_va_copy=no
20351 fi
20352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20353 fi
20354 echo "$as_me:20354: result: $cf_cv_have_va_copy" >&5
20355 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20356
20357 test "$cf_cv_have_va_copy" = yes &&
20358 cat >>confdefs.h <<\EOF
20359 #define HAVE_VA_COPY 1
20360 EOF
20361
20362 echo "$as_me:20362: checking for __va_copy" >&5
20363 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20364 if test "${cf_cv_have___va_copy+set}" = set; then
20365   echo $ECHO_N "(cached) $ECHO_C" >&6
20366 else
20367
20368 cat >conftest.$ac_ext <<_ACEOF
20369 #line 20369 "configure"
20370 #include "confdefs.h"
20371
20372 #include <stdarg.h>
20373
20374 int
20375 main (void)
20376 {
20377
20378         static va_list dst;
20379         static va_list src;
20380         __va_copy(dst, src)
20381   ;
20382   return 0;
20383 }
20384 _ACEOF
20385 rm -f conftest.$ac_objext conftest$ac_exeext
20386 if { (eval echo "$as_me:20386: \"$ac_link\"") >&5
20387   (eval $ac_link) 2>&5
20388   ac_status=$?
20389   echo "$as_me:20389: \$? = $ac_status" >&5
20390   (exit $ac_status); } &&
20391          { ac_try='test -s conftest$ac_exeext'
20392   { (eval echo "$as_me:20392: \"$ac_try\"") >&5
20393   (eval $ac_try) 2>&5
20394   ac_status=$?
20395   echo "$as_me:20395: \$? = $ac_status" >&5
20396   (exit $ac_status); }; }; then
20397   cf_cv_have___va_copy=yes
20398 else
20399   echo "$as_me: failed program was:" >&5
20400 cat conftest.$ac_ext >&5
20401 cf_cv_have___va_copy=no
20402 fi
20403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20404 fi
20405 echo "$as_me:20405: result: $cf_cv_have___va_copy" >&5
20406 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20407
20408 test "$cf_cv_have___va_copy" = yes &&
20409 cat >>confdefs.h <<\EOF
20410 #define HAVE___VA_COPY 1
20411 EOF
20412
20413 echo "$as_me:20413: checking for pid_t" >&5
20414 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20415 if test "${ac_cv_type_pid_t+set}" = set; then
20416   echo $ECHO_N "(cached) $ECHO_C" >&6
20417 else
20418   cat >conftest.$ac_ext <<_ACEOF
20419 #line 20419 "configure"
20420 #include "confdefs.h"
20421 $ac_includes_default
20422 int
20423 main (void)
20424 {
20425 if ((pid_t *) 0)
20426   return 0;
20427 if (sizeof (pid_t))
20428   return 0;
20429   ;
20430   return 0;
20431 }
20432 _ACEOF
20433 rm -f conftest.$ac_objext
20434 if { (eval echo "$as_me:20434: \"$ac_compile\"") >&5
20435   (eval $ac_compile) 2>&5
20436   ac_status=$?
20437   echo "$as_me:20437: \$? = $ac_status" >&5
20438   (exit $ac_status); } &&
20439          { ac_try='test -s conftest.$ac_objext'
20440   { (eval echo "$as_me:20440: \"$ac_try\"") >&5
20441   (eval $ac_try) 2>&5
20442   ac_status=$?
20443   echo "$as_me:20443: \$? = $ac_status" >&5
20444   (exit $ac_status); }; }; then
20445   ac_cv_type_pid_t=yes
20446 else
20447   echo "$as_me: failed program was:" >&5
20448 cat conftest.$ac_ext >&5
20449 ac_cv_type_pid_t=no
20450 fi
20451 rm -f conftest.$ac_objext conftest.$ac_ext
20452 fi
20453 echo "$as_me:20453: result: $ac_cv_type_pid_t" >&5
20454 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20455 if test $ac_cv_type_pid_t = yes; then
20456   :
20457 else
20458
20459 cat >>confdefs.h <<EOF
20460 #define pid_t int
20461 EOF
20462
20463 fi
20464
20465 for ac_header in unistd.h vfork.h
20466 do
20467 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20468 echo "$as_me:20468: checking for $ac_header" >&5
20469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20471   echo $ECHO_N "(cached) $ECHO_C" >&6
20472 else
20473   cat >conftest.$ac_ext <<_ACEOF
20474 #line 20474 "configure"
20475 #include "confdefs.h"
20476 #include <$ac_header>
20477 _ACEOF
20478 if { (eval echo "$as_me:20478: \"$ac_cpp conftest.$ac_ext\"") >&5
20479   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20480   ac_status=$?
20481   egrep -v '^ *\+' conftest.er1 >conftest.err
20482   rm -f conftest.er1
20483   cat conftest.err >&5
20484   echo "$as_me:20484: \$? = $ac_status" >&5
20485   (exit $ac_status); } >/dev/null; then
20486   if test -s conftest.err; then
20487     ac_cpp_err=$ac_c_preproc_warn_flag
20488   else
20489     ac_cpp_err=
20490   fi
20491 else
20492   ac_cpp_err=yes
20493 fi
20494 if test -z "$ac_cpp_err"; then
20495   eval "$as_ac_Header=yes"
20496 else
20497   echo "$as_me: failed program was:" >&5
20498   cat conftest.$ac_ext >&5
20499   eval "$as_ac_Header=no"
20500 fi
20501 rm -f conftest.err conftest.$ac_ext
20502 fi
20503 echo "$as_me:20503: result: `eval echo '${'$as_ac_Header'}'`" >&5
20504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20506   cat >>confdefs.h <<EOF
20507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20508 EOF
20509
20510 fi
20511 done
20512
20513 for ac_func in fork vfork
20514 do
20515 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20516 echo "$as_me:20516: checking for $ac_func" >&5
20517 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20518 if eval "test \"\${$as_ac_var+set}\" = set"; then
20519   echo $ECHO_N "(cached) $ECHO_C" >&6
20520 else
20521   cat >conftest.$ac_ext <<_ACEOF
20522 #line 20522 "configure"
20523 #include "confdefs.h"
20524 #define $ac_func autoconf_temporary
20525 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20526 #undef $ac_func
20527
20528 #ifdef __cplusplus
20529 extern "C"
20530 #endif
20531
20532 /* We use char because int might match the return type of a gcc2
20533    builtin and then its argument prototype would still apply.  */
20534 char $ac_func (void);
20535
20536 int
20537 main (void)
20538 {
20539
20540 /* The GNU C library defines stubs for functions which it implements
20541     to always fail with ENOSYS.  Some functions are actually named
20542     something starting with __ and the normal name is an alias.  */
20543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20544 #error found stub for $ac_func
20545 #endif
20546
20547         return $ac_func ();
20548   ;
20549   return 0;
20550 }
20551 _ACEOF
20552 rm -f conftest.$ac_objext conftest$ac_exeext
20553 if { (eval echo "$as_me:20553: \"$ac_link\"") >&5
20554   (eval $ac_link) 2>&5
20555   ac_status=$?
20556   echo "$as_me:20556: \$? = $ac_status" >&5
20557   (exit $ac_status); } &&
20558          { ac_try='test -s conftest$ac_exeext'
20559   { (eval echo "$as_me:20559: \"$ac_try\"") >&5
20560   (eval $ac_try) 2>&5
20561   ac_status=$?
20562   echo "$as_me:20562: \$? = $ac_status" >&5
20563   (exit $ac_status); }; }; then
20564   eval "$as_ac_var=yes"
20565 else
20566   echo "$as_me: failed program was:" >&5
20567 cat conftest.$ac_ext >&5
20568 eval "$as_ac_var=no"
20569 fi
20570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20571 fi
20572 echo "$as_me:20572: result: `eval echo '${'$as_ac_var'}'`" >&5
20573 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20574 if test `eval echo '${'$as_ac_var'}'` = yes; then
20575   cat >>confdefs.h <<EOF
20576 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20577 EOF
20578
20579 fi
20580 done
20581
20582 ac_cv_func_fork_works=$ac_cv_func_fork
20583 if test "x$ac_cv_func_fork" = xyes; then
20584   echo "$as_me:20584: checking for working fork" >&5
20585 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20586 if test "${ac_cv_func_fork_works+set}" = set; then
20587   echo $ECHO_N "(cached) $ECHO_C" >&6
20588 else
20589   if test "$cross_compiling" = yes; then
20590   ac_cv_func_fork_works=cross
20591 else
20592   cat >conftest.$ac_ext <<_ACEOF
20593 /* By Rüdiger Kuhlmann. */
20594       #include <sys/types.h>
20595       #if HAVE_UNISTD_H
20596       # include <unistd.h>
20597       #endif
20598       /* Some systems only have a dummy stub for fork() */
20599       int main (void)
20600       {
20601         if (fork() < 0)
20602           $ac_main_return (1);
20603         $ac_main_return (0);
20604       }
20605 _ACEOF
20606 rm -f conftest$ac_exeext
20607 if { (eval echo "$as_me:20607: \"$ac_link\"") >&5
20608   (eval $ac_link) 2>&5
20609   ac_status=$?
20610   echo "$as_me:20610: \$? = $ac_status" >&5
20611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20612   { (eval echo "$as_me:20612: \"$ac_try\"") >&5
20613   (eval $ac_try) 2>&5
20614   ac_status=$?
20615   echo "$as_me:20615: \$? = $ac_status" >&5
20616   (exit $ac_status); }; }; then
20617   ac_cv_func_fork_works=yes
20618 else
20619   echo "$as_me: program exited with status $ac_status" >&5
20620 echo "$as_me: failed program was:" >&5
20621 cat conftest.$ac_ext >&5
20622 ac_cv_func_fork_works=no
20623 fi
20624 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20625 fi
20626 fi
20627 echo "$as_me:20627: result: $ac_cv_func_fork_works" >&5
20628 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20629
20630 fi
20631 if test "x$ac_cv_func_fork_works" = xcross; then
20632   case $host in
20633     *-*-amigaos* | *-*-msdosdjgpp*)
20634       # Override, as these systems have only a dummy fork() stub
20635       ac_cv_func_fork_works=no
20636       ;;
20637     *)
20638       ac_cv_func_fork_works=yes
20639       ;;
20640   esac
20641   { echo "$as_me:20641: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20642 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20643 fi
20644 ac_cv_func_vfork_works=$ac_cv_func_vfork
20645 if test "x$ac_cv_func_vfork" = xyes; then
20646   echo "$as_me:20646: checking for working vfork" >&5
20647 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20648 if test "${ac_cv_func_vfork_works+set}" = set; then
20649   echo $ECHO_N "(cached) $ECHO_C" >&6
20650 else
20651   if test "$cross_compiling" = yes; then
20652   ac_cv_func_vfork_works=cross
20653 else
20654   cat >conftest.$ac_ext <<_ACEOF
20655 #line 20655 "configure"
20656 #include "confdefs.h"
20657 /* Thanks to Paul Eggert for this test.  */
20658 #include <stdio.h>
20659 #include <sys/types.h>
20660 #include <sys/stat.h>
20661 #if HAVE_UNISTD_H
20662 # include <unistd.h>
20663 #endif
20664 #if HAVE_VFORK_H
20665 # include <vfork.h>
20666 #endif
20667 /* On some sparc systems, changes by the child to local and incoming
20668    argument registers are propagated back to the parent.  The compiler
20669    is told about this with #include <vfork.h>, but some compilers
20670    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20671    static variable whose address is put into a register that is
20672    clobbered by the vfork.  */
20673 static
20674 #ifdef __cplusplus
20675 sparc_address_test (int arg)
20676 # else
20677 sparc_address_test (arg) int arg;
20678 #endif
20679 {
20680   static pid_t child;
20681   if (!child) {
20682     child = vfork ();
20683     if (child < 0) {
20684       perror ("vfork");
20685       _exit(2);
20686     }
20687     if (!child) {
20688       arg = getpid();
20689       write(-1, "", 0);
20690       _exit (arg);
20691     }
20692   }
20693 }
20694
20695 int
20696 main (void)
20697 {
20698   pid_t parent = getpid ();
20699   pid_t child;
20700
20701   sparc_address_test ();
20702
20703   child = vfork ();
20704
20705   if (child == 0) {
20706     /* Here is another test for sparc vfork register problems.  This
20707        test uses lots of local variables, at least as many local
20708        variables as main has allocated so far including compiler
20709        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20710        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20711        reuse the register of parent for one of the local variables,
20712        since it will think that parent can't possibly be used any more
20713        in this routine.  Assigning to the local variable will thus
20714        munge parent in the parent process.  */
20715     pid_t
20716       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20717       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20718     /* Convince the compiler that p..p7 are live; otherwise, it might
20719        use the same hardware register for all 8 local variables.  */
20720     if (p != p1 || p != p2 || p != p3 || p != p4
20721         || p != p5 || p != p6 || p != p7)
20722       _exit(1);
20723
20724     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20725        from child file descriptors.  If the child closes a descriptor
20726        before it execs or exits, this munges the parent's descriptor
20727        as well.  Test for this by closing stdout in the child.  */
20728     _exit(close(fileno(stdout)) != 0);
20729   } else {
20730     int status;
20731     struct stat st;
20732
20733     while (wait(&status) != child)
20734       ;
20735     $ac_main_return(
20736          /* Was there some problem with vforking?  */
20737          child < 0
20738
20739          /* Did the child fail?  (This shouldn't happen.)  */
20740          || status
20741
20742          /* Did the vfork/compiler bug occur?  */
20743          || parent != getpid()
20744
20745          /* Did the file descriptor bug occur?  */
20746          || fstat(fileno(stdout), &st) != 0
20747          );
20748   }
20749 }
20750 _ACEOF
20751 rm -f conftest$ac_exeext
20752 if { (eval echo "$as_me:20752: \"$ac_link\"") >&5
20753   (eval $ac_link) 2>&5
20754   ac_status=$?
20755   echo "$as_me:20755: \$? = $ac_status" >&5
20756   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20757   { (eval echo "$as_me:20757: \"$ac_try\"") >&5
20758   (eval $ac_try) 2>&5
20759   ac_status=$?
20760   echo "$as_me:20760: \$? = $ac_status" >&5
20761   (exit $ac_status); }; }; then
20762   ac_cv_func_vfork_works=yes
20763 else
20764   echo "$as_me: program exited with status $ac_status" >&5
20765 echo "$as_me: failed program was:" >&5
20766 cat conftest.$ac_ext >&5
20767 ac_cv_func_vfork_works=no
20768 fi
20769 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20770 fi
20771 fi
20772 echo "$as_me:20772: result: $ac_cv_func_vfork_works" >&5
20773 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20774
20775 fi;
20776 if test "x$ac_cv_func_fork_works" = xcross; then
20777   ac_cv_func_vfork_works=ac_cv_func_vfork
20778   { echo "$as_me:20778: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20779 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20780 fi
20781
20782 if test "x$ac_cv_func_vfork_works" = xyes; then
20783
20784 cat >>confdefs.h <<\EOF
20785 #define HAVE_WORKING_VFORK 1
20786 EOF
20787
20788 else
20789
20790 cat >>confdefs.h <<\EOF
20791 #define vfork fork
20792 EOF
20793
20794 fi
20795 if test "x$ac_cv_func_fork_works" = xyes; then
20796
20797 cat >>confdefs.h <<\EOF
20798 #define HAVE_WORKING_FORK 1
20799 EOF
20800
20801 fi
20802
20803 # special check for test/ditto.c
20804
20805 echo "$as_me:20805: checking for openpty in -lutil" >&5
20806 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20807 if test "${ac_cv_lib_util_openpty+set}" = set; then
20808   echo $ECHO_N "(cached) $ECHO_C" >&6
20809 else
20810   ac_check_lib_save_LIBS=$LIBS
20811 LIBS="-lutil  $LIBS"
20812 cat >conftest.$ac_ext <<_ACEOF
20813 #line 20813 "configure"
20814 #include "confdefs.h"
20815
20816 /* Override any gcc2 internal prototype to avoid an error.  */
20817 #ifdef __cplusplus
20818 extern "C"
20819 #endif
20820 /* We use char because int might match the return type of a gcc2
20821    builtin and then its argument prototype would still apply.  */
20822 char openpty ();
20823 int
20824 main (void)
20825 {
20826 openpty ();
20827   ;
20828   return 0;
20829 }
20830 _ACEOF
20831 rm -f conftest.$ac_objext conftest$ac_exeext
20832 if { (eval echo "$as_me:20832: \"$ac_link\"") >&5
20833   (eval $ac_link) 2>&5
20834   ac_status=$?
20835   echo "$as_me:20835: \$? = $ac_status" >&5
20836   (exit $ac_status); } &&
20837          { ac_try='test -s conftest$ac_exeext'
20838   { (eval echo "$as_me:20838: \"$ac_try\"") >&5
20839   (eval $ac_try) 2>&5
20840   ac_status=$?
20841   echo "$as_me:20841: \$? = $ac_status" >&5
20842   (exit $ac_status); }; }; then
20843   ac_cv_lib_util_openpty=yes
20844 else
20845   echo "$as_me: failed program was:" >&5
20846 cat conftest.$ac_ext >&5
20847 ac_cv_lib_util_openpty=no
20848 fi
20849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20850 LIBS=$ac_check_lib_save_LIBS
20851 fi
20852 echo "$as_me:20852: result: $ac_cv_lib_util_openpty" >&5
20853 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20854 if test $ac_cv_lib_util_openpty = yes; then
20855   cf_cv_lib_util=yes
20856 else
20857   cf_cv_lib_util=no
20858 fi
20859
20860 echo "$as_me:20860: checking for openpty header" >&5
20861 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20862 if test "${cf_cv_func_openpty+set}" = set; then
20863   echo $ECHO_N "(cached) $ECHO_C" >&6
20864 else
20865
20866         cf_save_LIBS="$LIBS"
20867         test $cf_cv_lib_util = yes && {
20868 cf_add_libs="-lutil"
20869 # Filter out duplicates - this happens with badly-designed ".pc" files...
20870 for cf_add_1lib in $LIBS
20871 do
20872         for cf_add_2lib in $cf_add_libs
20873         do
20874                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20875                 then
20876                         cf_add_1lib=
20877                         break
20878                 fi
20879         done
20880         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20881 done
20882 LIBS="$cf_add_libs"
20883  }
20884         for cf_header in pty.h libutil.h util.h
20885         do
20886         cat >conftest.$ac_ext <<_ACEOF
20887 #line 20887 "configure"
20888 #include "confdefs.h"
20889
20890 #include <$cf_header>
20891
20892 int
20893 main (void)
20894 {
20895
20896         int x = openpty((int *)0, (int *)0, (char *)0,
20897                                    (struct termios *)0, (struct winsize *)0);
20898
20899   ;
20900   return 0;
20901 }
20902 _ACEOF
20903 rm -f conftest.$ac_objext conftest$ac_exeext
20904 if { (eval echo "$as_me:20904: \"$ac_link\"") >&5
20905   (eval $ac_link) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit $ac_status); } &&
20909          { ac_try='test -s conftest$ac_exeext'
20910   { (eval echo "$as_me:20910: \"$ac_try\"") >&5
20911   (eval $ac_try) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); }; }; then
20915
20916                 cf_cv_func_openpty=$cf_header
20917                 break
20918
20919 else
20920   echo "$as_me: failed program was:" >&5
20921 cat conftest.$ac_ext >&5
20922
20923                 cf_cv_func_openpty=no
20924
20925 fi
20926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20927         done
20928         LIBS="$cf_save_LIBS"
20929
20930 fi
20931 echo "$as_me:20931: result: $cf_cv_func_openpty" >&5
20932 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20933
20934 if test "$cf_cv_func_openpty" != no ; then
20935
20936 cat >>confdefs.h <<EOF
20937 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20938 EOF
20939
20940 cat >>confdefs.h <<\EOF
20941 #define USE_XTERM_PTY 1
20942 EOF
20943
20944         if test "x$cf_cv_lib_util" = xyes ; then
20945
20946 cf_add_libs="-lutil"
20947 # Filter out duplicates - this happens with badly-designed ".pc" files...
20948 for cf_add_1lib in $TEST_LIBS
20949 do
20950         for cf_add_2lib in $cf_add_libs
20951         do
20952                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20953                 then
20954                         cf_add_1lib=
20955                         break
20956                 fi
20957         done
20958         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20959 done
20960 TEST_LIBS="$cf_add_libs"
20961
20962         fi
20963 fi
20964
20965 if test "$with_hashed_db" != no ; then
20966
20967 cat >>confdefs.h <<\EOF
20968 #define USE_HASHED_DB 1
20969 EOF
20970
20971 case $with_hashed_db in
20972 (yes|*able*)
20973         ;;
20974 (*)
20975         if test -d "$with_hashed_db" ; then
20976
20977 if test -n "$with_hashed_db/include" ; then
20978   for cf_add_incdir in $with_hashed_db/include
20979   do
20980         while test $cf_add_incdir != /usr/include
20981         do
20982           if test -d $cf_add_incdir
20983           then
20984                 cf_have_incdir=no
20985                 if test -n "$CFLAGS$CPPFLAGS" ; then
20986                   # a loop is needed to ensure we can add subdirs of existing dirs
20987                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20988                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20989                           cf_have_incdir=yes; break
20990                         fi
20991                   done
20992                 fi
20993
20994                 if test "$cf_have_incdir" = no ; then
20995                   if test "$cf_add_incdir" = /usr/local/include ; then
20996                         if test "$GCC" = yes
20997                         then
20998                           cf_save_CPPFLAGS=$CPPFLAGS
20999
21000         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21001         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21002
21003                           cat >conftest.$ac_ext <<_ACEOF
21004 #line 21004 "configure"
21005 #include "confdefs.h"
21006 #include <stdio.h>
21007 int
21008 main (void)
21009 {
21010 printf("Hello")
21011   ;
21012   return 0;
21013 }
21014 _ACEOF
21015 rm -f conftest.$ac_objext
21016 if { (eval echo "$as_me:21016: \"$ac_compile\"") >&5
21017   (eval $ac_compile) 2>&5
21018   ac_status=$?
21019   echo "$as_me:21019: \$? = $ac_status" >&5
21020   (exit $ac_status); } &&
21021          { ac_try='test -s conftest.$ac_objext'
21022   { (eval echo "$as_me:21022: \"$ac_try\"") >&5
21023   (eval $ac_try) 2>&5
21024   ac_status=$?
21025   echo "$as_me:21025: \$? = $ac_status" >&5
21026   (exit $ac_status); }; }; then
21027   :
21028 else
21029   echo "$as_me: failed program was:" >&5
21030 cat conftest.$ac_ext >&5
21031 cf_have_incdir=yes
21032 fi
21033 rm -f conftest.$ac_objext conftest.$ac_ext
21034                           CPPFLAGS=$cf_save_CPPFLAGS
21035                         fi
21036                   fi
21037                 fi
21038
21039                 if test "$cf_have_incdir" = no ; then
21040                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21041
21042 echo "${as_me:-configure}:21042: testing adding $cf_add_incdir to include-path ..." 1>&5
21043
21044                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21045
21046                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21047                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21048                   cf_add_incdir="$cf_top_incdir"
21049                 else
21050                   break
21051                 fi
21052           else
21053                 break
21054           fi
21055         done
21056   done
21057 fi
21058
21059 if test -n "$with_hashed_db/lib" ; then
21060         for cf_add_libdir in $with_hashed_db/lib
21061         do
21062                 if test $cf_add_libdir = /usr/lib ; then
21063                         :
21064                 elif test -d $cf_add_libdir
21065                 then
21066                         cf_have_libdir=no
21067                         if test -n "$LDFLAGS$LIBS" ; then
21068                                 # a loop is needed to ensure we can add subdirs of existing dirs
21069                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21070                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21071                                                 cf_have_libdir=yes; break
21072                                         fi
21073                                 done
21074                         fi
21075                         if test "$cf_have_libdir" = no ; then
21076                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21077
21078 echo "${as_me:-configure}:21078: testing adding $cf_add_libdir to library-path ..." 1>&5
21079
21080                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21081                         fi
21082                 fi
21083         done
21084 fi
21085
21086         else
21087                 case "$with_hashed_db" in
21088                 (./*|../*|/*)
21089                         { echo "$as_me:21089: WARNING: no such directory $with_hashed_db" >&5
21090 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21091                         ;;
21092                 (*)
21093
21094 cf_search=
21095
21096 test "x$prefix" != "xNONE" && \
21097 test -d "$prefix" && \
21098  {
21099         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21100         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21101         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21102         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21103         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21104         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21105 }
21106
21107 for cf_subdir_prefix in \
21108         /usr \
21109         /usr/local \
21110         /usr/pkg \
21111         /opt \
21112         /opt/local \
21113         $HOME
21114 do
21115
21116 test "x$cf_subdir_prefix" != "x$prefix" && \
21117 test -d "$cf_subdir_prefix" && \
21118 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21119         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21120         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21121         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21122         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21123         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21124         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"
21125 }
21126
21127 done
21128
21129         for cf_item in $cf_search
21130         do
21131                 case $cf_item in
21132                 (*/$with_hashed_db)
21133
21134 if test -n "$cf_item" ; then
21135   for cf_add_incdir in $cf_item
21136   do
21137         while test $cf_add_incdir != /usr/include
21138         do
21139           if test -d $cf_add_incdir
21140           then
21141                 cf_have_incdir=no
21142                 if test -n "$CFLAGS$CPPFLAGS" ; then
21143                   # a loop is needed to ensure we can add subdirs of existing dirs
21144                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21145                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21146                           cf_have_incdir=yes; break
21147                         fi
21148                   done
21149                 fi
21150
21151                 if test "$cf_have_incdir" = no ; then
21152                   if test "$cf_add_incdir" = /usr/local/include ; then
21153                         if test "$GCC" = yes
21154                         then
21155                           cf_save_CPPFLAGS=$CPPFLAGS
21156
21157         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21158         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21159
21160                           cat >conftest.$ac_ext <<_ACEOF
21161 #line 21161 "configure"
21162 #include "confdefs.h"
21163 #include <stdio.h>
21164 int
21165 main (void)
21166 {
21167 printf("Hello")
21168   ;
21169   return 0;
21170 }
21171 _ACEOF
21172 rm -f conftest.$ac_objext
21173 if { (eval echo "$as_me:21173: \"$ac_compile\"") >&5
21174   (eval $ac_compile) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit $ac_status); } &&
21178          { ac_try='test -s conftest.$ac_objext'
21179   { (eval echo "$as_me:21179: \"$ac_try\"") >&5
21180   (eval $ac_try) 2>&5
21181   ac_status=$?
21182   echo "$as_me:21182: \$? = $ac_status" >&5
21183   (exit $ac_status); }; }; then
21184   :
21185 else
21186   echo "$as_me: failed program was:" >&5
21187 cat conftest.$ac_ext >&5
21188 cf_have_incdir=yes
21189 fi
21190 rm -f conftest.$ac_objext conftest.$ac_ext
21191                           CPPFLAGS=$cf_save_CPPFLAGS
21192                         fi
21193                   fi
21194                 fi
21195
21196                 if test "$cf_have_incdir" = no ; then
21197                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21198
21199 echo "${as_me:-configure}:21199: testing adding $cf_add_incdir to include-path ..." 1>&5
21200
21201                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21202
21203                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21204                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21205                   cf_add_incdir="$cf_top_incdir"
21206                 else
21207                   break
21208                 fi
21209           else
21210                 break
21211           fi
21212         done
21213   done
21214 fi
21215
21216                         ;;
21217                 esac
21218         done
21219
21220 cf_search=
21221
21222 test "x$prefix" != "xNONE" && \
21223 test -d "$prefix" && \
21224  {
21225         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21226         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21227         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21228         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21229         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21230         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21231 }
21232
21233 for cf_subdir_prefix in \
21234         /usr \
21235         /usr/local \
21236         /usr/pkg \
21237         /opt \
21238         /opt/local \
21239         $HOME
21240 do
21241
21242 test "x$cf_subdir_prefix" != "x$prefix" && \
21243 test -d "$cf_subdir_prefix" && \
21244 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21245         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21246         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21247         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21248         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21249         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21250         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"
21251 }
21252
21253 done
21254
21255         for cf_item in $cf_search
21256         do
21257                 case $cf_item in
21258                 (*/$with_hashed_db)
21259
21260 if test -n "$cf_item" ; then
21261         for cf_add_libdir in $cf_item
21262         do
21263                 if test $cf_add_libdir = /usr/lib ; then
21264                         :
21265                 elif test -d $cf_add_libdir
21266                 then
21267                         cf_have_libdir=no
21268                         if test -n "$LDFLAGS$LIBS" ; then
21269                                 # a loop is needed to ensure we can add subdirs of existing dirs
21270                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21271                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21272                                                 cf_have_libdir=yes; break
21273                                         fi
21274                                 done
21275                         fi
21276                         if test "$cf_have_libdir" = no ; then
21277                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21278
21279 echo "${as_me:-configure}:21279: testing adding $cf_add_libdir to library-path ..." 1>&5
21280
21281                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21282                         fi
21283                 fi
21284         done
21285 fi
21286
21287                         ;;
21288                 esac
21289         done
21290
21291                         ;;
21292                 esac
21293         fi
21294 esac
21295
21296 echo "$as_me:21296: checking for db.h" >&5
21297 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21298 if test "${ac_cv_header_db_h+set}" = set; then
21299   echo $ECHO_N "(cached) $ECHO_C" >&6
21300 else
21301   cat >conftest.$ac_ext <<_ACEOF
21302 #line 21302 "configure"
21303 #include "confdefs.h"
21304 #include <db.h>
21305 _ACEOF
21306 if { (eval echo "$as_me:21306: \"$ac_cpp conftest.$ac_ext\"") >&5
21307   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21308   ac_status=$?
21309   egrep -v '^ *\+' conftest.er1 >conftest.err
21310   rm -f conftest.er1
21311   cat conftest.err >&5
21312   echo "$as_me:21312: \$? = $ac_status" >&5
21313   (exit $ac_status); } >/dev/null; then
21314   if test -s conftest.err; then
21315     ac_cpp_err=$ac_c_preproc_warn_flag
21316   else
21317     ac_cpp_err=
21318   fi
21319 else
21320   ac_cpp_err=yes
21321 fi
21322 if test -z "$ac_cpp_err"; then
21323   ac_cv_header_db_h=yes
21324 else
21325   echo "$as_me: failed program was:" >&5
21326   cat conftest.$ac_ext >&5
21327   ac_cv_header_db_h=no
21328 fi
21329 rm -f conftest.err conftest.$ac_ext
21330 fi
21331 echo "$as_me:21331: result: $ac_cv_header_db_h" >&5
21332 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21333 if test $ac_cv_header_db_h = yes; then
21334
21335 echo "$as_me:21335: checking for version of db" >&5
21336 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21337 if test "${cf_cv_hashed_db_version+set}" = set; then
21338   echo $ECHO_N "(cached) $ECHO_C" >&6
21339 else
21340
21341 cf_cv_hashed_db_version=unknown
21342
21343 for cf_db_version in 1 2 3 4 5 6
21344 do
21345
21346 echo "${as_me:-configure}:21346: testing checking for db version $cf_db_version ..." 1>&5
21347
21348         cat >conftest.$ac_ext <<_ACEOF
21349 #line 21349 "configure"
21350 #include "confdefs.h"
21351
21352 $ac_includes_default
21353 #include <db.h>
21354
21355 #ifdef DB_VERSION_MAJOR
21356         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21357 #if $cf_db_version == DB_VERSION_MAJOR
21358         /* ok */
21359 #else
21360         make an error
21361 #endif
21362 #else
21363 #if $cf_db_version == 1
21364         /* ok: assuming this is DB 1.8.5 */
21365 #else
21366         make an error
21367 #endif
21368 #endif
21369
21370 int
21371 main (void)
21372 {
21373 DBT *foo = 0
21374   ;
21375   return 0;
21376 }
21377 _ACEOF
21378 rm -f conftest.$ac_objext
21379 if { (eval echo "$as_me:21379: \"$ac_compile\"") >&5
21380   (eval $ac_compile) 2>&5
21381   ac_status=$?
21382   echo "$as_me:21382: \$? = $ac_status" >&5
21383   (exit $ac_status); } &&
21384          { ac_try='test -s conftest.$ac_objext'
21385   { (eval echo "$as_me:21385: \"$ac_try\"") >&5
21386   (eval $ac_try) 2>&5
21387   ac_status=$?
21388   echo "$as_me:21388: \$? = $ac_status" >&5
21389   (exit $ac_status); }; }; then
21390
21391         cf_cv_hashed_db_version=$cf_db_version
21392         break
21393
21394 else
21395   echo "$as_me: failed program was:" >&5
21396 cat conftest.$ac_ext >&5
21397 fi
21398 rm -f conftest.$ac_objext conftest.$ac_ext
21399 done
21400
21401 fi
21402 echo "$as_me:21402: result: $cf_cv_hashed_db_version" >&5
21403 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21404
21405 if test "$cf_cv_hashed_db_version" = unknown ; then
21406         { { echo "$as_me:21406: error: Cannot determine version of db" >&5
21407 echo "$as_me: error: Cannot determine version of db" >&2;}
21408    { (exit 1); exit 1; }; }
21409 else
21410
21411 echo "$as_me:21411: checking for db libraries" >&5
21412 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21413 if test "${cf_cv_hashed_db_libs+set}" = set; then
21414   echo $ECHO_N "(cached) $ECHO_C" >&6
21415 else
21416
21417 cf_cv_hashed_db_libs=unknown
21418 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21419 do
21420         cf_save_libs="$LIBS"
21421         if test -n "$cf_db_libs"; then
21422
21423 cf_add_libs="-l$cf_db_libs"
21424 # Filter out duplicates - this happens with badly-designed ".pc" files...
21425 for cf_add_1lib in $LIBS
21426 do
21427         for cf_add_2lib in $cf_add_libs
21428         do
21429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21430                 then
21431                         cf_add_1lib=
21432                         break
21433                 fi
21434         done
21435         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21436 done
21437 LIBS="$cf_add_libs"
21438
21439         fi
21440
21441 echo "${as_me:-configure}:21441: testing checking for library "$cf_db_libs" ..." 1>&5
21442
21443         cat >conftest.$ac_ext <<_ACEOF
21444 #line 21444 "configure"
21445 #include "confdefs.h"
21446
21447 $ac_includes_default
21448 #include <db.h>
21449
21450 int
21451 main (void)
21452 {
21453
21454         char *path = "/tmp/foo";
21455 #ifdef DB_VERSION_MAJOR
21456 #if DB_VERSION_MAJOR >= 4
21457         DB *result = 0;
21458         db_create(&result, NULL, 0);
21459         result->open(result,
21460                 NULL,
21461                 path,
21462                 path,
21463                 DB_HASH,
21464                 DB_CREATE,
21465                 0644);
21466 #elif DB_VERSION_MAJOR >= 3
21467         DB *result = 0;
21468         db_create(&result, NULL, 0);
21469         result->open(result,
21470                 path,
21471                 path,
21472                 DB_HASH,
21473                 DB_CREATE,
21474                 0644);
21475 #elif DB_VERSION_MAJOR >= 2
21476         DB *result = 0;
21477         db_open(path,
21478                 DB_HASH,
21479                 DB_CREATE,
21480                 0644,
21481                 (DB_ENV *) 0,
21482                 (DB_INFO *) 0,
21483                 &result);
21484 #endif /* DB_VERSION_MAJOR */
21485 #else
21486         DB *result = dbopen(path,
21487                      2,
21488                      0644,
21489                      DB_HASH,
21490                      0);
21491 #endif
21492         ${cf_cv_main_return:-return}(result != 0)
21493
21494   ;
21495   return 0;
21496 }
21497 _ACEOF
21498 rm -f conftest.$ac_objext conftest$ac_exeext
21499 if { (eval echo "$as_me:21499: \"$ac_link\"") >&5
21500   (eval $ac_link) 2>&5
21501   ac_status=$?
21502   echo "$as_me:21502: \$? = $ac_status" >&5
21503   (exit $ac_status); } &&
21504          { ac_try='test -s conftest$ac_exeext'
21505   { (eval echo "$as_me:21505: \"$ac_try\"") >&5
21506   (eval $ac_try) 2>&5
21507   ac_status=$?
21508   echo "$as_me:21508: \$? = $ac_status" >&5
21509   (exit $ac_status); }; }; then
21510
21511         if test -n "$cf_db_libs" ; then
21512                 cf_cv_hashed_db_libs=$cf_db_libs
21513         else
21514                 cf_cv_hashed_db_libs=default
21515         fi
21516         LIBS="$cf_save_libs"
21517         break
21518
21519 else
21520   echo "$as_me: failed program was:" >&5
21521 cat conftest.$ac_ext >&5
21522 fi
21523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21524         LIBS="$cf_save_libs"
21525 done
21526
21527 fi
21528 echo "$as_me:21528: result: $cf_cv_hashed_db_libs" >&5
21529 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21530
21531         if test "$cf_cv_hashed_db_libs" = unknown ; then
21532                 { { echo "$as_me:21532: error: Cannot determine library for db" >&5
21533 echo "$as_me: error: Cannot determine library for db" >&2;}
21534    { (exit 1); exit 1; }; }
21535         elif test "$cf_cv_hashed_db_libs" != default ; then
21536
21537 cf_add_libs="-l$cf_cv_hashed_db_libs"
21538 # Filter out duplicates - this happens with badly-designed ".pc" files...
21539 for cf_add_1lib in $LIBS
21540 do
21541         for cf_add_2lib in $cf_add_libs
21542         do
21543                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21544                 then
21545                         cf_add_1lib=
21546                         break
21547                 fi
21548         done
21549         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21550 done
21551 LIBS="$cf_add_libs"
21552
21553         fi
21554 fi
21555
21556 else
21557
21558         { { echo "$as_me:21558: error: Cannot find db.h" >&5
21559 echo "$as_me: error: Cannot find db.h" >&2;}
21560    { (exit 1); exit 1; }; }
21561
21562 fi
21563
21564 fi
21565
21566 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21567         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21568         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21569 fi
21570
21571 # Just in case, check if the C compiler has a bool type.
21572
21573 echo "$as_me:21573: checking if we should include stdbool.h" >&5
21574 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21575
21576 if test "${cf_cv_header_stdbool_h+set}" = set; then
21577   echo $ECHO_N "(cached) $ECHO_C" >&6
21578 else
21579
21580         cat >conftest.$ac_ext <<_ACEOF
21581 #line 21581 "configure"
21582 #include "confdefs.h"
21583
21584 int
21585 main (void)
21586 {
21587 bool foo = false
21588   ;
21589   return 0;
21590 }
21591 _ACEOF
21592 rm -f conftest.$ac_objext
21593 if { (eval echo "$as_me:21593: \"$ac_compile\"") >&5
21594   (eval $ac_compile) 2>&5
21595   ac_status=$?
21596   echo "$as_me:21596: \$? = $ac_status" >&5
21597   (exit $ac_status); } &&
21598          { ac_try='test -s conftest.$ac_objext'
21599   { (eval echo "$as_me:21599: \"$ac_try\"") >&5
21600   (eval $ac_try) 2>&5
21601   ac_status=$?
21602   echo "$as_me:21602: \$? = $ac_status" >&5
21603   (exit $ac_status); }; }; then
21604   cf_cv_header_stdbool_h=0
21605 else
21606   echo "$as_me: failed program was:" >&5
21607 cat conftest.$ac_ext >&5
21608 cat >conftest.$ac_ext <<_ACEOF
21609 #line 21609 "configure"
21610 #include "confdefs.h"
21611
21612 #ifndef __BEOS__
21613 #include <stdbool.h>
21614 #endif
21615
21616 int
21617 main (void)
21618 {
21619 bool foo = false
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 rm -f conftest.$ac_objext
21625 if { (eval echo "$as_me:21625: \"$ac_compile\"") >&5
21626   (eval $ac_compile) 2>&5
21627   ac_status=$?
21628   echo "$as_me:21628: \$? = $ac_status" >&5
21629   (exit $ac_status); } &&
21630          { ac_try='test -s conftest.$ac_objext'
21631   { (eval echo "$as_me:21631: \"$ac_try\"") >&5
21632   (eval $ac_try) 2>&5
21633   ac_status=$?
21634   echo "$as_me:21634: \$? = $ac_status" >&5
21635   (exit $ac_status); }; }; then
21636   cf_cv_header_stdbool_h=1
21637 else
21638   echo "$as_me: failed program was:" >&5
21639 cat conftest.$ac_ext >&5
21640 cf_cv_header_stdbool_h=0
21641 fi
21642 rm -f conftest.$ac_objext conftest.$ac_ext
21643 fi
21644 rm -f conftest.$ac_objext conftest.$ac_ext
21645 fi
21646
21647 if test "$cf_cv_header_stdbool_h" = 1
21648 then    echo "$as_me:21648: result: yes" >&5
21649 echo "${ECHO_T}yes" >&6
21650 else    echo "$as_me:21650: result: no" >&5
21651 echo "${ECHO_T}no" >&6
21652 fi
21653
21654 echo "$as_me:21654: checking for builtin bool type" >&5
21655 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21656
21657 if test "${cf_cv_cc_bool_type+set}" = set; then
21658   echo $ECHO_N "(cached) $ECHO_C" >&6
21659 else
21660
21661         cat >conftest.$ac_ext <<_ACEOF
21662 #line 21662 "configure"
21663 #include "confdefs.h"
21664
21665 #include <stdio.h>
21666 #include <sys/types.h>
21667
21668 int
21669 main (void)
21670 {
21671 bool x = false
21672   ;
21673   return 0;
21674 }
21675 _ACEOF
21676 rm -f conftest.$ac_objext
21677 if { (eval echo "$as_me:21677: \"$ac_compile\"") >&5
21678   (eval $ac_compile) 2>&5
21679   ac_status=$?
21680   echo "$as_me:21680: \$? = $ac_status" >&5
21681   (exit $ac_status); } &&
21682          { ac_try='test -s conftest.$ac_objext'
21683   { (eval echo "$as_me:21683: \"$ac_try\"") >&5
21684   (eval $ac_try) 2>&5
21685   ac_status=$?
21686   echo "$as_me:21686: \$? = $ac_status" >&5
21687   (exit $ac_status); }; }; then
21688   cf_cv_cc_bool_type=1
21689 else
21690   echo "$as_me: failed program was:" >&5
21691 cat conftest.$ac_ext >&5
21692 cf_cv_cc_bool_type=0
21693 fi
21694 rm -f conftest.$ac_objext conftest.$ac_ext
21695
21696 fi
21697
21698 if test "$cf_cv_cc_bool_type" = 1
21699 then    echo "$as_me:21699: result: yes" >&5
21700 echo "${ECHO_T}yes" >&6
21701 else    echo "$as_me:21701: result: no" >&5
21702 echo "${ECHO_T}no" >&6
21703 fi
21704
21705 # Check for C++ compiler characteristics (and ensure that it's there!)
21706 if test -n "$CXX" ; then
21707         ac_ext=cc
21708 ac_cpp='$CXXCPP $CPPFLAGS'
21709 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21710 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21711 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21712 ac_main_return=return
21713
21714 if test -n "$GXX" ; then
21715
21716         cf_save="$LIBS"
21717         LIBS="$LIBS $CXXLIBS"
21718         echo "$as_me:21718: checking if we already have C++ library" >&5
21719 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21720         cat >conftest.$ac_ext <<_ACEOF
21721 #line 21721 "configure"
21722 #include "confdefs.h"
21723
21724                         #include <iostream>
21725 int
21726 main (void)
21727 {
21728
21729                         std::cout << "Hello World!" << std::endl;
21730   ;
21731   return 0;
21732 }
21733 _ACEOF
21734 rm -f conftest.$ac_objext conftest$ac_exeext
21735 if { (eval echo "$as_me:21735: \"$ac_link\"") >&5
21736   (eval $ac_link) 2>&5
21737   ac_status=$?
21738   echo "$as_me:21738: \$? = $ac_status" >&5
21739   (exit $ac_status); } &&
21740          { ac_try='test -s conftest$ac_exeext'
21741   { (eval echo "$as_me:21741: \"$ac_try\"") >&5
21742   (eval $ac_try) 2>&5
21743   ac_status=$?
21744   echo "$as_me:21744: \$? = $ac_status" >&5
21745   (exit $ac_status); }; }; then
21746   cf_have_libstdcpp=yes
21747 else
21748   echo "$as_me: failed program was:" >&5
21749 cat conftest.$ac_ext >&5
21750 cf_have_libstdcpp=no
21751 fi
21752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21753         echo "$as_me:21753: result: $cf_have_libstdcpp" >&5
21754 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21755         LIBS="$cf_save"
21756
21757         if test $cf_have_libstdcpp != yes
21758         then
21759                 case $cf_cv_system_name in
21760                 (os2*)
21761                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21762                                 cf_stdcpp_libname=stdcpp
21763                         else
21764                                 cf_stdcpp_libname=stdc++
21765                         fi
21766                         ;;
21767                 (*)
21768                         cf_stdcpp_libname=stdc++
21769                         ;;
21770                 esac
21771
21772                 echo "$as_me:21772: checking for library $cf_stdcpp_libname" >&5
21773 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21774 if test "${cf_cv_libstdcpp+set}" = set; then
21775   echo $ECHO_N "(cached) $ECHO_C" >&6
21776 else
21777
21778                         cf_save="$LIBS"
21779                         LIBS="$LIBS $CXXLIBS"
21780
21781 cf_add_libs="-l$cf_stdcpp_libname"
21782 # Filter out duplicates - this happens with badly-designed ".pc" files...
21783 for cf_add_1lib in $LIBS
21784 do
21785         for cf_add_2lib in $cf_add_libs
21786         do
21787                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21788                 then
21789                         cf_add_1lib=
21790                         break
21791                 fi
21792         done
21793         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21794 done
21795 LIBS="$cf_add_libs"
21796
21797                 cat >conftest.$ac_ext <<_ACEOF
21798 #line 21798 "configure"
21799 #include "confdefs.h"
21800
21801                                 #include <iostream>
21802 int
21803 main (void)
21804 {
21805
21806                                 std::cout << "Hello World!" << std::endl;
21807   ;
21808   return 0;
21809 }
21810 _ACEOF
21811 rm -f conftest.$ac_objext conftest$ac_exeext
21812 if { (eval echo "$as_me:21812: \"$ac_link\"") >&5
21813   (eval $ac_link) 2>&5
21814   ac_status=$?
21815   echo "$as_me:21815: \$? = $ac_status" >&5
21816   (exit $ac_status); } &&
21817          { ac_try='test -s conftest$ac_exeext'
21818   { (eval echo "$as_me:21818: \"$ac_try\"") >&5
21819   (eval $ac_try) 2>&5
21820   ac_status=$?
21821   echo "$as_me:21821: \$? = $ac_status" >&5
21822   (exit $ac_status); }; }; then
21823   cf_cv_libstdcpp=yes
21824 else
21825   echo "$as_me: failed program was:" >&5
21826 cat conftest.$ac_ext >&5
21827 cf_cv_libstdcpp=no
21828 fi
21829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21830                         LIBS="$cf_save"
21831
21832 fi
21833 echo "$as_me:21833: result: $cf_cv_libstdcpp" >&5
21834 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21835                 test "$cf_cv_libstdcpp" = yes && {
21836 cf_add_libs="-l$cf_stdcpp_libname"
21837 # Filter out duplicates - this happens with badly-designed ".pc" files...
21838 for cf_add_1lib in $CXXLIBS
21839 do
21840         for cf_add_2lib in $cf_add_libs
21841         do
21842                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21843                 then
21844                         cf_add_1lib=
21845                         break
21846                 fi
21847         done
21848         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21849 done
21850 CXXLIBS="$cf_add_libs"
21851  }
21852         fi
21853 fi
21854
21855         echo "$as_me:21855: checking whether $CXX understands -c and -o together" >&5
21856 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21857 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21858   echo $ECHO_N "(cached) $ECHO_C" >&6
21859 else
21860
21861 cat > conftest.$ac_ext <<CF_EOF
21862 int main(void)
21863 {
21864         ${cf_cv_main_return:-return}(0);
21865 }
21866 CF_EOF
21867 # We do the test twice because some compilers refuse to overwrite an
21868 # existing .o file with -o, though they will create one.
21869 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21870 if { (eval echo "$as_me:21870: \"$ac_try\"") >&5
21871   (eval $ac_try) 2>&5
21872   ac_status=$?
21873   echo "$as_me:21873: \$? = $ac_status" >&5
21874   (exit $ac_status); } &&
21875   test -f conftest2.$ac_objext && { (eval echo "$as_me:21875: \"$ac_try\"") >&5
21876   (eval $ac_try) 2>&5
21877   ac_status=$?
21878   echo "$as_me:21878: \$? = $ac_status" >&5
21879   (exit $ac_status); };
21880 then
21881   eval cf_cv_prog_CXX_c_o=yes
21882 else
21883   eval cf_cv_prog_CXX_c_o=no
21884 fi
21885 rm -rf conftest*
21886
21887 fi
21888 if test $cf_cv_prog_CXX_c_o = yes; then
21889   echo "$as_me:21889: result: yes" >&5
21890 echo "${ECHO_T}yes" >&6
21891 else
21892   echo "$as_me:21892: result: no" >&5
21893 echo "${ECHO_T}no" >&6
21894 fi
21895
21896         case $GXX_VERSION in
21897         (1*|2.0-6*)
21898                 cf_cxx_library=yes
21899                 ;;
21900         (*-2.7*|2.7*)
21901
21902 cf_cxx_library=unknown
21903 case $cf_cv_system_name in
21904 (os2*)
21905         cf_gpp_libname=gpp
21906         ;;
21907 (*)
21908         cf_gpp_libname=g++
21909         ;;
21910 esac
21911 if test "$GXX" = yes; then
21912         echo "$as_me:21912: checking for lib$cf_gpp_libname" >&5
21913 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21914         cf_save="$LIBS"
21915
21916 cf_add_libs="-l$cf_gpp_libname"
21917 # Filter out duplicates - this happens with badly-designed ".pc" files...
21918 for cf_add_1lib in $LIBS
21919 do
21920         for cf_add_2lib in $cf_add_libs
21921         do
21922                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21923                 then
21924                         cf_add_1lib=
21925                         break
21926                 fi
21927         done
21928         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21929 done
21930 LIBS="$cf_add_libs"
21931
21932         cat >conftest.$ac_ext <<_ACEOF
21933 #line 21933 "configure"
21934 #include "confdefs.h"
21935
21936 #include <$cf_gpp_libname/builtin.h>
21937
21938 int
21939 main (void)
21940 {
21941 two_arg_error_handler_t foo2 = lib_error_handler
21942   ;
21943   return 0;
21944 }
21945 _ACEOF
21946 rm -f conftest.$ac_objext conftest$ac_exeext
21947 if { (eval echo "$as_me:21947: \"$ac_link\"") >&5
21948   (eval $ac_link) 2>&5
21949   ac_status=$?
21950   echo "$as_me:21950: \$? = $ac_status" >&5
21951   (exit $ac_status); } &&
21952          { ac_try='test -s conftest$ac_exeext'
21953   { (eval echo "$as_me:21953: \"$ac_try\"") >&5
21954   (eval $ac_try) 2>&5
21955   ac_status=$?
21956   echo "$as_me:21956: \$? = $ac_status" >&5
21957   (exit $ac_status); }; }; then
21958   cf_cxx_library=yes
21959
21960 cf_add_libs="-l$cf_gpp_libname"
21961 # Filter out duplicates - this happens with badly-designed ".pc" files...
21962 for cf_add_1lib in $CXXLIBS
21963 do
21964         for cf_add_2lib in $cf_add_libs
21965         do
21966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21967                 then
21968                         cf_add_1lib=
21969                         break
21970                 fi
21971         done
21972         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21973 done
21974 CXXLIBS="$cf_add_libs"
21975
21976          if test "$cf_gpp_libname" = cpp ; then
21977
21978 cat >>confdefs.h <<\EOF
21979 #define HAVE_GPP_BUILTIN_H 1
21980 EOF
21981
21982          else
21983
21984 cat >>confdefs.h <<\EOF
21985 #define HAVE_GXX_BUILTIN_H 1
21986 EOF
21987
21988          fi
21989 else
21990   echo "$as_me: failed program was:" >&5
21991 cat conftest.$ac_ext >&5
21992 cat >conftest.$ac_ext <<_ACEOF
21993 #line 21993 "configure"
21994 #include "confdefs.h"
21995
21996 #include <builtin.h>
21997
21998 int
21999 main (void)
22000 {
22001 two_arg_error_handler_t foo2 = lib_error_handler
22002   ;
22003   return 0;
22004 }
22005 _ACEOF
22006 rm -f conftest.$ac_objext conftest$ac_exeext
22007 if { (eval echo "$as_me:22007: \"$ac_link\"") >&5
22008   (eval $ac_link) 2>&5
22009   ac_status=$?
22010   echo "$as_me:22010: \$? = $ac_status" >&5
22011   (exit $ac_status); } &&
22012          { ac_try='test -s conftest$ac_exeext'
22013   { (eval echo "$as_me:22013: \"$ac_try\"") >&5
22014   (eval $ac_try) 2>&5
22015   ac_status=$?
22016   echo "$as_me:22016: \$? = $ac_status" >&5
22017   (exit $ac_status); }; }; then
22018   cf_cxx_library=yes
22019
22020 cf_add_libs="-l$cf_gpp_libname"
22021 # Filter out duplicates - this happens with badly-designed ".pc" files...
22022 for cf_add_1lib in $CXXLIBS
22023 do
22024         for cf_add_2lib in $cf_add_libs
22025         do
22026                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22027                 then
22028                         cf_add_1lib=
22029                         break
22030                 fi
22031         done
22032         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22033 done
22034 CXXLIBS="$cf_add_libs"
22035
22036 cat >>confdefs.h <<\EOF
22037 #define HAVE_BUILTIN_H 1
22038 EOF
22039
22040 else
22041   echo "$as_me: failed program was:" >&5
22042 cat conftest.$ac_ext >&5
22043 cf_cxx_library=no
22044 fi
22045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22046 fi
22047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22048         LIBS="$cf_save"
22049         echo "$as_me:22049: result: $cf_cxx_library" >&5
22050 echo "${ECHO_T}$cf_cxx_library" >&6
22051 fi
22052
22053                 ;;
22054         (*)
22055                 cf_cxx_library=no
22056                 ;;
22057         esac
22058
22059         ac_ext=cc
22060 ac_cpp='$CXXCPP $CPPFLAGS'
22061 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22062 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22063 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22064 ac_main_return=return
22065 echo "$as_me:22065: checking how to run the C++ preprocessor" >&5
22066 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22067 if test -z "$CXXCPP"; then
22068   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22069   echo $ECHO_N "(cached) $ECHO_C" >&6
22070 else
22071       # Double quotes because CXXCPP needs to be expanded
22072     for CXXCPP in "$CXX -E" "/lib/cpp"
22073     do
22074       ac_preproc_ok=false
22075 for ac_cxx_preproc_warn_flag in '' yes
22076 do
22077   # Use a header file that comes with gcc, so configuring glibc
22078   # with a fresh cross-compiler works.
22079   # On the NeXT, cc -E runs the code through the compiler's parser,
22080   # not just through cpp. "Syntax error" is here to catch this case.
22081   cat >conftest.$ac_ext <<_ACEOF
22082 #line 22082 "configure"
22083 #include "confdefs.h"
22084 #include <assert.h>
22085                      Syntax error
22086 _ACEOF
22087 if { (eval echo "$as_me:22087: \"$ac_cpp conftest.$ac_ext\"") >&5
22088   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22089   ac_status=$?
22090   egrep -v '^ *\+' conftest.er1 >conftest.err
22091   rm -f conftest.er1
22092   cat conftest.err >&5
22093   echo "$as_me:22093: \$? = $ac_status" >&5
22094   (exit $ac_status); } >/dev/null; then
22095   if test -s conftest.err; then
22096     ac_cpp_err=$ac_cxx_preproc_warn_flag
22097   else
22098     ac_cpp_err=
22099   fi
22100 else
22101   ac_cpp_err=yes
22102 fi
22103 if test -z "$ac_cpp_err"; then
22104   :
22105 else
22106   echo "$as_me: failed program was:" >&5
22107   cat conftest.$ac_ext >&5
22108   # Broken: fails on valid input.
22109 continue
22110 fi
22111 rm -f conftest.err conftest.$ac_ext
22112
22113   # OK, works on sane cases.  Now check whether non-existent headers
22114   # can be detected and how.
22115   cat >conftest.$ac_ext <<_ACEOF
22116 #line 22116 "configure"
22117 #include "confdefs.h"
22118 #include <ac_nonexistent.h>
22119 _ACEOF
22120 if { (eval echo "$as_me:22120: \"$ac_cpp conftest.$ac_ext\"") >&5
22121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22122   ac_status=$?
22123   egrep -v '^ *\+' conftest.er1 >conftest.err
22124   rm -f conftest.er1
22125   cat conftest.err >&5
22126   echo "$as_me:22126: \$? = $ac_status" >&5
22127   (exit $ac_status); } >/dev/null; then
22128   if test -s conftest.err; then
22129     ac_cpp_err=$ac_cxx_preproc_warn_flag
22130   else
22131     ac_cpp_err=
22132   fi
22133 else
22134   ac_cpp_err=yes
22135 fi
22136 if test -z "$ac_cpp_err"; then
22137   # Broken: success on invalid input.
22138 continue
22139 else
22140   echo "$as_me: failed program was:" >&5
22141   cat conftest.$ac_ext >&5
22142   # Passes both tests.
22143 ac_preproc_ok=:
22144 break
22145 fi
22146 rm -f conftest.err conftest.$ac_ext
22147
22148 done
22149 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22150 rm -f conftest.err conftest.$ac_ext
22151 if $ac_preproc_ok; then
22152   break
22153 fi
22154
22155     done
22156     ac_cv_prog_CXXCPP=$CXXCPP
22157
22158 fi
22159   CXXCPP=$ac_cv_prog_CXXCPP
22160 else
22161   ac_cv_prog_CXXCPP=$CXXCPP
22162 fi
22163 echo "$as_me:22163: result: $CXXCPP" >&5
22164 echo "${ECHO_T}$CXXCPP" >&6
22165 ac_preproc_ok=false
22166 for ac_cxx_preproc_warn_flag in '' yes
22167 do
22168   # Use a header file that comes with gcc, so configuring glibc
22169   # with a fresh cross-compiler works.
22170   # On the NeXT, cc -E runs the code through the compiler's parser,
22171   # not just through cpp. "Syntax error" is here to catch this case.
22172   cat >conftest.$ac_ext <<_ACEOF
22173 #line 22173 "configure"
22174 #include "confdefs.h"
22175 #include <assert.h>
22176                      Syntax error
22177 _ACEOF
22178 if { (eval echo "$as_me:22178: \"$ac_cpp conftest.$ac_ext\"") >&5
22179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22180   ac_status=$?
22181   egrep -v '^ *\+' conftest.er1 >conftest.err
22182   rm -f conftest.er1
22183   cat conftest.err >&5
22184   echo "$as_me:22184: \$? = $ac_status" >&5
22185   (exit $ac_status); } >/dev/null; then
22186   if test -s conftest.err; then
22187     ac_cpp_err=$ac_cxx_preproc_warn_flag
22188   else
22189     ac_cpp_err=
22190   fi
22191 else
22192   ac_cpp_err=yes
22193 fi
22194 if test -z "$ac_cpp_err"; then
22195   :
22196 else
22197   echo "$as_me: failed program was:" >&5
22198   cat conftest.$ac_ext >&5
22199   # Broken: fails on valid input.
22200 continue
22201 fi
22202 rm -f conftest.err conftest.$ac_ext
22203
22204   # OK, works on sane cases.  Now check whether non-existent headers
22205   # can be detected and how.
22206   cat >conftest.$ac_ext <<_ACEOF
22207 #line 22207 "configure"
22208 #include "confdefs.h"
22209 #include <ac_nonexistent.h>
22210 _ACEOF
22211 if { (eval echo "$as_me:22211: \"$ac_cpp conftest.$ac_ext\"") >&5
22212   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22213   ac_status=$?
22214   egrep -v '^ *\+' conftest.er1 >conftest.err
22215   rm -f conftest.er1
22216   cat conftest.err >&5
22217   echo "$as_me:22217: \$? = $ac_status" >&5
22218   (exit $ac_status); } >/dev/null; then
22219   if test -s conftest.err; then
22220     ac_cpp_err=$ac_cxx_preproc_warn_flag
22221   else
22222     ac_cpp_err=
22223   fi
22224 else
22225   ac_cpp_err=yes
22226 fi
22227 if test -z "$ac_cpp_err"; then
22228   # Broken: success on invalid input.
22229 continue
22230 else
22231   echo "$as_me: failed program was:" >&5
22232   cat conftest.$ac_ext >&5
22233   # Passes both tests.
22234 ac_preproc_ok=:
22235 break
22236 fi
22237 rm -f conftest.err conftest.$ac_ext
22238
22239 done
22240 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22241 rm -f conftest.err conftest.$ac_ext
22242 if $ac_preproc_ok; then
22243   :
22244 else
22245   { { echo "$as_me:22245: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22246 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22247    { (exit 1); exit 1; }; }
22248 fi
22249
22250 ac_ext=cc
22251 ac_cpp='$CXXCPP $CPPFLAGS'
22252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22255 ac_main_return=return
22256
22257 for ac_header in typeinfo
22258 do
22259 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22260 echo "$as_me:22260: checking for $ac_header" >&5
22261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22263   echo $ECHO_N "(cached) $ECHO_C" >&6
22264 else
22265   cat >conftest.$ac_ext <<_ACEOF
22266 #line 22266 "configure"
22267 #include "confdefs.h"
22268 #include <$ac_header>
22269 _ACEOF
22270 if { (eval echo "$as_me:22270: \"$ac_cpp conftest.$ac_ext\"") >&5
22271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22272   ac_status=$?
22273   egrep -v '^ *\+' conftest.er1 >conftest.err
22274   rm -f conftest.er1
22275   cat conftest.err >&5
22276   echo "$as_me:22276: \$? = $ac_status" >&5
22277   (exit $ac_status); } >/dev/null; then
22278   if test -s conftest.err; then
22279     ac_cpp_err=$ac_cxx_preproc_warn_flag
22280   else
22281     ac_cpp_err=
22282   fi
22283 else
22284   ac_cpp_err=yes
22285 fi
22286 if test -z "$ac_cpp_err"; then
22287   eval "$as_ac_Header=yes"
22288 else
22289   echo "$as_me: failed program was:" >&5
22290   cat conftest.$ac_ext >&5
22291   eval "$as_ac_Header=no"
22292 fi
22293 rm -f conftest.err conftest.$ac_ext
22294 fi
22295 echo "$as_me:22295: result: `eval echo '${'$as_ac_Header'}'`" >&5
22296 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22297 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22298   cat >>confdefs.h <<EOF
22299 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22300 EOF
22301
22302 fi
22303 done
22304
22305 for ac_header in iostream
22306 do
22307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22308 echo "$as_me:22308: checking for $ac_header" >&5
22309 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22310 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22311   echo $ECHO_N "(cached) $ECHO_C" >&6
22312 else
22313   cat >conftest.$ac_ext <<_ACEOF
22314 #line 22314 "configure"
22315 #include "confdefs.h"
22316 #include <$ac_header>
22317 _ACEOF
22318 if { (eval echo "$as_me:22318: \"$ac_cpp conftest.$ac_ext\"") >&5
22319   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22320   ac_status=$?
22321   egrep -v '^ *\+' conftest.er1 >conftest.err
22322   rm -f conftest.er1
22323   cat conftest.err >&5
22324   echo "$as_me:22324: \$? = $ac_status" >&5
22325   (exit $ac_status); } >/dev/null; then
22326   if test -s conftest.err; then
22327     ac_cpp_err=$ac_cxx_preproc_warn_flag
22328   else
22329     ac_cpp_err=
22330   fi
22331 else
22332   ac_cpp_err=yes
22333 fi
22334 if test -z "$ac_cpp_err"; then
22335   eval "$as_ac_Header=yes"
22336 else
22337   echo "$as_me: failed program was:" >&5
22338   cat conftest.$ac_ext >&5
22339   eval "$as_ac_Header=no"
22340 fi
22341 rm -f conftest.err conftest.$ac_ext
22342 fi
22343 echo "$as_me:22343: result: `eval echo '${'$as_ac_Header'}'`" >&5
22344 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22345 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22346   cat >>confdefs.h <<EOF
22347 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22348 EOF
22349
22350 fi
22351 done
22352
22353 if test x"$ac_cv_header_iostream" = xyes ; then
22354         echo "$as_me:22354: checking if iostream uses std-namespace" >&5
22355 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22356         cat >conftest.$ac_ext <<_ACEOF
22357 #line 22357 "configure"
22358 #include "confdefs.h"
22359
22360 #include <iostream>
22361 using std::endl;
22362 using std::cerr;
22363 int
22364 main (void)
22365 {
22366
22367 cerr << "testing" << endl;
22368
22369   ;
22370   return 0;
22371 }
22372 _ACEOF
22373 rm -f conftest.$ac_objext
22374 if { (eval echo "$as_me:22374: \"$ac_compile\"") >&5
22375   (eval $ac_compile) 2>&5
22376   ac_status=$?
22377   echo "$as_me:22377: \$? = $ac_status" >&5
22378   (exit $ac_status); } &&
22379          { ac_try='test -s conftest.$ac_objext'
22380   { (eval echo "$as_me:22380: \"$ac_try\"") >&5
22381   (eval $ac_try) 2>&5
22382   ac_status=$?
22383   echo "$as_me:22383: \$? = $ac_status" >&5
22384   (exit $ac_status); }; }; then
22385   cf_iostream_namespace=yes
22386 else
22387   echo "$as_me: failed program was:" >&5
22388 cat conftest.$ac_ext >&5
22389 cf_iostream_namespace=no
22390 fi
22391 rm -f conftest.$ac_objext conftest.$ac_ext
22392         echo "$as_me:22392: result: $cf_iostream_namespace" >&5
22393 echo "${ECHO_T}$cf_iostream_namespace" >&6
22394         if test "$cf_iostream_namespace" = yes ; then
22395
22396 cat >>confdefs.h <<\EOF
22397 #define IOSTREAM_NAMESPACE 1
22398 EOF
22399
22400         fi
22401 fi
22402
22403 echo "$as_me:22403: checking if we should include stdbool.h" >&5
22404 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22405
22406 if test "${cf_cv_header_stdbool_h+set}" = set; then
22407   echo $ECHO_N "(cached) $ECHO_C" >&6
22408 else
22409
22410         cat >conftest.$ac_ext <<_ACEOF
22411 #line 22411 "configure"
22412 #include "confdefs.h"
22413
22414 int
22415 main (void)
22416 {
22417 bool foo = false
22418   ;
22419   return 0;
22420 }
22421 _ACEOF
22422 rm -f conftest.$ac_objext
22423 if { (eval echo "$as_me:22423: \"$ac_compile\"") >&5
22424   (eval $ac_compile) 2>&5
22425   ac_status=$?
22426   echo "$as_me:22426: \$? = $ac_status" >&5
22427   (exit $ac_status); } &&
22428          { ac_try='test -s conftest.$ac_objext'
22429   { (eval echo "$as_me:22429: \"$ac_try\"") >&5
22430   (eval $ac_try) 2>&5
22431   ac_status=$?
22432   echo "$as_me:22432: \$? = $ac_status" >&5
22433   (exit $ac_status); }; }; then
22434   cf_cv_header_stdbool_h=0
22435 else
22436   echo "$as_me: failed program was:" >&5
22437 cat conftest.$ac_ext >&5
22438 cat >conftest.$ac_ext <<_ACEOF
22439 #line 22439 "configure"
22440 #include "confdefs.h"
22441
22442 #ifndef __BEOS__
22443 #include <stdbool.h>
22444 #endif
22445
22446 int
22447 main (void)
22448 {
22449 bool foo = false
22450   ;
22451   return 0;
22452 }
22453 _ACEOF
22454 rm -f conftest.$ac_objext
22455 if { (eval echo "$as_me:22455: \"$ac_compile\"") >&5
22456   (eval $ac_compile) 2>&5
22457   ac_status=$?
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit $ac_status); } &&
22460          { ac_try='test -s conftest.$ac_objext'
22461   { (eval echo "$as_me:22461: \"$ac_try\"") >&5
22462   (eval $ac_try) 2>&5
22463   ac_status=$?
22464   echo "$as_me:22464: \$? = $ac_status" >&5
22465   (exit $ac_status); }; }; then
22466   cf_cv_header_stdbool_h=1
22467 else
22468   echo "$as_me: failed program was:" >&5
22469 cat conftest.$ac_ext >&5
22470 cf_cv_header_stdbool_h=0
22471 fi
22472 rm -f conftest.$ac_objext conftest.$ac_ext
22473 fi
22474 rm -f conftest.$ac_objext conftest.$ac_ext
22475 fi
22476
22477 if test "$cf_cv_header_stdbool_h" = 1
22478 then    echo "$as_me:22478: result: yes" >&5
22479 echo "${ECHO_T}yes" >&6
22480 else    echo "$as_me:22480: result: no" >&5
22481 echo "${ECHO_T}no" >&6
22482 fi
22483
22484 echo "$as_me:22484: checking for builtin bool type" >&5
22485 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22486
22487 if test "${cf_cv_builtin_bool+set}" = set; then
22488   echo $ECHO_N "(cached) $ECHO_C" >&6
22489 else
22490
22491         cat >conftest.$ac_ext <<_ACEOF
22492 #line 22492 "configure"
22493 #include "confdefs.h"
22494
22495 #include <stdio.h>
22496 #include <sys/types.h>
22497
22498 int
22499 main (void)
22500 {
22501 bool x = false
22502   ;
22503   return 0;
22504 }
22505 _ACEOF
22506 rm -f conftest.$ac_objext
22507 if { (eval echo "$as_me:22507: \"$ac_compile\"") >&5
22508   (eval $ac_compile) 2>&5
22509   ac_status=$?
22510   echo "$as_me:22510: \$? = $ac_status" >&5
22511   (exit $ac_status); } &&
22512          { ac_try='test -s conftest.$ac_objext'
22513   { (eval echo "$as_me:22513: \"$ac_try\"") >&5
22514   (eval $ac_try) 2>&5
22515   ac_status=$?
22516   echo "$as_me:22516: \$? = $ac_status" >&5
22517   (exit $ac_status); }; }; then
22518   cf_cv_builtin_bool=1
22519 else
22520   echo "$as_me: failed program was:" >&5
22521 cat conftest.$ac_ext >&5
22522 cf_cv_builtin_bool=0
22523 fi
22524 rm -f conftest.$ac_objext conftest.$ac_ext
22525
22526 fi
22527
22528 if test "$cf_cv_builtin_bool" = 1
22529 then    echo "$as_me:22529: result: yes" >&5
22530 echo "${ECHO_T}yes" >&6
22531 else    echo "$as_me:22531: result: no" >&5
22532 echo "${ECHO_T}no" >&6
22533 fi
22534
22535 echo "$as_me:22535: checking for size of bool" >&5
22536 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22537 if test "${cf_cv_type_of_bool+set}" = set; then
22538   echo $ECHO_N "(cached) $ECHO_C" >&6
22539 else
22540
22541         rm -f cf_test.out
22542         if test "$cross_compiling" = yes; then
22543   cf_cv_type_of_bool=unknown
22544 else
22545   cat >conftest.$ac_ext <<_ACEOF
22546 #line 22546 "configure"
22547 #include "confdefs.h"
22548
22549 #include <stdlib.h>
22550 #include <stdio.h>
22551
22552 #if defined(__cplusplus)
22553
22554 #ifdef HAVE_GXX_BUILTIN_H
22555 #include <g++/builtin.h>
22556 #elif HAVE_GPP_BUILTIN_H
22557 #include <gpp/builtin.h>
22558 #elif HAVE_BUILTIN_H
22559 #include <builtin.h>
22560 #endif
22561
22562 #else
22563
22564 #if $cf_cv_header_stdbool_h
22565 #include <stdbool.h>
22566 #endif
22567
22568 #endif
22569
22570 int main(void)
22571 {
22572         FILE *fp = fopen("cf_test.out", "w");
22573         if (fp != 0) {
22574                 bool x = true;
22575                 if ((bool)(-x) >= 0)
22576                         fputs("unsigned ", fp);
22577                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22578                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22579                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22580                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22581                 fclose(fp);
22582         }
22583         ${cf_cv_main_return:-return}(0);
22584 }
22585
22586 _ACEOF
22587 rm -f conftest$ac_exeext
22588 if { (eval echo "$as_me:22588: \"$ac_link\"") >&5
22589   (eval $ac_link) 2>&5
22590   ac_status=$?
22591   echo "$as_me:22591: \$? = $ac_status" >&5
22592   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22593   { (eval echo "$as_me:22593: \"$ac_try\"") >&5
22594   (eval $ac_try) 2>&5
22595   ac_status=$?
22596   echo "$as_me:22596: \$? = $ac_status" >&5
22597   (exit $ac_status); }; }; then
22598   cf_cv_type_of_bool=`cat cf_test.out`
22599                  if test -z "$cf_cv_type_of_bool"; then
22600                    cf_cv_type_of_bool=unknown
22601                  fi
22602 else
22603   echo "$as_me: program exited with status $ac_status" >&5
22604 echo "$as_me: failed program was:" >&5
22605 cat conftest.$ac_ext >&5
22606 cf_cv_type_of_bool=unknown
22607 fi
22608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22609 fi
22610
22611 fi
22612
22613         rm -f cf_test.out
22614 echo "$as_me:22614: result: $cf_cv_type_of_bool" >&5
22615 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22616 if test "$cf_cv_type_of_bool" = unknown ; then
22617         case .$NCURSES_BOOL in
22618         (.auto|.) NCURSES_BOOL=unsigned;;
22619         esac
22620         { echo "$as_me:22620: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22621 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22622         cf_cv_type_of_bool=$NCURSES_BOOL
22623 fi
22624
22625 echo "$as_me:22625: checking for special defines needed for etip.h" >&5
22626 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22627 cf_save_CXXFLAGS="$CXXFLAGS"
22628 cf_result="none"
22629
22630 # etip.h includes ncurses.h which includes ncurses_dll.h
22631 # But ncurses_dll.h is generated - fix here.
22632 test -d include || mkdir include
22633 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
22634
22635 for cf_math in "" MATH_H
22636 do
22637 for cf_excp in "" MATH_EXCEPTION
22638 do
22639         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22640         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22641         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22642 cat >conftest.$ac_ext <<_ACEOF
22643 #line 22643 "configure"
22644 #include "confdefs.h"
22645
22646 #include <etip.h.in>
22647
22648 int
22649 main (void)
22650 {
22651
22652   ;
22653   return 0;
22654 }
22655 _ACEOF
22656 rm -f conftest.$ac_objext
22657 if { (eval echo "$as_me:22657: \"$ac_compile\"") >&5
22658   (eval $ac_compile) 2>&5
22659   ac_status=$?
22660   echo "$as_me:22660: \$? = $ac_status" >&5
22661   (exit $ac_status); } &&
22662          { ac_try='test -s conftest.$ac_objext'
22663   { (eval echo "$as_me:22663: \"$ac_try\"") >&5
22664   (eval $ac_try) 2>&5
22665   ac_status=$?
22666   echo "$as_me:22666: \$? = $ac_status" >&5
22667   (exit $ac_status); }; }; then
22668
22669         test -n "$cf_math" && cat >>confdefs.h <<EOF
22670 #define ETIP_NEEDS_${cf_math} 1
22671 EOF
22672
22673         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22674 #define ETIP_NEEDS_${cf_excp} 1
22675 EOF
22676
22677         cf_result="$cf_math $cf_excp"
22678         break 2
22679
22680 else
22681   echo "$as_me: failed program was:" >&5
22682 cat conftest.$ac_ext >&5
22683 fi
22684 rm -f conftest.$ac_objext conftest.$ac_ext
22685 done
22686 done
22687 echo "$as_me:22687: result: $cf_result" >&5
22688 echo "${ECHO_T}$cf_result" >&6
22689 CXXFLAGS="$cf_save_CXXFLAGS"
22690
22691 if test -n "$CXX"; then
22692 echo "$as_me:22692: checking if $CXX accepts parameter initialization" >&5
22693 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22694 if test "${cf_cv_cpp_param_init+set}" = set; then
22695   echo $ECHO_N "(cached) $ECHO_C" >&6
22696 else
22697
22698         ac_ext=cc
22699 ac_cpp='$CXXCPP $CPPFLAGS'
22700 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22701 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22702 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22703 ac_main_return=return
22704
22705         if test "$cross_compiling" = yes; then
22706   cf_cv_cpp_param_init=unknown
22707 else
22708   cat >conftest.$ac_ext <<_ACEOF
22709 #line 22709 "configure"
22710 #include "confdefs.h"
22711
22712 class TEST {
22713 private:
22714         int value;
22715 public:
22716         TEST(int x = 1);
22717         ~TEST();
22718 };
22719
22720 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22721 {
22722         value = x;
22723 }
22724 int main(void) { }
22725
22726 _ACEOF
22727 rm -f conftest$ac_exeext
22728 if { (eval echo "$as_me:22728: \"$ac_link\"") >&5
22729   (eval $ac_link) 2>&5
22730   ac_status=$?
22731   echo "$as_me:22731: \$? = $ac_status" >&5
22732   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22733   { (eval echo "$as_me:22733: \"$ac_try\"") >&5
22734   (eval $ac_try) 2>&5
22735   ac_status=$?
22736   echo "$as_me:22736: \$? = $ac_status" >&5
22737   (exit $ac_status); }; }; then
22738   cf_cv_cpp_param_init=yes
22739 else
22740   echo "$as_me: program exited with status $ac_status" >&5
22741 echo "$as_me: failed program was:" >&5
22742 cat conftest.$ac_ext >&5
22743 cf_cv_cpp_param_init=no
22744 fi
22745 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22746 fi
22747         ac_ext=cc
22748 ac_cpp='$CXXCPP $CPPFLAGS'
22749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22752 ac_main_return=return
22753
22754 fi
22755 echo "$as_me:22755: result: $cf_cv_cpp_param_init" >&5
22756 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22757 fi
22758 test "$cf_cv_cpp_param_init" = yes &&
22759 cat >>confdefs.h <<\EOF
22760 #define CPP_HAS_PARAM_INIT 1
22761 EOF
22762
22763 if test -n "$CXX"; then
22764
22765 echo "$as_me:22765: checking if $CXX accepts static_cast" >&5
22766 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22767 if test "${cf_cv_cpp_static_cast+set}" = set; then
22768   echo $ECHO_N "(cached) $ECHO_C" >&6
22769 else
22770
22771         ac_ext=cc
22772 ac_cpp='$CXXCPP $CPPFLAGS'
22773 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22774 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22775 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22776 ac_main_return=return
22777
22778         cat >conftest.$ac_ext <<_ACEOF
22779 #line 22779 "configure"
22780 #include "confdefs.h"
22781
22782 class NCursesPanel
22783 {
22784 public:
22785   NCursesPanel(int nlines,
22786                int ncols,
22787                int begin_y = 0,
22788                int begin_x = 0)
22789   {
22790   }
22791   NCursesPanel();
22792   ~NCursesPanel();
22793 };
22794
22795 template<class T> class NCursesUserPanel : public NCursesPanel
22796 {
22797 public:
22798   NCursesUserPanel (int nlines,
22799                     int ncols,
22800                     int begin_y = 0,
22801                     int begin_x = 0,
22802                     const T* p_UserData = static_cast<T*>(0))
22803     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22804   {
22805   };
22806   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22807   {
22808   };
22809
22810   virtual ~NCursesUserPanel() {};
22811 };
22812
22813 int
22814 main (void)
22815 {
22816
22817         const char* p_UserData = static_cast<char*>(0)
22818   ;
22819   return 0;
22820 }
22821 _ACEOF
22822 rm -f conftest.$ac_objext
22823 if { (eval echo "$as_me:22823: \"$ac_compile\"") >&5
22824   (eval $ac_compile) 2>&5
22825   ac_status=$?
22826   echo "$as_me:22826: \$? = $ac_status" >&5
22827   (exit $ac_status); } &&
22828          { ac_try='test -s conftest.$ac_objext'
22829   { (eval echo "$as_me:22829: \"$ac_try\"") >&5
22830   (eval $ac_try) 2>&5
22831   ac_status=$?
22832   echo "$as_me:22832: \$? = $ac_status" >&5
22833   (exit $ac_status); }; }; then
22834   cf_cv_cpp_static_cast=yes
22835 else
22836   echo "$as_me: failed program was:" >&5
22837 cat conftest.$ac_ext >&5
22838 cf_cv_cpp_static_cast=no
22839 fi
22840 rm -f conftest.$ac_objext conftest.$ac_ext
22841
22842         ac_ext=cc
22843 ac_cpp='$CXXCPP $CPPFLAGS'
22844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22847 ac_main_return=return
22848
22849 fi
22850 echo "$as_me:22850: result: $cf_cv_cpp_static_cast" >&5
22851 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22852
22853 fi
22854
22855 test "$cf_cv_cpp_static_cast" = yes &&
22856 cat >>confdefs.h <<\EOF
22857 #define CPP_HAS_STATIC_CAST 1
22858 EOF
22859
22860         CXX_AR='$(AR)'
22861         CXX_ARFLAGS='$(ARFLAGS)'
22862         case $cf_cv_system_name in
22863         (irix*)
22864             if test "$GXX" != yes ; then
22865                 CXX_AR='$(CXX)'
22866                 CXX_ARFLAGS='-ar -o'
22867             fi
22868             ;;
22869         (sco3.2v5*)
22870             CXXLDFLAGS="-u main"
22871             ;;
22872         (solaris2*)
22873             if test "$GXX" != yes ; then
22874                 CXX_AR='$(CXX)'
22875                 CXX_ARFLAGS='-xar -o'
22876             fi
22877             ;;
22878         esac
22879
22880 else
22881         cf_cxx_library=no
22882         cf_cv_builtin_bool=1
22883
22884         # Just because we are not configuring against C++ right now does not
22885         # mean that a user will not want to use C++.  Some distributors disable
22886         # the C++ portion of this configuration as a shortcut (or just to avoid
22887         # compiling the demo in the c++ directory).  So we need a reasonable
22888         # default for the 'bool' type.
22889         #
22890         # Caveat: since the storage of the bool type is not standardized, it
22891         # may change.
22892
22893         if test "$NCURSES_BOOL" != auto ; then
22894                 cf_cv_type_of_bool=$NCURSES_BOOL
22895                 cf_cv_header_stdbool_h=0
22896         else
22897                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22898
22899 echo "$as_me:22899: checking for size of bool" >&5
22900 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22901 if test "${cf_cv_type_of_bool+set}" = set; then
22902   echo $ECHO_N "(cached) $ECHO_C" >&6
22903 else
22904
22905         rm -f cf_test.out
22906         if test "$cross_compiling" = yes; then
22907   cf_cv_type_of_bool=unknown
22908 else
22909   cat >conftest.$ac_ext <<_ACEOF
22910 #line 22910 "configure"
22911 #include "confdefs.h"
22912
22913 #include <stdlib.h>
22914 #include <stdio.h>
22915
22916 #if defined(__cplusplus)
22917
22918 #ifdef HAVE_GXX_BUILTIN_H
22919 #include <g++/builtin.h>
22920 #elif HAVE_GPP_BUILTIN_H
22921 #include <gpp/builtin.h>
22922 #elif HAVE_BUILTIN_H
22923 #include <builtin.h>
22924 #endif
22925
22926 #else
22927
22928 #if $cf_cv_header_stdbool_h
22929 #include <stdbool.h>
22930 #endif
22931
22932 #endif
22933
22934 int main(void)
22935 {
22936         FILE *fp = fopen("cf_test.out", "w");
22937         if (fp != 0) {
22938                 bool x = true;
22939                 if ((bool)(-x) >= 0)
22940                         fputs("unsigned ", fp);
22941                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22942                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22943                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22944                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22945                 fclose(fp);
22946         }
22947         ${cf_cv_main_return:-return}(0);
22948 }
22949
22950 _ACEOF
22951 rm -f conftest$ac_exeext
22952 if { (eval echo "$as_me:22952: \"$ac_link\"") >&5
22953   (eval $ac_link) 2>&5
22954   ac_status=$?
22955   echo "$as_me:22955: \$? = $ac_status" >&5
22956   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22957   { (eval echo "$as_me:22957: \"$ac_try\"") >&5
22958   (eval $ac_try) 2>&5
22959   ac_status=$?
22960   echo "$as_me:22960: \$? = $ac_status" >&5
22961   (exit $ac_status); }; }; then
22962   cf_cv_type_of_bool=`cat cf_test.out`
22963                  if test -z "$cf_cv_type_of_bool"; then
22964                    cf_cv_type_of_bool=unknown
22965                  fi
22966 else
22967   echo "$as_me: program exited with status $ac_status" >&5
22968 echo "$as_me: failed program was:" >&5
22969 cat conftest.$ac_ext >&5
22970 cf_cv_type_of_bool=unknown
22971 fi
22972 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22973 fi
22974
22975 fi
22976
22977         rm -f cf_test.out
22978 echo "$as_me:22978: result: $cf_cv_type_of_bool" >&5
22979 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22980 if test "$cf_cv_type_of_bool" = unknown ; then
22981         case .$NCURSES_BOOL in
22982         (.auto|.) NCURSES_BOOL=unsigned;;
22983         esac
22984         { echo "$as_me:22984: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22985 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22986         cf_cv_type_of_bool=$NCURSES_BOOL
22987 fi
22988
22989                 else
22990                         echo "$as_me:22990: checking for fallback type of bool" >&5
22991 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22992                         case "$host_cpu" in
22993                         (i?86)  cf_cv_type_of_bool=char ;;
22994                         (*)     cf_cv_type_of_bool=int  ;;
22995                         esac
22996                         echo "$as_me:22996: result: $cf_cv_type_of_bool" >&5
22997 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22998                 fi
22999         fi
23000 fi
23001
23002 # If the C compiler did not declare bool, and we did not determine that the C++
23003 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
23004 # ncurses library use the same type as C++ bool.  Note that this allows one to
23005 # specify the type of bool in a configure-script option and postpone
23006 # integration with the C++ compiler provided that the types are compatible.
23007 USE_CXX_BOOL=1
23008 if test $cf_cv_cc_bool_type = 1
23009 then
23010         # oops: C has a bool.  Unlikely, but C++ could differ.
23011         USE_CXX_BOOL=0
23012 elif test $cf_cv_builtin_bool = 0
23013 then
23014         # C++ has no bool
23015         USE_CXX_BOOL=0
23016 else
23017         # this is the normal case
23018         USE_CXX_BOOL='defined(__cplusplus)'
23019 fi
23020
23021 if test -f "${srcdir}/Ada95/Makefile.in" ; then
23022
23023         if test "$cf_with_ada" != "no" ; then
23024                 if test "$with_libtool" != "no"; then
23025                         { echo "$as_me:23025: WARNING: libtool does not support Ada - disabling feature" >&5
23026 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23027                         cf_with_ada=no
23028                 fi
23029         fi
23030
23031         if test "$cf_with_ada" != "no" ; then
23032
23033 cf_ada_make=gnatmake
23034 cf_ada_config="#"
23035 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23036 set dummy $cf_ada_make; ac_word=$2
23037 echo "$as_me:23037: checking for $ac_word" >&5
23038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23039 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23040   echo $ECHO_N "(cached) $ECHO_C" >&6
23041 else
23042   if test -n "$gnatmake_exists"; then
23043   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23044 else
23045   ac_save_IFS=$IFS; IFS=$ac_path_separator
23046 ac_dummy="$PATH"
23047 for ac_dir in $ac_dummy; do
23048   IFS=$ac_save_IFS
23049   test -z "$ac_dir" && ac_dir=.
23050   $as_executable_p "$ac_dir/$ac_word" || continue
23051 ac_cv_prog_gnatmake_exists="yes"
23052 echo "$as_me:23052: found $ac_dir/$ac_word" >&5
23053 break
23054 done
23055
23056   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23057 fi
23058 fi
23059 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23060 if test -n "$gnatmake_exists"; then
23061   echo "$as_me:23061: result: $gnatmake_exists" >&5
23062 echo "${ECHO_T}$gnatmake_exists" >&6
23063 else
23064   echo "$as_me:23064: result: no" >&5
23065 echo "${ECHO_T}no" >&6
23066 fi
23067
23068 if test "$ac_cv_prog_gnatmake_exists" = no; then
23069         cf_ada_make=
23070         cf_cv_prog_gnat_correct=no
23071 else
23072         # Extract the first word of "gprconfig", so it can be a program name with args.
23073 set dummy gprconfig; ac_word=$2
23074 echo "$as_me:23074: checking for $ac_word" >&5
23075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23076 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23077   echo $ECHO_N "(cached) $ECHO_C" >&6
23078 else
23079   if test -n "$gprconfig_exists"; then
23080   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23081 else
23082   ac_save_IFS=$IFS; IFS=$ac_path_separator
23083 ac_dummy="$PATH"
23084 for ac_dir in $ac_dummy; do
23085   IFS=$ac_save_IFS
23086   test -z "$ac_dir" && ac_dir=.
23087   $as_executable_p "$ac_dir/$ac_word" || continue
23088 ac_cv_prog_gprconfig_exists="yes"
23089 echo "$as_me:23089: found $ac_dir/$ac_word" >&5
23090 break
23091 done
23092
23093   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23094 fi
23095 fi
23096 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23097 if test -n "$gprconfig_exists"; then
23098   echo "$as_me:23098: result: $gprconfig_exists" >&5
23099 echo "${ECHO_T}$gprconfig_exists" >&6
23100 else
23101   echo "$as_me:23101: result: no" >&5
23102 echo "${ECHO_T}no" >&6
23103 fi
23104
23105         if test "$ac_cv_prog_gprconfig_exists" = yes
23106         then
23107                 rm -rf conftest* *~conftest*
23108                 if mkdir conftest.src
23109                 then
23110                         cf_ada_config=""
23111                         cd conftest.src
23112                         for cf_gprconfig in Ada C
23113                         do
23114                                 echo "$as_me:23114: checking for gprconfig name for $cf_gprconfig" >&5
23115 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23116                                 if test $cf_gprconfig = C
23117                                 then
23118                                         for cf_gprconfig_param in \
23119                                                 $cf_gprconfig,,,,GNATGCC \
23120                                                 $cf_gprconfig,,,,GCC \
23121                                                 $cf_gprconfig
23122                                         do
23123                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23124                                                 test -n "$cf_gprconfig_value" && break
23125                                         done
23126                                 else
23127                                         cf_gprconfig_param=$cf_gprconfig
23128                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23129                                 fi
23130                                 if test -n "$cf_gprconfig_value"
23131                                 then
23132                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23133                                         echo "$as_me:23133: result: $cf_gprconfig_value" >&5
23134 echo "${ECHO_T}$cf_gprconfig_value" >&6
23135                                 else
23136                                         echo "$as_me:23136: result: missing" >&5
23137 echo "${ECHO_T}missing" >&6
23138                                         cf_ada_config="#"
23139                                         break
23140                                 fi
23141                         done
23142                         cd ..
23143                         rm -rf conftest* *~conftest*
23144                 fi
23145         else
23146                 # gprconfig is newer than gnatmake; we can continue...
23147                 cf_ada_config="##"
23148         fi
23149         if test "x$cf_ada_config" != "x#"
23150         then
23151
23152 echo "$as_me:23152: checking for gnat version" >&5
23153 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23154 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23155         grep '[0-9].[0-9][0-9]*' |\
23156         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23157 echo "$as_me:23157: result: $cf_gnat_version" >&5
23158 echo "${ECHO_T}$cf_gnat_version" >&6
23159
23160 case $cf_gnat_version in
23161 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23162         cf_cv_prog_gnat_correct=yes
23163         ;;
23164 (*)
23165         { echo "$as_me:23165: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23166 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23167         cf_cv_prog_gnat_correct=no
23168         ;;
23169 esac
23170
23171                 # Extract the first word of "m4", so it can be a program name with args.
23172 set dummy m4; ac_word=$2
23173 echo "$as_me:23173: checking for $ac_word" >&5
23174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23175 if test "${ac_cv_prog_M4_exists+set}" = set; then
23176   echo $ECHO_N "(cached) $ECHO_C" >&6
23177 else
23178   if test -n "$M4_exists"; then
23179   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23180 else
23181   ac_save_IFS=$IFS; IFS=$ac_path_separator
23182 ac_dummy="$PATH"
23183 for ac_dir in $ac_dummy; do
23184   IFS=$ac_save_IFS
23185   test -z "$ac_dir" && ac_dir=.
23186   $as_executable_p "$ac_dir/$ac_word" || continue
23187 ac_cv_prog_M4_exists="yes"
23188 echo "$as_me:23188: found $ac_dir/$ac_word" >&5
23189 break
23190 done
23191
23192   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23193 fi
23194 fi
23195 M4_exists=$ac_cv_prog_M4_exists
23196 if test -n "$M4_exists"; then
23197   echo "$as_me:23197: result: $M4_exists" >&5
23198 echo "${ECHO_T}$M4_exists" >&6
23199 else
23200   echo "$as_me:23200: result: no" >&5
23201 echo "${ECHO_T}no" >&6
23202 fi
23203
23204                 if test "$ac_cv_prog_M4_exists" = no; then
23205                         cf_cv_prog_gnat_correct=no
23206                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23207                 fi
23208                 if test "$cf_cv_prog_gnat_correct" = yes; then
23209                         echo "$as_me:23209: checking if GNAT works" >&5
23210 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23211
23212 rm -rf conftest* *~conftest*
23213 cat >>conftest.ads <<CF_EOF
23214 procedure conftest;
23215 CF_EOF
23216 cat >>conftest.adb <<CF_EOF
23217 with Text_IO;
23218 with GNAT.OS_Lib;
23219 procedure conftest is
23220 begin
23221    Text_IO.Put ("Hello World");
23222    Text_IO.New_Line;
23223    GNAT.OS_Lib.OS_Exit (0);
23224 end conftest;
23225 CF_EOF
23226 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23227    if ( ./conftest 1>&5 2>&1 ) ; then
23228       cf_cv_prog_gnat_correct=yes
23229    else
23230       cf_cv_prog_gnat_correct=no
23231    fi
23232 else
23233    cf_cv_prog_gnat_correct=no
23234 fi
23235 rm -rf conftest* *~conftest*
23236
23237                         echo "$as_me:23237: result: $cf_cv_prog_gnat_correct" >&5
23238 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23239                 fi
23240         else
23241                 cf_cv_prog_gnat_correct=no
23242         fi
23243 fi
23244
23245                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23246
23247         ADAFLAGS="$ADAFLAGS -gnatpn"
23248
23249         echo "$as_me:23249: checking optimization options for ADAFLAGS" >&5
23250 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23251         case "$CFLAGS" in
23252         (*-g*)
23253
23254         ADAFLAGS="$ADAFLAGS -g"
23255
23256                 ;;
23257         esac
23258         case "$CFLAGS" in
23259         (*-O*)
23260                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23261
23262         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23263
23264                 ;;
23265         esac
23266         echo "$as_me:23266: result: $ADAFLAGS" >&5
23267 echo "${ECHO_T}$ADAFLAGS" >&6
23268
23269 echo "$as_me:23269: checking if GNATPREP supports -T option" >&5
23270 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23271 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23272   echo $ECHO_N "(cached) $ECHO_C" >&6
23273 else
23274
23275 cf_cv_gnatprep_opt_t=no
23276 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23277
23278 fi
23279 echo "$as_me:23279: result: $cf_cv_gnatprep_opt_t" >&5
23280 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23281 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23282
23283 echo "$as_me:23283: checking if GNAT supports generics" >&5
23284 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23285 case $cf_gnat_version in
23286 (3.[1-9]*|[4-9].*)
23287         cf_gnat_generics=yes
23288         ;;
23289 (*)
23290         cf_gnat_generics=no
23291         ;;
23292 esac
23293 echo "$as_me:23293: result: $cf_gnat_generics" >&5
23294 echo "${ECHO_T}$cf_gnat_generics" >&6
23295
23296 if test "$cf_gnat_generics" = yes
23297 then
23298         cf_compile_generics=generics
23299         cf_generic_objects="\${GENOBJS}"
23300 else
23301         cf_compile_generics=
23302         cf_generic_objects=
23303 fi
23304
23305 echo "$as_me:23305: checking if GNAT supports SIGINT" >&5
23306 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23307 if test "${cf_cv_gnat_sigint+set}" = set; then
23308   echo $ECHO_N "(cached) $ECHO_C" >&6
23309 else
23310
23311 rm -rf conftest* *~conftest*
23312 cat >>conftest.ads <<CF_EOF
23313 with Ada.Interrupts.Names;
23314
23315 package ConfTest is
23316
23317    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23318    pragma Unreserve_All_Interrupts;
23319    pragma Warnings (On);
23320
23321    protected Process is
23322       procedure Stop;
23323       function Continue return Boolean;
23324       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23325    private
23326       Done : Boolean := False;
23327    end Process;
23328
23329 end ConfTest;
23330 CF_EOF
23331 cat >>conftest.adb <<CF_EOF
23332 package body ConfTest is
23333    protected body Process is
23334       procedure Stop is
23335       begin
23336          Done := True;
23337       end Stop;
23338       function Continue return Boolean is
23339       begin
23340          return not Done;
23341       end Continue;
23342    end Process;
23343 end ConfTest;
23344 CF_EOF
23345 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23346       cf_cv_gnat_sigint=yes
23347 else
23348    cf_cv_gnat_sigint=no
23349 fi
23350 rm -rf conftest* *~conftest*
23351
23352 fi
23353 echo "$as_me:23353: result: $cf_cv_gnat_sigint" >&5
23354 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23355
23356 if test $cf_cv_gnat_sigint = yes ; then
23357         USE_GNAT_SIGINT=""
23358 else
23359         USE_GNAT_SIGINT="#"
23360 fi
23361
23362 cf_gnat_libraries=no
23363 cf_gnat_projects=no
23364
23365 if test "$enable_gnat_projects" != no ; then
23366 echo "$as_me:23366: checking if GNAT supports project files" >&5
23367 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23368 case $cf_gnat_version in
23369 (3.[0-9]*)
23370         ;;
23371 (*)
23372         case $cf_cv_system_name in
23373         (cygwin*|msys*)
23374                 ;;
23375         (*)
23376                 rm -rf conftest* *~conftest*
23377                 if mkdir conftest.src conftest.bin conftest.lib
23378                 then
23379                         cd conftest.src
23380                         rm -rf conftest* *~conftest*
23381                         cat >>library.gpr <<CF_EOF
23382 project Library is
23383   Kind := External ("LIB_KIND");
23384   for Library_Name use "ConfTest";
23385   for Object_Dir use ".";
23386   for Library_ALI_Dir use External("LIBRARY_DIR");
23387   for Library_Version use External ("SONAME");
23388   for Library_Kind use Kind;
23389   for Library_Dir use External("BUILD_DIR");
23390   Source_Dir := External ("SOURCE_DIR");
23391   for Source_Dirs use (Source_Dir);
23392 end Library;
23393 CF_EOF
23394                         cat >>confpackage.ads <<CF_EOF
23395 package ConfPackage is
23396    procedure conftest;
23397 end ConfPackage;
23398 CF_EOF
23399                         cat >>confpackage.adb <<CF_EOF
23400 with Text_IO;
23401 package body ConfPackage is
23402    procedure conftest is
23403    begin
23404       Text_IO.Put ("Hello World");
23405       Text_IO.New_Line;
23406    end conftest;
23407 end ConfPackage;
23408 CF_EOF
23409                         if ( $cf_ada_make $ADAFLAGS \
23410                                         -Plibrary.gpr \
23411                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23412                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23413                                         -XSOURCE_DIR=`pwd` \
23414                                         -XSONAME=libConfTest.so.1 \
23415                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23416                                 cf_gnat_projects=yes
23417                         fi
23418                         cd ..
23419                 fi
23420                 if test -f conftest.lib/confpackage.ali
23421                 then
23422                         cf_gnat_libraries=yes
23423                 fi
23424                 rm -rf conftest* *~conftest*
23425                 ;;
23426         esac
23427         ;;
23428 esac
23429 echo "$as_me:23429: result: $cf_gnat_projects" >&5
23430 echo "${ECHO_T}$cf_gnat_projects" >&6
23431 fi # enable_gnat_projects
23432
23433 if test $cf_gnat_projects = yes
23434 then
23435         echo "$as_me:23435: checking if GNAT supports libraries" >&5
23436 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23437         echo "$as_me:23437: result: $cf_gnat_libraries" >&5
23438 echo "${ECHO_T}$cf_gnat_libraries" >&6
23439 fi
23440
23441 if test "$cf_gnat_projects" = yes
23442 then
23443         USE_OLD_MAKERULES="#"
23444         USE_GNAT_PROJECTS=""
23445 else
23446         USE_OLD_MAKERULES=""
23447         USE_GNAT_PROJECTS="#"
23448 fi
23449
23450 if test "$cf_gnat_libraries" = yes
23451 then
23452         USE_GNAT_LIBRARIES=""
23453 else
23454         USE_GNAT_LIBRARIES="#"
23455 fi
23456
23457 echo "$as_me:23457: checking for ada-compiler" >&5
23458 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23459
23460 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23461 if test "${with_ada_compiler+set}" = set; then
23462   withval="$with_ada_compiler"
23463   cf_ada_compiler=$withval
23464 else
23465   cf_ada_compiler=gnatmake
23466 fi;
23467
23468 echo "$as_me:23468: result: $cf_ada_compiler" >&5
23469 echo "${ECHO_T}$cf_ada_compiler" >&6
23470
23471                         cf_ada_package=terminal_interface
23472
23473 echo "$as_me:23473: checking for ada-include" >&5
23474 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23475
23476 # Check whether --with-ada-include or --without-ada-include was given.
23477 if test "${with_ada_include+set}" = set; then
23478   withval="$with_ada_include"
23479
23480 else
23481   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23482 fi; if test -n "$prefix/share/ada/adainclude" ; then
23483
23484 if test "x$prefix" != xNONE; then
23485         cf_path_syntax="$prefix"
23486 else
23487         cf_path_syntax="$ac_default_prefix"
23488 fi
23489
23490 case ".$withval" in
23491 (.\$\(*\)*|.\'*\'*)
23492         ;;
23493 (..|./*|.\\*)
23494         ;;
23495 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23496         ;;
23497 (.\${*prefix}*|.\${*dir}*)
23498         eval withval="$withval"
23499         case ".$withval" in
23500         (.NONE/*)
23501                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23502                 ;;
23503         esac
23504         ;;
23505 (.no|.NONE/*)
23506         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23507         ;;
23508 (*)
23509         { { echo "$as_me:23509: error: expected a pathname, not \"$withval\"" >&5
23510 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23511    { (exit 1); exit 1; }; }
23512         ;;
23513 esac
23514
23515 fi
23516 eval ADA_INCLUDE="$withval"
23517
23518 echo "$as_me:23518: result: $ADA_INCLUDE" >&5
23519 echo "${ECHO_T}$ADA_INCLUDE" >&6
23520
23521 echo "$as_me:23521: checking for ada-objects" >&5
23522 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23523
23524 # Check whether --with-ada-objects or --without-ada-objects was given.
23525 if test "${with_ada_objects+set}" = set; then
23526   withval="$with_ada_objects"
23527
23528 else
23529   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23530 fi; if test -n "$prefix/lib/ada/adalib" ; then
23531
23532 if test "x$prefix" != xNONE; then
23533         cf_path_syntax="$prefix"
23534 else
23535         cf_path_syntax="$ac_default_prefix"
23536 fi
23537
23538 case ".$withval" in
23539 (.\$\(*\)*|.\'*\'*)
23540         ;;
23541 (..|./*|.\\*)
23542         ;;
23543 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23544         ;;
23545 (.\${*prefix}*|.\${*dir}*)
23546         eval withval="$withval"
23547         case ".$withval" in
23548         (.NONE/*)
23549                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23550                 ;;
23551         esac
23552         ;;
23553 (.no|.NONE/*)
23554         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23555         ;;
23556 (*)
23557         { { echo "$as_me:23557: error: expected a pathname, not \"$withval\"" >&5
23558 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23559    { (exit 1); exit 1; }; }
23560         ;;
23561 esac
23562
23563 fi
23564 eval ADA_OBJECTS="$withval"
23565
23566 echo "$as_me:23566: result: $ADA_OBJECTS" >&5
23567 echo "${ECHO_T}$ADA_OBJECTS" >&6
23568
23569 echo "$as_me:23569: checking if an Ada95 shared-library should be built" >&5
23570 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23571
23572 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23573 if test "${with_ada_sharedlib+set}" = set; then
23574   withval="$with_ada_sharedlib"
23575   with_ada_sharedlib=$withval
23576 else
23577   with_ada_sharedlib=no
23578 fi;
23579 echo "$as_me:23579: result: $with_ada_sharedlib" >&5
23580 echo "${ECHO_T}$with_ada_sharedlib" >&6
23581
23582 if test "x$with_ada_sharedlib" != xno
23583 then
23584         if test "x$cf_gnat_projects" != xyes
23585         then
23586                 { echo "$as_me:23586: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23587 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23588                 with_ada_sharedlib=no
23589         fi
23590 fi
23591
23592 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23593 MAKE_ADA_SHAREDLIB="#"
23594
23595 if test "x$with_ada_sharedlib" != xno
23596 then
23597         MAKE_ADA_SHAREDLIB=
23598         if test "x$with_ada_sharedlib" != xyes
23599         then
23600                 ADA_SHAREDLIB="$with_ada_sharedlib"
23601         fi
23602 fi
23603
23604                 fi
23605         fi
23606 else
23607         cf_with_ada=no
23608 fi
23609
23610 # do this "late" to avoid conflict with header-checks
23611 if test "x$with_widec" = xyes ; then
23612         echo "$as_me:23612: checking for wchar_t" >&5
23613 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23614 if test "${ac_cv_type_wchar_t+set}" = set; then
23615   echo $ECHO_N "(cached) $ECHO_C" >&6
23616 else
23617   cat >conftest.$ac_ext <<_ACEOF
23618 #line 23618 "configure"
23619 #include "confdefs.h"
23620 $ac_includes_default
23621 int
23622 main (void)
23623 {
23624 if ((wchar_t *) 0)
23625   return 0;
23626 if (sizeof (wchar_t))
23627   return 0;
23628   ;
23629   return 0;
23630 }
23631 _ACEOF
23632 rm -f conftest.$ac_objext
23633 if { (eval echo "$as_me:23633: \"$ac_compile\"") >&5
23634   (eval $ac_compile) 2>&5
23635   ac_status=$?
23636   echo "$as_me:23636: \$? = $ac_status" >&5
23637   (exit $ac_status); } &&
23638          { ac_try='test -s conftest.$ac_objext'
23639   { (eval echo "$as_me:23639: \"$ac_try\"") >&5
23640   (eval $ac_try) 2>&5
23641   ac_status=$?
23642   echo "$as_me:23642: \$? = $ac_status" >&5
23643   (exit $ac_status); }; }; then
23644   ac_cv_type_wchar_t=yes
23645 else
23646   echo "$as_me: failed program was:" >&5
23647 cat conftest.$ac_ext >&5
23648 ac_cv_type_wchar_t=no
23649 fi
23650 rm -f conftest.$ac_objext conftest.$ac_ext
23651 fi
23652 echo "$as_me:23652: result: $ac_cv_type_wchar_t" >&5
23653 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23654
23655 echo "$as_me:23655: checking size of wchar_t" >&5
23656 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23657 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23658   echo $ECHO_N "(cached) $ECHO_C" >&6
23659 else
23660   if test "$ac_cv_type_wchar_t" = yes; then
23661   if test "$cross_compiling" = yes; then
23662   # Depending upon the size, compute the lo and hi bounds.
23663 cat >conftest.$ac_ext <<_ACEOF
23664 #line 23664 "configure"
23665 #include "confdefs.h"
23666 $ac_includes_default
23667 int
23668 main (void)
23669 {
23670 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23671   ;
23672   return 0;
23673 }
23674 _ACEOF
23675 rm -f conftest.$ac_objext
23676 if { (eval echo "$as_me:23676: \"$ac_compile\"") >&5
23677   (eval $ac_compile) 2>&5
23678   ac_status=$?
23679   echo "$as_me:23679: \$? = $ac_status" >&5
23680   (exit $ac_status); } &&
23681          { ac_try='test -s conftest.$ac_objext'
23682   { (eval echo "$as_me:23682: \"$ac_try\"") >&5
23683   (eval $ac_try) 2>&5
23684   ac_status=$?
23685   echo "$as_me:23685: \$? = $ac_status" >&5
23686   (exit $ac_status); }; }; then
23687   ac_lo=0 ac_mid=0
23688   while :; do
23689     cat >conftest.$ac_ext <<_ACEOF
23690 #line 23690 "configure"
23691 #include "confdefs.h"
23692 $ac_includes_default
23693 int
23694 main (void)
23695 {
23696 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23697   ;
23698   return 0;
23699 }
23700 _ACEOF
23701 rm -f conftest.$ac_objext
23702 if { (eval echo "$as_me:23702: \"$ac_compile\"") >&5
23703   (eval $ac_compile) 2>&5
23704   ac_status=$?
23705   echo "$as_me:23705: \$? = $ac_status" >&5
23706   (exit $ac_status); } &&
23707          { ac_try='test -s conftest.$ac_objext'
23708   { (eval echo "$as_me:23708: \"$ac_try\"") >&5
23709   (eval $ac_try) 2>&5
23710   ac_status=$?
23711   echo "$as_me:23711: \$? = $ac_status" >&5
23712   (exit $ac_status); }; }; then
23713   ac_hi=$ac_mid; break
23714 else
23715   echo "$as_me: failed program was:" >&5
23716 cat conftest.$ac_ext >&5
23717 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23718 fi
23719 rm -f conftest.$ac_objext conftest.$ac_ext
23720   done
23721 else
23722   echo "$as_me: failed program was:" >&5
23723 cat conftest.$ac_ext >&5
23724 ac_hi=-1 ac_mid=-1
23725   while :; do
23726     cat >conftest.$ac_ext <<_ACEOF
23727 #line 23727 "configure"
23728 #include "confdefs.h"
23729 $ac_includes_default
23730 int
23731 main (void)
23732 {
23733 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23734   ;
23735   return 0;
23736 }
23737 _ACEOF
23738 rm -f conftest.$ac_objext
23739 if { (eval echo "$as_me:23739: \"$ac_compile\"") >&5
23740   (eval $ac_compile) 2>&5
23741   ac_status=$?
23742   echo "$as_me:23742: \$? = $ac_status" >&5
23743   (exit $ac_status); } &&
23744          { ac_try='test -s conftest.$ac_objext'
23745   { (eval echo "$as_me:23745: \"$ac_try\"") >&5
23746   (eval $ac_try) 2>&5
23747   ac_status=$?
23748   echo "$as_me:23748: \$? = $ac_status" >&5
23749   (exit $ac_status); }; }; then
23750   ac_lo=$ac_mid; break
23751 else
23752   echo "$as_me: failed program was:" >&5
23753 cat conftest.$ac_ext >&5
23754 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23755 fi
23756 rm -f conftest.$ac_objext conftest.$ac_ext
23757   done
23758 fi
23759 rm -f conftest.$ac_objext conftest.$ac_ext
23760 # Binary search between lo and hi bounds.
23761 while test "x$ac_lo" != "x$ac_hi"; do
23762   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23763   cat >conftest.$ac_ext <<_ACEOF
23764 #line 23764 "configure"
23765 #include "confdefs.h"
23766 $ac_includes_default
23767 int
23768 main (void)
23769 {
23770 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23771   ;
23772   return 0;
23773 }
23774 _ACEOF
23775 rm -f conftest.$ac_objext
23776 if { (eval echo "$as_me:23776: \"$ac_compile\"") >&5
23777   (eval $ac_compile) 2>&5
23778   ac_status=$?
23779   echo "$as_me:23779: \$? = $ac_status" >&5
23780   (exit $ac_status); } &&
23781          { ac_try='test -s conftest.$ac_objext'
23782   { (eval echo "$as_me:23782: \"$ac_try\"") >&5
23783   (eval $ac_try) 2>&5
23784   ac_status=$?
23785   echo "$as_me:23785: \$? = $ac_status" >&5
23786   (exit $ac_status); }; }; then
23787   ac_hi=$ac_mid
23788 else
23789   echo "$as_me: failed program was:" >&5
23790 cat conftest.$ac_ext >&5
23791 ac_lo=`expr $ac_mid + 1`
23792 fi
23793 rm -f conftest.$ac_objext conftest.$ac_ext
23794 done
23795 ac_cv_sizeof_wchar_t=$ac_lo
23796 else
23797   if test "$cross_compiling" = yes; then
23798   { { echo "$as_me:23798: error: cannot run test program while cross compiling" >&5
23799 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23800    { (exit 1); exit 1; }; }
23801 else
23802   cat >conftest.$ac_ext <<_ACEOF
23803 #line 23803 "configure"
23804 #include "confdefs.h"
23805 $ac_includes_default
23806 int
23807 main (void)
23808 {
23809 FILE *f = fopen ("conftest.val", "w");
23810 if (!f)
23811   $ac_main_return (1);
23812 fprintf (f, "%d", (sizeof (wchar_t)));
23813 fclose (f);
23814   ;
23815   return 0;
23816 }
23817 _ACEOF
23818 rm -f conftest$ac_exeext
23819 if { (eval echo "$as_me:23819: \"$ac_link\"") >&5
23820   (eval $ac_link) 2>&5
23821   ac_status=$?
23822   echo "$as_me:23822: \$? = $ac_status" >&5
23823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23824   { (eval echo "$as_me:23824: \"$ac_try\"") >&5
23825   (eval $ac_try) 2>&5
23826   ac_status=$?
23827   echo "$as_me:23827: \$? = $ac_status" >&5
23828   (exit $ac_status); }; }; then
23829   ac_cv_sizeof_wchar_t=`cat conftest.val`
23830 else
23831   echo "$as_me: program exited with status $ac_status" >&5
23832 echo "$as_me: failed program was:" >&5
23833 cat conftest.$ac_ext >&5
23834 fi
23835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23836 fi
23837 fi
23838 rm -f conftest.val
23839 else
23840   ac_cv_sizeof_wchar_t=0
23841 fi
23842 fi
23843 echo "$as_me:23843: result: $ac_cv_sizeof_wchar_t" >&5
23844 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23845 cat >>confdefs.h <<EOF
23846 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23847 EOF
23848
23849 fi
23850
23851 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23852 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23853 ###
23854 ### ticlib modules may be a separate library, otherwise contained in termlib.
23855 ### termlib modules may be a separate library, otherwise contained in ncurses.
23856 ###
23857 ### The of "+" or " " between the tokens controls the way the script
23858 ### chooses to split module lists into libraries.
23859 ###
23860 ### (see CF_LIB_RULES).
23861 echo "$as_me:23861: checking for library subsets" >&5
23862 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23863 LIB_SUBSETS=
23864
23865 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23866         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23867         if test "$with_ticlib" != no ; then
23868                 LIB_SUBSETS="${LIB_SUBSETS} "
23869         else
23870                 LIB_SUBSETS="${LIB_SUBSETS}+"
23871         fi
23872 fi
23873
23874 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23875 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23876
23877 if test "$with_termlib" != no ; then
23878         LIB_SUBSETS="${LIB_SUBSETS} "
23879 else
23880         LIB_SUBSETS="${LIB_SUBSETS}+"
23881 fi
23882
23883 LIB_SUBSETS="${LIB_SUBSETS}base"
23884
23885 # Most term-driver calls are to tinfo, but some like init_pair are to the
23886 # base library (so it resides in base).
23887 if test "$with_term_driver" != no ; then
23888         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23889         case $cf_cv_system_name in
23890         (*mingw32*|*mingw64*)
23891                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23892                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23893                 ;;
23894         (*)
23895                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23896                 ;;
23897         esac
23898 fi
23899
23900 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23901 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23902
23903 echo "$as_me:23903: result: $LIB_SUBSETS" >&5
23904 echo "${ECHO_T}$LIB_SUBSETS" >&6
23905
23906 ### Construct the list of include-directories to be generated
23907
23908 if test "$srcdir" != "."; then
23909         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23910 fi
23911 CPPFLAGS="-I../include $CPPFLAGS"
23912 if test "$srcdir" != "."; then
23913         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23914 fi
23915 CPPFLAGS="-I. $CPPFLAGS"
23916
23917 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23918 if test "$srcdir" != "."; then
23919         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23920 fi
23921 if test "$GCC" != yes; then
23922         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23923 elif test "$includedir" != "/usr/include"; then
23924         if test "$includedir" = '${prefix}/include' ; then
23925                 if test x$prefix != x/usr ; then
23926                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23927                 fi
23928         else
23929                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23930         fi
23931 fi
23932
23933 ### Build up pieces for makefile rules
23934 echo "$as_me:23934: checking default library suffix" >&5
23935 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23936
23937         case $DFT_LWR_MODEL in
23938         (libtool) DFT_ARG_SUFFIX=''   ;;
23939         (normal)  DFT_ARG_SUFFIX=''   ;;
23940         (debug)   DFT_ARG_SUFFIX='_g' ;;
23941         (profile) DFT_ARG_SUFFIX='_p' ;;
23942         (shared)  DFT_ARG_SUFFIX=''   ;;
23943         esac
23944         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23945 echo "$as_me:23945: result: $DFT_ARG_SUFFIX" >&5
23946 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23947
23948 echo "$as_me:23948: checking default library-dependency suffix" >&5
23949 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23950
23951         case X$DFT_LWR_MODEL in
23952         (Xlibtool)
23953                 DFT_LIB_SUFFIX='.la'
23954                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23955                 ;;
23956         (Xdebug)
23957                 DFT_LIB_SUFFIX='_g.a'
23958                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23959                 ;;
23960         (Xprofile)
23961                 DFT_LIB_SUFFIX='_p.a'
23962                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23963                 ;;
23964         (Xshared)
23965                 case $cf_cv_system_name in
23966                 (aix[5-7]*)
23967                         DFT_LIB_SUFFIX='.so'
23968                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23969                         ;;
23970                 (cygwin*|msys*|mingw*)
23971                         DFT_LIB_SUFFIX='.dll'
23972                         DFT_DEP_SUFFIX='.dll.a'
23973                         ;;
23974                 (darwin*)
23975                         DFT_LIB_SUFFIX='.dylib'
23976                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23977                         ;;
23978                 (hpux*)
23979                         case $target in
23980                         (ia64*)
23981                                 DFT_LIB_SUFFIX='.so'
23982                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23983                                 ;;
23984                         (*)
23985                                 DFT_LIB_SUFFIX='.sl'
23986                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23987                                 ;;
23988                         esac
23989                         ;;
23990                 (*)
23991                         DFT_LIB_SUFFIX='.so'
23992                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23993                         ;;
23994                 esac
23995                 ;;
23996         (*)
23997                 DFT_LIB_SUFFIX='.a'
23998                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23999                 ;;
24000         esac
24001         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24002         then
24003                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
24004                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
24005         fi
24006 echo "$as_me:24006: result: $DFT_DEP_SUFFIX" >&5
24007 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
24008
24009 echo "$as_me:24009: checking default object directory" >&5
24010 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
24011
24012         case $DFT_LWR_MODEL in
24013         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
24014         (normal)  DFT_OBJ_SUBDIR='objects' ;;
24015         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
24016         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
24017         (shared)
24018                 case $cf_cv_system_name in
24019                 (cygwin|msys)
24020                         DFT_OBJ_SUBDIR='objects' ;;
24021                 (*)
24022                         DFT_OBJ_SUBDIR='obj_s' ;;
24023                 esac
24024         esac
24025 echo "$as_me:24025: result: $DFT_OBJ_SUBDIR" >&5
24026 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
24027
24028 if test "x$cf_with_cxx" = xyes ; then
24029 echo "$as_me:24029: checking c++ library-dependency suffix" >&5
24030 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
24031 if test "$with_libtool" != "no"; then
24032         # libtool thinks it can make c++ shared libraries (perhaps only g++)
24033         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24034 elif test "$with_shared_cxx" != "no"; then
24035         # also for g++ users...
24036         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24037 else
24038         # we normally make a static library because C/C++ library rules differ
24039
24040         case Xnormal in
24041         (Xlibtool)
24042                 CXX_LIB_SUFFIX='.la'
24043                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24044                 ;;
24045         (Xdebug)
24046                 CXX_LIB_SUFFIX='_g.a'
24047                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24048                 ;;
24049         (Xprofile)
24050                 CXX_LIB_SUFFIX='_p.a'
24051                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24052                 ;;
24053         (Xshared)
24054                 case $cf_cv_system_name in
24055                 (aix[5-7]*)
24056                         CXX_LIB_SUFFIX='.so'
24057                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24058                         ;;
24059                 (cygwin*|msys*|mingw*)
24060                         CXX_LIB_SUFFIX='.dll'
24061                         CXX_DEP_SUFFIX='.dll.a'
24062                         ;;
24063                 (darwin*)
24064                         CXX_LIB_SUFFIX='.dylib'
24065                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24066                         ;;
24067                 (hpux*)
24068                         case $target in
24069                         (ia64*)
24070                                 CXX_LIB_SUFFIX='.so'
24071                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24072                                 ;;
24073                         (*)
24074                                 CXX_LIB_SUFFIX='.sl'
24075                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24076                                 ;;
24077                         esac
24078                         ;;
24079                 (*)
24080                         CXX_LIB_SUFFIX='.so'
24081                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24082                         ;;
24083                 esac
24084                 ;;
24085         (*)
24086                 CXX_LIB_SUFFIX='.a'
24087                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24088                 ;;
24089         esac
24090         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24091         then
24092                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24093                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24094         fi
24095
24096 fi
24097 echo "$as_me:24097: result: $CXX_LIB_SUFFIX" >&5
24098 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24099
24100 fi
24101
24102 # do not want -ldl in build except as needed for -lncurses dependency
24103 if test "x$with_dlsym" = xyes ; then
24104 if test $DFT_LWR_MODEL = shared || \
24105    test $DFT_LWR_MODEL = libtool ; then
24106
24107 # remove dl library from $LIBS
24108 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24109
24110 fi
24111 fi
24112 ### Set up low-level terminfo dependencies for makefiles.
24113
24114 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24115 # do not need libdl
24116 TICS_LIST=
24117 if test "x$with_dlsym" = xyes ; then
24118
24119 # remove dl library from $SHLIB_LIST
24120 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24121
24122 fi
24123
24124 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24125 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24126 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24127 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24128 then
24129         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24130 fi
24131
24132 if test "$with_ticlib" != no ; then
24133
24134         if test "x$with_ticlib" != xyes ; then
24135                 TICS_NAME=$with_ticlib
24136                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24137                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24138                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24139                 TICS_LIB_SUFFIX="${with_ticlib}"
24140         else
24141                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24142                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24143                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24144                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24145         fi
24146         TICS_LDFLAGS="-L${LIB_DIR}"
24147         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24148 else
24149         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24150         TICS_LDFLAGS="-L${LIB_DIR}"
24151         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24152 fi
24153
24154 if test "$with_termlib" != no ; then
24155
24156         if test "x$with_termlib" != xyes ; then
24157                 TINFO_NAME=$with_termlib
24158                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24159                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24160                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24161                 TINFO_LIB_SUFFIX="${with_termlib}"
24162         else
24163                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24164                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24165                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24166                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24167         fi
24168
24169         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24170         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24171         if test "$DFT_LWR_MODEL" = "libtool"; then
24172                 TEST_ARGS="${TEST_DEPS}"
24173                 TEST_ARG2="${TEST_DEP2}"
24174                 TINFO_LDFLAGS="-L${LIB_DIR}"
24175                 TINFO_LIBS="$TEST_ARGS"
24176                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24177                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24178         else
24179                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24180                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24181                 if test "x$with_term_driver" != xno ; then
24182                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24183                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24184                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24185                 else
24186                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24187                         TINFO_LIBS="$TEST_ARGS"
24188                 fi
24189                 TINFO_LDFLAGS="-L${LIB_DIR}"
24190                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24191         fi
24192 else
24193         # the next lines are needed for linking libtic over libncurses
24194         TINFO_NAME=${LIB_NAME}
24195         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24196         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24197         if test "x$with_tic_depends" = xyes ; then
24198                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24199         else
24200                 TICS_LIST="$SHLIB_LIST"
24201         fi
24202
24203         TINFO_LDFLAGS="-L${LIB_DIR}"
24204         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24205 fi
24206
24207 if test "$DFT_LWR_MODEL" = shared ; then
24208         case $cf_cv_system_name in
24209         (cygwin*|msys*)
24210                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24211                 TINFO_SUFFIX=.dll
24212                 ;;
24213         esac
24214 fi
24215
24216 if test "x$with_dlsym" = xyes ; then
24217
24218 # remove dl library from $TICS_LIST
24219 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24220
24221 fi
24222
24223 if test "$DFT_LWR_MODEL" = "libtool"; then
24224         OBJEXT=lo
24225 fi
24226
24227 # needed for Ada95
24228 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24229
24230 case $DFT_LWR_MODEL in
24231 (normal|debug|profile)
24232
24233 if test "$GCC" = yes ; then
24234         case $cf_cv_system_name in
24235         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24236                 LDFLAGS_STATIC=
24237                 LDFLAGS_SHARED=
24238                 ;;
24239         (*)     # normally, except when broken
24240                 LDFLAGS_STATIC=-static
24241                 LDFLAGS_SHARED=-dynamic
24242                 ;;
24243         esac
24244 else
24245         case $cf_cv_system_name in
24246         (aix[4-7]*)     # from ld manpage
24247                 LDFLAGS_STATIC=-bstatic
24248                 LDFLAGS_SHARED=-bdynamic
24249                 ;;
24250         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24251                 # We could also use just "archive" and "shared".
24252                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24253                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24254                 ;;
24255         (irix*)         # from ld manpage IRIX64
24256                 LDFLAGS_STATIC=-Bstatic
24257                 LDFLAGS_SHARED=-Bdynamic
24258                 ;;
24259         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24260                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24261                 LDFLAGS_STATIC=-noso
24262                 LDFLAGS_SHARED=-so_archive
24263                 ;;
24264         (solaris2*)
24265                 LDFLAGS_STATIC=-Bstatic
24266                 LDFLAGS_SHARED=-Bdynamic
24267                 ;;
24268         esac
24269 fi
24270
24271 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24272 then
24273         echo "$as_me:24273: checking if linker supports switching between static/dynamic" >&5
24274 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24275
24276         rm -f libconftest.a
24277         cat >conftest.$ac_ext <<EOF
24278 #line 24278 "configure"
24279 #include <stdio.h>
24280 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24281 EOF
24282         if { (eval echo "$as_me:24282: \"$ac_compile\"") >&5
24283   (eval $ac_compile) 2>&5
24284   ac_status=$?
24285   echo "$as_me:24285: \$? = $ac_status" >&5
24286   (exit $ac_status); } ; then
24287                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24288                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24289         fi
24290         rm -f conftest.*
24291
24292         cf_save_LIBS="$LIBS"
24293
24294         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24295         cat >conftest.$ac_ext <<_ACEOF
24296 #line 24296 "configure"
24297 #include "confdefs.h"
24298
24299 #line 24299 "configure"
24300 #include <stdio.h>
24301 int cf_ldflags_static(FILE *fp);
24302
24303 int
24304 main (void)
24305 {
24306
24307         return cf_ldflags_static(stdin);
24308
24309   ;
24310   return 0;
24311 }
24312 _ACEOF
24313 rm -f conftest.$ac_objext conftest$ac_exeext
24314 if { (eval echo "$as_me:24314: \"$ac_link\"") >&5
24315   (eval $ac_link) 2>&5
24316   ac_status=$?
24317   echo "$as_me:24317: \$? = $ac_status" >&5
24318   (exit $ac_status); } &&
24319          { ac_try='test -s conftest$ac_exeext'
24320   { (eval echo "$as_me:24320: \"$ac_try\"") >&5
24321   (eval $ac_try) 2>&5
24322   ac_status=$?
24323   echo "$as_me:24323: \$? = $ac_status" >&5
24324   (exit $ac_status); }; }; then
24325
24326         # some linkers simply ignore the -dynamic
24327         case x`file conftest$ac_exeext 2>/dev/null` in
24328         (*static*)
24329                 cf_ldflags_static=no
24330                 ;;
24331         (*)
24332                 cf_ldflags_static=yes
24333                 ;;
24334         esac
24335
24336 else
24337   echo "$as_me: failed program was:" >&5
24338 cat conftest.$ac_ext >&5
24339 cf_ldflags_static=no
24340 fi
24341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24342
24343         rm -f libconftest.*
24344         LIBS="$cf_save_LIBS"
24345
24346         echo "$as_me:24346: result: $cf_ldflags_static" >&5
24347 echo "${ECHO_T}$cf_ldflags_static" >&6
24348
24349         if test $cf_ldflags_static != yes
24350         then
24351                 LDFLAGS_STATIC=
24352                 LDFLAGS_SHARED=
24353         fi
24354 else
24355         LDFLAGS_STATIC=
24356         LDFLAGS_SHARED=
24357 fi
24358
24359         ;;
24360 esac
24361
24362 echo "$as_me:24362: checking where we will install curses.h" >&5
24363 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24364
24365 includesubdir=
24366 if test "$with_overwrite" = no && \
24367  ( test "x$includedir" = 'x${prefix}/include' || \
24368    test "x$includedir" = "x${prefix}/include" )
24369 then
24370         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24371 fi
24372 echo "$as_me:24372: result: ${includedir}${includesubdir}" >&5
24373 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24374
24375 ### Resolve a conflict between normal and wide-curses by forcing applications
24376 ### that will need libutf8 to add it to their configure script.
24377 if test "$with_overwrite" != no ; then
24378 if test "$NCURSES_LIBUTF8" = 1 ; then
24379         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24380         { echo "$as_me:24380: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24381 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24382 fi
24383 fi
24384 WITH_OVERWRITE=$with_overwrite
24385
24386 # used to separate tack out of the tree
24387 NCURSES_TREE=
24388
24389 ### predefined stuff for the test programs
24390
24391 cat >>confdefs.h <<\EOF
24392 #define HAVE_SLK_COLOR 1
24393 EOF
24394
24395 ### Construct the list of subdirectories for which we'll customize makefiles
24396 ### with the appropriate compile-rules.
24397
24398 echo "$as_me:24398: checking for src modules" >&5
24399 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24400
24401 # dependencies and linker-arguments for test-programs
24402 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24403 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24404 if test "$DFT_LWR_MODEL" = "libtool"; then
24405         TEST_ARGS="${TEST_DEPS}"
24406         TEST_ARG2="${TEST_DEP2}"
24407 else
24408         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24409         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24410 fi
24411
24412 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24413 cf_cv_src_modules=
24414 for cf_dir in $modules_to_build
24415 do
24416         if test -f $srcdir/$cf_dir/modules; then
24417
24418                 # We may/may not have tack in the distribution, though the
24419                 # makefile is.
24420                 if test $cf_dir = tack ; then
24421                         if test "x$cf_with_tack" != "xyes"; then
24422                                 continue
24423                         fi
24424                 fi
24425
24426                 if test -z "$cf_cv_src_modules"; then
24427                         cf_cv_src_modules=$cf_dir
24428                 else
24429                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24430                 fi
24431
24432                 # Make the ncurses_cfg.h file record the library interface files as
24433                 # well.  These are header files that are the same name as their
24434                 # directory.  Ncurses is the only library that does not follow
24435                 # that pattern.
24436                 if test $cf_dir = tack ; then
24437                         continue
24438                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24439
24440 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24441
24442                         cat >>confdefs.h <<EOF
24443 #define HAVE_${cf_have_include}_H 1
24444 EOF
24445
24446                         cat >>confdefs.h <<EOF
24447 #define HAVE_LIB${cf_have_include} 1
24448 EOF
24449
24450                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24451                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24452                         if test "$DFT_LWR_MODEL" = "libtool"; then
24453                                 TEST_ARGS="${TEST_DEPS}"
24454                                 TEST_ARG2="${TEST_DEP2}"
24455                         else
24456                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24457                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24458                         fi
24459                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24460                 fi
24461         fi
24462 done
24463 echo "$as_me:24463: result: $cf_cv_src_modules" >&5
24464 echo "${ECHO_T}$cf_cv_src_modules" >&6
24465
24466 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24467 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24468
24469 SRC_SUBDIRS=
24470 if test "x$cf_with_manpages" != xno ; then
24471         SRC_SUBDIRS="$SRC_SUBDIRS man"
24472 fi
24473 SRC_SUBDIRS="$SRC_SUBDIRS include"
24474 for cf_dir in $cf_cv_src_modules
24475 do
24476         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24477 done
24478 if test "x$cf_with_tests" != "xno" ; then
24479         SRC_SUBDIRS="$SRC_SUBDIRS test"
24480 fi
24481 # always make this, to install the ncurses-config script
24482 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24483 if test "$cf_with_cxx_binding" != no; then
24484         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24485         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24486 fi
24487
24488 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24489 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24490
24491 ADA_SUBDIRS=
24492 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24493         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24494         ADA_SUBDIRS="gen src"
24495         if test "x$cf_with_tests" != "xno" ; then
24496                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24497         fi
24498 fi
24499
24500 SUB_MAKEFILES=
24501 for cf_dir in $SRC_SUBDIRS
24502 do
24503         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24504 done
24505
24506 if test -n "$ADA_SUBDIRS"; then
24507         for cf_dir in $ADA_SUBDIRS
24508         do
24509                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24510         done
24511
24512 fi
24513
24514 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24515    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24516    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24517 fi
24518
24519 DIRS_TO_MAKE="lib"
24520 for cf_item in $cf_list_models
24521 do
24522
24523         case $cf_item in
24524         (libtool) cf_subdir='obj_lo'  ;;
24525         (normal)  cf_subdir='objects' ;;
24526         (debug)   cf_subdir='obj_g' ;;
24527         (profile) cf_subdir='obj_p' ;;
24528         (shared)
24529                 case $cf_cv_system_name in
24530                 (cygwin|msys)
24531                         cf_subdir='objects' ;;
24532                 (*)
24533                         cf_subdir='obj_s' ;;
24534                 esac
24535         esac
24536
24537         for cf_item2 in $DIRS_TO_MAKE
24538         do
24539                 test $cf_item2 = $cf_subdir && break
24540         done
24541         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24542 done
24543 for cf_dir in $DIRS_TO_MAKE
24544 do
24545         test ! -d $cf_dir && mkdir $cf_dir
24546 done
24547
24548 # symbols that differ when compiling Ada95 by itself.
24549 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24550
24551 # values to use as strings
24552
24553 cat >>confdefs.h <<EOF
24554 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24555 EOF
24556
24557 cat >>confdefs.h <<EOF
24558 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24559 EOF
24560
24561 ### Now that we're done running tests, add the compiler-warnings, if any
24562
24563 cf_fix_cppflags=no
24564 cf_new_cflags=
24565 cf_new_cppflags=
24566 cf_new_extra_cppflags=
24567
24568 for cf_add_cflags in $EXTRA_CFLAGS
24569 do
24570 case $cf_fix_cppflags in
24571 (no)
24572         case $cf_add_cflags in
24573         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24574                 case $cf_add_cflags in
24575                 (-D*)
24576                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24577
24578                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24579                                 && test -z "${cf_tst_cflags}" \
24580                                 && cf_fix_cppflags=yes
24581
24582                         if test $cf_fix_cppflags = yes ; then
24583
24584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24586
24587                                 continue
24588                         elif test "${cf_tst_cflags}" = "\"'" ; then
24589
24590         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24591         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24592
24593                                 continue
24594                         fi
24595                         ;;
24596                 esac
24597                 case "$CPPFLAGS" in
24598                 (*$cf_add_cflags)
24599                         ;;
24600                 (*)
24601                         case $cf_add_cflags in
24602                         (-D*)
24603                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24604
24605 CPPFLAGS=`echo "$CPPFLAGS" | \
24606         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24607                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24608
24609                                 ;;
24610                         esac
24611
24612         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24613         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24614
24615                         ;;
24616                 esac
24617                 ;;
24618         (*)
24619
24620         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24621         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24622
24623                 ;;
24624         esac
24625         ;;
24626 (yes)
24627
24628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24630
24631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24632
24633         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24634                 && test -z "${cf_tst_cflags}" \
24635                 && cf_fix_cppflags=no
24636         ;;
24637 esac
24638 done
24639
24640 if test -n "$cf_new_cflags" ; then
24641
24642         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24643         CFLAGS="${CFLAGS}$cf_new_cflags"
24644
24645 fi
24646
24647 if test -n "$cf_new_cppflags" ; then
24648
24649         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24650         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24651
24652 fi
24653
24654 if test -n "$cf_new_extra_cppflags" ; then
24655
24656         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24657         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24658
24659 fi
24660
24661 ### Define substitutions for header files to avoid name-pollution
24662
24663 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24664         HAVE_TCGETATTR=1
24665 else
24666         HAVE_TCGETATTR=0
24667 fi
24668
24669 if test "x$ac_cv_header_stdint_h" = xyes ; then
24670         HAVE_STDINT_H=1
24671 else
24672         HAVE_STDINT_H=0
24673 fi
24674
24675 if test "x$ac_cv_header_termio_h" = xyes ; then
24676         HAVE_TERMIO_H=1
24677 else
24678         HAVE_TERMIO_H=0
24679 fi
24680
24681 if test "x$ac_cv_header_termios_h" = xyes ; then
24682         HAVE_TERMIOS_H=1
24683 else
24684         HAVE_TERMIOS_H=0
24685 fi
24686
24687 ################################################################################
24688 test "x$use_database" = xyes && \
24689 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24690
24691 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24692 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24693
24694 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24695 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24696 fi
24697
24698 # Extract the first word of "tic", so it can be a program name with args.
24699 set dummy tic; ac_word=$2
24700 echo "$as_me:24700: checking for $ac_word" >&5
24701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24702 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24703   echo $ECHO_N "(cached) $ECHO_C" >&6
24704 else
24705   case $TIC_PATH in
24706   [\\/]* | ?:[\\/]*)
24707   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24708   ;;
24709   *)
24710   ac_save_IFS=$IFS; IFS=$ac_path_separator
24711 ac_dummy="$PATH:/usr/local/ncurses/bin"
24712 for ac_dir in $ac_dummy; do
24713   IFS=$ac_save_IFS
24714   test -z "$ac_dir" && ac_dir=.
24715   if $as_executable_p "$ac_dir/$ac_word"; then
24716    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24717    echo "$as_me:24717: found $ac_dir/$ac_word" >&5
24718    break
24719 fi
24720 done
24721
24722   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24723   ;;
24724 esac
24725 fi
24726 TIC_PATH=$ac_cv_path_TIC_PATH
24727
24728 if test -n "$TIC_PATH"; then
24729   echo "$as_me:24729: result: $TIC_PATH" >&5
24730 echo "${ECHO_T}$TIC_PATH" >&6
24731 else
24732   echo "$as_me:24732: result: no" >&5
24733 echo "${ECHO_T}no" >&6
24734 fi
24735
24736 if test -n "$FALLBACK_LIST"
24737 then
24738         if test "$TIC_PATH" = unknown
24739         then
24740                 { echo "$as_me:24740: WARNING: no tic program found for fallbacks" >&5
24741 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24742         fi
24743 fi
24744
24745 if test "x$cf_with_tests" != xno ; then
24746         MAKE_TESTS=
24747 else
24748         MAKE_TESTS="#"
24749 fi
24750
24751 ADAHTML_DIR=../../doc/html/ada
24752
24753 # these could be configurable, but are not currently
24754 PANEL_NAME=panel
24755 MENU_NAME=menu
24756 FORM_NAME=form
24757 CXX_NAME=ncurses++
24758
24759 # workaround for OS/2 (20151017)
24760 case $cf_cv_system_name in
24761 (os2*)
24762         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24763         ;;
24764 (*)
24765         LIBTOOL_OPTS_CXX=
24766         ;;
24767 esac
24768
24769 # workaround for g++ versus Solaris (20131116)
24770 case $cf_cv_system_name in
24771 (solaris2*)
24772         case "x$CPPFLAGS" in
24773         (*-D_XOPEN_SOURCE_EXTENDED*)
24774                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24775
24776 echo "${as_me:-configure}:24776: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24777
24778                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24779                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24780                 ;;
24781         esac
24782         ;;
24783 esac
24784
24785 # Help to automatically enable the extended curses features when using either
24786 # the *-config or the ".pc" files by adding defines.
24787 echo "$as_me:24787: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24788 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24789 PKG_CFLAGS=
24790 for cf_loop1 in $CPPFLAGS_after_XOPEN
24791 do
24792         cf_found=no
24793         for cf_loop2 in $CPPFLAGS_before_XOPEN
24794         do
24795                 if test "x$cf_loop1" = "x$cf_loop2"
24796                 then
24797                         cf_found=yes
24798                         break
24799                 fi
24800         done
24801         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24802 done
24803 echo "$as_me:24803: result: $PKG_CFLAGS" >&5
24804 echo "${ECHO_T}$PKG_CFLAGS" >&6
24805
24806 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24807 case "x$NCURSES_OSPEED" in
24808 (*short*)
24809         cf_compatible=1
24810         ;;
24811 (*)
24812         cf_compatible=0
24813         ;;
24814 esac
24815
24816 cat >>confdefs.h <<EOF
24817 #define NCURSES_OSPEED_COMPAT $cf_compatible
24818 EOF
24819
24820 case "x$cf_cv_typeof_chtype" in
24821 (xshort|xint|xlong)
24822         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24823         ;;
24824 esac
24825
24826 case "x$cf_cv_typeof_mmask_t" in
24827 (xshort|xint|xlong)
24828         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24829         ;;
24830 esac
24831
24832 # substitute into misc/Makefile to suppress
24833 # (un)install.data from the
24834 # (un)install rules.
24835 if test "x$cf_with_db_install" = "xno"; then
24836         MISC_INSTALL_DATA=
24837         MISC_UNINSTALL_DATA=
24838 else
24839         MISC_INSTALL_DATA=install.data
24840         MISC_UNINSTALL_DATA=uninstall.data
24841 fi
24842
24843 SUB_SCRIPTS=
24844
24845 if test -n "$PACKAGE"
24846 then
24847         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24848         export PACKAGE
24849         echo "package: $PACKAGE"
24850 fi
24851
24852 UNALTERED_SYMS=
24853 cf_filter_syms=no
24854
24855 if test -n "$RESULTING_SYMS"
24856 then
24857         cf_filter_syms=$cf_dft_filter_syms
24858         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24859
24860 echo "${as_me:-configure}:24860: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24861
24862 fi
24863
24864 if test "x$WILDCARD_SYMS" = xno
24865 then
24866         cf_filter_syms=yes
24867 fi
24868
24869 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24870
24871 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24872 if test $cf_filter_syms = yes
24873 then
24874         RESULTING_SYMS=resulting.map
24875 fi
24876
24877 if test "x$cross_compiling" = xyes ; then
24878         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24879         CHECK_BUILD="#"
24880 else
24881         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24882         CHECK_BUILD=
24883 fi
24884
24885 cat >>confdefs.h <<\EOF
24886 #define HAVE_CURSES_DATA_BOOLNAMES 1
24887 EOF
24888
24889 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"
24890 ac_config_commands="$ac_config_commands default"
24891 cat >confcache <<\_ACEOF
24892 # This file is a shell script that caches the results of configure
24893 # tests run on this system so they can be shared between configure
24894 # scripts and configure runs, see configure's option --config-cache.
24895 # It is not useful on other systems.  If it contains results you don't
24896 # want to keep, you may remove or edit it.
24897 #
24898 # config.status only pays attention to the cache file if you give it
24899 # the --recheck option to rerun configure.
24900 #
24901 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24902 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24903 # following values.
24904
24905 _ACEOF
24906
24907 # The following way of writing the cache mishandles newlines in values,
24908 # but we know of no workaround that is simple, portable, and efficient.
24909 # So, don't put newlines in cache variables' values.
24910 # Ultrix sh set writes to stderr and can't be redirected directly,
24911 # and sets the high bit in the cache file unless we assign to the vars.
24912 {
24913   (set) 2>&1 |
24914     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24915     *ac_space=\ *)
24916       # `set' does not quote correctly, so add quotes (double-quote
24917       # substitution turns \\\\ into \\, and sed turns \\ into \).
24918       sed -n \
24919         "s/'/'\\\\''/g;
24920           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24921       ;;
24922     *)
24923       # `set' quotes correctly as required by POSIX, so do not add quotes.
24924       sed -n \
24925         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24926       ;;
24927     esac;
24928 } |
24929   sed '
24930      t clear
24931      : clear
24932      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24933      t end
24934      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24935      : end' >>confcache
24936 if cmp -s $cache_file confcache; then :; else
24937   if test -w $cache_file; then
24938     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24939     cat confcache >$cache_file
24940   else
24941     echo "not updating unwritable cache $cache_file"
24942   fi
24943 fi
24944 rm -f confcache
24945
24946 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24947 # Let make expand exec_prefix.
24948 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24949
24950 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24951 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24952 # trailing colons and then remove the whole line if VPATH becomes empty
24953 # (actually we leave an empty line to preserve line numbers).
24954 if test "x$srcdir" = x.; then
24955   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24956 s/:*\$(srcdir):*/:/;
24957 s/:*\${srcdir}:*/:/;
24958 s/:*@srcdir@:*/:/;
24959 s/^\([^=]*=[    ]*\):*/\1/;
24960 s/:*$//;
24961 s/^[^=]*=[      ]*$//;
24962 }'
24963 fi
24964
24965 DEFS=-DHAVE_CONFIG_H
24966
24967 : ${CONFIG_STATUS=./config.status}
24968 ac_clean_files_save=$ac_clean_files
24969 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24970 { echo "$as_me:24970: creating $CONFIG_STATUS" >&5
24971 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24972 cat >$CONFIG_STATUS <<_ACEOF
24973 #! $SHELL
24974 # Generated automatically by configure.
24975 # Run this file to recreate the current configuration.
24976 # Compiler output produced by configure, useful for debugging
24977 # configure, is in config.log if it exists.
24978
24979 debug=false
24980 SHELL=\${CONFIG_SHELL-$SHELL}
24981 ac_cs_invocation="\$0 \$@"
24982
24983 _ACEOF
24984
24985 cat >>$CONFIG_STATUS <<\_ACEOF
24986 # Be Bourne compatible
24987 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24988   emulate sh
24989   NULLCMD=:
24990 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24991   set -o posix
24992 fi
24993
24994 # Name of the executable.
24995 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24996
24997 if expr a : '\(a\)' >/dev/null 2>&1; then
24998   as_expr=expr
24999 else
25000   as_expr=false
25001 fi
25002
25003 rm -f conf$$ conf$$.exe conf$$.file
25004 echo >conf$$.file
25005 if ln -s conf$$.file conf$$ 2>/dev/null; then
25006   # We could just check for DJGPP; but this test a) works b) is more generic
25007   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25008   if test -f conf$$.exe; then
25009     # Don't use ln at all; we don't have any links
25010     as_ln_s='cp -p'
25011   else
25012     as_ln_s='ln -s'
25013   fi
25014 elif ln conf$$.file conf$$ 2>/dev/null; then
25015   as_ln_s=ln
25016 else
25017   as_ln_s='cp -p'
25018 fi
25019 rm -f conf$$ conf$$.exe conf$$.file
25020
25021 as_executable_p="test -f"
25022
25023 # Support unset when possible.
25024 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25025   as_unset=unset
25026 else
25027   as_unset=false
25028 fi
25029
25030 # NLS nuisances.
25031 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25032 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25033 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25034 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25035 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25036 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25037 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25038 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25039
25040 # IFS
25041 # We need space, tab and new line, in precisely that order.
25042 as_nl='
25043 '
25044 IFS="   $as_nl"
25045
25046 # CDPATH.
25047 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25048
25049 exec 6>&1
25050
25051 _ACEOF
25052
25053 # Files that config.status was made for.
25054 if test -n "$ac_config_files"; then
25055   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25056 fi
25057
25058 if test -n "$ac_config_headers"; then
25059   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25060 fi
25061
25062 if test -n "$ac_config_links"; then
25063   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25064 fi
25065
25066 if test -n "$ac_config_commands"; then
25067   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25068 fi
25069
25070 cat >>$CONFIG_STATUS <<\EOF
25071
25072 ac_cs_usage="\
25073 \`$as_me' instantiates files from templates according to the
25074 current configuration.
25075
25076 Usage: $0 [OPTIONS] [FILE]...
25077
25078   -h, --help       print this help, then exit
25079   -V, --version    print version number, then exit
25080   -d, --debug      don't remove temporary files
25081       --recheck    update $as_me by reconfiguring in the same conditions
25082   --file=FILE[:TEMPLATE]
25083                    instantiate the configuration file FILE
25084   --header=FILE[:TEMPLATE]
25085                    instantiate the configuration header FILE
25086
25087 Configuration files:
25088 $config_files
25089
25090 Configuration headers:
25091 $config_headers
25092
25093 Configuration commands:
25094 $config_commands
25095
25096 Report bugs to <dickey@invisible-island.net>."
25097 EOF
25098
25099 cat >>$CONFIG_STATUS <<EOF
25100 ac_cs_version="\\
25101 config.status
25102 configured by $0, generated by GNU Autoconf 2.52.20181006,
25103   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25104
25105 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25106 Free Software Foundation, Inc.
25107 This config.status script is free software; the Free Software Foundation
25108 gives unlimited permission to copy, distribute and modify it."
25109 srcdir=$srcdir
25110 INSTALL="$INSTALL"
25111 EOF
25112
25113 cat >>$CONFIG_STATUS <<\EOF
25114 # If no file are specified by the user, then we need to provide default
25115 # value.  By we need to know if files were specified by the user.
25116 ac_need_defaults=:
25117 while test $# != 0
25118 do
25119   case $1 in
25120   --*=*)
25121     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25122     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25123     shift
25124     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25125     shift
25126     ;;
25127   -*);;
25128   *) # This is not an option, so the user has probably given explicit
25129      # arguments.
25130      ac_need_defaults=false;;
25131   esac
25132
25133   case $1 in
25134   # Handling of the options.
25135 EOF
25136 cat >>$CONFIG_STATUS <<EOF
25137   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25138     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25139     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25140 EOF
25141 cat >>$CONFIG_STATUS <<\EOF
25142   --version | --vers* | -V )
25143     echo "$ac_cs_version"; exit 0 ;;
25144   --he | --h)
25145     # Conflict between --help and --header
25146     { { echo "$as_me:25146: error: ambiguous option: $1
25147 Try \`$0 --help' for more information." >&5
25148 echo "$as_me: error: ambiguous option: $1
25149 Try \`$0 --help' for more information." >&2;}
25150    { (exit 1); exit 1; }; };;
25151   --help | --hel | -h )
25152     echo "$ac_cs_usage"; exit 0 ;;
25153   --debug | --d* | -d )
25154     debug=: ;;
25155   --file | --fil | --fi | --f )
25156     shift
25157     CONFIG_FILES="$CONFIG_FILES $1"
25158     ac_need_defaults=false;;
25159   --header | --heade | --head | --hea )
25160     shift
25161     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25162     ac_need_defaults=false;;
25163
25164   # This is an error.
25165   -*) { { echo "$as_me:25165: error: unrecognized option: $1
25166 Try \`$0 --help' for more information." >&5
25167 echo "$as_me: error: unrecognized option: $1
25168 Try \`$0 --help' for more information." >&2;}
25169    { (exit 1); exit 1; }; } ;;
25170
25171   *) ac_config_targets="$ac_config_targets $1" ;;
25172
25173   esac
25174   shift
25175 done
25176
25177 exec 5>>config.log
25178 cat >&5 << _ACEOF
25179
25180 ## ----------------------- ##
25181 ## Running config.status.  ##
25182 ## ----------------------- ##
25183
25184 This file was extended by $as_me 2.52.20181006, executed with
25185   CONFIG_FILES    = $CONFIG_FILES
25186   CONFIG_HEADERS  = $CONFIG_HEADERS
25187   CONFIG_LINKS    = $CONFIG_LINKS
25188   CONFIG_COMMANDS = $CONFIG_COMMANDS
25189   > $ac_cs_invocation
25190 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25191
25192 _ACEOF
25193 EOF
25194
25195 cat >>$CONFIG_STATUS <<EOF
25196 #
25197 # INIT-COMMANDS section.
25198 #
25199
25200 ### Special initialization commands, used to pass information from the
25201 ### configuration-run into config.status
25202
25203 AWK="$AWK"
25204 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25205 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25206 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25207 ECHO_LD="$ECHO_LD"
25208 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25209 LDCONFIG="$LDCONFIG"
25210 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25211 LIB_NAME="$LIB_NAME"
25212 LIB_PREFIX="$LIB_PREFIX"
25213 LIB_SUBSETS="$LIB_SUBSETS"
25214 LIB_SUFFIX="$LIB_SUFFIX"
25215 LIB_TRACING="$LIB_TRACING"
25216 LN_S="$LN_S"
25217 MAKE_TERMINFO="$MAKE_TERMINFO"
25218 NCURSES_MAJOR="$NCURSES_MAJOR"
25219 NCURSES_MINOR="$NCURSES_MINOR"
25220 NCURSES_OSPEED="$NCURSES_OSPEED"
25221 NCURSES_PATCH="$NCURSES_PATCH"
25222 SRC_SUBDIRS="$SRC_SUBDIRS"
25223 TERMINFO="$TERMINFO"
25224 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25225 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25226 TICS_NAME="$TICS_NAME"
25227 TICS_SUFFIX="$TICS_SUFFIX"
25228 TIC_PATH="$TIC_PATH"
25229 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25230 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25231 TINFO_NAME="$TINFO_NAME"
25232 TINFO_SUFFIX="$TINFO_SUFFIX"
25233 UNALTERED_SYMS="$UNALTERED_SYMS"
25234 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25235 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25236 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25237 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25238 WILDCARD_SYMS="$WILDCARD_SYMS"
25239 WITH_CURSES_H="$with_curses_h"
25240 WITH_ECHO="${enable_echo:=yes}"
25241 WITH_OVERWRITE="$with_overwrite"
25242 cf_LIST_MODELS="$cf_list_models"
25243 cf_cv_abi_version="$cf_cv_abi_version"
25244 cf_cv_do_relink="$cf_cv_do_relink"
25245 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25246 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25247 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25248 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25249 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25250 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25251 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25252 cf_cv_rel_version="$cf_cv_rel_version"
25253 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25254 cf_cv_shared_soname='$cf_cv_shared_soname'
25255 cf_cv_shlib_version="$cf_cv_shlib_version"
25256 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25257 cf_cv_system_name="$cf_cv_system_name"
25258 cf_cv_term_driver="$with_term_driver"
25259 cf_with_ada="$cf_with_ada"
25260 cf_with_cxx_binding="$cf_with_cxx_binding"
25261 cf_with_db_install="$cf_with_db_install"
25262 cf_with_manpages="$cf_with_manpages"
25263 cf_with_tests="$cf_with_tests"
25264 host="$host"
25265 target="$target"
25266 with_shared_cxx="$with_shared_cxx"
25267
25268 EOF
25269
25270 cat >>$CONFIG_STATUS <<\EOF
25271 for ac_config_target in $ac_config_targets
25272 do
25273   case "$ac_config_target" in
25274   # Handling of arguments.
25275   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25276   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25277   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25278   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25279   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25280   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25281   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25282   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25283   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25284   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25285   *) { { echo "$as_me:25285: error: invalid argument: $ac_config_target" >&5
25286 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25287    { (exit 1); exit 1; }; };;
25288   esac
25289 done
25290
25291 # If the user did not use the arguments to specify the items to instantiate,
25292 # then the envvar interface is used.  Set only those that are not.
25293 # We use the long form for the default assignment because of an extremely
25294 # bizarre bug on SunOS 4.1.3.
25295 if $ac_need_defaults; then
25296   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25297   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25298   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25299 fi
25300
25301 # Create a temporary directory, and hook for its removal unless debugging.
25302 $debug ||
25303 {
25304   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25305   trap '{ (exit 1); exit 1; }' 1 2 13 15
25306 }
25307
25308 # Create a (secure) tmp directory for tmp files.
25309 : ${TMPDIR=/tmp}
25310 {
25311   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25312   test -n "$tmp" && test -d "$tmp"
25313 }  ||
25314 {
25315   tmp=$TMPDIR/cs$$-$RANDOM
25316   (umask 077 && mkdir $tmp)
25317 } ||
25318 {
25319    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25320    { (exit 1); exit 1; }
25321 }
25322
25323 EOF
25324
25325 cat >>$CONFIG_STATUS <<EOF
25326
25327 #
25328 # CONFIG_FILES section.
25329 #
25330
25331 # No need to generate the scripts if there are no CONFIG_FILES.
25332 # This happens for instance when ./config.status config.h
25333 if test -n "\$CONFIG_FILES"; then
25334   # Protect against being on the right side of a sed subst in config.status.
25335   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25336    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25337 s,@SHELL@,$SHELL,;t t
25338 s,@exec_prefix@,$exec_prefix,;t t
25339 s,@prefix@,$prefix,;t t
25340 s,@program_transform_name@,$program_transform_name,;t t
25341 s,@bindir@,$bindir,;t t
25342 s,@sbindir@,$sbindir,;t t
25343 s,@libexecdir@,$libexecdir,;t t
25344 s,@datarootdir@,$datarootdir,;t t
25345 s,@datadir@,$datadir,;t t
25346 s,@sysconfdir@,$sysconfdir,;t t
25347 s,@sharedstatedir@,$sharedstatedir,;t t
25348 s,@localstatedir@,$localstatedir,;t t
25349 s,@runstatedir@,$runstatedir,;t t
25350 s,@libdir@,$libdir,;t t
25351 s,@includedir@,$includedir,;t t
25352 s,@oldincludedir@,$oldincludedir,;t t
25353 s,@infodir@,$infodir,;t t
25354 s,@mandir@,$mandir,;t t
25355 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25356 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25357 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25358 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25359 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25360 s,@build_alias@,$build_alias,;t t
25361 s,@host_alias@,$host_alias,;t t
25362 s,@target_alias@,$target_alias,;t t
25363 s,@ECHO_C@,$ECHO_C,;t t
25364 s,@ECHO_N@,$ECHO_N,;t t
25365 s,@ECHO_T@,$ECHO_T,;t t
25366 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25367 s,@DEFS@,$DEFS,;t t
25368 s,@LIBS@,$LIBS,;t t
25369 s,@top_builddir@,$top_builddir,;t t
25370 s,@EGREP@,$EGREP,;t t
25371 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25372 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25373 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25374 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25375 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25376 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25377 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25378 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25379 s,@VERSION@,$VERSION,;t t
25380 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25381 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25382 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25383 s,@PACKAGE@,$PACKAGE,;t t
25384 s,@build@,$build,;t t
25385 s,@build_cpu@,$build_cpu,;t t
25386 s,@build_vendor@,$build_vendor,;t t
25387 s,@build_os@,$build_os,;t t
25388 s,@host@,$host,;t t
25389 s,@host_cpu@,$host_cpu,;t t
25390 s,@host_vendor@,$host_vendor,;t t
25391 s,@host_os@,$host_os,;t t
25392 s,@target@,$target,;t t
25393 s,@target_cpu@,$target_cpu,;t t
25394 s,@target_vendor@,$target_vendor,;t t
25395 s,@target_os@,$target_os,;t t
25396 s,@CC@,$CC,;t t
25397 s,@CFLAGS@,$CFLAGS,;t t
25398 s,@LDFLAGS@,$LDFLAGS,;t t
25399 s,@CPPFLAGS@,$CPPFLAGS,;t t
25400 s,@ac_ct_CC@,$ac_ct_CC,;t t
25401 s,@EXEEXT@,$EXEEXT,;t t
25402 s,@OBJEXT@,$OBJEXT,;t t
25403 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25404 s,@CPP@,$CPP,;t t
25405 s,@LDCONFIG@,$LDCONFIG,;t t
25406 s,@CXX@,$CXX,;t t
25407 s,@CXXFLAGS@,$CXXFLAGS,;t t
25408 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25409 s,@AWK@,$AWK,;t t
25410 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25411 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25412 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25413 s,@LINT@,$LINT,;t t
25414 s,@LINT_OPTS@,$LINT_OPTS,;t t
25415 s,@LN_S@,$LN_S,;t t
25416 s,@cf_config_suffix@,$cf_config_suffix,;t t
25417 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25418 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25419 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25420 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25421 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25422 s,@SET_MAKE@,$SET_MAKE,;t t
25423 s,@CTAGS@,$CTAGS,;t t
25424 s,@ETAGS@,$ETAGS,;t t
25425 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25426 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25427 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25428 s,@RANLIB@,$RANLIB,;t t
25429 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25430 s,@LD@,$LD,;t t
25431 s,@ac_ct_LD@,$ac_ct_LD,;t t
25432 s,@AR@,$AR,;t t
25433 s,@ac_ct_AR@,$ac_ct_AR,;t t
25434 s,@NM@,$NM,;t t
25435 s,@ac_ct_NM@,$ac_ct_NM,;t t
25436 s,@ARFLAGS@,$ARFLAGS,;t t
25437 s,@DESTDIR@,$DESTDIR,;t t
25438 s,@BUILD_CC@,$BUILD_CC,;t t
25439 s,@BUILD_CPP@,$BUILD_CPP,;t t
25440 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25441 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25442 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25443 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25444 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25445 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25446 s,@cf_list_models@,$cf_list_models,;t t
25447 s,@ABI_VERSION@,$ABI_VERSION,;t t
25448 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25449 s,@LIBTOOL@,$LIBTOOL,;t t
25450 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25451 s,@LT_UNDEF@,$LT_UNDEF,;t t
25452 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25453 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25454 s,@LIB_CREATE@,$LIB_CREATE,;t t
25455 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25456 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25457 s,@LIB_PREP@,$LIB_PREP,;t t
25458 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25459 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25460 s,@LIB_LINK@,$LIB_LINK,;t t
25461 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25462 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25463 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25464 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25465 s,@TICS_NAME@,$TICS_NAME,;t t
25466 s,@TINFO_NAME@,$TINFO_NAME,;t t
25467 s,@LIB_NAME@,$LIB_NAME,;t t
25468 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25469 s,@CC_G_OPT@,$CC_G_OPT,;t t
25470 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25471 s,@LD_MODEL@,$LD_MODEL,;t t
25472 s,@shlibdir@,$shlibdir,;t t
25473 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25474 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25475 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25476 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25477 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25478 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25479 s,@LINK_PROGS@,$LINK_PROGS,;t t
25480 s,@LINK_TESTS@,$LINK_TESTS,;t t
25481 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25482 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25483 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25484 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25485 s,@RPATH_LIST@,$RPATH_LIST,;t t
25486 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25487 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25488 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25489 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25490 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25491 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25492 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25493 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25494 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25495 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25496 s,@XTERM_KBS@,$XTERM_KBS,;t t
25497 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25498 s,@TERMINFO@,$TERMINFO,;t t
25499 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25500 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25501 s,@TERMPATH@,$TERMPATH,;t t
25502 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25503 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25504 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25505 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25506 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25507 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25508 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25509 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25510 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25511 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25512 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25513 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25514 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25515 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25516 s,@RGB_PATH@,$RGB_PATH,;t t
25517 s,@no_x11_rgb@,$no_x11_rgb,;t t
25518 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25519 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25520 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25521 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25522 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25523 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25524 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25525 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25526 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25527 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25528 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25529 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25530 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25531 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25532 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25533 s,@PTHREAD@,$PTHREAD,;t t
25534 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25535 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25536 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25537 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25538 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25539 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25540 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25541 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25542 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25543 s,@ECHO_LT@,$ECHO_LT,;t t
25544 s,@ECHO_LD@,$ECHO_LD,;t t
25545 s,@RULE_CC@,$RULE_CC,;t t
25546 s,@SHOW_CC@,$SHOW_CC,;t t
25547 s,@ECHO_CC@,$ECHO_CC,;t t
25548 s,@ECHO_LINK@,$ECHO_LINK,;t t
25549 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25550 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25551 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25552 s,@ADAFLAGS@,$ADAFLAGS,;t t
25553 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25554 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25555 s,@ADA_TRACE@,$ADA_TRACE,;t t
25556 s,@MATH_LIB@,$MATH_LIB,;t t
25557 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25558 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25559 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25560 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25561 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25562 s,@TEST_LIBS@,$TEST_LIBS,;t t
25563 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25564 s,@CXXCPP@,$CXXCPP,;t t
25565 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25566 s,@CXX_AR@,$CXX_AR,;t t
25567 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25568 s,@CXXLIBS@,$CXXLIBS,;t t
25569 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25570 s,@gnatmake_exists@,$gnatmake_exists,;t t
25571 s,@gprconfig_exists@,$gprconfig_exists,;t t
25572 s,@M4_exists@,$M4_exists,;t t
25573 s,@cf_ada_make@,$cf_ada_make,;t t
25574 s,@cf_ada_config@,$cf_ada_config,;t t
25575 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25576 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25577 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25578 s,@cf_compile_generics@,$cf_compile_generics,;t t
25579 s,@cf_generic_objects@,$cf_generic_objects,;t t
25580 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25581 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25582 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25583 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25584 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25585 s,@cf_ada_package@,$cf_ada_package,;t t
25586 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25587 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25588 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25589 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25590 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25591 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25592 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25593 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25594 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25595 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25596 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25597 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25598 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25599 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25600 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25601 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25602 s,@TICS_LIBS@,$TICS_LIBS,;t t
25603 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25604 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25605 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25606 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25607 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25608 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25609 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25610 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25611 s,@includesubdir@,$includesubdir,;t t
25612 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25613 s,@TICS_LIST@,$TICS_LIST,;t t
25614 s,@TINFO_LIST@,$TINFO_LIST,;t t
25615 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25616 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25617 s,@TEST_ARGS@,$TEST_ARGS,;t t
25618 s,@TEST_DEPS@,$TEST_DEPS,;t t
25619 s,@TEST_ARG2@,$TEST_ARG2,;t t
25620 s,@TEST_DEP2@,$TEST_DEP2,;t t
25621 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25622 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25623 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25624 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25625 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25626 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25627 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25628 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25629 s,@cross_compiling@,$cross_compiling,;t t
25630 s,@TIC_PATH@,$TIC_PATH,;t t
25631 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25632 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25633 s,@PANEL_NAME@,$PANEL_NAME,;t t
25634 s,@MENU_NAME@,$MENU_NAME,;t t
25635 s,@FORM_NAME@,$FORM_NAME,;t t
25636 s,@CXX_NAME@,$CXX_NAME,;t t
25637 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25638 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25639 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25640 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25641 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25642 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25643 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25644 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25645 CEOF
25646
25647 EOF
25648
25649   cat >>$CONFIG_STATUS <<\EOF
25650   # Split the substitutions into bite-sized pieces for seds with
25651   # small command number limits, like on Digital OSF/1 and HP-UX.
25652   ac_max_sed_lines=48
25653   ac_sed_frag=1 # Number of current file.
25654   ac_beg=1 # First line for current file.
25655   ac_end=$ac_max_sed_lines # Line after last line for current file.
25656   ac_more_lines=:
25657   ac_sed_cmds=
25658   while $ac_more_lines; do
25659     if test $ac_beg -gt 1; then
25660       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25661     else
25662       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25663     fi
25664     if test ! -s $tmp/subs.frag; then
25665       ac_more_lines=false
25666     else
25667       # The purpose of the label and of the branching condition is to
25668       # speed up the sed processing (if there are no `@' at all, there
25669       # is no need to browse any of the substitutions).
25670       # These are the two extra sed commands mentioned above.
25671       (echo ':t
25672   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25673       # It is possible to make a multiline substitution using escaped newlines.
25674       # Ensure that we do not split the substitution between script fragments.
25675       ac_BEG=$ac_end
25676       ac_END=`expr $ac_end + $ac_max_sed_lines`
25677       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25678       if test -s $tmp/subs.next; then
25679         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25680         if test ! -s $tmp/subs.edit; then
25681           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25682           if test ! -s $tmp/subs.edit; then
25683             if test $ac_beg -gt 1; then
25684               ac_end=`expr $ac_end - 1`
25685               continue
25686             fi
25687           fi
25688         fi
25689       fi
25690
25691       if test -z "$ac_sed_cmds"; then
25692         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25693       else
25694         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25695       fi
25696       ac_sed_frag=`expr $ac_sed_frag + 1`
25697       ac_beg=$ac_end
25698       ac_end=`expr $ac_end + $ac_max_sed_lines`
25699     fi
25700   done
25701   if test -z "$ac_sed_cmds"; then
25702     ac_sed_cmds=cat
25703   fi
25704 fi # test -n "$CONFIG_FILES"
25705
25706 EOF
25707 cat >>$CONFIG_STATUS <<\EOF
25708 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25709   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25710   case $ac_file in
25711   - | *:- | *:-:* ) # input from stdin
25712         cat >$tmp/stdin
25713         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25714         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25715   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25716         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25717   * )   ac_file_in=$ac_file.in ;;
25718   esac
25719
25720   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25721   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25722          X"$ac_file" : 'X\(//\)[^/]' \| \
25723          X"$ac_file" : 'X\(//\)$' \| \
25724          X"$ac_file" : 'X\(/\)' \| \
25725          .     : '\(.\)' 2>/dev/null ||
25726 echo X"$ac_file" |
25727     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25728           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25729           /^X\(\/\/\)$/{ s//\1/; q; }
25730           /^X\(\/\).*/{ s//\1/; q; }
25731           s/.*/./; q'`
25732   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25733     { case "$ac_dir" in
25734   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25735   *)                      as_incr_dir=.;;
25736 esac
25737 as_dummy="$ac_dir"
25738 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25739   case $as_mkdir_dir in
25740     # Skip DOS drivespec
25741     ?:) as_incr_dir=$as_mkdir_dir ;;
25742     *)
25743       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25744       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25745     ;;
25746   esac
25747 done; }
25748
25749     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25750     # A "../" for each directory in $ac_dir_suffix.
25751     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25752   else
25753     ac_dir_suffix= ac_dots=
25754   fi
25755
25756   case $srcdir in
25757   .)  ac_srcdir=.
25758       if test -z "$ac_dots"; then
25759          ac_top_srcdir=.
25760       else
25761          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25762       fi ;;
25763   [\\/]* | ?:[\\/]* )
25764       ac_srcdir=$srcdir$ac_dir_suffix;
25765       ac_top_srcdir=$srcdir ;;
25766   *) # Relative path.
25767     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25768     ac_top_srcdir=$ac_dots$srcdir ;;
25769   esac
25770
25771   case $INSTALL in
25772   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25773   *) ac_INSTALL=$ac_dots$INSTALL ;;
25774   esac
25775
25776   if test x"$ac_file" != x-; then
25777     { echo "$as_me:25777: creating $ac_file" >&5
25778 echo "$as_me: creating $ac_file" >&6;}
25779     rm -f "$ac_file"
25780   fi
25781   # Let's still pretend it is `configure' which instantiates (i.e., don't
25782   # use $as_me), people would be surprised to read:
25783   #    /* config.h.  Generated automatically by config.status.  */
25784   configure_input="Generated automatically from `echo $ac_file_in |
25785                                                  sed 's,.*/,,'` by configure."
25786
25787   # First look for the input files in the build tree, otherwise in the
25788   # src tree.
25789   ac_file_inputs=`IFS=:
25790     for f in $ac_file_in; do
25791       case $f in
25792       -) echo $tmp/stdin ;;
25793       [\\/$]*)
25794          # Absolute (can't be DOS-style, as IFS=:)
25795          test -f "$f" || { { echo "$as_me:25795: error: cannot find input file: $f" >&5
25796 echo "$as_me: error: cannot find input file: $f" >&2;}
25797    { (exit 1); exit 1; }; }
25798          echo $f;;
25799       *) # Relative
25800          if test -f "$f"; then
25801            # Build tree
25802            echo $f
25803          elif test -f "$srcdir/$f"; then
25804            # Source tree
25805            echo $srcdir/$f
25806          else
25807            # /dev/null tree
25808            { { echo "$as_me:25808: error: cannot find input file: $f" >&5
25809 echo "$as_me: error: cannot find input file: $f" >&2;}
25810    { (exit 1); exit 1; }; }
25811          fi;;
25812       esac
25813     done` || { (exit 1); exit 1; }
25814 EOF
25815 cat >>$CONFIG_STATUS <<\EOF
25816   ac_warn_datarootdir=no
25817   if test x"$ac_file" != x-; then
25818     for ac_item in $ac_file_inputs
25819     do
25820       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25821       if test -n "$ac_seen"; then
25822         ac_used=`grep '@datarootdir@' $ac_item`
25823         if test -z "$ac_used"; then
25824           { echo "$as_me:25824: WARNING: datarootdir was used implicitly but not set:
25825 $ac_seen" >&5
25826 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25827 $ac_seen" >&2;}
25828           ac_warn_datarootdir=yes
25829         fi
25830       fi
25831       ac_seen=`grep '${datarootdir}' $ac_item`
25832       if test -n "$ac_seen"; then
25833         { echo "$as_me:25833: WARNING: datarootdir was used explicitly but not set:
25834 $ac_seen" >&5
25835 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25836 $ac_seen" >&2;}
25837         ac_warn_datarootdir=yes
25838       fi
25839     done
25840   fi
25841
25842 if test "x$ac_warn_datarootdir" = xyes; then
25843   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25844 fi
25845
25846 EOF
25847 cat >>$CONFIG_STATUS <<EOF
25848   sed "$ac_vpsub
25849 $extrasub
25850 EOF
25851 cat >>$CONFIG_STATUS <<\EOF
25852 :t
25853 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25854 s,@configure_input@,$configure_input,;t t
25855 s,@srcdir@,$ac_srcdir,;t t
25856 s,@top_srcdir@,$ac_top_srcdir,;t t
25857 s,@INSTALL@,$ac_INSTALL,;t t
25858 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25859   rm -f $tmp/stdin
25860   if test x"$ac_file" != x-; then
25861     cp $tmp/out $ac_file
25862
25863     for ac_name in prefix exec_prefix datarootdir
25864     do
25865         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25866         if test -n "$ac_seen"; then
25867             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25868             if test -z "$ac_init"; then
25869               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25870               { echo "$as_me:25870: WARNING: Variable $ac_name is used but was not set:
25871 $ac_seen" >&5
25872 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25873 $ac_seen" >&2;}
25874             fi
25875         fi
25876     done
25877     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25878     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25879     if test -s $tmp/out; then
25880       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25881       { echo "$as_me:25881: WARNING: Some variables may not be substituted:
25882 $ac_seen" >&5
25883 echo "$as_me: WARNING: Some variables may not be substituted:
25884 $ac_seen" >&2;}
25885     fi
25886   else
25887     cat $tmp/out
25888   fi
25889   rm -f $tmp/out
25890
25891 done
25892 EOF
25893 cat >>$CONFIG_STATUS <<\EOF
25894
25895 #
25896 # CONFIG_HEADER section.
25897 #
25898
25899 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25900 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25901 #
25902 # ac_d sets the value in "#define NAME VALUE" lines.
25903 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25904 ac_dB='[        ].*$,\1#\2'
25905 ac_dC=' '
25906 ac_dD=',;t'
25907 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25908 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25909 ac_iB='\([      ]\),\1#\2define\3'
25910 ac_iC=' '
25911 ac_iD='\4,;t'
25912 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25913 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25914 ac_uB='$,\1#\2define\3'
25915 ac_uC=' '
25916 ac_uD=',;t'
25917
25918 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25919   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25920   case $ac_file in
25921   - | *:- | *:-:* ) # input from stdin
25922         cat >$tmp/stdin
25923         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25924         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25925   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25926         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25927   * )   ac_file_in=$ac_file.in ;;
25928   esac
25929
25930   test x"$ac_file" != x- && { echo "$as_me:25930: creating $ac_file" >&5
25931 echo "$as_me: creating $ac_file" >&6;}
25932
25933   # First look for the input files in the build tree, otherwise in the
25934   # src tree.
25935   ac_file_inputs=`IFS=:
25936     for f in $ac_file_in; do
25937       case $f in
25938       -) echo $tmp/stdin ;;
25939       [\\/$]*)
25940          # Absolute (can't be DOS-style, as IFS=:)
25941          test -f "$f" || { { echo "$as_me:25941: error: cannot find input file: $f" >&5
25942 echo "$as_me: error: cannot find input file: $f" >&2;}
25943    { (exit 1); exit 1; }; }
25944          echo $f;;
25945       *) # Relative
25946          if test -f "$f"; then
25947            # Build tree
25948            echo $f
25949          elif test -f "$srcdir/$f"; then
25950            # Source tree
25951            echo $srcdir/$f
25952          else
25953            # /dev/null tree
25954            { { echo "$as_me:25954: error: cannot find input file: $f" >&5
25955 echo "$as_me: error: cannot find input file: $f" >&2;}
25956    { (exit 1); exit 1; }; }
25957          fi;;
25958       esac
25959     done` || { (exit 1); exit 1; }
25960   # Remove the trailing spaces.
25961   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25962
25963 EOF
25964
25965 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25966 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25967 # be either 'cat' or 'sort'.
25968 cat confdefs.h | uniq >conftest.vals
25969
25970 # Break up conftest.vals because some shells have a limit on
25971 # the size of here documents, and old seds have small limits too.
25972
25973 rm -f conftest.tail
25974 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25975 while grep . conftest.vals >/dev/null
25976 do
25977   # Write chunks of a limited-size here document to conftest.frag.
25978   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25979   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25980   echo 'CEOF' >> $CONFIG_STATUS
25981   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25982   rm -f conftest.vals
25983   mv conftest.tail conftest.vals
25984 done
25985 rm -f conftest.vals
25986
25987 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25988 # marker @DEFS@.
25989 echo '  cat >> conftest.edit <<CEOF
25990 /@DEFS@/r conftest.frag
25991 /@DEFS@/d
25992 CEOF
25993 sed -f conftest.edit $tmp/in > $tmp/out
25994 rm -f $tmp/in
25995 mv $tmp/out $tmp/in
25996 rm -f conftest.edit conftest.frag
25997 ' >> $CONFIG_STATUS
25998
25999 cat >>$CONFIG_STATUS <<\EOF
26000   # Let's still pretend it is `configure' which instantiates (i.e., don't
26001   # use $as_me), people would be surprised to read:
26002   #    /* config.h.  Generated automatically by config.status.  */
26003   if test x"$ac_file" = x-; then
26004     echo "/* Generated automatically by configure.  */" >$tmp/config.h
26005   else
26006     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
26007   fi
26008   cat $tmp/in >>$tmp/config.h
26009   rm -f $tmp/in
26010   if test x"$ac_file" != x-; then
26011     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
26012       { echo "$as_me:26012: $ac_file is unchanged" >&5
26013 echo "$as_me: $ac_file is unchanged" >&6;}
26014     else
26015       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26016          X"$ac_file" : 'X\(//\)[^/]' \| \
26017          X"$ac_file" : 'X\(//\)$' \| \
26018          X"$ac_file" : 'X\(/\)' \| \
26019          .     : '\(.\)' 2>/dev/null ||
26020 echo X"$ac_file" |
26021     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26022           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26023           /^X\(\/\/\)$/{ s//\1/; q; }
26024           /^X\(\/\).*/{ s//\1/; q; }
26025           s/.*/./; q'`
26026       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26027         { case "$ac_dir" in
26028   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26029   *)                      as_incr_dir=.;;
26030 esac
26031 as_dummy="$ac_dir"
26032 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26033   case $as_mkdir_dir in
26034     # Skip DOS drivespec
26035     ?:) as_incr_dir=$as_mkdir_dir ;;
26036     *)
26037       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26038       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26039     ;;
26040   esac
26041 done; }
26042
26043       fi
26044       rm -f $ac_file
26045       mv $tmp/config.h $ac_file
26046     fi
26047   else
26048     cat $tmp/config.h
26049     rm -f $tmp/config.h
26050   fi
26051 done
26052 EOF
26053 cat >>$CONFIG_STATUS <<\EOF
26054 #
26055 # CONFIG_COMMANDS section.
26056 #
26057 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26058   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26059   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26060
26061   case $ac_dest in
26062     default )
26063 if test "x$cf_with_tests" != xno ; then
26064
26065 for cf_dir in test
26066 do
26067         if test ! -d $srcdir/$cf_dir; then
26068                 continue
26069         elif test -f $srcdir/$cf_dir/programs; then
26070                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26071         fi
26072 done
26073
26074 fi
26075
26076 cf_prefix=$LIB_PREFIX
26077
26078 case $cf_cv_shlib_version in
26079 (cygdll|msysdll|mingw)
26080         TINFO_NAME=$TINFO_ARG_SUFFIX
26081         TINFO_SUFFIX=.dll
26082         ;;
26083 esac
26084
26085 if test -n "$TINFO_SUFFIX" ; then
26086         case $TINFO_SUFFIX in
26087         (tw*)
26088                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26089                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26090                 ;;
26091         (t*)
26092                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26093                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26094                 ;;
26095         (w*)
26096                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26097                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26098                 ;;
26099         esac
26100 fi
26101
26102 for cf_dir in $SRC_SUBDIRS
26103 do
26104         if test ! -d $srcdir/$cf_dir ; then
26105                 continue
26106         elif test -f $srcdir/$cf_dir/modules; then
26107
26108                 SHARED_LIB=
26109                 Libs_To_Make=
26110                 cf_awk_program=
26111                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26112                 then
26113                         cf_awk_program="$cf_awk_program\
26114 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26115 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26116 "
26117                 fi
26118
26119                 if test "x$WILDCARD_SYMS" = xno
26120                 then
26121                         cf_awk_program="$cf_awk_program\
26122 /[      ]_\\*;/ { skip=1; next; }\
26123 "
26124                 fi
26125
26126                 if test "x$cf_awk_program" != "x"
26127                 then
26128                         cat >>$cf_dir/Makefile <<CF_EOF
26129
26130 # Generated by CF_LIB_RULES
26131 resulting.map: $UNALTERED_SYMS
26132         $AWK 'BEGIN { skip = 1; last=""; } \
26133 $cf_awk_program \
26134 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26135  skip = 0; last = \$\$0; } \
26136 END { print last; }' < $UNALTERED_SYMS >\$@
26137
26138 distclean::
26139         rm -f resulting.map
26140 CF_EOF
26141                 fi
26142
26143                 for cf_item in $cf_LIST_MODELS
26144                 do
26145
26146         case X$cf_item in
26147         (Xlibtool)
26148                 cf_suffix='.la'
26149                 cf_depsuf=$cf_suffix
26150                 ;;
26151         (Xdebug)
26152                 cf_suffix='_g.a'
26153                 cf_depsuf=$cf_suffix
26154                 ;;
26155         (Xprofile)
26156                 cf_suffix='_p.a'
26157                 cf_depsuf=$cf_suffix
26158                 ;;
26159         (Xshared)
26160                 case $cf_cv_system_name in
26161                 (aix[5-7]*)
26162                         cf_suffix='.so'
26163                         cf_depsuf=$cf_suffix
26164                         ;;
26165                 (cygwin*|msys*|mingw*)
26166                         cf_suffix='.dll'
26167                         cf_depsuf='.dll.a'
26168                         ;;
26169                 (darwin*)
26170                         cf_suffix='.dylib'
26171                         cf_depsuf=$cf_suffix
26172                         ;;
26173                 (hpux*)
26174                         case $target in
26175                         (ia64*)
26176                                 cf_suffix='.so'
26177                                 cf_depsuf=$cf_suffix
26178                                 ;;
26179                         (*)
26180                                 cf_suffix='.sl'
26181                                 cf_depsuf=$cf_suffix
26182                                 ;;
26183                         esac
26184                         ;;
26185                 (*)
26186                         cf_suffix='.so'
26187                         cf_depsuf=$cf_suffix
26188                         ;;
26189                 esac
26190                 ;;
26191         (*)
26192                 cf_suffix='.a'
26193                 cf_depsuf=$cf_suffix
26194                 ;;
26195         esac
26196         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26197         then
26198                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26199                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26200         fi
26201
26202                         cf_libname=$cf_dir
26203                         test "$cf_dir" = c++ && cf_libname=ncurses++
26204                         if test $cf_item = shared ; then
26205                                 if test -n "${LIB_SUFFIX}"
26206                                 then
26207                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26208                                 else
26209                                         cf_shared_suffix="$cf_suffix"
26210                                 fi
26211                                 if test "$cf_cv_do_symlinks" = yes ; then
26212                                         cf_version_name=
26213
26214                                         case "$cf_cv_shlib_version" in
26215                                         (rel)
26216                                                 cf_version_name=REL_VERSION
26217                                                 ;;
26218                                         (abi)
26219                                                 cf_version_name=ABI_VERSION
26220                                                 ;;
26221                                         esac
26222
26223                                         if test -n "$cf_version_name"
26224                                         then
26225                                                 case "$cf_cv_system_name" in
26226                                                 (darwin*)
26227                                                         # "w", etc?
26228                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26229                                                         ;;
26230                                                 (*)
26231                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26232                                                         ;;
26233                                                 esac
26234                                         fi
26235                                         if test -n "${USE_LIB_SUFFIX}"
26236                                         then
26237                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26238                                         else
26239                                                 cf_shared_suffix="$cf_suffix"
26240                                         fi
26241                                 fi
26242                                 # cygwin needs import library, and has unique naming convention
26243                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26244                                 # use 'cyg' prefix for shared lib.
26245                                 case $cf_cv_shlib_version in
26246                                 (cygdll)
26247                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26248                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26249                                         ;;
26250                                 (msysdll)
26251                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26252                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26253                                         ;;
26254                                 (mingw)
26255                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26256                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26257                                         ;;
26258                                 (*)
26259                                         cf_add_lib=
26260                                         ;;
26261                                 esac
26262                                 if test -n "$cf_add_lib"
26263                                 then
26264                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26265                                         continue
26266                                 fi
26267                         fi
26268                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26269                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26270                 done
26271
26272                 if test $cf_dir = ncurses ; then
26273                         cf_subsets="$LIB_SUBSETS"
26274                         cf_r_parts="$cf_subsets"
26275                         cf_liblist="$Libs_To_Make"
26276
26277                         while test -n "$cf_r_parts"
26278                         do
26279                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26280                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26281                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26282                                         cf_add_lib=
26283                                         case $cf_l_parts in
26284                                         (*termlib*)
26285                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26286                                                 ;;
26287                                         (*ticlib*)
26288                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26289                                                 ;;
26290                                         (*)
26291                                                 break
26292                                                 ;;
26293                                         esac
26294                                         if test -n "$cf_add_lib"; then
26295                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26296                                         fi
26297                                 else
26298                                         break
26299                                 fi
26300                         done
26301                 else
26302                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26303                 fi
26304
26305                 if test $cf_dir = c++; then
26306                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26307                                 cf_list=
26308                                 for cf_item in $Libs_To_Make
26309                                 do
26310                                         case $cf_item in
26311                                         (*.a)
26312                                                 ;;
26313                                         (*)
26314                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26315                                                 ;;
26316                                         esac
26317                                         for cf_test in $cf_list
26318                                         do
26319                                                 if test "$cf_test" = "$cf_item"
26320                                                 then
26321                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26322                                                         cf_item=
26323                                                         break
26324                                                 fi
26325                                         done
26326                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26327                                 done
26328                                 Libs_To_Make="$cf_list"
26329                         fi
26330                 fi
26331
26332                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26333                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26334                         $cf_dir/Makefile >$cf_dir/Makefile.out
26335                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26336
26337                 $AWK -f $srcdir/mk-0th.awk \
26338                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26339                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26340
26341                 for cf_subset in $cf_subsets
26342                 do
26343                         cf_subdirs=
26344                         for cf_item in $cf_LIST_MODELS
26345                         do
26346
26347                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26348
26349 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26350
26351                         CXX_MODEL=$cf_ITEM
26352                         if test "$CXX_MODEL" = SHARED; then
26353                                 case $cf_cv_shlib_version in
26354                                 (cygdll|msysdll|mingw)
26355                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26356
26357 echo "${as_me:-configure}:26357: testing overriding CXX_MODEL to SHARED ..." 1>&5
26358
26359                                         with_shared_cxx=yes
26360                                         ;;
26361                                 (*)
26362                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26363                                         ;;
26364                                 esac
26365                         fi
26366
26367         case X$cf_item in
26368         (Xlibtool)
26369                 cf_suffix='.la'
26370                 cf_depsuf=$cf_suffix
26371                 ;;
26372         (Xdebug)
26373                 cf_suffix='_g.a'
26374                 cf_depsuf=$cf_suffix
26375                 ;;
26376         (Xprofile)
26377                 cf_suffix='_p.a'
26378                 cf_depsuf=$cf_suffix
26379                 ;;
26380         (Xshared)
26381                 case $cf_cv_system_name in
26382                 (aix[5-7]*)
26383                         cf_suffix='.so'
26384                         cf_depsuf=$cf_suffix
26385                         ;;
26386                 (cygwin*|msys*|mingw*)
26387                         cf_suffix='.dll'
26388                         cf_depsuf='.dll.a'
26389                         ;;
26390                 (darwin*)
26391                         cf_suffix='.dylib'
26392                         cf_depsuf=$cf_suffix
26393                         ;;
26394                 (hpux*)
26395                         case $target in
26396                         (ia64*)
26397                                 cf_suffix='.so'
26398                                 cf_depsuf=$cf_suffix
26399                                 ;;
26400                         (*)
26401                                 cf_suffix='.sl'
26402                                 cf_depsuf=$cf_suffix
26403                                 ;;
26404                         esac
26405                         ;;
26406                 (*)
26407                         cf_suffix='.so'
26408                         cf_depsuf=$cf_suffix
26409                         ;;
26410                 esac
26411                 ;;
26412         (*)
26413                 cf_suffix='.a'
26414                 cf_depsuf=$cf_suffix
26415                 ;;
26416         esac
26417         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26418         then
26419                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26420                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26421         fi
26422
26423         case $cf_item in
26424         (libtool) cf_subdir='obj_lo'  ;;
26425         (normal)  cf_subdir='objects' ;;
26426         (debug)   cf_subdir='obj_g' ;;
26427         (profile) cf_subdir='obj_p' ;;
26428         (shared)
26429                 case $cf_cv_system_name in
26430                 (cygwin|msys)
26431                         cf_subdir='objects' ;;
26432                 (*)
26433                         cf_subdir='obj_s' ;;
26434                 esac
26435         esac
26436
26437                         # Test for case where we build libtinfo with a different name.
26438                         cf_libname=$cf_dir
26439                         if test $cf_dir = ncurses ; then
26440                                 case $cf_subset in
26441                                 (*base*)
26442                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26443                                         ;;
26444                                 (*termlib*)
26445                                         cf_libname=$TINFO_LIB_SUFFIX
26446                                         ;;
26447                                 (ticlib*)
26448                                         cf_libname=$TICS_LIB_SUFFIX
26449                                         ;;
26450                                 esac
26451                         elif test $cf_dir = c++ ; then
26452                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26453                         else
26454                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26455                         fi
26456                         if test -n "${USE_ARG_SUFFIX}" ; then
26457                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26458                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26459                         fi
26460
26461                         # These dependencies really are for development, not
26462                         # builds, but they are useful in porting, too.
26463                         cf_depend="../include/ncurses_cfg.h"
26464                         if test "$srcdir" = "."; then
26465                                 cf_reldir="."
26466                         else
26467                                 cf_reldir="\${srcdir}"
26468                         fi
26469
26470                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26471                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26472                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26473                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26474                         fi
26475
26476                         cf_dir_suffix=
26477                         old_cf_suffix="$cf_suffix"
26478                         if test "$cf_cv_shlib_version_infix" = yes ; then
26479                         if test -n "$USE_LIB_SUFFIX" ; then
26480                                 case $USE_LIB_SUFFIX in
26481                                 (tw*)
26482                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26483                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26484                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26485                                         ;;
26486                                 (t*)
26487                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26488                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26489                                         cf_dir_suffix=t$EXTRA_SUFFIX
26490                                         ;;
26491                                 (w*)
26492                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26493                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26494                                         cf_dir_suffix=w$EXTRA_SUFFIX
26495                                         ;;
26496                                 (*)
26497                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26498                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26499                                         cf_dir_suffix=$EXTRA_SUFFIX
26500                                         ;;
26501                                 esac
26502                         fi
26503                         fi
26504
26505                         $AWK -f $srcdir/mk-1st.awk \
26506                                 name=${cf_libname}${cf_dir_suffix} \
26507                                 traces=$LIB_TRACING \
26508                                 MODEL=$cf_ITEM \
26509                                 CXX_MODEL=$CXX_MODEL \
26510                                 model=$cf_subdir \
26511                                 prefix=$cf_prefix \
26512                                 suffix=$cf_suffix \
26513                                 subset=$cf_subset \
26514                                 driver=$cf_cv_term_driver \
26515                                 SymLink="$LN_S" \
26516                                 TermlibRoot=$TINFO_NAME \
26517                                 TermlibSuffix=$TINFO_SUFFIX \
26518                                 ShlibVer=$cf_cv_shlib_version \
26519                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26520                                 ReLink=${cf_cv_do_relink:-no} \
26521                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26522                                 DoLinks=$cf_cv_do_symlinks \
26523                                 rmSoLocs=$cf_cv_rm_so_locs \
26524                                 ldconfig="$LDCONFIG" \
26525                                 overwrite=$WITH_OVERWRITE \
26526                                 depend="$cf_depend" \
26527                                 host="$host" \
26528                                 libtool_version="$LIBTOOL_VERSION" \
26529                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26530
26531                         cf_suffix="$old_cf_suffix"
26532
26533                         for cf_subdir2 in $cf_subdirs lib
26534                         do
26535                                 test $cf_subdir = $cf_subdir2 && break
26536                         done
26537                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26538                         $AWK -f $srcdir/mk-2nd.awk \
26539                                 name=$cf_dir \
26540                                 traces=$LIB_TRACING \
26541                                 MODEL=$cf_ITEM \
26542                                 model=$cf_subdir \
26543                                 subset=$cf_subset \
26544                                 srcdir=$srcdir \
26545                                 echo=$WITH_ECHO \
26546                                 crenames=$cf_cv_prog_CC_c_o \
26547                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26548                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26549                         cf_subdirs="$cf_subdirs $cf_subdir"
26550                         done
26551                 done
26552         fi
26553
26554         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26555 done
26556
26557 for cf_dir in $SRC_SUBDIRS
26558 do
26559         if test ! -d $srcdir/$cf_dir ; then
26560                 continue
26561         fi
26562
26563         if test -f $cf_dir/Makefile ; then
26564                 case "$cf_dir" in
26565                 (Ada95)
26566                         echo 'libs \' >> Makefile
26567                         echo 'install.libs \' >> Makefile
26568                         echo 'uninstall.libs ::' >> Makefile
26569                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26570                         ;;
26571                 esac
26572         fi
26573
26574         if test -f $srcdir/$cf_dir/modules; then
26575                 echo >> Makefile
26576                 if test -f $srcdir/$cf_dir/headers; then
26577 cat >> Makefile <<CF_EOF
26578 install.includes \\
26579 uninstall.includes \\
26580 CF_EOF
26581                 fi
26582 if test "$cf_dir" != "c++" ; then
26583 echo 'lint \' >> Makefile
26584 fi
26585 cat >> Makefile <<CF_EOF
26586 libs \\
26587 lintlib \\
26588 install.libs \\
26589 uninstall.libs \\
26590 install.$cf_dir \\
26591 uninstall.$cf_dir ::
26592         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26593 CF_EOF
26594         elif test -f $srcdir/$cf_dir/headers; then
26595 cat >> Makefile <<CF_EOF
26596
26597 libs \\
26598 install.libs \\
26599 uninstall.libs \\
26600 install.includes \\
26601 uninstall.includes ::
26602         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26603 CF_EOF
26604 fi
26605 done
26606
26607 if test "x$cf_with_db_install" = xyes; then
26608 cat >> Makefile <<CF_EOF
26609
26610 install.libs uninstall.libs \\
26611 install.data uninstall.data ::
26612 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26613 CF_EOF
26614 else
26615 cat >> Makefile <<CF_EOF
26616
26617 install.libs uninstall.libs ::
26618         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26619 CF_EOF
26620 fi
26621
26622 if test "x$cf_with_manpages" = xyes; then
26623 cat >> Makefile <<CF_EOF
26624
26625 install.man \\
26626 uninstall.man ::
26627         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26628 CF_EOF
26629 fi
26630
26631 cat >> Makefile <<CF_EOF
26632
26633 distclean ::
26634         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26635         rm -f headers.sh headers.sed mk_shared_lib.sh
26636         rm -f edit_man.* man_alias.*
26637         rm -rf \${DIRS_TO_MAKE}
26638 CF_EOF
26639
26640 # Special case: tack's manpage lives in its own directory.
26641 if test "x$cf_with_manpages" = xyes; then
26642 if test "x$cf_with_tack" = "xyes"; then
26643 cat >> Makefile <<CF_EOF
26644
26645 install.man \\
26646 uninstall.man ::
26647         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26648 CF_EOF
26649 fi
26650 fi
26651
26652 rm -f headers.sed headers.sh
26653
26654 echo creating headers.sh
26655 cat >headers.sh <<CF_EOF
26656 #! $SHELL
26657 # This shell script is generated by the 'configure' script.  It is invoked in a
26658 # subdirectory of the build tree.  It generates a sed-script in the parent
26659 # directory that is used to adjust includes for header files that reside in a
26660 # subdirectory of /usr/include, etc.
26661 PRG=""
26662 while test \$# != 3
26663 do
26664 PRG="\$PRG \$1"; shift
26665 done
26666 DST=\$1
26667 REF=\$2
26668 SRC=\$3
26669 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26670 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26671 echo installing \$SRC in \$DST
26672 CF_EOF
26673
26674 if test $WITH_CURSES_H = yes; then
26675         cat >>headers.sh <<CF_EOF
26676 case \$DST in
26677 (/*/include/*)
26678         END=\`basename \$DST\`
26679         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26680         do
26681                 NAME=\`basename \$i\`
26682                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26683         done
26684         ;;
26685 (*)
26686         echo "" >> \$TMPSED
26687         ;;
26688 esac
26689 CF_EOF
26690
26691 else
26692         cat >>headers.sh <<CF_EOF
26693 case \$DST in
26694 (/*/include/*)
26695         END=\`basename \$DST\`
26696         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26697         do
26698                 NAME=\`basename \$i\`
26699                 if test "\$NAME" = "curses.h"
26700                 then
26701                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26702                         NAME=ncurses.h
26703                 fi
26704                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26705         done
26706         ;;
26707 (*)
26708         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26709         ;;
26710 esac
26711 CF_EOF
26712 fi
26713 cat >>headers.sh <<CF_EOF
26714 rm -f \$TMPSRC
26715 sed -f \$TMPSED \$SRC > \$TMPSRC
26716 NAME=\`basename \$SRC\`
26717 CF_EOF
26718 if test $WITH_CURSES_H != yes; then
26719         cat >>headers.sh <<CF_EOF
26720 test "\$NAME" = "curses.h" && NAME=ncurses.h
26721 CF_EOF
26722 fi
26723 cat >>headers.sh <<CF_EOF
26724 # Just in case someone gzip'd manpages, remove the conflicting copy.
26725 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26726
26727 eval \$PRG \$TMPSRC \$DST/\$NAME
26728 rm -f \$TMPSRC \$TMPSED
26729 CF_EOF
26730
26731 chmod 0755 headers.sh
26732
26733 for cf_dir in $SRC_SUBDIRS
26734 do
26735         if test ! -d $srcdir/$cf_dir ; then
26736                 continue
26737         fi
26738
26739         if test -f $srcdir/$cf_dir/headers; then
26740                 $AWK -f $srcdir/mk-hdr.awk \
26741                         subset="$LIB_SUBSETS" \
26742                         compat="$WITH_CURSES_H" \
26743                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26744         fi
26745
26746         if test -f $srcdir/$cf_dir/modules; then
26747                 if test "$cf_dir" != "c++" ; then
26748                         cat >>$cf_dir/Makefile <<"CF_EOF"
26749 depend : ${AUTO_SRC}
26750         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26751
26752 # DO NOT DELETE THIS LINE -- make depend depends on it.
26753 CF_EOF
26754                 fi
26755         fi
26756 done
26757
26758 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26759 if test -z "$USE_OLD_MAKERULES" ; then
26760         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26761 fi
26762 fi
26763  ;;
26764   esac
26765 done
26766 EOF
26767
26768 cat >>$CONFIG_STATUS <<\EOF
26769
26770 { (exit 0); exit 0; }
26771 EOF
26772 chmod +x $CONFIG_STATUS
26773 ac_clean_files=$ac_clean_files_save
26774
26775 # configure is writing to config.log, and then calls config.status.
26776 # config.status does its own redirection, appending to config.log.
26777 # Unfortunately, on DOS this fails, as config.log is still kept open
26778 # by configure, so config.status won't be able to write to it; its
26779 # output is simply discarded.  So we exec the FD to /dev/null,
26780 # effectively closing config.log, so it can be properly (re)opened and
26781 # appended to by config.status.  When coming back to configure, we
26782 # need to make the FD available again.
26783 if test "$no_create" != yes; then
26784   ac_cs_success=:
26785   exec 5>/dev/null
26786   $SHELL $CONFIG_STATUS || ac_cs_success=false
26787   exec 5>>config.log
26788   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26789   # would make configure fail if this is the last instruction.
26790   $ac_cs_success || { (exit 1); exit 1; }
26791 fi
26792 ${MAKE:-make} preinstall