]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
a320efc03448ce160bbf9058fc739e0636063ad7
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.700 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-interop        compile-in interop bindings
840   --enable-safe-sprintf   compile with experimental safe-sprintf code
841   --disable-scroll-hints  compile without scroll-hints code
842   --enable-wgetch-events  compile with wgetch-events code
843 Testing/development Options:
844   --disable-echo          do not display "compiling" commands
845   --disable-stripping     do not strip (debug info) installed executables
846   --enable-warnings       build: turn on GCC compiler warnings
847   --enable-string-hacks   work around bogus compiler/loader warnings
848   --enable-assertions     test: turn on generation of assertion code
849   --with-dmalloc          test: use Gray Watson's dmalloc library
850   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851   --with-valgrind         test: use valgrind
852   --disable-leaks         test: free permanent memory, analyze leaks
853   --enable-expanded       test: generate functions for certain macros
854   --disable-macros        test: use functions rather than macros
855   --with-trace            test: add trace() function to all models of ncurses
856   --disable-gnat-projects test: disable GNAT projects even if usable
857 Ada Binding Options:
858   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862   --with-ada-libname=XXX  override default Ada library-name
863   --with-form-libname=XXX override form basename of library
864   --with-menu-libname=XXX override menu basename of library
865   --with-panel-libname=XXX override panel basename of library
866   --with-cxx-libname=XXX override ncurses++ basename of library
867
868 Some influential environment variables:
869   CC          C compiler command
870   CFLAGS      C compiler flags
871   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
872               nonstandard directory <lib dir>
873   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
874               headers in a nonstandard directory <include dir>
875   CPP         C preprocessor
876   CXX         C++ compiler command
877   CXXFLAGS    C++ compiler flags
878   CXXCPP      C++ preprocessor
879
880 Use these variables to override the choices made by `configure' or to help
881 it to find libraries and programs with nonstandard names/locations.
882
883 EOF
884 fi
885
886 if test "$ac_init_help" = "recursive"; then
887   # If there are subdirs, report their specific --help.
888   ac_popdir=`pwd`
889   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
890     cd $ac_subdir
891     # A "../" for each directory in /$ac_subdir.
892     ac_dots=`echo $ac_subdir |
893              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
894
895     case $srcdir in
896     .) # No --srcdir option.  We are building in place.
897       ac_sub_srcdir=$srcdir ;;
898     [\\/]* | ?:[\\/]* ) # Absolute path.
899       ac_sub_srcdir=$srcdir/$ac_subdir ;;
900     *) # Relative path.
901       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
902     esac
903
904     # Check for guested configure; otherwise get Cygnus style configure.
905     if test -f $ac_sub_srcdir/configure.gnu; then
906       echo
907       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
908     elif test -f $ac_sub_srcdir/configure; then
909       echo
910       $SHELL $ac_sub_srcdir/configure  --help=recursive
911     elif test -f $ac_sub_srcdir/configure.ac ||
912            test -f $ac_sub_srcdir/configure.in; then
913       echo
914       $ac_configure --help
915     else
916       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
917     fi
918     cd $ac_popdir
919   done
920 fi
921
922 test -n "$ac_init_help" && exit 0
923 if $ac_init_version; then
924   cat <<\EOF
925
926 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
927 Free Software Foundation, Inc.
928 This configure script is free software; the Free Software Foundation
929 gives unlimited permission to copy, distribute and modify it.
930 EOF
931   exit 0
932 fi
933 exec 5>config.log
934 cat >&5 <<EOF
935 This file contains any messages produced by compilers while
936 running configure, to aid debugging if configure makes a mistake.
937
938 It was created by $as_me, which was
939 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
940
941   $ $0 $@
942
943 EOF
944 {
945 cat <<_ASUNAME
946 ## ---------- ##
947 ## Platform.  ##
948 ## ---------- ##
949
950 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
951 uname -m = `(uname -m) 2>/dev/null || echo unknown`
952 uname -r = `(uname -r) 2>/dev/null || echo unknown`
953 uname -s = `(uname -s) 2>/dev/null || echo unknown`
954 uname -v = `(uname -v) 2>/dev/null || echo unknown`
955
956 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
957 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
958
959 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
960 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
961 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
962 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
963 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
964 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
965 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
966
967 PATH = $PATH
968
969 _ASUNAME
970 } >&5
971
972 cat >&5 <<EOF
973 ## ------------ ##
974 ## Core tests.  ##
975 ## ------------ ##
976
977 EOF
978
979 # Keep a trace of the command line.
980 # Strip out --no-create and --no-recursion so they do not pile up.
981 # Also quote any args containing shell meta-characters.
982 ac_configure_args=
983 ac_sep=
984 for ac_arg
985 do
986   case $ac_arg in
987   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
988   | --no-cr | --no-c) ;;
989   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
990   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
991   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
992     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
993     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
994     ac_sep=" " ;;
995   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
996      ac_sep=" " ;;
997   esac
998   # Get rid of the leading space.
999 done
1000
1001 # When interrupted or exit'd, cleanup temporary files, and complete
1002 # config.log.  We remove comments because anyway the quotes in there
1003 # would cause problems or look ugly.
1004 trap 'exit_status=$?
1005   # Save into config.log some information that might help in debugging.
1006   echo >&5
1007   echo "## ----------------- ##" >&5
1008   echo "## Cache variables.  ##" >&5
1009   echo "## ----------------- ##" >&5
1010   echo >&5
1011   # The following way of writing the cache mishandles newlines in values,
1012 {
1013   (set) 2>&1 |
1014     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1015     *ac_space=\ *)
1016       sed -n \
1017         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1018           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1019       ;;
1020     *)
1021       sed -n \
1022         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1023       ;;
1024     esac;
1025 } >&5
1026   sed "/^$/d" confdefs.h >conftest.log
1027   if test -s conftest.log; then
1028     echo >&5
1029     echo "## ------------ ##" >&5
1030     echo "## confdefs.h.  ##" >&5
1031     echo "## ------------ ##" >&5
1032     echo >&5
1033     cat conftest.log >&5
1034   fi
1035   (echo; echo) >&5
1036   test "$ac_signal" != 0 &&
1037     echo "$as_me: caught signal $ac_signal" >&5
1038   echo "$as_me: exit $exit_status" >&5
1039   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1040     exit $exit_status
1041      ' 0
1042 for ac_signal in 1 2 13 15; do
1043   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1044 done
1045 ac_signal=0
1046
1047 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1048 rm -rf conftest* confdefs.h
1049 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1050 echo >confdefs.h
1051
1052 # Let the site file select an alternate cache file if it wants to.
1053 # Prefer explicitly selected file to automatically selected ones.
1054 if test -z "$CONFIG_SITE"; then
1055   if test "x$prefix" != xNONE; then
1056     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1057   else
1058     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1059   fi
1060 fi
1061 for ac_site_file in $CONFIG_SITE; do
1062   if test -r "$ac_site_file"; then
1063     { echo "$as_me:1063: loading site script $ac_site_file" >&5
1064 echo "$as_me: loading site script $ac_site_file" >&6;}
1065     cat "$ac_site_file" >&5
1066     . "$ac_site_file"
1067   fi
1068 done
1069
1070 if test -r "$cache_file"; then
1071   # Some versions of bash will fail to source /dev/null (special
1072   # files actually), so we avoid doing that.
1073   if test -f "$cache_file"; then
1074     { echo "$as_me:1074: loading cache $cache_file" >&5
1075 echo "$as_me: loading cache $cache_file" >&6;}
1076     case $cache_file in
1077       [\\/]* | ?:[\\/]* ) . $cache_file;;
1078       *)                      . ./$cache_file;;
1079     esac
1080   fi
1081 else
1082   { echo "$as_me:1082: creating cache $cache_file" >&5
1083 echo "$as_me: creating cache $cache_file" >&6;}
1084   >$cache_file
1085 fi
1086
1087 # Check that the precious variables saved in the cache have kept the same
1088 # value.
1089 ac_cache_corrupted=false
1090 for ac_var in `(set) 2>&1 |
1091                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1092   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1093   eval ac_new_set=\$ac_env_${ac_var}_set
1094   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1095   eval ac_new_val="\$ac_env_${ac_var}_value"
1096   case $ac_old_set,$ac_new_set in
1097     set,)
1098       { echo "$as_me:1098: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1099 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1100       ac_cache_corrupted=: ;;
1101     ,set)
1102       { echo "$as_me:1102: error: \`$ac_var' was not set in the previous run" >&5
1103 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1104       ac_cache_corrupted=: ;;
1105     ,);;
1106     *)
1107       if test "x$ac_old_val" != "x$ac_new_val"; then
1108         { echo "$as_me:1108: error: \`$ac_var' has changed since the previous run:" >&5
1109 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1110         { echo "$as_me:1110:   former value:  $ac_old_val" >&5
1111 echo "$as_me:   former value:  $ac_old_val" >&2;}
1112         { echo "$as_me:1112:   current value: $ac_new_val" >&5
1113 echo "$as_me:   current value: $ac_new_val" >&2;}
1114         ac_cache_corrupted=:
1115       fi;;
1116   esac
1117   # Pass precious variables to config.status.  It doesn't matter if
1118   # we pass some twice (in addition to the command line arguments).
1119   if test "$ac_new_set" = set; then
1120     case $ac_new_val in
1121     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1122       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1123       ac_configure_args="$ac_configure_args '$ac_arg'"
1124       ;;
1125     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1126        ;;
1127     esac
1128   fi
1129 done
1130 if $ac_cache_corrupted; then
1131   { echo "$as_me:1131: error: changes in the environment can compromise the build" >&5
1132 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1133   { { echo "$as_me:1133: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1134 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1135    { (exit 1); exit 1; }; }
1136 fi
1137
1138 ac_ext=c
1139 ac_cpp='$CPP $CPPFLAGS'
1140 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1141 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1142 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1143 ac_main_return=return
1144
1145 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1146   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1147                    ECHO_T='     ' ;;
1148   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1149   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1150 esac
1151 echo "#! $SHELL" >conftest.sh
1152 echo  "exit 0"   >>conftest.sh
1153 chmod +x conftest.sh
1154 if { (echo "$as_me:1154: PATH=\".;.\"; conftest.sh") >&5
1155   (PATH=".;."; conftest.sh) 2>&5
1156   ac_status=$?
1157   echo "$as_me:1157: \$? = $ac_status" >&5
1158   (exit $ac_status); }; then
1159   ac_path_separator=';'
1160 else
1161   ac_path_separator=:
1162 fi
1163 PATH_SEPARATOR="$ac_path_separator"
1164 rm -f conftest.sh
1165
1166 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1167
1168 top_builddir=`pwd`
1169
1170 echo "$as_me:1170: checking for egrep" >&5
1171 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1172 if test "${ac_cv_prog_egrep+set}" = set; then
1173   echo $ECHO_N "(cached) $ECHO_C" >&6
1174 else
1175   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1176                 then ac_cv_prog_egrep='grep -E'
1177                 else ac_cv_prog_egrep='egrep'
1178         fi
1179 fi
1180 echo "$as_me:1180: result: $ac_cv_prog_egrep" >&5
1181 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1182         EGREP=$ac_cv_prog_egrep
1183
1184         test -z "$EGREP" && { { echo "$as_me:1184: error: No egrep program found" >&5
1185 echo "$as_me: error: No egrep program found" >&2;}
1186    { (exit 1); exit 1; }; }
1187
1188 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1189 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1190 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 cf_cv_abi_version=${NCURSES_MAJOR}
1192 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1193 cf_cv_timestamp=`date`
1194 echo "$as_me:1194: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1195 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1196
1197 if test -f $srcdir/VERSION ; then
1198         echo "$as_me:1198: checking for package version" >&5
1199 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1200
1201         # if there are not enough fields, cut returns the last one...
1202         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1203         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1204         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1205
1206         # this is how CF_BUNDLED_INTL uses $VERSION:
1207         VERSION="$cf_field1"
1208
1209         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1210         test -z "$VERSION_MAJOR" && { { echo "$as_me:1210: error: missing major-version" >&5
1211 echo "$as_me: error: missing major-version" >&2;}
1212    { (exit 1); exit 1; }; }
1213
1214         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1215         test -z "$VERSION_MINOR" && { { echo "$as_me:1215: error: missing minor-version" >&5
1216 echo "$as_me: error: missing minor-version" >&2;}
1217    { (exit 1); exit 1; }; }
1218
1219         echo "$as_me:1219: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1220 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1221
1222         echo "$as_me:1222: checking for package patch date" >&5
1223 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1224         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1225         case .$VERSION_PATCH in
1226         (.)
1227                 { { echo "$as_me:1227: error: missing patch-date $VERSION_PATCH" >&5
1228 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1229    { (exit 1); exit 1; }; }
1230                 ;;
1231         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1232                 ;;
1233         (*)
1234                 { { echo "$as_me:1234: error: illegal patch-date $VERSION_PATCH" >&5
1235 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1236    { (exit 1); exit 1; }; }
1237                 ;;
1238         esac
1239         echo "$as_me:1239: result: $VERSION_PATCH" >&5
1240 echo "${ECHO_T}$VERSION_PATCH" >&6
1241 else
1242         { { echo "$as_me:1242: error: did not find $srcdir/VERSION" >&5
1243 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1244    { (exit 1); exit 1; }; }
1245 fi
1246
1247 # show the actual data that we have for versions:
1248 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1249
1250 echo "${as_me:-configure}:1250: testing ABI VERSION $VERSION ..." 1>&5
1251
1252 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1253
1254 echo "${as_me:-configure}:1254: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1255
1256 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1257
1258 echo "${as_me:-configure}:1258: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1259
1260 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1261
1262 echo "${as_me:-configure}:1262: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1263
1264         cf_PACKAGE=NCURSES
1265         PACKAGE=ncurses
1266
1267 cat >>confdefs.h <<EOF
1268 #define PACKAGE "$PACKAGE"
1269 EOF
1270
1271 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1272
1273         cat >>confdefs.h <<EOF
1274 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1275 EOF
1276
1277         cat >>confdefs.h <<EOF
1278 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1279 EOF
1280
1281 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1282
1283 # Check whether --with-rel-version or --without-rel-version was given.
1284 if test "${with_rel_version+set}" = set; then
1285   withval="$with_rel_version"
1286   { echo "$as_me:1286: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1287 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1288  cf_cv_rel_version=$withval
1289 fi;
1290
1291  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1292  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1293
1294 if test -n "$NCURSES_MAJOR" ; then
1295   case $NCURSES_MAJOR in
1296   ([0-9]*)
1297         ;;
1298   (*)
1299         { { echo "$as_me:1299: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1300 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1301    { (exit 1); exit 1; }; }
1302         ;;
1303   esac
1304 else
1305   { { echo "$as_me:1305: error: Release major-version value is empty" >&5
1306 echo "$as_me: error: Release major-version value is empty" >&2;}
1307    { (exit 1); exit 1; }; }
1308 fi
1309
1310 if test -n "$NCURSES_MINOR" ; then
1311   case $NCURSES_MINOR in
1312   ([0-9]*)
1313         ;;
1314   (*)
1315         { { echo "$as_me:1315: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1316 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1317    { (exit 1); exit 1; }; }
1318         ;;
1319   esac
1320 else
1321   { { echo "$as_me:1321: error: Release minor-version value is empty" >&5
1322 echo "$as_me: error: Release minor-version value is empty" >&2;}
1323    { (exit 1); exit 1; }; }
1324 fi
1325
1326 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1327
1328 # Check whether --with-abi-version or --without-abi-version was given.
1329 if test "${with_abi_version+set}" = set; then
1330   withval="$with_abi_version"
1331
1332         if test "x$cf_cv_abi_version" != "x$withval"
1333         then
1334                 { echo "$as_me:1334: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1335 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1336                 case $cf_cv_rel_version in
1337                 (5.*)
1338                         cf_cv_rel_version=$withval.0
1339                         ;;
1340                 (6.*)
1341                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1342                         ;;
1343                 esac
1344         fi
1345         cf_cv_abi_version=$withval
1346 fi;
1347
1348 if test -n "$cf_cv_abi_version" ; then
1349   case $cf_cv_abi_version in
1350   ([0-9]*)
1351         ;;
1352   (*)
1353         { { echo "$as_me:1353: error: ABI version is not a number: $cf_cv_abi_version" >&5
1354 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1355    { (exit 1); exit 1; }; }
1356         ;;
1357   esac
1358 else
1359   { { echo "$as_me:1359: error: ABI version value is empty" >&5
1360 echo "$as_me: error: ABI version value is empty" >&2;}
1361    { (exit 1); exit 1; }; }
1362 fi
1363
1364 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1365 then
1366         case $cf_cv_rel_version in
1367         (5.*)
1368                 cf_cv_rel_version=$with_abi_version.0
1369                 ;;
1370         esac
1371 fi
1372
1373 ac_aux_dir=
1374 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1375   if test -f $ac_dir/install-sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install-sh -c"
1378     break
1379   elif test -f $ac_dir/install.sh; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/install.sh -c"
1382     break
1383   elif test -f $ac_dir/shtool; then
1384     ac_aux_dir=$ac_dir
1385     ac_install_sh="$ac_aux_dir/shtool install -c"
1386     break
1387   fi
1388 done
1389 if test -z "$ac_aux_dir"; then
1390   { { echo "$as_me:1390: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1391 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1392    { (exit 1); exit 1; }; }
1393 fi
1394 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1395 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1396 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1397
1398 # Make sure we can run config.sub.
1399 $ac_config_sub sun4 >/dev/null 2>&1 ||
1400   { { echo "$as_me:1400: error: cannot run $ac_config_sub" >&5
1401 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1402    { (exit 1); exit 1; }; }
1403
1404 echo "$as_me:1404: checking build system type" >&5
1405 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1406 if test "${ac_cv_build+set}" = set; then
1407   echo $ECHO_N "(cached) $ECHO_C" >&6
1408 else
1409   ac_cv_build_alias=$build_alias
1410 test -z "$ac_cv_build_alias" &&
1411   ac_cv_build_alias=`$ac_config_guess`
1412 test -z "$ac_cv_build_alias" &&
1413   { { echo "$as_me:1413: error: cannot guess build type; you must specify one" >&5
1414 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1415    { (exit 1); exit 1; }; }
1416 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1417   { { echo "$as_me:1417: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1418 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1419    { (exit 1); exit 1; }; }
1420
1421 fi
1422 echo "$as_me:1422: result: $ac_cv_build" >&5
1423 echo "${ECHO_T}$ac_cv_build" >&6
1424 build=$ac_cv_build
1425 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1426 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1427 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1428
1429 echo "$as_me:1429: checking host system type" >&5
1430 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1431 if test "${ac_cv_host+set}" = set; then
1432   echo $ECHO_N "(cached) $ECHO_C" >&6
1433 else
1434   ac_cv_host_alias=$host_alias
1435 test -z "$ac_cv_host_alias" &&
1436   ac_cv_host_alias=$ac_cv_build_alias
1437 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1438   { { echo "$as_me:1438: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1439 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1440    { (exit 1); exit 1; }; }
1441
1442 fi
1443 echo "$as_me:1443: result: $ac_cv_host" >&5
1444 echo "${ECHO_T}$ac_cv_host" >&6
1445 host=$ac_cv_host
1446 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1447 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1448 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1449
1450 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1451         echo "$as_me:1451: checking target system type" >&5
1452 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1453 if test "${ac_cv_target+set}" = set; then
1454   echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456   ac_cv_target_alias=$target_alias
1457 test "x$ac_cv_target_alias" = "x" &&
1458   ac_cv_target_alias=$ac_cv_host_alias
1459 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1460   { { echo "$as_me:1460: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1461 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1462    { (exit 1); exit 1; }; }
1463
1464 fi
1465 echo "$as_me:1465: result: $ac_cv_target" >&5
1466 echo "${ECHO_T}$ac_cv_target" >&6
1467 target=$ac_cv_target
1468 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1469 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1470 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1471
1472 # The aliases save the names the user supplied, while $host etc.
1473 # will get canonicalized.
1474 test -n "$target_alias" &&
1475   test "$program_prefix$program_suffix$program_transform_name" = \
1476     NONENONEs,x,x, &&
1477   program_prefix=${target_alias}-
1478         system_name="$host_os"
1479 else
1480         system_name="`(uname -s -r) 2>/dev/null`"
1481         if test -z "$system_name" ; then
1482                 system_name="`(hostname) 2>/dev/null`"
1483         fi
1484 fi
1485 test -n "$system_name" &&
1486 cat >>confdefs.h <<EOF
1487 #define SYSTEM_NAME "$system_name"
1488 EOF
1489
1490 if test "${cf_cv_system_name+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   cf_cv_system_name="$system_name"
1494 fi
1495
1496 test -z "$system_name" && system_name="$cf_cv_system_name"
1497 test -n "$cf_cv_system_name" && echo "$as_me:1497: result: Configuring for $cf_cv_system_name" >&5
1498 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1499
1500 if test ".$system_name" != ".$cf_cv_system_name" ; then
1501         echo "$as_me:1501: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1502 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1503         { { echo "$as_me:1503: error: \"Please remove config.cache and try again.\"" >&5
1504 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1505    { (exit 1); exit 1; }; }
1506 fi
1507
1508 # Check whether --with-system-type or --without-system-type was given.
1509 if test "${with_system_type+set}" = set; then
1510   withval="$with_system_type"
1511   { echo "$as_me:1511: WARNING: overriding system type to $withval" >&5
1512 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1513         cf_cv_system_name=$withval
1514         host_os=$withval
1515
1516 fi;
1517
1518 ###     Save the given $CFLAGS to allow user-override.
1519 cf_user_CFLAGS="$CFLAGS"
1520
1521 ###     Default install-location
1522
1523 echo "$as_me:1523: checking for prefix" >&5
1524 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1525 if test "x$prefix" = "xNONE" ; then
1526         case "$cf_cv_system_name" in
1527                 # non-vendor systems don't have a conflict
1528         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1529                 prefix=/usr
1530                 ;;
1531         (*)     prefix=$ac_default_prefix
1532                 ;;
1533         esac
1534 fi
1535 echo "$as_me:1535: result: $prefix" >&5
1536 echo "${ECHO_T}$prefix" >&6
1537
1538 if test "x$prefix" = "xNONE" ; then
1539 echo "$as_me:1539: checking for default include-directory" >&5
1540 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1541 test -n "$verbose" && echo 1>&6
1542 for cf_symbol in \
1543         $includedir \
1544         $includedir/ncurses \
1545         $prefix/include \
1546         $prefix/include/ncurses \
1547         /usr/local/include \
1548         /usr/local/include/ncurses \
1549         /usr/include \
1550         /usr/include/ncurses
1551 do
1552         cf_dir=`eval echo $cf_symbol`
1553         if test -f $cf_dir/curses.h ; then
1554         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1555                 includedir="$cf_symbol"
1556                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1557                 break
1558         fi
1559         fi
1560         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1561 done
1562 echo "$as_me:1562: result: $includedir" >&5
1563 echo "${ECHO_T}$includedir" >&6
1564 fi
1565
1566 ### Defaults for ncurses ABI
1567
1568 case x$cf_cv_abi_version in
1569 (x[6789])
1570         cf_dft_ext_colors=yes
1571         cf_dft_ext_const=yes
1572         cf_dft_ext_mouse=yes
1573         cf_dft_ext_putwin=yes
1574         cf_dft_ext_spfuncs=yes
1575         cf_dft_filter_syms=yes
1576         cf_dft_chtype=uint32_t
1577         cf_dft_mmask_t=uint32_t
1578         cf_dft_interop=yes
1579         cf_dft_tparm_arg=intptr_t
1580         cf_dft_with_lp64=yes
1581         ;;
1582 (*)
1583         cf_dft_ext_colors=no
1584         cf_dft_ext_const=no
1585         cf_dft_ext_mouse=no
1586         cf_dft_ext_putwin=no
1587         cf_dft_ext_spfuncs=no
1588         cf_dft_filter_syms=no
1589         cf_dft_chtype=auto
1590         cf_dft_mmask_t=auto
1591         cf_dft_interop=no
1592         cf_dft_tparm_arg=long
1593         cf_dft_with_lp64=no
1594         ;;
1595 esac
1596
1597 ###     Checks for programs.
1598
1599 # Check whether --with-ada or --without-ada was given.
1600 if test "${with_ada+set}" = set; then
1601   withval="$with_ada"
1602   cf_with_ada=$withval
1603 else
1604   cf_with_ada=yes
1605 fi;
1606
1607 if test "x$cf_with_ada" = xyes
1608 then
1609         cf_prog_cc="gnatgcc gcc cc"
1610 else
1611         cf_prog_cc="gcc cc"
1612 fi
1613
1614 ac_ext=c
1615 ac_cpp='$CPP $CPPFLAGS'
1616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1619 ac_main_return=return
1620 if test -n "$ac_tool_prefix"; then
1621   for ac_prog in $cf_prog_cc
1622   do
1623     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1624 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1625 echo "$as_me:1625: checking for $ac_word" >&5
1626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1627 if test "${ac_cv_prog_CC+set}" = set; then
1628   echo $ECHO_N "(cached) $ECHO_C" >&6
1629 else
1630   if test -n "$CC"; then
1631   ac_cv_prog_CC="$CC" # Let the user override the test.
1632 else
1633   ac_save_IFS=$IFS; IFS=$ac_path_separator
1634 ac_dummy="$PATH"
1635 for ac_dir in $ac_dummy; do
1636   IFS=$ac_save_IFS
1637   test -z "$ac_dir" && ac_dir=.
1638   $as_executable_p "$ac_dir/$ac_word" || continue
1639 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1640 echo "$as_me:1640: found $ac_dir/$ac_word" >&5
1641 break
1642 done
1643
1644 fi
1645 fi
1646 CC=$ac_cv_prog_CC
1647 if test -n "$CC"; then
1648   echo "$as_me:1648: result: $CC" >&5
1649 echo "${ECHO_T}$CC" >&6
1650 else
1651   echo "$as_me:1651: result: no" >&5
1652 echo "${ECHO_T}no" >&6
1653 fi
1654
1655     test -n "$CC" && break
1656   done
1657 fi
1658 if test -z "$CC"; then
1659   ac_ct_CC=$CC
1660   for ac_prog in $cf_prog_cc
1661 do
1662   # Extract the first word of "$ac_prog", so it can be a program name with args.
1663 set dummy $ac_prog; ac_word=$2
1664 echo "$as_me:1664: checking for $ac_word" >&5
1665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1666 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667   echo $ECHO_N "(cached) $ECHO_C" >&6
1668 else
1669   if test -n "$ac_ct_CC"; then
1670   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671 else
1672   ac_save_IFS=$IFS; IFS=$ac_path_separator
1673 ac_dummy="$PATH"
1674 for ac_dir in $ac_dummy; do
1675   IFS=$ac_save_IFS
1676   test -z "$ac_dir" && ac_dir=.
1677   $as_executable_p "$ac_dir/$ac_word" || continue
1678 ac_cv_prog_ac_ct_CC="$ac_prog"
1679 echo "$as_me:1679: found $ac_dir/$ac_word" >&5
1680 break
1681 done
1682
1683 fi
1684 fi
1685 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1686 if test -n "$ac_ct_CC"; then
1687   echo "$as_me:1687: result: $ac_ct_CC" >&5
1688 echo "${ECHO_T}$ac_ct_CC" >&6
1689 else
1690   echo "$as_me:1690: result: no" >&5
1691 echo "${ECHO_T}no" >&6
1692 fi
1693
1694   test -n "$ac_ct_CC" && break
1695 done
1696
1697   CC=$ac_ct_CC
1698 fi
1699
1700 test -z "$CC" && { { echo "$as_me:1700: error: no acceptable cc found in \$PATH" >&5
1701 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1702    { (exit 1); exit 1; }; }
1703
1704 # Provide some information about the compiler.
1705 echo "$as_me:1705:" \
1706      "checking for C compiler version" >&5
1707 ac_compiler=`set X $ac_compile; echo $2`
1708 { (eval echo "$as_me:1708: \"$ac_compiler --version </dev/null >&5\"") >&5
1709   (eval $ac_compiler --version </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713 { (eval echo "$as_me:1713: \"$ac_compiler -v </dev/null >&5\"") >&5
1714   (eval $ac_compiler -v </dev/null >&5) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1716: \$? = $ac_status" >&5
1717   (exit $ac_status); }
1718 { (eval echo "$as_me:1718: \"$ac_compiler -V </dev/null >&5\"") >&5
1719   (eval $ac_compiler -V </dev/null >&5) 2>&5
1720   ac_status=$?
1721   echo "$as_me:1721: \$? = $ac_status" >&5
1722   (exit $ac_status); }
1723
1724 cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main (void)
1730 {
1731
1732   ;
1733   return 0;
1734 }
1735 _ACEOF
1736 ac_clean_files_save=$ac_clean_files
1737 ac_clean_files="$ac_clean_files a.out a.exe"
1738 # Try to create an executable without -o first, disregard a.out.
1739 # It will help us diagnose broken compilers, and finding out an intuition
1740 # of exeext.
1741 echo "$as_me:1741: checking for C compiler default output" >&5
1742 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1743 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1744 if { (eval echo "$as_me:1744: \"$ac_link_default\"") >&5
1745   (eval $ac_link_default) 2>&5
1746   ac_status=$?
1747   echo "$as_me:1747: \$? = $ac_status" >&5
1748   (exit $ac_status); }; then
1749   # Find the output, starting from the most likely.  This scheme is
1750 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1751 # resort.
1752 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1753                 ls a.out conftest 2>/dev/null;
1754                 ls a.* conftest.* 2>/dev/null`; do
1755   case $ac_file in
1756     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1757     a.out ) # We found the default executable, but exeext='' is most
1758             # certainly right.
1759             break;;
1760     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1761           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1762           export ac_cv_exeext
1763           break;;
1764     * ) break;;
1765   esac
1766 done
1767 else
1768   echo "$as_me: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 { { echo "$as_me:1770: error: C compiler cannot create executables" >&5
1771 echo "$as_me: error: C compiler cannot create executables" >&2;}
1772    { (exit 77); exit 77; }; }
1773 fi
1774
1775 ac_exeext=$ac_cv_exeext
1776 echo "$as_me:1776: result: $ac_file" >&5
1777 echo "${ECHO_T}$ac_file" >&6
1778
1779 # Check the compiler produces executables we can run.  If not, either
1780 # the compiler is broken, or we cross compile.
1781 echo "$as_me:1781: checking whether the C compiler works" >&5
1782 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1783 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1784 # If not cross compiling, check that we can run a simple program.
1785 if test "$cross_compiling" != yes; then
1786   if { ac_try='./$ac_file'
1787   { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1788   (eval $ac_try) 2>&5
1789   ac_status=$?
1790   echo "$as_me:1790: \$? = $ac_status" >&5
1791   (exit $ac_status); }; }; then
1792     cross_compiling=no
1793   else
1794     if test "$cross_compiling" = maybe; then
1795         cross_compiling=yes
1796     else
1797         { { echo "$as_me:1797: error: cannot run C compiled programs.
1798 If you meant to cross compile, use \`--host'." >&5
1799 echo "$as_me: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&2;}
1801    { (exit 1); exit 1; }; }
1802     fi
1803   fi
1804 fi
1805 echo "$as_me:1805: result: yes" >&5
1806 echo "${ECHO_T}yes" >&6
1807
1808 rm -f a.out a.exe conftest$ac_cv_exeext
1809 ac_clean_files=$ac_clean_files_save
1810 # Check the compiler produces executables we can run.  If not, either
1811 # the compiler is broken, or we cross compile.
1812 echo "$as_me:1812: checking whether we are cross compiling" >&5
1813 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1814 echo "$as_me:1814: result: $cross_compiling" >&5
1815 echo "${ECHO_T}$cross_compiling" >&6
1816
1817 echo "$as_me:1817: checking for executable suffix" >&5
1818 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1819 if { (eval echo "$as_me:1819: \"$ac_link\"") >&5
1820   (eval $ac_link) 2>&5
1821   ac_status=$?
1822   echo "$as_me:1822: \$? = $ac_status" >&5
1823   (exit $ac_status); }; then
1824   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1825 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1826 # work properly (i.e., refer to `conftest.exe'), while it won't with
1827 # `rm'.
1828 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1829   case $ac_file in
1830     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1831     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1832           export ac_cv_exeext
1833           break;;
1834     * ) break;;
1835   esac
1836 done
1837 else
1838   { { echo "$as_me:1838: error: cannot compute EXEEXT: cannot compile and link" >&5
1839 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1840    { (exit 1); exit 1; }; }
1841 fi
1842
1843 rm -f conftest$ac_cv_exeext
1844 echo "$as_me:1844: result: $ac_cv_exeext" >&5
1845 echo "${ECHO_T}$ac_cv_exeext" >&6
1846
1847 rm -f conftest.$ac_ext
1848 EXEEXT=$ac_cv_exeext
1849 ac_exeext=$EXEEXT
1850 echo "$as_me:1850: checking for object suffix" >&5
1851 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1852 if test "${ac_cv_objext+set}" = set; then
1853   echo $ECHO_N "(cached) $ECHO_C" >&6
1854 else
1855   cat >conftest.$ac_ext <<_ACEOF
1856 #line 1856 "configure"
1857 #include "confdefs.h"
1858
1859 int
1860 main (void)
1861 {
1862
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.o conftest.obj
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); }; then
1873   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1874   case $ac_file in
1875     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1876     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1877        break;;
1878   esac
1879 done
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 { { echo "$as_me:1883: error: cannot compute OBJEXT: cannot compile" >&5
1884 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1885    { (exit 1); exit 1; }; }
1886 fi
1887
1888 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1889 fi
1890 echo "$as_me:1890: result: $ac_cv_objext" >&5
1891 echo "${ECHO_T}$ac_cv_objext" >&6
1892 OBJEXT=$ac_cv_objext
1893 ac_objext=$OBJEXT
1894 echo "$as_me:1894: checking whether we are using the GNU C compiler" >&5
1895 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1896 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1897   echo $ECHO_N "(cached) $ECHO_C" >&6
1898 else
1899   cat >conftest.$ac_ext <<_ACEOF
1900 #line 1900 "configure"
1901 #include "confdefs.h"
1902
1903 int
1904 main (void)
1905 {
1906 #ifndef __GNUC__
1907        choke me
1908 #endif
1909
1910   ;
1911   return 0;
1912 }
1913 _ACEOF
1914 rm -f conftest.$ac_objext
1915 if { (eval echo "$as_me:1915: \"$ac_compile\"") >&5
1916   (eval $ac_compile) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); } &&
1920          { ac_try='test -s conftest.$ac_objext'
1921   { (eval echo "$as_me:1921: \"$ac_try\"") >&5
1922   (eval $ac_try) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit $ac_status); }; }; then
1926   ac_compiler_gnu=yes
1927 else
1928   echo "$as_me: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1930 ac_compiler_gnu=no
1931 fi
1932 rm -f conftest.$ac_objext conftest.$ac_ext
1933 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1934
1935 fi
1936 echo "$as_me:1936: result: $ac_cv_c_compiler_gnu" >&5
1937 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1938 GCC=`test $ac_compiler_gnu = yes && echo yes`
1939 ac_test_CFLAGS=${CFLAGS+set}
1940 ac_save_CFLAGS=$CFLAGS
1941 CFLAGS="-g"
1942 echo "$as_me:1942: checking whether $CC accepts -g" >&5
1943 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1944 if test "${ac_cv_prog_cc_g+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947   cat >conftest.$ac_ext <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950
1951 int
1952 main (void)
1953 {
1954
1955   ;
1956   return 0;
1957 }
1958 _ACEOF
1959 rm -f conftest.$ac_objext
1960 if { (eval echo "$as_me:1960: \"$ac_compile\"") >&5
1961   (eval $ac_compile) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); } &&
1965          { ac_try='test -s conftest.$ac_objext'
1966   { (eval echo "$as_me:1966: \"$ac_try\"") >&5
1967   (eval $ac_try) 2>&5
1968   ac_status=$?
1969   echo "$as_me:1969: \$? = $ac_status" >&5
1970   (exit $ac_status); }; }; then
1971   ac_cv_prog_cc_g=yes
1972 else
1973   echo "$as_me: failed program was:" >&5
1974 cat conftest.$ac_ext >&5
1975 ac_cv_prog_cc_g=no
1976 fi
1977 rm -f conftest.$ac_objext conftest.$ac_ext
1978 fi
1979 echo "$as_me:1979: result: $ac_cv_prog_cc_g" >&5
1980 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1981 if test "$ac_test_CFLAGS" = set; then
1982   CFLAGS=$ac_save_CFLAGS
1983 elif test $ac_cv_prog_cc_g = yes; then
1984   if test "$GCC" = yes; then
1985     CFLAGS="-g -O2"
1986   else
1987     CFLAGS="-g"
1988   fi
1989 else
1990   if test "$GCC" = yes; then
1991     CFLAGS="-O2"
1992   else
1993     CFLAGS=
1994   fi
1995 fi
1996 # Some people use a C++ compiler to compile C.  Since we use `exit',
1997 # in C++ we need to declare it.  In case someone uses the same compiler
1998 # for both compiling C and C++ we need to have the C++ compiler decide
1999 # the declaration of exit, since it's the most demanding environment.
2000 cat >conftest.$ac_ext <<_ACEOF
2001 #ifndef __cplusplus
2002   choke me
2003 #endif
2004 _ACEOF
2005 rm -f conftest.$ac_objext
2006 if { (eval echo "$as_me:2006: \"$ac_compile\"") >&5
2007   (eval $ac_compile) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); } &&
2011          { ac_try='test -s conftest.$ac_objext'
2012   { (eval echo "$as_me:2012: \"$ac_try\"") >&5
2013   (eval $ac_try) 2>&5
2014   ac_status=$?
2015   echo "$as_me:2015: \$? = $ac_status" >&5
2016   (exit $ac_status); }; }; then
2017   for ac_declaration in \
2018    ''\
2019    '#include <stdlib.h>' \
2020    'extern "C" void std::exit (int) throw (); using std::exit;' \
2021    'extern "C" void std::exit (int); using std::exit;' \
2022    'extern "C" void exit (int) throw ();' \
2023    'extern "C" void exit (int);' \
2024    'void exit (int);'
2025 do
2026   cat >conftest.$ac_ext <<_ACEOF
2027 #line 2027 "configure"
2028 #include "confdefs.h"
2029 #include <stdlib.h>
2030 $ac_declaration
2031 int
2032 main (void)
2033 {
2034 exit (42);
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.$ac_objext
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit $ac_status); } &&
2045          { ac_try='test -s conftest.$ac_objext'
2046   { (eval echo "$as_me:2046: \"$ac_try\"") >&5
2047   (eval $ac_try) 2>&5
2048   ac_status=$?
2049   echo "$as_me:2049: \$? = $ac_status" >&5
2050   (exit $ac_status); }; }; then
2051   :
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 continue
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058   cat >conftest.$ac_ext <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2061 $ac_declaration
2062 int
2063 main (void)
2064 {
2065 exit (42);
2066   ;
2067   return 0;
2068 }
2069 _ACEOF
2070 rm -f conftest.$ac_objext
2071 if { (eval echo "$as_me:2071: \"$ac_compile\"") >&5
2072   (eval $ac_compile) 2>&5
2073   ac_status=$?
2074   echo "$as_me:2074: \$? = $ac_status" >&5
2075   (exit $ac_status); } &&
2076          { ac_try='test -s conftest.$ac_objext'
2077   { (eval echo "$as_me:2077: \"$ac_try\"") >&5
2078   (eval $ac_try) 2>&5
2079   ac_status=$?
2080   echo "$as_me:2080: \$? = $ac_status" >&5
2081   (exit $ac_status); }; }; then
2082   break
2083 else
2084   echo "$as_me: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 fi
2087 rm -f conftest.$ac_objext conftest.$ac_ext
2088 done
2089 rm -rf conftest*
2090 if test -n "$ac_declaration"; then
2091   echo '#ifdef __cplusplus' >>confdefs.h
2092   echo $ac_declaration      >>confdefs.h
2093   echo '#endif'             >>confdefs.h
2094 fi
2095
2096 else
2097   echo "$as_me: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 fi
2100 rm -f conftest.$ac_objext conftest.$ac_ext
2101 ac_ext=c
2102 ac_cpp='$CPP $CPPFLAGS'
2103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2106 ac_main_return=return
2107
2108 GCC_VERSION=none
2109 if test "$GCC" = yes ; then
2110         echo "$as_me:2110: checking version of $CC" >&5
2111 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2112         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.].*//'`"
2113         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2114         echo "$as_me:2114: result: $GCC_VERSION" >&5
2115 echo "${ECHO_T}$GCC_VERSION" >&6
2116 fi
2117
2118 INTEL_COMPILER=no
2119
2120 if test "$GCC" = yes ; then
2121         case $host_os in
2122         (linux*|gnu*)
2123                 echo "$as_me:2123: checking if this is really Intel C compiler" >&5
2124 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2125                 cf_save_CFLAGS="$CFLAGS"
2126                 CFLAGS="$CFLAGS -no-gcc"
2127                 cat >conftest.$ac_ext <<_ACEOF
2128 #line 2128 "configure"
2129 #include "confdefs.h"
2130
2131 int
2132 main (void)
2133 {
2134
2135 #ifdef __INTEL_COMPILER
2136 #else
2137 make an error
2138 #endif
2139
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   INTEL_COMPILER=yes
2157 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2158
2159 else
2160   echo "$as_me: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 fi
2163 rm -f conftest.$ac_objext conftest.$ac_ext
2164                 CFLAGS="$cf_save_CFLAGS"
2165                 echo "$as_me:2165: result: $INTEL_COMPILER" >&5
2166 echo "${ECHO_T}$INTEL_COMPILER" >&6
2167                 ;;
2168         esac
2169 fi
2170
2171 CLANG_COMPILER=no
2172
2173 if test "$GCC" = yes ; then
2174         echo "$as_me:2174: checking if this is really Clang C compiler" >&5
2175 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2176         cf_save_CFLAGS="$CFLAGS"
2177         CFLAGS="$CFLAGS -Qunused-arguments"
2178         cat >conftest.$ac_ext <<_ACEOF
2179 #line 2179 "configure"
2180 #include "confdefs.h"
2181
2182 int
2183 main (void)
2184 {
2185
2186 #ifdef __clang__
2187 #else
2188 make an error
2189 #endif
2190
2191   ;
2192   return 0;
2193 }
2194 _ACEOF
2195 rm -f conftest.$ac_objext
2196 if { (eval echo "$as_me:2196: \"$ac_compile\"") >&5
2197   (eval $ac_compile) 2>&5
2198   ac_status=$?
2199   echo "$as_me:2199: \$? = $ac_status" >&5
2200   (exit $ac_status); } &&
2201          { ac_try='test -s conftest.$ac_objext'
2202   { (eval echo "$as_me:2202: \"$ac_try\"") >&5
2203   (eval $ac_try) 2>&5
2204   ac_status=$?
2205   echo "$as_me:2205: \$? = $ac_status" >&5
2206   (exit $ac_status); }; }; then
2207   CLANG_COMPILER=yes
2208 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2209
2210 else
2211   echo "$as_me: failed program was:" >&5
2212 cat conftest.$ac_ext >&5
2213 fi
2214 rm -f conftest.$ac_objext conftest.$ac_ext
2215         CFLAGS="$cf_save_CFLAGS"
2216         echo "$as_me:2216: result: $CLANG_COMPILER" >&5
2217 echo "${ECHO_T}$CLANG_COMPILER" >&6
2218 fi
2219
2220 echo "$as_me:2220: checking for $CC option to accept ANSI C" >&5
2221 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2222 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2223   echo $ECHO_N "(cached) $ECHO_C" >&6
2224 else
2225   ac_cv_prog_cc_stdc=no
2226 ac_save_CC=$CC
2227 cat >conftest.$ac_ext <<_ACEOF
2228 #line 2228 "configure"
2229 #include "confdefs.h"
2230 #include <stdarg.h>
2231 #include <stdio.h>
2232 #include <sys/types.h>
2233 #include <sys/stat.h>
2234 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2235 struct buf { int x; };
2236 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2237 static char *e (p, i)
2238      char **p;
2239      int i;
2240 {
2241   return p[i];
2242 }
2243 static char *f (char * (*g) (char **, int), char **p, ...)
2244 {
2245   char *s;
2246   va_list v;
2247   va_start (v,p);
2248   s = g (p, va_arg (v,int));
2249   va_end (v);
2250   return s;
2251 }
2252 int test (int i, double x);
2253 struct s1 {int (*f) (int a);};
2254 struct s2 {int (*f) (double a);};
2255 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2256 int argc;
2257 char **argv;
2258 int
2259 main (void)
2260 {
2261 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 # Don't try gcc -ansi; that turns off useful extensions and
2267 # breaks some systems' header files.
2268 # AIX                   -qlanglvl=ansi
2269 # Ultrix and OSF/1      -std1
2270 # HP-UX 10.20 and later -Ae
2271 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2272 # SVR4                  -Xc -D__EXTENSIONS__
2273 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2274 do
2275   CC="$ac_save_CC $ac_arg"
2276   rm -f conftest.$ac_objext
2277 if { (eval echo "$as_me:2277: \"$ac_compile\"") >&5
2278   (eval $ac_compile) 2>&5
2279   ac_status=$?
2280   echo "$as_me:2280: \$? = $ac_status" >&5
2281   (exit $ac_status); } &&
2282          { ac_try='test -s conftest.$ac_objext'
2283   { (eval echo "$as_me:2283: \"$ac_try\"") >&5
2284   (eval $ac_try) 2>&5
2285   ac_status=$?
2286   echo "$as_me:2286: \$? = $ac_status" >&5
2287   (exit $ac_status); }; }; then
2288   ac_cv_prog_cc_stdc=$ac_arg
2289 break
2290 else
2291   echo "$as_me: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293 fi
2294 rm -f conftest.$ac_objext
2295 done
2296 rm -f conftest.$ac_ext conftest.$ac_objext
2297 CC=$ac_save_CC
2298
2299 fi
2300
2301 case "x$ac_cv_prog_cc_stdc" in
2302   x|xno)
2303     echo "$as_me:2303: result: none needed" >&5
2304 echo "${ECHO_T}none needed" >&6 ;;
2305   *)
2306     echo "$as_me:2306: result: $ac_cv_prog_cc_stdc" >&5
2307 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2308     CC="$CC $ac_cv_prog_cc_stdc" ;;
2309 esac
2310
2311 # This should have been defined by AC_PROG_CC
2312 : ${CC:=cc}
2313
2314 echo "$as_me:2314: checking \$CFLAGS variable" >&5
2315 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2316 case "x$CFLAGS" in
2317 (*-[IUD]*)
2318         echo "$as_me:2318: result: broken" >&5
2319 echo "${ECHO_T}broken" >&6
2320         { echo "$as_me:2320: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2321 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2322         cf_flags="$CFLAGS"
2323         CFLAGS=
2324         for cf_arg in $cf_flags
2325         do
2326
2327 cf_fix_cppflags=no
2328 cf_new_cflags=
2329 cf_new_cppflags=
2330 cf_new_extra_cppflags=
2331
2332 for cf_add_cflags in $cf_arg
2333 do
2334 case $cf_fix_cppflags in
2335 (no)
2336         case $cf_add_cflags in
2337         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2338                 case $cf_add_cflags in
2339                 (-D*)
2340                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2341
2342                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2343                                 && test -z "${cf_tst_cflags}" \
2344                                 && cf_fix_cppflags=yes
2345
2346                         if test $cf_fix_cppflags = yes ; then
2347
2348         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2349         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2350
2351                                 continue
2352                         elif test "${cf_tst_cflags}" = "\"'" ; then
2353
2354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2356
2357                                 continue
2358                         fi
2359                         ;;
2360                 esac
2361                 case "$CPPFLAGS" in
2362                 (*$cf_add_cflags)
2363                         ;;
2364                 (*)
2365                         case $cf_add_cflags in
2366                         (-D*)
2367                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2368
2369 CPPFLAGS=`echo "$CPPFLAGS" | \
2370         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2371                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2372
2373                                 ;;
2374                         esac
2375
2376         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2377         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2378
2379                         ;;
2380                 esac
2381                 ;;
2382         (*)
2383
2384         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2385         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2386
2387                 ;;
2388         esac
2389         ;;
2390 (yes)
2391
2392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2394
2395         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2396
2397         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2398                 && test -z "${cf_tst_cflags}" \
2399                 && cf_fix_cppflags=no
2400         ;;
2401 esac
2402 done
2403
2404 if test -n "$cf_new_cflags" ; then
2405
2406         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2407         CFLAGS="${CFLAGS}$cf_new_cflags"
2408
2409 fi
2410
2411 if test -n "$cf_new_cppflags" ; then
2412
2413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2414         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2415
2416 fi
2417
2418 if test -n "$cf_new_extra_cppflags" ; then
2419
2420         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2421         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2422
2423 fi
2424
2425         done
2426         ;;
2427 (*)
2428         echo "$as_me:2428: result: ok" >&5
2429 echo "${ECHO_T}ok" >&6
2430         ;;
2431 esac
2432
2433 echo "$as_me:2433: checking \$CC variable" >&5
2434 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2435 case "$CC" in
2436 (*[\ \  ]-*)
2437         echo "$as_me:2437: result: broken" >&5
2438 echo "${ECHO_T}broken" >&6
2439         { echo "$as_me:2439: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2440 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2441         # humor him...
2442         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2443         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2444         CC="$cf_prog"
2445         for cf_arg in $cf_flags
2446         do
2447                 case "x$cf_arg" in
2448                 (x-[IUDfgOW]*)
2449
2450 cf_fix_cppflags=no
2451 cf_new_cflags=
2452 cf_new_cppflags=
2453 cf_new_extra_cppflags=
2454
2455 for cf_add_cflags in $cf_arg
2456 do
2457 case $cf_fix_cppflags in
2458 (no)
2459         case $cf_add_cflags in
2460         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2461                 case $cf_add_cflags in
2462                 (-D*)
2463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2464
2465                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2466                                 && test -z "${cf_tst_cflags}" \
2467                                 && cf_fix_cppflags=yes
2468
2469                         if test $cf_fix_cppflags = yes ; then
2470
2471         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2472         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2473
2474                                 continue
2475                         elif test "${cf_tst_cflags}" = "\"'" ; then
2476
2477         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2478         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2479
2480                                 continue
2481                         fi
2482                         ;;
2483                 esac
2484                 case "$CPPFLAGS" in
2485                 (*$cf_add_cflags)
2486                         ;;
2487                 (*)
2488                         case $cf_add_cflags in
2489                         (-D*)
2490                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2491
2492 CPPFLAGS=`echo "$CPPFLAGS" | \
2493         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2494                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2495
2496                                 ;;
2497                         esac
2498
2499         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2500         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2501
2502                         ;;
2503                 esac
2504                 ;;
2505         (*)
2506
2507         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2508         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2509
2510                 ;;
2511         esac
2512         ;;
2513 (yes)
2514
2515         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2516         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2517
2518         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2519
2520         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2521                 && test -z "${cf_tst_cflags}" \
2522                 && cf_fix_cppflags=no
2523         ;;
2524 esac
2525 done
2526
2527 if test -n "$cf_new_cflags" ; then
2528
2529         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2530         CFLAGS="${CFLAGS}$cf_new_cflags"
2531
2532 fi
2533
2534 if test -n "$cf_new_cppflags" ; then
2535
2536         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2537         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2538
2539 fi
2540
2541 if test -n "$cf_new_extra_cppflags" ; then
2542
2543         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2544         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2545
2546 fi
2547
2548                         ;;
2549                 (*)
2550                         CC="$CC $cf_arg"
2551                         ;;
2552                 esac
2553         done
2554         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2555
2556 echo "${as_me:-configure}:2556: testing resulting CC: '$CC' ..." 1>&5
2557
2558         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2559
2560 echo "${as_me:-configure}:2560: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2561
2562         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2563
2564 echo "${as_me:-configure}:2564: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2565
2566         ;;
2567 (*)
2568         echo "$as_me:2568: result: ok" >&5
2569 echo "${ECHO_T}ok" >&6
2570         ;;
2571 esac
2572
2573 ac_ext=c
2574 ac_cpp='$CPP $CPPFLAGS'
2575 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2576 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2577 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2578 ac_main_return=return
2579 echo "$as_me:2579: checking how to run the C preprocessor" >&5
2580 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2581 # On Suns, sometimes $CPP names a directory.
2582 if test -n "$CPP" && test -d "$CPP"; then
2583   CPP=
2584 fi
2585 if test -z "$CPP"; then
2586   if test "${ac_cv_prog_CPP+set}" = set; then
2587   echo $ECHO_N "(cached) $ECHO_C" >&6
2588 else
2589       # Double quotes because CPP needs to be expanded
2590     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2591     do
2592       ac_preproc_ok=false
2593 for ac_c_preproc_warn_flag in '' yes
2594 do
2595   # Use a header file that comes with gcc, so configuring glibc
2596   # with a fresh cross-compiler works.
2597   # On the NeXT, cc -E runs the code through the compiler's parser,
2598   # not just through cpp. "Syntax error" is here to catch this case.
2599   cat >conftest.$ac_ext <<_ACEOF
2600 #line 2600 "configure"
2601 #include "confdefs.h"
2602 #include <assert.h>
2603                      Syntax error
2604 _ACEOF
2605 if { (eval echo "$as_me:2605: \"$ac_cpp conftest.$ac_ext\"") >&5
2606   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2607   ac_status=$?
2608   egrep -v '^ *\+' conftest.er1 >conftest.err
2609   rm -f conftest.er1
2610   cat conftest.err >&5
2611   echo "$as_me:2611: \$? = $ac_status" >&5
2612   (exit $ac_status); } >/dev/null; then
2613   if test -s conftest.err; then
2614     ac_cpp_err=$ac_c_preproc_warn_flag
2615   else
2616     ac_cpp_err=
2617   fi
2618 else
2619   ac_cpp_err=yes
2620 fi
2621 if test -z "$ac_cpp_err"; then
2622   :
2623 else
2624   echo "$as_me: failed program was:" >&5
2625   cat conftest.$ac_ext >&5
2626   # Broken: fails on valid input.
2627 continue
2628 fi
2629 rm -f conftest.err conftest.$ac_ext
2630
2631   # OK, works on sane cases.  Now check whether non-existent headers
2632   # can be detected and how.
2633   cat >conftest.$ac_ext <<_ACEOF
2634 #line 2634 "configure"
2635 #include "confdefs.h"
2636 #include <ac_nonexistent.h>
2637 _ACEOF
2638 if { (eval echo "$as_me:2638: \"$ac_cpp conftest.$ac_ext\"") >&5
2639   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2640   ac_status=$?
2641   egrep -v '^ *\+' conftest.er1 >conftest.err
2642   rm -f conftest.er1
2643   cat conftest.err >&5
2644   echo "$as_me:2644: \$? = $ac_status" >&5
2645   (exit $ac_status); } >/dev/null; then
2646   if test -s conftest.err; then
2647     ac_cpp_err=$ac_c_preproc_warn_flag
2648   else
2649     ac_cpp_err=
2650   fi
2651 else
2652   ac_cpp_err=yes
2653 fi
2654 if test -z "$ac_cpp_err"; then
2655   # Broken: success on invalid input.
2656 continue
2657 else
2658   echo "$as_me: failed program was:" >&5
2659   cat conftest.$ac_ext >&5
2660   # Passes both tests.
2661 ac_preproc_ok=:
2662 break
2663 fi
2664 rm -f conftest.err conftest.$ac_ext
2665
2666 done
2667 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2668 rm -f conftest.err conftest.$ac_ext
2669 if $ac_preproc_ok; then
2670   break
2671 fi
2672
2673     done
2674     ac_cv_prog_CPP=$CPP
2675
2676 fi
2677   CPP=$ac_cv_prog_CPP
2678 else
2679   ac_cv_prog_CPP=$CPP
2680 fi
2681 echo "$as_me:2681: result: $CPP" >&5
2682 echo "${ECHO_T}$CPP" >&6
2683 ac_preproc_ok=false
2684 for ac_c_preproc_warn_flag in '' yes
2685 do
2686   # Use a header file that comes with gcc, so configuring glibc
2687   # with a fresh cross-compiler works.
2688   # On the NeXT, cc -E runs the code through the compiler's parser,
2689   # not just through cpp. "Syntax error" is here to catch this case.
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693 #include <assert.h>
2694                      Syntax error
2695 _ACEOF
2696 if { (eval echo "$as_me:2696: \"$ac_cpp conftest.$ac_ext\"") >&5
2697   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2698   ac_status=$?
2699   egrep -v '^ *\+' conftest.er1 >conftest.err
2700   rm -f conftest.er1
2701   cat conftest.err >&5
2702   echo "$as_me:2702: \$? = $ac_status" >&5
2703   (exit $ac_status); } >/dev/null; then
2704   if test -s conftest.err; then
2705     ac_cpp_err=$ac_c_preproc_warn_flag
2706   else
2707     ac_cpp_err=
2708   fi
2709 else
2710   ac_cpp_err=yes
2711 fi
2712 if test -z "$ac_cpp_err"; then
2713   :
2714 else
2715   echo "$as_me: failed program was:" >&5
2716   cat conftest.$ac_ext >&5
2717   # Broken: fails on valid input.
2718 continue
2719 fi
2720 rm -f conftest.err conftest.$ac_ext
2721
2722   # OK, works on sane cases.  Now check whether non-existent headers
2723   # can be detected and how.
2724   cat >conftest.$ac_ext <<_ACEOF
2725 #line 2725 "configure"
2726 #include "confdefs.h"
2727 #include <ac_nonexistent.h>
2728 _ACEOF
2729 if { (eval echo "$as_me:2729: \"$ac_cpp conftest.$ac_ext\"") >&5
2730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2731   ac_status=$?
2732   egrep -v '^ *\+' conftest.er1 >conftest.err
2733   rm -f conftest.er1
2734   cat conftest.err >&5
2735   echo "$as_me:2735: \$? = $ac_status" >&5
2736   (exit $ac_status); } >/dev/null; then
2737   if test -s conftest.err; then
2738     ac_cpp_err=$ac_c_preproc_warn_flag
2739   else
2740     ac_cpp_err=
2741   fi
2742 else
2743   ac_cpp_err=yes
2744 fi
2745 if test -z "$ac_cpp_err"; then
2746   # Broken: success on invalid input.
2747 continue
2748 else
2749   echo "$as_me: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   # Passes both tests.
2752 ac_preproc_ok=:
2753 break
2754 fi
2755 rm -f conftest.err conftest.$ac_ext
2756
2757 done
2758 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2759 rm -f conftest.err conftest.$ac_ext
2760 if $ac_preproc_ok; then
2761   :
2762 else
2763   { { echo "$as_me:2763: error: C preprocessor \"$CPP\" fails sanity check" >&5
2764 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2765    { (exit 1); exit 1; }; }
2766 fi
2767
2768 ac_ext=c
2769 ac_cpp='$CPP $CPPFLAGS'
2770 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2771 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2773 ac_main_return=return
2774
2775 if test $ac_cv_c_compiler_gnu = yes; then
2776     echo "$as_me:2776: checking whether $CC needs -traditional" >&5
2777 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2778 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2779   echo $ECHO_N "(cached) $ECHO_C" >&6
2780 else
2781     ac_pattern="Autoconf.*'x'"
2782   cat >conftest.$ac_ext <<_ACEOF
2783 #line 2783 "configure"
2784 #include "confdefs.h"
2785 #include <sgtty.h>
2786 int Autoconf = TIOCGETP;
2787 _ACEOF
2788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2789   egrep "$ac_pattern" >/dev/null 2>&1; then
2790   ac_cv_prog_gcc_traditional=yes
2791 else
2792   ac_cv_prog_gcc_traditional=no
2793 fi
2794 rm -rf conftest*
2795
2796   if test $ac_cv_prog_gcc_traditional = no; then
2797     cat >conftest.$ac_ext <<_ACEOF
2798 #line 2798 "configure"
2799 #include "confdefs.h"
2800 #include <termio.h>
2801 int Autoconf = TCGETA;
2802 _ACEOF
2803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2804   egrep "$ac_pattern" >/dev/null 2>&1; then
2805   ac_cv_prog_gcc_traditional=yes
2806 fi
2807 rm -rf conftest*
2808
2809   fi
2810 fi
2811 echo "$as_me:2811: result: $ac_cv_prog_gcc_traditional" >&5
2812 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2813   if test $ac_cv_prog_gcc_traditional = yes; then
2814     CC="$CC -traditional"
2815   fi
2816 fi
2817
2818 echo "$as_me:2818: checking whether $CC understands -c and -o together" >&5
2819 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2820 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2821   echo $ECHO_N "(cached) $ECHO_C" >&6
2822 else
2823
2824 cat > conftest.$ac_ext <<CF_EOF
2825 int main(void)
2826 {
2827         ${cf_cv_main_return:-return}(0);
2828 }
2829 CF_EOF
2830 # We do the test twice because some compilers refuse to overwrite an
2831 # existing .o file with -o, though they will create one.
2832 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2833 if { (eval echo "$as_me:2833: \"$ac_try\"") >&5
2834   (eval $ac_try) 2>&5
2835   ac_status=$?
2836   echo "$as_me:2836: \$? = $ac_status" >&5
2837   (exit $ac_status); } &&
2838   test -f conftest2.$ac_objext && { (eval echo "$as_me:2838: \"$ac_try\"") >&5
2839   (eval $ac_try) 2>&5
2840   ac_status=$?
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit $ac_status); };
2843 then
2844   eval cf_cv_prog_CC_c_o=yes
2845 else
2846   eval cf_cv_prog_CC_c_o=no
2847 fi
2848 rm -rf conftest*
2849
2850 fi
2851 if test $cf_cv_prog_CC_c_o = yes; then
2852   echo "$as_me:2852: result: yes" >&5
2853 echo "${ECHO_T}yes" >&6
2854 else
2855   echo "$as_me:2855: result: no" >&5
2856 echo "${ECHO_T}no" >&6
2857 fi
2858
2859 if test "$cross_compiling" = yes ; then
2860         LDCONFIG=:
2861 else
2862         case "$cf_cv_system_name" in
2863         (dragonfly*|mirbsd*|freebsd*)
2864                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2865                 ;;
2866         (*) LDPATH=$PATH:/sbin:/usr/sbin
2867                 # Extract the first word of "ldconfig", so it can be a program name with args.
2868 set dummy ldconfig; ac_word=$2
2869 echo "$as_me:2869: checking for $ac_word" >&5
2870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2871 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2872   echo $ECHO_N "(cached) $ECHO_C" >&6
2873 else
2874   case $LDCONFIG in
2875   [\\/]* | ?:[\\/]*)
2876   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2877   ;;
2878   *)
2879   ac_save_IFS=$IFS; IFS=$ac_path_separator
2880 ac_dummy="$LDPATH"
2881 for ac_dir in $ac_dummy; do
2882   IFS=$ac_save_IFS
2883   test -z "$ac_dir" && ac_dir=.
2884   if $as_executable_p "$ac_dir/$ac_word"; then
2885    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2886    echo "$as_me:2886: found $ac_dir/$ac_word" >&5
2887    break
2888 fi
2889 done
2890
2891   ;;
2892 esac
2893 fi
2894 LDCONFIG=$ac_cv_path_LDCONFIG
2895
2896 if test -n "$LDCONFIG"; then
2897   echo "$as_me:2897: result: $LDCONFIG" >&5
2898 echo "${ECHO_T}$LDCONFIG" >&6
2899 else
2900   echo "$as_me:2900: result: no" >&5
2901 echo "${ECHO_T}no" >&6
2902 fi
2903
2904                 ;;
2905         esac
2906 fi
2907
2908 echo "$as_me:2908: checking if you want to ensure bool is consistent with C++" >&5
2909 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2910
2911 # Check whether --with-cxx or --without-cxx was given.
2912 if test "${with_cxx+set}" = set; then
2913   withval="$with_cxx"
2914   cf_with_cxx=$withval
2915 else
2916   cf_with_cxx=yes
2917 fi;
2918 echo "$as_me:2918: result: $cf_with_cxx" >&5
2919 echo "${ECHO_T}$cf_with_cxx" >&6
2920 if test "X$cf_with_cxx" = Xno ; then
2921         CXX=""
2922         GXX=""
2923 else
2924         # with autoconf 2.13, we can change the error to a warning:
2925                 ac_ext=cc
2926 ac_cpp='$CXXCPP $CPPFLAGS'
2927 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2928 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2929 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2930 ac_main_return=return
2931 if test -n "$ac_tool_prefix"; then
2932   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2933   do
2934     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2935 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2936 echo "$as_me:2936: checking for $ac_word" >&5
2937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2938 if test "${ac_cv_prog_CXX+set}" = set; then
2939   echo $ECHO_N "(cached) $ECHO_C" >&6
2940 else
2941   if test -n "$CXX"; then
2942   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2943 else
2944   ac_save_IFS=$IFS; IFS=$ac_path_separator
2945 ac_dummy="$PATH"
2946 for ac_dir in $ac_dummy; do
2947   IFS=$ac_save_IFS
2948   test -z "$ac_dir" && ac_dir=.
2949   $as_executable_p "$ac_dir/$ac_word" || continue
2950 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2951 echo "$as_me:2951: found $ac_dir/$ac_word" >&5
2952 break
2953 done
2954
2955 fi
2956 fi
2957 CXX=$ac_cv_prog_CXX
2958 if test -n "$CXX"; then
2959   echo "$as_me:2959: result: $CXX" >&5
2960 echo "${ECHO_T}$CXX" >&6
2961 else
2962   echo "$as_me:2962: result: no" >&5
2963 echo "${ECHO_T}no" >&6
2964 fi
2965
2966     test -n "$CXX" && break
2967   done
2968 fi
2969 if test -z "$CXX"; then
2970   ac_ct_CXX=$CXX
2971   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2972 do
2973   # Extract the first word of "$ac_prog", so it can be a program name with args.
2974 set dummy $ac_prog; ac_word=$2
2975 echo "$as_me:2975: checking for $ac_word" >&5
2976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2977 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   if test -n "$ac_ct_CXX"; then
2981   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2982 else
2983   ac_save_IFS=$IFS; IFS=$ac_path_separator
2984 ac_dummy="$PATH"
2985 for ac_dir in $ac_dummy; do
2986   IFS=$ac_save_IFS
2987   test -z "$ac_dir" && ac_dir=.
2988   $as_executable_p "$ac_dir/$ac_word" || continue
2989 ac_cv_prog_ac_ct_CXX="$ac_prog"
2990 echo "$as_me:2990: found $ac_dir/$ac_word" >&5
2991 break
2992 done
2993
2994 fi
2995 fi
2996 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2997 if test -n "$ac_ct_CXX"; then
2998   echo "$as_me:2998: result: $ac_ct_CXX" >&5
2999 echo "${ECHO_T}$ac_ct_CXX" >&6
3000 else
3001   echo "$as_me:3001: result: no" >&5
3002 echo "${ECHO_T}no" >&6
3003 fi
3004
3005   test -n "$ac_ct_CXX" && break
3006 done
3007 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3008
3009   CXX=$ac_ct_CXX
3010 fi
3011
3012 # Provide some information about the compiler.
3013 echo "$as_me:3013:" \
3014      "checking for C++ compiler version" >&5
3015 ac_compiler=`set X $ac_compile; echo $2`
3016 { (eval echo "$as_me:3016: \"$ac_compiler --version </dev/null >&5\"") >&5
3017   (eval $ac_compiler --version </dev/null >&5) 2>&5
3018   ac_status=$?
3019   echo "$as_me:3019: \$? = $ac_status" >&5
3020   (exit $ac_status); }
3021 { (eval echo "$as_me:3021: \"$ac_compiler -v </dev/null >&5\"") >&5
3022   (eval $ac_compiler -v </dev/null >&5) 2>&5
3023   ac_status=$?
3024   echo "$as_me:3024: \$? = $ac_status" >&5
3025   (exit $ac_status); }
3026 { (eval echo "$as_me:3026: \"$ac_compiler -V </dev/null >&5\"") >&5
3027   (eval $ac_compiler -V </dev/null >&5) 2>&5
3028   ac_status=$?
3029   echo "$as_me:3029: \$? = $ac_status" >&5
3030   (exit $ac_status); }
3031
3032 echo "$as_me:3032: checking whether we are using the GNU C++ compiler" >&5
3033 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3034 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3035   echo $ECHO_N "(cached) $ECHO_C" >&6
3036 else
3037   cat >conftest.$ac_ext <<_ACEOF
3038 #line 3038 "configure"
3039 #include "confdefs.h"
3040
3041 int
3042 main (void)
3043 {
3044 #ifndef __GNUC__
3045        choke me
3046 #endif
3047
3048   ;
3049   return 0;
3050 }
3051 _ACEOF
3052 rm -f conftest.$ac_objext
3053 if { (eval echo "$as_me:3053: \"$ac_compile\"") >&5
3054   (eval $ac_compile) 2>&5
3055   ac_status=$?
3056   echo "$as_me:3056: \$? = $ac_status" >&5
3057   (exit $ac_status); } &&
3058          { ac_try='test -s conftest.$ac_objext'
3059   { (eval echo "$as_me:3059: \"$ac_try\"") >&5
3060   (eval $ac_try) 2>&5
3061   ac_status=$?
3062   echo "$as_me:3062: \$? = $ac_status" >&5
3063   (exit $ac_status); }; }; then
3064   ac_compiler_gnu=yes
3065 else
3066   echo "$as_me: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 ac_compiler_gnu=no
3069 fi
3070 rm -f conftest.$ac_objext conftest.$ac_ext
3071 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3072
3073 fi
3074 echo "$as_me:3074: result: $ac_cv_cxx_compiler_gnu" >&5
3075 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3076 GXX=`test $ac_compiler_gnu = yes && echo yes`
3077 ac_test_CXXFLAGS=${CXXFLAGS+set}
3078 ac_save_CXXFLAGS=$CXXFLAGS
3079 CXXFLAGS="-g"
3080 echo "$as_me:3080: checking whether $CXX accepts -g" >&5
3081 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3082 if test "${ac_cv_prog_cxx_g+set}" = set; then
3083   echo $ECHO_N "(cached) $ECHO_C" >&6
3084 else
3085   cat >conftest.$ac_ext <<_ACEOF
3086 #line 3086 "configure"
3087 #include "confdefs.h"
3088
3089 int
3090 main (void)
3091 {
3092
3093   ;
3094   return 0;
3095 }
3096 _ACEOF
3097 rm -f conftest.$ac_objext
3098 if { (eval echo "$as_me:3098: \"$ac_compile\"") >&5
3099   (eval $ac_compile) 2>&5
3100   ac_status=$?
3101   echo "$as_me:3101: \$? = $ac_status" >&5
3102   (exit $ac_status); } &&
3103          { ac_try='test -s conftest.$ac_objext'
3104   { (eval echo "$as_me:3104: \"$ac_try\"") >&5
3105   (eval $ac_try) 2>&5
3106   ac_status=$?
3107   echo "$as_me:3107: \$? = $ac_status" >&5
3108   (exit $ac_status); }; }; then
3109   ac_cv_prog_cxx_g=yes
3110 else
3111   echo "$as_me: failed program was:" >&5
3112 cat conftest.$ac_ext >&5
3113 ac_cv_prog_cxx_g=no
3114 fi
3115 rm -f conftest.$ac_objext conftest.$ac_ext
3116 fi
3117 echo "$as_me:3117: result: $ac_cv_prog_cxx_g" >&5
3118 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3119 if test "$ac_test_CXXFLAGS" = set; then
3120   CXXFLAGS=$ac_save_CXXFLAGS
3121 elif test $ac_cv_prog_cxx_g = yes; then
3122   if test "$GXX" = yes; then
3123     CXXFLAGS="-g -O2"
3124   else
3125     CXXFLAGS="-g"
3126   fi
3127 else
3128   if test "$GXX" = yes; then
3129     CXXFLAGS="-O2"
3130   else
3131     CXXFLAGS=
3132   fi
3133 fi
3134 for ac_declaration in \
3135    ''\
3136    '#include <stdlib.h>' \
3137    'extern "C" void std::exit (int) throw (); using std::exit;' \
3138    'extern "C" void std::exit (int); using std::exit;' \
3139    'extern "C" void exit (int) throw ();' \
3140    'extern "C" void exit (int);' \
3141    'void exit (int);'
3142 do
3143   cat >conftest.$ac_ext <<_ACEOF
3144 #line 3144 "configure"
3145 #include "confdefs.h"
3146 #include <stdlib.h>
3147 $ac_declaration
3148 int
3149 main (void)
3150 {
3151 exit (42);
3152   ;
3153   return 0;
3154 }
3155 _ACEOF
3156 rm -f conftest.$ac_objext
3157 if { (eval echo "$as_me:3157: \"$ac_compile\"") >&5
3158   (eval $ac_compile) 2>&5
3159   ac_status=$?
3160   echo "$as_me:3160: \$? = $ac_status" >&5
3161   (exit $ac_status); } &&
3162          { ac_try='test -s conftest.$ac_objext'
3163   { (eval echo "$as_me:3163: \"$ac_try\"") >&5
3164   (eval $ac_try) 2>&5
3165   ac_status=$?
3166   echo "$as_me:3166: \$? = $ac_status" >&5
3167   (exit $ac_status); }; }; then
3168   :
3169 else
3170   echo "$as_me: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 continue
3173 fi
3174 rm -f conftest.$ac_objext conftest.$ac_ext
3175   cat >conftest.$ac_ext <<_ACEOF
3176 #line 3176 "configure"
3177 #include "confdefs.h"
3178 $ac_declaration
3179 int
3180 main (void)
3181 {
3182 exit (42);
3183   ;
3184   return 0;
3185 }
3186 _ACEOF
3187 rm -f conftest.$ac_objext
3188 if { (eval echo "$as_me:3188: \"$ac_compile\"") >&5
3189   (eval $ac_compile) 2>&5
3190   ac_status=$?
3191   echo "$as_me:3191: \$? = $ac_status" >&5
3192   (exit $ac_status); } &&
3193          { ac_try='test -s conftest.$ac_objext'
3194   { (eval echo "$as_me:3194: \"$ac_try\"") >&5
3195   (eval $ac_try) 2>&5
3196   ac_status=$?
3197   echo "$as_me:3197: \$? = $ac_status" >&5
3198   (exit $ac_status); }; }; then
3199   break
3200 else
3201   echo "$as_me: failed program was:" >&5
3202 cat conftest.$ac_ext >&5
3203 fi
3204 rm -f conftest.$ac_objext conftest.$ac_ext
3205 done
3206 rm -rf conftest*
3207 if test -n "$ac_declaration"; then
3208   echo '#ifdef __cplusplus' >>confdefs.h
3209   echo $ac_declaration      >>confdefs.h
3210   echo '#endif'             >>confdefs.h
3211 fi
3212
3213 ac_ext=c
3214 ac_cpp='$CPP $CPPFLAGS'
3215 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3216 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3217 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3218 ac_main_return=return
3219
3220         ac_ext=cc
3221 ac_cpp='$CXXCPP $CPPFLAGS'
3222 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3225 ac_main_return=return
3226
3227         if test "x$cf_with_cxx" != xno
3228         then
3229                 # Several of the C++ configurations do not work, particularly when
3230                 # cross-compiling (20140913 -TD)
3231                 echo "$as_me:3231: checking if $CXX works" >&5
3232 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3233
3234                 save_CPPFLAGS="$CPPFLAGS"
3235                 eval cf_includedir=${includedir}
3236                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3237
3238 cat >conftest.$ac_ext <<_ACEOF
3239 #line 3239 "configure"
3240 #include "confdefs.h"
3241
3242 #include <stdlib.h>
3243 #include <stdio.h>
3244
3245 int
3246 main (void)
3247 {
3248
3249                 printf("Hello world!\n")
3250
3251   ;
3252   return 0;
3253 }
3254 _ACEOF
3255 rm -f conftest.$ac_objext
3256 if { (eval echo "$as_me:3256: \"$ac_compile\"") >&5
3257   (eval $ac_compile) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit $ac_status); } &&
3261          { ac_try='test -s conftest.$ac_objext'
3262   { (eval echo "$as_me:3262: \"$ac_try\"") >&5
3263   (eval $ac_try) 2>&5
3264   ac_status=$?
3265   echo "$as_me:3265: \$? = $ac_status" >&5
3266   (exit $ac_status); }; }; then
3267   cf_cxx_works=yes
3268 else
3269   echo "$as_me: failed program was:" >&5
3270 cat conftest.$ac_ext >&5
3271 cf_cxx_works=no
3272 fi
3273 rm -f conftest.$ac_objext conftest.$ac_ext
3274                 CPPFLAGS="$save_CPPFLAGS"
3275
3276                 echo "$as_me:3276: result: $cf_cxx_works" >&5
3277 echo "${ECHO_T}$cf_cxx_works" >&6
3278                 if test "x$cf_cxx_works" = xno
3279                 then
3280                         { echo "$as_me:3280: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3281 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3282                         cf_with_cxx=no; CXX=""; GXX="";
3283                 fi
3284         fi
3285         ac_ext=c
3286 ac_cpp='$CPP $CPPFLAGS'
3287 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3288 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3289 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3290 ac_main_return=return
3291
3292         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3293         if test "$CXX" = "g++" ; then
3294                 # Extract the first word of "g++", so it can be a program name with args.
3295 set dummy g++; ac_word=$2
3296 echo "$as_me:3296: checking for $ac_word" >&5
3297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3298 if test "${ac_cv_path_CXX+set}" = set; then
3299   echo $ECHO_N "(cached) $ECHO_C" >&6
3300 else
3301   case $CXX in
3302   [\\/]* | ?:[\\/]*)
3303   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3304   ;;
3305   *)
3306   ac_save_IFS=$IFS; IFS=$ac_path_separator
3307 ac_dummy="$PATH"
3308 for ac_dir in $ac_dummy; do
3309   IFS=$ac_save_IFS
3310   test -z "$ac_dir" && ac_dir=.
3311   if $as_executable_p "$ac_dir/$ac_word"; then
3312    ac_cv_path_CXX="$ac_dir/$ac_word"
3313    echo "$as_me:3313: found $ac_dir/$ac_word" >&5
3314    break
3315 fi
3316 done
3317
3318   ;;
3319 esac
3320 fi
3321 CXX=$ac_cv_path_CXX
3322
3323 if test -n "$CXX"; then
3324   echo "$as_me:3324: result: $CXX" >&5
3325 echo "${ECHO_T}$CXX" >&6
3326 else
3327   echo "$as_me:3327: result: no" >&5
3328 echo "${ECHO_T}no" >&6
3329 fi
3330
3331         fi
3332         case "x$CXX" in
3333         (x|xg++)
3334                 { echo "$as_me:3334: WARNING: You don't have any C++ compiler, too bad" >&5
3335 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3336                 cf_with_cxx=no; CXX=""; GXX="";
3337                 ;;
3338         esac
3339 fi
3340
3341 GXX_VERSION=none
3342 if test "$GXX" = yes; then
3343         echo "$as_me:3343: checking version of ${CXX:-g++}" >&5
3344 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3345         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3346         if test -z "$GXX_VERSION"
3347         then
3348                 GXX_VERSION=unknown
3349                 GXX=no
3350         fi
3351         echo "$as_me:3351: result: $GXX_VERSION" >&5
3352 echo "${ECHO_T}$GXX_VERSION" >&6
3353 fi
3354
3355 case $GXX_VERSION in
3356 (1*|2.[0-6]*)
3357         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3358         # cf_cxx_library=no
3359         { echo "$as_me:3359: WARNING: templates do not work" >&5
3360 echo "$as_me: WARNING: templates do not work" >&2;}
3361         ;;
3362 esac
3363
3364 echo "$as_me:3364: checking if you want to build C++ binding and demo" >&5
3365 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3366
3367 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3368 if test "${with_cxx_binding+set}" = set; then
3369   withval="$with_cxx_binding"
3370   cf_with_cxx_binding=$withval
3371 else
3372   cf_with_cxx_binding=$cf_with_cxx
3373 fi;
3374 echo "$as_me:3374: result: $cf_with_cxx_binding" >&5
3375 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3376
3377 echo "$as_me:3377: checking if you want to build with Ada" >&5
3378 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3379 echo "$as_me:3379: result: $cf_with_ada" >&5
3380 echo "${ECHO_T}$cf_with_ada" >&6
3381
3382 echo "$as_me:3382: checking if you want to install terminal database" >&5
3383 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3384
3385 # Check whether --enable-db-install or --disable-db-install was given.
3386 if test "${enable_db_install+set}" = set; then
3387   enableval="$enable_db_install"
3388   cf_with_db_install=$enableval
3389 else
3390   cf_with_db_install=yes
3391 fi;
3392 echo "$as_me:3392: result: $cf_with_db_install" >&5
3393 echo "${ECHO_T}$cf_with_db_install" >&6
3394
3395 echo "$as_me:3395: checking if you want to install manpages" >&5
3396 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3397
3398 # Check whether --with-manpages or --without-manpages was given.
3399 if test "${with_manpages+set}" = set; then
3400   withval="$with_manpages"
3401   cf_with_manpages=$withval
3402 else
3403   cf_with_manpages=yes
3404 fi;
3405 echo "$as_me:3405: result: $cf_with_manpages" >&5
3406 echo "${ECHO_T}$cf_with_manpages" >&6
3407
3408 echo "$as_me:3408: checking if you want to build programs such as tic" >&5
3409 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3410
3411 # Check whether --with-progs or --without-progs was given.
3412 if test "${with_progs+set}" = set; then
3413   withval="$with_progs"
3414   cf_with_progs=$withval
3415 else
3416   cf_with_progs=yes
3417 fi;
3418 echo "$as_me:3418: result: $cf_with_progs" >&5
3419 echo "${ECHO_T}$cf_with_progs" >&6
3420
3421 if test -f $srcdir/tack/tack.h; then
3422         if test "x$cross_compiling" = xyes ; then
3423                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3424
3425 echo "${as_me:-configure}:3425: testing ignoring tack because we are cross-compiling ..." 1>&5
3426
3427                 cf_with_tack=no
3428         else
3429                 echo "$as_me:3429: checking if you want to build the tack program" >&5
3430 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3431
3432 # Check whether --with-tack or --without-tack was given.
3433 if test "${with_tack+set}" = set; then
3434   withval="$with_tack"
3435   cf_with_tack=$withval
3436 else
3437   cf_with_tack=$cf_with_progs
3438 fi;
3439                 echo "$as_me:3439: result: $cf_with_tack" >&5
3440 echo "${ECHO_T}$cf_with_tack" >&6
3441         fi
3442 else
3443         cf_with_tack=no
3444 fi
3445
3446 echo "$as_me:3446: checking if you want to build test-programs" >&5
3447 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3448
3449 # Check whether --with-tests or --without-tests was given.
3450 if test "${with_tests+set}" = set; then
3451   withval="$with_tests"
3452   cf_with_tests=$withval
3453 else
3454   cf_with_tests=yes
3455 fi;
3456 echo "$as_me:3456: result: $cf_with_tests" >&5
3457 echo "${ECHO_T}$cf_with_tests" >&6
3458
3459 echo "$as_me:3459: checking if you wish to install curses.h" >&5
3460 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3461
3462 # Check whether --with-curses-h or --without-curses-h was given.
3463 if test "${with_curses_h+set}" = set; then
3464   withval="$with_curses_h"
3465   with_curses_h=$withval
3466 else
3467   with_curses_h=yes
3468 fi;
3469 echo "$as_me:3469: result: $with_curses_h" >&5
3470 echo "${ECHO_T}$with_curses_h" >&6
3471
3472 modules_to_build="ncurses"
3473 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3474 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3475 modules_to_build="$modules_to_build panel menu form"
3476
3477 test "$program_prefix" != NONE &&
3478   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3479 # Use a double $ so make ignores it.
3480 test "$program_suffix" != NONE &&
3481   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3482 # Double any \ or $.  echo might interpret backslashes.
3483 # By default was `s,x,x', remove it if useless.
3484 cat <<\_ACEOF >conftest.sed
3485 s/[\\$]/&&/g;s/;s,x,x,$//
3486 _ACEOF
3487 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3488 rm conftest.sed
3489
3490 for ac_prog in mawk gawk nawk awk
3491 do
3492   # Extract the first word of "$ac_prog", so it can be a program name with args.
3493 set dummy $ac_prog; ac_word=$2
3494 echo "$as_me:3494: checking for $ac_word" >&5
3495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3496 if test "${ac_cv_prog_AWK+set}" = set; then
3497   echo $ECHO_N "(cached) $ECHO_C" >&6
3498 else
3499   if test -n "$AWK"; then
3500   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3501 else
3502   ac_save_IFS=$IFS; IFS=$ac_path_separator
3503 ac_dummy="$PATH"
3504 for ac_dir in $ac_dummy; do
3505   IFS=$ac_save_IFS
3506   test -z "$ac_dir" && ac_dir=.
3507   $as_executable_p "$ac_dir/$ac_word" || continue
3508 ac_cv_prog_AWK="$ac_prog"
3509 echo "$as_me:3509: found $ac_dir/$ac_word" >&5
3510 break
3511 done
3512
3513 fi
3514 fi
3515 AWK=$ac_cv_prog_AWK
3516 if test -n "$AWK"; then
3517   echo "$as_me:3517: result: $AWK" >&5
3518 echo "${ECHO_T}$AWK" >&6
3519 else
3520   echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3522 fi
3523
3524   test -n "$AWK" && break
3525 done
3526
3527 test -z "$AWK" && { { echo "$as_me:3527: error: No awk program found" >&5
3528 echo "$as_me: error: No awk program found" >&2;}
3529    { (exit 1); exit 1; }; }
3530
3531 echo "$as_me:3531: checking for egrep" >&5
3532 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3533 if test "${ac_cv_prog_egrep+set}" = set; then
3534   echo $ECHO_N "(cached) $ECHO_C" >&6
3535 else
3536   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3537                 then ac_cv_prog_egrep='grep -E'
3538                 else ac_cv_prog_egrep='egrep'
3539         fi
3540 fi
3541 echo "$as_me:3541: result: $ac_cv_prog_egrep" >&5
3542 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3543         EGREP=$ac_cv_prog_egrep
3544
3545         test -z "$EGREP" && { { echo "$as_me:3545: error: No egrep program found" >&5
3546 echo "$as_me: error: No egrep program found" >&2;}
3547    { (exit 1); exit 1; }; }
3548
3549 # Find a good install program.  We prefer a C program (faster),
3550 # so one script is as good as another.  But avoid the broken or
3551 # incompatible versions:
3552 # SysV /etc/install, /usr/sbin/install
3553 # SunOS /usr/etc/install
3554 # IRIX /sbin/install
3555 # AIX /bin/install
3556 # AmigaOS /C/install, which installs bootblocks on floppy discs
3557 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3558 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3559 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3560 # ./install, which can be erroneously created by make from ./install.sh.
3561 echo "$as_me:3561: checking for a BSD compatible install" >&5
3562 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3563 if test -z "$INSTALL"; then
3564 if test "${ac_cv_path_install+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567     ac_save_IFS=$IFS; IFS=$ac_path_separator
3568   for ac_dir in $PATH; do
3569     IFS=$ac_save_IFS
3570     # Account for people who put trailing slashes in PATH elements.
3571     case $ac_dir/ in
3572     / | ./ | .// | /cC/* \
3573     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3574     | /usr/ucb/* ) ;;
3575     *)
3576       # OSF1 and SCO ODT 3.0 have their own names for install.
3577       # Don't use installbsd from OSF since it installs stuff as root
3578       # by default.
3579       for ac_prog in ginstall scoinst install; do
3580         if $as_executable_p "$ac_dir/$ac_prog"; then
3581           if test $ac_prog = install &&
3582             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583             # AIX install.  It has an incompatible calling convention.
3584             :
3585           elif test $ac_prog = install &&
3586             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3587             # program-specific install script used by HP pwplus--don't use.
3588             :
3589           else
3590             ac_cv_path_install="$ac_dir/$ac_prog -c"
3591             break 2
3592           fi
3593         fi
3594       done
3595       ;;
3596     esac
3597   done
3598
3599 fi
3600   if test "${ac_cv_path_install+set}" = set; then
3601     INSTALL=$ac_cv_path_install
3602   else
3603     # As a last resort, use the slow shell script.  We don't cache a
3604     # path for INSTALL within a source directory, because that will
3605     # break other packages using the cache if that directory is
3606     # removed, or if the path is relative.
3607     INSTALL=$ac_install_sh
3608   fi
3609 fi
3610 echo "$as_me:3610: result: $INSTALL" >&5
3611 echo "${ECHO_T}$INSTALL" >&6
3612
3613 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3614 # It thinks the first close brace ends the variable substitution.
3615 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3616
3617 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3618
3619 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3620
3621 case $INSTALL in
3622 (/*)
3623         ;;
3624 (*)
3625         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3626         test -z "$cf_dir" && cf_dir=.
3627         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3628         ;;
3629 esac
3630
3631 for ac_prog in lint cppcheck splint
3632 do
3633   # Extract the first word of "$ac_prog", so it can be a program name with args.
3634 set dummy $ac_prog; ac_word=$2
3635 echo "$as_me:3635: checking for $ac_word" >&5
3636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3637 if test "${ac_cv_prog_LINT+set}" = set; then
3638   echo $ECHO_N "(cached) $ECHO_C" >&6
3639 else
3640   if test -n "$LINT"; then
3641   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3642 else
3643   ac_save_IFS=$IFS; IFS=$ac_path_separator
3644 ac_dummy="$PATH"
3645 for ac_dir in $ac_dummy; do
3646   IFS=$ac_save_IFS
3647   test -z "$ac_dir" && ac_dir=.
3648   $as_executable_p "$ac_dir/$ac_word" || continue
3649 ac_cv_prog_LINT="$ac_prog"
3650 echo "$as_me:3650: found $ac_dir/$ac_word" >&5
3651 break
3652 done
3653
3654 fi
3655 fi
3656 LINT=$ac_cv_prog_LINT
3657 if test -n "$LINT"; then
3658   echo "$as_me:3658: result: $LINT" >&5
3659 echo "${ECHO_T}$LINT" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665   test -n "$LINT" && break
3666 done
3667
3668 case "x$LINT" in
3669 (xcppcheck|x*/cppcheck)
3670         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3671         ;;
3672 esac
3673
3674 echo "$as_me:3674: checking whether ln -s works" >&5
3675 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3676 LN_S=$as_ln_s
3677 if test "$LN_S" = "ln -s"; then
3678   echo "$as_me:3678: result: yes" >&5
3679 echo "${ECHO_T}yes" >&6
3680 else
3681   echo "$as_me:3681: result: no, using $LN_S" >&5
3682 echo "${ECHO_T}no, using $LN_S" >&6
3683 fi
3684
3685 echo "$as_me:3685: checking if $LN_S -f options work" >&5
3686 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3687
3688 rm -f conf$$.src conf$$dst
3689 echo >conf$$.dst
3690 echo first >conf$$.src
3691 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3692         cf_prog_ln_sf=yes
3693 else
3694         cf_prog_ln_sf=no
3695 fi
3696 rm -f conf$$.dst conf$$src
3697 echo "$as_me:3697: result: $cf_prog_ln_sf" >&5
3698 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3699
3700 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3701
3702 echo "$as_me:3702: checking for long file names" >&5
3703 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3704 if test "${ac_cv_sys_long_file_names+set}" = set; then
3705   echo $ECHO_N "(cached) $ECHO_C" >&6
3706 else
3707   ac_cv_sys_long_file_names=yes
3708 # Test for long file names in all the places we know might matter:
3709 #      .                the current directory, where building will happen
3710 #      $prefix/lib      where we will be installing things
3711 #      $exec_prefix/lib likewise
3712 # eval it to expand exec_prefix.
3713 #      $TMPDIR          if set, where it might want to write temporary files
3714 # if $TMPDIR is not set:
3715 #      /tmp             where it might want to write temporary files
3716 #      /var/tmp         likewise
3717 #      /usr/tmp         likewise
3718 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3719   ac_tmpdirs=$TMPDIR
3720 else
3721   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3722 fi
3723 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3724   test -d $ac_dir || continue
3725   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3726   ac_xdir=$ac_dir/cf$$
3727   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3728   ac_tf1=$ac_xdir/conftest9012345
3729   ac_tf2=$ac_xdir/conftest9012346
3730   (echo 1 >$ac_tf1) 2>/dev/null
3731   (echo 2 >$ac_tf2) 2>/dev/null
3732   ac_val=`cat $ac_tf1 2>/dev/null`
3733   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3734     ac_cv_sys_long_file_names=no
3735     rm -rf $ac_xdir 2>/dev/null
3736     break
3737   fi
3738   rm -rf $ac_xdir 2>/dev/null
3739 done
3740 fi
3741 echo "$as_me:3741: result: $ac_cv_sys_long_file_names" >&5
3742 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3743 if test $ac_cv_sys_long_file_names = yes; then
3744
3745 cat >>confdefs.h <<\EOF
3746 #define HAVE_LONG_FILE_NAMES 1
3747 EOF
3748
3749 fi
3750
3751 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3752 # of package conflict.
3753 cf_config_suffix=
3754
3755 # Check whether --with-config-suffix or --without-config-suffix was given.
3756 if test "${with_config_suffix+set}" = set; then
3757   withval="$with_config_suffix"
3758   case "x$withval" in
3759         (xyes|xno)
3760                 { echo "$as_me:3760: WARNING: expected a value for config-suffix option" >&5
3761 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3762                 ;;
3763         (*)     cf_config_suffix="$withval"
3764                 ;;
3765         esac
3766 fi;
3767
3768 # If we find pkg-config, check if we should install the ".pc" files.
3769
3770 echo "$as_me:3770: checking if you want to use pkg-config" >&5
3771 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3772
3773 # Check whether --with-pkg-config or --without-pkg-config was given.
3774 if test "${with_pkg_config+set}" = set; then
3775   withval="$with_pkg_config"
3776   cf_pkg_config=$withval
3777 else
3778   cf_pkg_config=yes
3779 fi;
3780 echo "$as_me:3780: result: $cf_pkg_config" >&5
3781 echo "${ECHO_T}$cf_pkg_config" >&6
3782
3783 case $cf_pkg_config in
3784 (no)
3785         PKG_CONFIG=none
3786         ;;
3787 (yes)
3788
3789 if test -n "$ac_tool_prefix"; then
3790   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3791 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   case $PKG_CONFIG in
3798   [\\/]* | ?:[\\/]*)
3799   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3800   ;;
3801   *)
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   if $as_executable_p "$ac_dir/$ac_word"; then
3808    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3809    echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810    break
3811 fi
3812 done
3813
3814   ;;
3815 esac
3816 fi
3817 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3818
3819 if test -n "$PKG_CONFIG"; then
3820   echo "$as_me:3820: result: $PKG_CONFIG" >&5
3821 echo "${ECHO_T}$PKG_CONFIG" >&6
3822 else
3823   echo "$as_me:3823: result: no" >&5
3824 echo "${ECHO_T}no" >&6
3825 fi
3826
3827 fi
3828 if test -z "$ac_cv_path_PKG_CONFIG"; then
3829   ac_pt_PKG_CONFIG=$PKG_CONFIG
3830   # Extract the first word of "pkg-config", so it can be a program name with args.
3831 set dummy pkg-config; ac_word=$2
3832 echo "$as_me:3832: checking for $ac_word" >&5
3833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3834 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3835   echo $ECHO_N "(cached) $ECHO_C" >&6
3836 else
3837   case $ac_pt_PKG_CONFIG in
3838   [\\/]* | ?:[\\/]*)
3839   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3840   ;;
3841   *)
3842   ac_save_IFS=$IFS; IFS=$ac_path_separator
3843 ac_dummy="$PATH"
3844 for ac_dir in $ac_dummy; do
3845   IFS=$ac_save_IFS
3846   test -z "$ac_dir" && ac_dir=.
3847   if $as_executable_p "$ac_dir/$ac_word"; then
3848    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3849    echo "$as_me:3849: found $ac_dir/$ac_word" >&5
3850    break
3851 fi
3852 done
3853
3854   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3855   ;;
3856 esac
3857 fi
3858 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3859
3860 if test -n "$ac_pt_PKG_CONFIG"; then
3861   echo "$as_me:3861: result: $ac_pt_PKG_CONFIG" >&5
3862 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3863 else
3864   echo "$as_me:3864: result: no" >&5
3865 echo "${ECHO_T}no" >&6
3866 fi
3867
3868   PKG_CONFIG=$ac_pt_PKG_CONFIG
3869 else
3870   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3871 fi
3872
3873         ;;
3874 (*)
3875         PKG_CONFIG=$withval
3876         ;;
3877 esac
3878
3879 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3880 if test "$PKG_CONFIG" != none ; then
3881
3882 if test "x$prefix" != xNONE; then
3883         cf_path_syntax="$prefix"
3884 else
3885         cf_path_syntax="$ac_default_prefix"
3886 fi
3887
3888 case ".$PKG_CONFIG" in
3889 (.\$\(*\)*|.\'*\'*)
3890         ;;
3891 (..|./*|.\\*)
3892         ;;
3893 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3894         ;;
3895 (.\${*prefix}*|.\${*dir}*)
3896         eval PKG_CONFIG="$PKG_CONFIG"
3897         case ".$PKG_CONFIG" in
3898         (.NONE/*)
3899                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3900                 ;;
3901         esac
3902         ;;
3903 (.no|.NONE/*)
3904         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3905         ;;
3906 (*)
3907         { { echo "$as_me:3907: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3908 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3909    { (exit 1); exit 1; }; }
3910         ;;
3911 esac
3912
3913 elif test "x$cf_pkg_config" != xno ; then
3914         { echo "$as_me:3914: WARNING: pkg-config is not installed" >&5
3915 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3916 fi
3917
3918 case $PKG_CONFIG in
3919 (no|none|yes)
3920         echo "$as_me:3920: checking for pkg-config library directory" >&5
3921 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3922         ;;
3923 (*)
3924         echo "$as_me:3924: checking for $PKG_CONFIG library directory" >&5
3925 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3926         ;;
3927 esac
3928
3929 PKG_CONFIG_LIBDIR=no
3930
3931 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3932 if test "${with_pkg_config_libdir+set}" = set; then
3933   withval="$with_pkg_config_libdir"
3934   PKG_CONFIG_LIBDIR=$withval
3935 else
3936   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3937 fi;
3938
3939 case x$PKG_CONFIG_LIBDIR in
3940 (x/*)
3941         ;;
3942 (xyes)
3943         # Look for the library directory using the same prefix as the executable
3944         if test "x$PKG_CONFIG" = xnone
3945         then
3946                 cf_path=$prefix
3947         else
3948                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3949         fi
3950
3951         # If you don't like using the default architecture, you have to specify the
3952         # intended library directory and corresponding compiler/linker options.
3953         #
3954         # This case allows for Debian's 2014-flavor of multiarch, along with the
3955         # most common variations before that point.  Some other variants spell the
3956         # directory differently, e.g., "pkg-config", and put it in unusual places.
3957         # pkg-config has always been poorly standardized, which is ironic...
3958         case x`(arch) 2>/dev/null` in
3959         (*64)
3960                 cf_search_path="\
3961                         $cf_path/lib/*64-linux-gnu \
3962                         $cf_path/share \
3963                         $cf_path/lib64 \
3964                         $cf_path/lib32 \
3965                         $cf_path/lib"
3966                 ;;
3967         (*)
3968                 cf_search_path="\
3969                         $cf_path/lib/*-linux-gnu \
3970                         $cf_path/share \
3971                         $cf_path/lib32 \
3972                         $cf_path/lib \
3973                         $cf_path/libdata"
3974                 ;;
3975         esac
3976
3977         test -n "$verbose" && echo "    list..." 1>&6
3978
3979 echo "${as_me:-configure}:3979: testing list... ..." 1>&5
3980
3981         for cf_config in $cf_search_path
3982         do
3983                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3984
3985 echo "${as_me:-configure}:3985: testing checking $cf_config/pkgconfig ..." 1>&5
3986
3987                 if test -d $cf_config/pkgconfig
3988                 then
3989                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3990                         echo "$as_me:3990: checking done" >&5
3991 echo $ECHO_N "checking done... $ECHO_C" >&6
3992                         break
3993                 fi
3994         done
3995         ;;
3996 (*)
3997         ;;
3998 esac
3999
4000 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4001         echo "$as_me:4001: result: $PKG_CONFIG_LIBDIR" >&5
4002 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4003 fi
4004
4005 if test "x$PKG_CONFIG" != xnone
4006 then
4007         echo "$as_me:4007: checking if we should install .pc files for $PKG_CONFIG" >&5
4008 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4009 else
4010         echo "$as_me:4010: checking if we should install .pc files" >&5
4011 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4012 fi
4013
4014 # Check whether --enable-pc-files or --disable-pc-files was given.
4015 if test "${enable_pc_files+set}" = set; then
4016   enableval="$enable_pc_files"
4017   enable_pc_files=$enableval
4018 else
4019   enable_pc_files=no
4020 fi;
4021 echo "$as_me:4021: result: $enable_pc_files" >&5
4022 echo "${ECHO_T}$enable_pc_files" >&6
4023
4024 if test "x$enable_pc_files" != xno
4025 then
4026         MAKE_PC_FILES=
4027         case "x$PKG_CONFIG_LIBDIR" in
4028         (xno|xyes)
4029                 { echo "$as_me:4029: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4030 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4031                 ;;
4032         (*)
4033
4034 if test "x$prefix" != xNONE; then
4035         cf_path_syntax="$prefix"
4036 else
4037         cf_path_syntax="$ac_default_prefix"
4038 fi
4039
4040 case ".$PKG_CONFIG_LIBDIR" in
4041 (.\$\(*\)*|.\'*\'*)
4042         ;;
4043 (..|./*|.\\*)
4044         ;;
4045 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4046         ;;
4047 (.\${*prefix}*|.\${*dir}*)
4048         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4049         case ".$PKG_CONFIG_LIBDIR" in
4050         (.NONE/*)
4051                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4052                 ;;
4053         esac
4054         ;;
4055 (.no|.NONE/*)
4056         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4057         ;;
4058 (*)
4059         { { echo "$as_me:4059: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4060 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4061    { (exit 1); exit 1; }; }
4062         ;;
4063 esac
4064
4065                 ;;
4066         esac
4067 else
4068         MAKE_PC_FILES="#"
4069 fi
4070
4071 if test -z "$MAKE_PC_FILES"
4072 then
4073         echo "$as_me:4073: checking for suffix to add to pc-files" >&5
4074 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4075
4076 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4077 if test "${with_pc_suffix+set}" = set; then
4078   withval="$with_pc_suffix"
4079   case "x$withval" in
4080         (xyes|xno)
4081                 PC_MODULE_SUFFIX=
4082                 ;;
4083         (*)     PC_MODULE_SUFFIX="$withval"
4084                 ;;
4085         esac
4086 fi;
4087         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4088         echo "$as_me:4088: result: $PC_MODULE_SUFFIX" >&5
4089 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4090         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4091
4092 fi
4093
4094 echo "$as_me:4094: checking if we should assume mixed-case filenames" >&5
4095 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4096
4097 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4098 if test "${enable_mixed_case+set}" = set; then
4099   enableval="$enable_mixed_case"
4100   enable_mixedcase=$enableval
4101 else
4102   enable_mixedcase=auto
4103 fi;
4104 echo "$as_me:4104: result: $enable_mixedcase" >&5
4105 echo "${ECHO_T}$enable_mixedcase" >&6
4106 if test "$enable_mixedcase" = "auto" ; then
4107
4108 echo "$as_me:4108: checking if filesystem supports mixed-case filenames" >&5
4109 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4110 if test "${cf_cv_mixedcase+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113
4114 if test "$cross_compiling" = yes ; then
4115         case $target_alias in
4116         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4117                 cf_cv_mixedcase=no
4118                 ;;
4119         (*)
4120                 cf_cv_mixedcase=yes
4121                 ;;
4122         esac
4123 else
4124         rm -f conftest CONFTEST
4125         echo test >conftest
4126         if test -f CONFTEST ; then
4127                 cf_cv_mixedcase=no
4128         else
4129                 cf_cv_mixedcase=yes
4130         fi
4131         rm -f conftest CONFTEST
4132 fi
4133
4134 fi
4135 echo "$as_me:4135: result: $cf_cv_mixedcase" >&5
4136 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4137 test "$cf_cv_mixedcase" = yes &&
4138 cat >>confdefs.h <<\EOF
4139 #define MIXEDCASE_FILENAMES 1
4140 EOF
4141
4142 else
4143         cf_cv_mixedcase=$enable_mixedcase
4144         if test "x$enable_mixedcase" = "xyes" ; then
4145
4146 cat >>confdefs.h <<\EOF
4147 #define MIXEDCASE_FILENAMES 1
4148 EOF
4149
4150         fi
4151 fi
4152
4153 # do this after mixed-case option (tags/TAGS is not as important as tic).
4154 echo "$as_me:4154: checking whether ${MAKE-make} sets \${MAKE}" >&5
4155 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4156 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4157 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4158   echo $ECHO_N "(cached) $ECHO_C" >&6
4159 else
4160   cat >conftest.make <<\EOF
4161 all:
4162         @echo 'ac_maketemp="${MAKE}"'
4163 EOF
4164 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4165 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4166 if test -n "$ac_maketemp"; then
4167   eval ac_cv_prog_make_${ac_make}_set=yes
4168 else
4169   eval ac_cv_prog_make_${ac_make}_set=no
4170 fi
4171 rm -f conftest.make
4172 fi
4173 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4174   echo "$as_me:4174: result: yes" >&5
4175 echo "${ECHO_T}yes" >&6
4176   SET_MAKE=
4177 else
4178   echo "$as_me:4178: result: no" >&5
4179 echo "${ECHO_T}no" >&6
4180   SET_MAKE="MAKE=${MAKE-make}"
4181 fi
4182
4183 for ac_prog in exctags ctags
4184 do
4185   # Extract the first word of "$ac_prog", so it can be a program name with args.
4186 set dummy $ac_prog; ac_word=$2
4187 echo "$as_me:4187: checking for $ac_word" >&5
4188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4189 if test "${ac_cv_prog_CTAGS+set}" = set; then
4190   echo $ECHO_N "(cached) $ECHO_C" >&6
4191 else
4192   if test -n "$CTAGS"; then
4193   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4194 else
4195   ac_save_IFS=$IFS; IFS=$ac_path_separator
4196 ac_dummy="$PATH"
4197 for ac_dir in $ac_dummy; do
4198   IFS=$ac_save_IFS
4199   test -z "$ac_dir" && ac_dir=.
4200   $as_executable_p "$ac_dir/$ac_word" || continue
4201 ac_cv_prog_CTAGS="$ac_prog"
4202 echo "$as_me:4202: found $ac_dir/$ac_word" >&5
4203 break
4204 done
4205
4206 fi
4207 fi
4208 CTAGS=$ac_cv_prog_CTAGS
4209 if test -n "$CTAGS"; then
4210   echo "$as_me:4210: result: $CTAGS" >&5
4211 echo "${ECHO_T}$CTAGS" >&6
4212 else
4213   echo "$as_me:4213: result: no" >&5
4214 echo "${ECHO_T}no" >&6
4215 fi
4216
4217   test -n "$CTAGS" && break
4218 done
4219
4220 for ac_prog in exetags etags
4221 do
4222   # Extract the first word of "$ac_prog", so it can be a program name with args.
4223 set dummy $ac_prog; ac_word=$2
4224 echo "$as_me:4224: checking for $ac_word" >&5
4225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4226 if test "${ac_cv_prog_ETAGS+set}" = set; then
4227   echo $ECHO_N "(cached) $ECHO_C" >&6
4228 else
4229   if test -n "$ETAGS"; then
4230   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4231 else
4232   ac_save_IFS=$IFS; IFS=$ac_path_separator
4233 ac_dummy="$PATH"
4234 for ac_dir in $ac_dummy; do
4235   IFS=$ac_save_IFS
4236   test -z "$ac_dir" && ac_dir=.
4237   $as_executable_p "$ac_dir/$ac_word" || continue
4238 ac_cv_prog_ETAGS="$ac_prog"
4239 echo "$as_me:4239: found $ac_dir/$ac_word" >&5
4240 break
4241 done
4242
4243 fi
4244 fi
4245 ETAGS=$ac_cv_prog_ETAGS
4246 if test -n "$ETAGS"; then
4247   echo "$as_me:4247: result: $ETAGS" >&5
4248 echo "${ECHO_T}$ETAGS" >&6
4249 else
4250   echo "$as_me:4250: result: no" >&5
4251 echo "${ECHO_T}no" >&6
4252 fi
4253
4254   test -n "$ETAGS" && break
4255 done
4256
4257 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4258 set dummy ${CTAGS:-ctags}; ac_word=$2
4259 echo "$as_me:4259: checking for $ac_word" >&5
4260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4261 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   if test -n "$MAKE_LOWER_TAGS"; then
4265   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4266 else
4267   ac_save_IFS=$IFS; IFS=$ac_path_separator
4268 ac_dummy="$PATH"
4269 for ac_dir in $ac_dummy; do
4270   IFS=$ac_save_IFS
4271   test -z "$ac_dir" && ac_dir=.
4272   $as_executable_p "$ac_dir/$ac_word" || continue
4273 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4274 echo "$as_me:4274: found $ac_dir/$ac_word" >&5
4275 break
4276 done
4277
4278   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4279 fi
4280 fi
4281 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4282 if test -n "$MAKE_LOWER_TAGS"; then
4283   echo "$as_me:4283: result: $MAKE_LOWER_TAGS" >&5
4284 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4285 else
4286   echo "$as_me:4286: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290 if test "$cf_cv_mixedcase" = yes ; then
4291         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4292 set dummy ${ETAGS:-etags}; ac_word=$2
4293 echo "$as_me:4293: checking for $ac_word" >&5
4294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4295 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4296   echo $ECHO_N "(cached) $ECHO_C" >&6
4297 else
4298   if test -n "$MAKE_UPPER_TAGS"; then
4299   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4300 else
4301   ac_save_IFS=$IFS; IFS=$ac_path_separator
4302 ac_dummy="$PATH"
4303 for ac_dir in $ac_dummy; do
4304   IFS=$ac_save_IFS
4305   test -z "$ac_dir" && ac_dir=.
4306   $as_executable_p "$ac_dir/$ac_word" || continue
4307 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4308 echo "$as_me:4308: found $ac_dir/$ac_word" >&5
4309 break
4310 done
4311
4312   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4313 fi
4314 fi
4315 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4316 if test -n "$MAKE_UPPER_TAGS"; then
4317   echo "$as_me:4317: result: $MAKE_UPPER_TAGS" >&5
4318 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4319 else
4320   echo "$as_me:4320: result: no" >&5
4321 echo "${ECHO_T}no" >&6
4322 fi
4323
4324 else
4325         MAKE_UPPER_TAGS=no
4326 fi
4327
4328 if test "$MAKE_UPPER_TAGS" = yes ; then
4329         MAKE_UPPER_TAGS=
4330 else
4331         MAKE_UPPER_TAGS="#"
4332 fi
4333
4334 if test "$MAKE_LOWER_TAGS" = yes ; then
4335         MAKE_LOWER_TAGS=
4336 else
4337         MAKE_LOWER_TAGS="#"
4338 fi
4339
4340 echo "$as_me:4340: checking for makeflags variable" >&5
4341 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4342 if test "${cf_cv_makeflags+set}" = set; then
4343   echo $ECHO_N "(cached) $ECHO_C" >&6
4344 else
4345
4346         cf_cv_makeflags=''
4347         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4348         do
4349                 cat >cf_makeflags.tmp <<CF_EOF
4350 SHELL = $SHELL
4351 all :
4352         @ echo '.$cf_option'
4353 CF_EOF
4354                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4355                 case "$cf_result" in
4356                 (.*k|.*kw)
4357                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4358                         case "$cf_result" in
4359                         (.*CC=*)        cf_cv_makeflags=
4360                                 ;;
4361                         (*)     cf_cv_makeflags=$cf_option
4362                                 ;;
4363                         esac
4364                         break
4365                         ;;
4366                 (.-)
4367                         ;;
4368                 (*)
4369
4370 echo "${as_me:-configure}:4370: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4371
4372                         ;;
4373                 esac
4374         done
4375         rm -f cf_makeflags.tmp
4376
4377 fi
4378 echo "$as_me:4378: result: $cf_cv_makeflags" >&5
4379 echo "${ECHO_T}$cf_cv_makeflags" >&6
4380
4381 if test -n "$ac_tool_prefix"; then
4382   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4383 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4384 echo "$as_me:4384: checking for $ac_word" >&5
4385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4386 if test "${ac_cv_prog_RANLIB+set}" = set; then
4387   echo $ECHO_N "(cached) $ECHO_C" >&6
4388 else
4389   if test -n "$RANLIB"; then
4390   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4391 else
4392   ac_save_IFS=$IFS; IFS=$ac_path_separator
4393 ac_dummy="$PATH"
4394 for ac_dir in $ac_dummy; do
4395   IFS=$ac_save_IFS
4396   test -z "$ac_dir" && ac_dir=.
4397   $as_executable_p "$ac_dir/$ac_word" || continue
4398 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4399 echo "$as_me:4399: found $ac_dir/$ac_word" >&5
4400 break
4401 done
4402
4403 fi
4404 fi
4405 RANLIB=$ac_cv_prog_RANLIB
4406 if test -n "$RANLIB"; then
4407   echo "$as_me:4407: result: $RANLIB" >&5
4408 echo "${ECHO_T}$RANLIB" >&6
4409 else
4410   echo "$as_me:4410: result: no" >&5
4411 echo "${ECHO_T}no" >&6
4412 fi
4413
4414 fi
4415 if test -z "$ac_cv_prog_RANLIB"; then
4416   ac_ct_RANLIB=$RANLIB
4417   # Extract the first word of "ranlib", so it can be a program name with args.
4418 set dummy ranlib; ac_word=$2
4419 echo "$as_me:4419: checking for $ac_word" >&5
4420 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4421 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4422   echo $ECHO_N "(cached) $ECHO_C" >&6
4423 else
4424   if test -n "$ac_ct_RANLIB"; then
4425   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4426 else
4427   ac_save_IFS=$IFS; IFS=$ac_path_separator
4428 ac_dummy="$PATH"
4429 for ac_dir in $ac_dummy; do
4430   IFS=$ac_save_IFS
4431   test -z "$ac_dir" && ac_dir=.
4432   $as_executable_p "$ac_dir/$ac_word" || continue
4433 ac_cv_prog_ac_ct_RANLIB="ranlib"
4434 echo "$as_me:4434: found $ac_dir/$ac_word" >&5
4435 break
4436 done
4437
4438   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4439 fi
4440 fi
4441 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4442 if test -n "$ac_ct_RANLIB"; then
4443   echo "$as_me:4443: result: $ac_ct_RANLIB" >&5
4444 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4445 else
4446   echo "$as_me:4446: result: no" >&5
4447 echo "${ECHO_T}no" >&6
4448 fi
4449
4450   RANLIB=$ac_ct_RANLIB
4451 else
4452   RANLIB="$ac_cv_prog_RANLIB"
4453 fi
4454
4455 if test -n "$ac_tool_prefix"; then
4456   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4457 set dummy ${ac_tool_prefix}ld; ac_word=$2
4458 echo "$as_me:4458: checking for $ac_word" >&5
4459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4460 if test "${ac_cv_prog_LD+set}" = set; then
4461   echo $ECHO_N "(cached) $ECHO_C" >&6
4462 else
4463   if test -n "$LD"; then
4464   ac_cv_prog_LD="$LD" # Let the user override the test.
4465 else
4466   ac_save_IFS=$IFS; IFS=$ac_path_separator
4467 ac_dummy="$PATH"
4468 for ac_dir in $ac_dummy; do
4469   IFS=$ac_save_IFS
4470   test -z "$ac_dir" && ac_dir=.
4471   $as_executable_p "$ac_dir/$ac_word" || continue
4472 ac_cv_prog_LD="${ac_tool_prefix}ld"
4473 echo "$as_me:4473: found $ac_dir/$ac_word" >&5
4474 break
4475 done
4476
4477 fi
4478 fi
4479 LD=$ac_cv_prog_LD
4480 if test -n "$LD"; then
4481   echo "$as_me:4481: result: $LD" >&5
4482 echo "${ECHO_T}$LD" >&6
4483 else
4484   echo "$as_me:4484: result: no" >&5
4485 echo "${ECHO_T}no" >&6
4486 fi
4487
4488 fi
4489 if test -z "$ac_cv_prog_LD"; then
4490   ac_ct_LD=$LD
4491   # Extract the first word of "ld", so it can be a program name with args.
4492 set dummy ld; ac_word=$2
4493 echo "$as_me:4493: checking for $ac_word" >&5
4494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4495 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4496   echo $ECHO_N "(cached) $ECHO_C" >&6
4497 else
4498   if test -n "$ac_ct_LD"; then
4499   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4500 else
4501   ac_save_IFS=$IFS; IFS=$ac_path_separator
4502 ac_dummy="$PATH"
4503 for ac_dir in $ac_dummy; do
4504   IFS=$ac_save_IFS
4505   test -z "$ac_dir" && ac_dir=.
4506   $as_executable_p "$ac_dir/$ac_word" || continue
4507 ac_cv_prog_ac_ct_LD="ld"
4508 echo "$as_me:4508: found $ac_dir/$ac_word" >&5
4509 break
4510 done
4511
4512   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4513 fi
4514 fi
4515 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4516 if test -n "$ac_ct_LD"; then
4517   echo "$as_me:4517: result: $ac_ct_LD" >&5
4518 echo "${ECHO_T}$ac_ct_LD" >&6
4519 else
4520   echo "$as_me:4520: result: no" >&5
4521 echo "${ECHO_T}no" >&6
4522 fi
4523
4524   LD=$ac_ct_LD
4525 else
4526   LD="$ac_cv_prog_LD"
4527 fi
4528
4529 if test -n "$ac_tool_prefix"; then
4530   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4531 set dummy ${ac_tool_prefix}ar; ac_word=$2
4532 echo "$as_me:4532: checking for $ac_word" >&5
4533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4534 if test "${ac_cv_prog_AR+set}" = set; then
4535   echo $ECHO_N "(cached) $ECHO_C" >&6
4536 else
4537   if test -n "$AR"; then
4538   ac_cv_prog_AR="$AR" # Let the user override the test.
4539 else
4540   ac_save_IFS=$IFS; IFS=$ac_path_separator
4541 ac_dummy="$PATH"
4542 for ac_dir in $ac_dummy; do
4543   IFS=$ac_save_IFS
4544   test -z "$ac_dir" && ac_dir=.
4545   $as_executable_p "$ac_dir/$ac_word" || continue
4546 ac_cv_prog_AR="${ac_tool_prefix}ar"
4547 echo "$as_me:4547: found $ac_dir/$ac_word" >&5
4548 break
4549 done
4550
4551 fi
4552 fi
4553 AR=$ac_cv_prog_AR
4554 if test -n "$AR"; then
4555   echo "$as_me:4555: result: $AR" >&5
4556 echo "${ECHO_T}$AR" >&6
4557 else
4558   echo "$as_me:4558: result: no" >&5
4559 echo "${ECHO_T}no" >&6
4560 fi
4561
4562 fi
4563 if test -z "$ac_cv_prog_AR"; then
4564   ac_ct_AR=$AR
4565   # Extract the first word of "ar", so it can be a program name with args.
4566 set dummy ar; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$ac_ct_AR"; then
4573   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_ac_ct_AR="ar"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4587 fi
4588 fi
4589 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4590 if test -n "$ac_ct_AR"; then
4591   echo "$as_me:4591: result: $ac_ct_AR" >&5
4592 echo "${ECHO_T}$ac_ct_AR" >&6
4593 else
4594   echo "$as_me:4594: result: no" >&5
4595 echo "${ECHO_T}no" >&6
4596 fi
4597
4598   AR=$ac_ct_AR
4599 else
4600   AR="$ac_cv_prog_AR"
4601 fi
4602
4603 if test -n "$ac_tool_prefix"; then
4604   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4605 set dummy ${ac_tool_prefix}nm; ac_word=$2
4606 echo "$as_me:4606: checking for $ac_word" >&5
4607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4608 if test "${ac_cv_prog_NM+set}" = set; then
4609   echo $ECHO_N "(cached) $ECHO_C" >&6
4610 else
4611   if test -n "$NM"; then
4612   ac_cv_prog_NM="$NM" # Let the user override the test.
4613 else
4614   ac_save_IFS=$IFS; IFS=$ac_path_separator
4615 ac_dummy="$PATH"
4616 for ac_dir in $ac_dummy; do
4617   IFS=$ac_save_IFS
4618   test -z "$ac_dir" && ac_dir=.
4619   $as_executable_p "$ac_dir/$ac_word" || continue
4620 ac_cv_prog_NM="${ac_tool_prefix}nm"
4621 echo "$as_me:4621: found $ac_dir/$ac_word" >&5
4622 break
4623 done
4624
4625 fi
4626 fi
4627 NM=$ac_cv_prog_NM
4628 if test -n "$NM"; then
4629   echo "$as_me:4629: result: $NM" >&5
4630 echo "${ECHO_T}$NM" >&6
4631 else
4632   echo "$as_me:4632: result: no" >&5
4633 echo "${ECHO_T}no" >&6
4634 fi
4635
4636 fi
4637 if test -z "$ac_cv_prog_NM"; then
4638   ac_ct_NM=$NM
4639   # Extract the first word of "nm", so it can be a program name with args.
4640 set dummy nm; ac_word=$2
4641 echo "$as_me:4641: checking for $ac_word" >&5
4642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4643 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4644   echo $ECHO_N "(cached) $ECHO_C" >&6
4645 else
4646   if test -n "$ac_ct_NM"; then
4647   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4648 else
4649   ac_save_IFS=$IFS; IFS=$ac_path_separator
4650 ac_dummy="$PATH"
4651 for ac_dir in $ac_dummy; do
4652   IFS=$ac_save_IFS
4653   test -z "$ac_dir" && ac_dir=.
4654   $as_executable_p "$ac_dir/$ac_word" || continue
4655 ac_cv_prog_ac_ct_NM="nm"
4656 echo "$as_me:4656: found $ac_dir/$ac_word" >&5
4657 break
4658 done
4659
4660   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4661 fi
4662 fi
4663 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4664 if test -n "$ac_ct_NM"; then
4665   echo "$as_me:4665: result: $ac_ct_NM" >&5
4666 echo "${ECHO_T}$ac_ct_NM" >&6
4667 else
4668   echo "$as_me:4668: result: no" >&5
4669 echo "${ECHO_T}no" >&6
4670 fi
4671
4672   NM=$ac_ct_NM
4673 else
4674   NM="$ac_cv_prog_NM"
4675 fi
4676
4677 if test -n "$ac_tool_prefix"; then
4678   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4679 set dummy ${ac_tool_prefix}ar; ac_word=$2
4680 echo "$as_me:4680: checking for $ac_word" >&5
4681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4682 if test "${ac_cv_prog_AR+set}" = set; then
4683   echo $ECHO_N "(cached) $ECHO_C" >&6
4684 else
4685   if test -n "$AR"; then
4686   ac_cv_prog_AR="$AR" # Let the user override the test.
4687 else
4688   ac_save_IFS=$IFS; IFS=$ac_path_separator
4689 ac_dummy="$PATH"
4690 for ac_dir in $ac_dummy; do
4691   IFS=$ac_save_IFS
4692   test -z "$ac_dir" && ac_dir=.
4693   $as_executable_p "$ac_dir/$ac_word" || continue
4694 ac_cv_prog_AR="${ac_tool_prefix}ar"
4695 echo "$as_me:4695: found $ac_dir/$ac_word" >&5
4696 break
4697 done
4698
4699 fi
4700 fi
4701 AR=$ac_cv_prog_AR
4702 if test -n "$AR"; then
4703   echo "$as_me:4703: result: $AR" >&5
4704 echo "${ECHO_T}$AR" >&6
4705 else
4706   echo "$as_me:4706: result: no" >&5
4707 echo "${ECHO_T}no" >&6
4708 fi
4709
4710 fi
4711 if test -z "$ac_cv_prog_AR"; then
4712   ac_ct_AR=$AR
4713   # Extract the first word of "ar", so it can be a program name with args.
4714 set dummy ar; ac_word=$2
4715 echo "$as_me:4715: checking for $ac_word" >&5
4716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4717 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4718   echo $ECHO_N "(cached) $ECHO_C" >&6
4719 else
4720   if test -n "$ac_ct_AR"; then
4721   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4722 else
4723   ac_save_IFS=$IFS; IFS=$ac_path_separator
4724 ac_dummy="$PATH"
4725 for ac_dir in $ac_dummy; do
4726   IFS=$ac_save_IFS
4727   test -z "$ac_dir" && ac_dir=.
4728   $as_executable_p "$ac_dir/$ac_word" || continue
4729 ac_cv_prog_ac_ct_AR="ar"
4730 echo "$as_me:4730: found $ac_dir/$ac_word" >&5
4731 break
4732 done
4733
4734   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4735 fi
4736 fi
4737 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4738 if test -n "$ac_ct_AR"; then
4739   echo "$as_me:4739: result: $ac_ct_AR" >&5
4740 echo "${ECHO_T}$ac_ct_AR" >&6
4741 else
4742   echo "$as_me:4742: result: no" >&5
4743 echo "${ECHO_T}no" >&6
4744 fi
4745
4746   AR=$ac_ct_AR
4747 else
4748   AR="$ac_cv_prog_AR"
4749 fi
4750
4751 echo "$as_me:4751: checking for options to update archives" >&5
4752 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4753 if test "${cf_cv_ar_flags+set}" = set; then
4754   echo $ECHO_N "(cached) $ECHO_C" >&6
4755 else
4756
4757         cf_cv_ar_flags=unknown
4758         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4759         do
4760
4761                 # check if $ARFLAGS already contains this choice
4762                 if test "x$ARFLAGS" != "x" ; then
4763                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4764                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4765                                 cf_cv_ar_flags=
4766                                 break
4767                         fi
4768                 fi
4769
4770                 rm -f conftest.$ac_cv_objext
4771                 rm -f conftest.a
4772
4773                 cat >conftest.$ac_ext <<EOF
4774 #line 4774 "configure"
4775 int     testdata[3] = { 123, 456, 789 };
4776 EOF
4777                 if { (eval echo "$as_me:4777: \"$ac_compile\"") >&5
4778   (eval $ac_compile) 2>&5
4779   ac_status=$?
4780   echo "$as_me:4780: \$? = $ac_status" >&5
4781   (exit $ac_status); } ; then
4782                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4783                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4784                         if test -f conftest.a ; then
4785                                 cf_cv_ar_flags=$cf_ar_flags
4786                                 break
4787                         fi
4788                 else
4789                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4790
4791 echo "${as_me:-configure}:4791: testing cannot compile test-program ..." 1>&5
4792
4793                         break
4794                 fi
4795         done
4796         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4797
4798 fi
4799 echo "$as_me:4799: result: $cf_cv_ar_flags" >&5
4800 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4801
4802 if test -n "$ARFLAGS" ; then
4803         if test -n "$cf_cv_ar_flags" ; then
4804                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4805         fi
4806 else
4807         ARFLAGS=$cf_cv_ar_flags
4808 fi
4809
4810 echo "$as_me:4810: checking if you have specified an install-prefix" >&5
4811 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4812
4813 # Check whether --with-install-prefix or --without-install-prefix was given.
4814 if test "${with_install_prefix+set}" = set; then
4815   withval="$with_install_prefix"
4816   case "x$withval" in
4817         (xyes|xno)
4818                 ;;
4819         (*)     DESTDIR="$withval"
4820                 ;;
4821         esac
4822 fi;
4823 echo "$as_me:4823: result: $DESTDIR" >&5
4824 echo "${ECHO_T}$DESTDIR" >&6
4825
4826 ###############################################################################
4827
4828 # If we're cross-compiling, allow the user to override the tools and their
4829 # options.  The configure script is oriented toward identifying the host
4830 # compiler, etc., but we need a build compiler to generate parts of the source.
4831
4832 if test "$cross_compiling" = yes ; then
4833
4834         # defaults that we might want to override
4835         : ${BUILD_CFLAGS:=''}
4836         : ${BUILD_CPPFLAGS:=''}
4837         : ${BUILD_LDFLAGS:=''}
4838         : ${BUILD_LIBS:=''}
4839         : ${BUILD_EXEEXT:='$x'}
4840         : ${BUILD_OBJEXT:='o'}
4841
4842 # Check whether --with-build-cc or --without-build-cc was given.
4843 if test "${with_build_cc+set}" = set; then
4844   withval="$with_build_cc"
4845   BUILD_CC="$withval"
4846 else
4847   for ac_prog in gcc clang c99 c89 cc cl
4848 do
4849   # Extract the first word of "$ac_prog", so it can be a program name with args.
4850 set dummy $ac_prog; ac_word=$2
4851 echo "$as_me:4851: checking for $ac_word" >&5
4852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4853 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   if test -n "$BUILD_CC"; then
4857   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4858 else
4859   ac_save_IFS=$IFS; IFS=$ac_path_separator
4860 ac_dummy="$PATH"
4861 for ac_dir in $ac_dummy; do
4862   IFS=$ac_save_IFS
4863   test -z "$ac_dir" && ac_dir=.
4864   $as_executable_p "$ac_dir/$ac_word" || continue
4865 ac_cv_prog_BUILD_CC="$ac_prog"
4866 echo "$as_me:4866: found $ac_dir/$ac_word" >&5
4867 break
4868 done
4869
4870 fi
4871 fi
4872 BUILD_CC=$ac_cv_prog_BUILD_CC
4873 if test -n "$BUILD_CC"; then
4874   echo "$as_me:4874: result: $BUILD_CC" >&5
4875 echo "${ECHO_T}$BUILD_CC" >&6
4876 else
4877   echo "$as_me:4877: result: no" >&5
4878 echo "${ECHO_T}no" >&6
4879 fi
4880
4881   test -n "$BUILD_CC" && break
4882 done
4883 test -n "$BUILD_CC" || BUILD_CC="none"
4884
4885 fi;
4886         echo "$as_me:4886: checking for native build C compiler" >&5
4887 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4888         echo "$as_me:4888: result: $BUILD_CC" >&5
4889 echo "${ECHO_T}$BUILD_CC" >&6
4890
4891         echo "$as_me:4891: checking for native build C preprocessor" >&5
4892 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4893
4894 # Check whether --with-build-cpp or --without-build-cpp was given.
4895 if test "${with_build_cpp+set}" = set; then
4896   withval="$with_build_cpp"
4897   BUILD_CPP="$withval"
4898 else
4899   BUILD_CPP='${BUILD_CC} -E'
4900 fi;
4901         echo "$as_me:4901: result: $BUILD_CPP" >&5
4902 echo "${ECHO_T}$BUILD_CPP" >&6
4903
4904         echo "$as_me:4904: checking for native build C flags" >&5
4905 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4906
4907 # Check whether --with-build-cflags or --without-build-cflags was given.
4908 if test "${with_build_cflags+set}" = set; then
4909   withval="$with_build_cflags"
4910   BUILD_CFLAGS="$withval"
4911 fi;
4912         echo "$as_me:4912: result: $BUILD_CFLAGS" >&5
4913 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4914
4915         echo "$as_me:4915: checking for native build C preprocessor-flags" >&5
4916 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4917
4918 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4919 if test "${with_build_cppflags+set}" = set; then
4920   withval="$with_build_cppflags"
4921   BUILD_CPPFLAGS="$withval"
4922 fi;
4923         echo "$as_me:4923: result: $BUILD_CPPFLAGS" >&5
4924 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4925
4926         echo "$as_me:4926: checking for native build linker-flags" >&5
4927 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4928
4929 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4930 if test "${with_build_ldflags+set}" = set; then
4931   withval="$with_build_ldflags"
4932   BUILD_LDFLAGS="$withval"
4933 fi;
4934         echo "$as_me:4934: result: $BUILD_LDFLAGS" >&5
4935 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4936
4937         echo "$as_me:4937: checking for native build linker-libraries" >&5
4938 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4939
4940 # Check whether --with-build-libs or --without-build-libs was given.
4941 if test "${with_build_libs+set}" = set; then
4942   withval="$with_build_libs"
4943   BUILD_LIBS="$withval"
4944 fi;
4945         echo "$as_me:4945: result: $BUILD_LIBS" >&5
4946 echo "${ECHO_T}$BUILD_LIBS" >&6
4947
4948         # this assumes we're on Unix.
4949         BUILD_EXEEXT=
4950         BUILD_OBJEXT=o
4951
4952         : ${BUILD_CC:='${CC}'}
4953
4954         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4955                 { { echo "$as_me:4955: error: Cross-build requires two compilers.
4956 Use --with-build-cc to specify the native compiler." >&5
4957 echo "$as_me: error: Cross-build requires two compilers.
4958 Use --with-build-cc to specify the native compiler." >&2;}
4959    { (exit 1); exit 1; }; }
4960         fi
4961
4962 else
4963         : ${BUILD_CC:='${CC}'}
4964         : ${BUILD_CPP:='${CPP}'}
4965         : ${BUILD_CFLAGS:='${CFLAGS}'}
4966         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4967         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4968         : ${BUILD_LIBS:='${LIBS}'}
4969         : ${BUILD_EXEEXT:='$x'}
4970         : ${BUILD_OBJEXT:='o'}
4971 fi
4972
4973 ###############################################################################
4974
4975 ### Options to allow the user to specify the set of libraries which are used.
4976 ### Use "--without-normal --with-shared" to allow the default model to be
4977 ### shared, for example.
4978 cf_list_models=""
4979
4980 echo "$as_me:4980: checking if libtool -version-number should be used" >&5
4981 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4982
4983 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4984 if test "${enable_libtool_version+set}" = set; then
4985   enableval="$enable_libtool_version"
4986   test "$enableval" != no && enableval=yes
4987         if test "$enableval" != "yes" ; then
4988     cf_libtool_version=no
4989         else
4990                 cf_libtool_version=yes
4991         fi
4992 else
4993   enableval=yes
4994         cf_libtool_version=yes
4995
4996 fi;
4997 echo "$as_me:4997: result: $cf_libtool_version" >&5
4998 echo "${ECHO_T}$cf_libtool_version" >&6
4999
5000 if test "$cf_libtool_version" = yes ; then
5001         LIBTOOL_VERSION="-version-number"
5002 else
5003         LIBTOOL_VERSION="-version-info"
5004         case "x$VERSION" in
5005         (x)
5006                 { echo "$as_me:5006: WARNING: VERSION was not set" >&5
5007 echo "$as_me: WARNING: VERSION was not set" >&2;}
5008                 ;;
5009         (x*.*.*)
5010                 ABI_VERSION="$VERSION"
5011                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5012
5013 echo "${as_me:-configure}:5013: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5014
5015                 ;;
5016         (x*:*:*)
5017                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5018                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5019
5020 echo "${as_me:-configure}:5020: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5021
5022                 ;;
5023         (*)
5024                 { echo "$as_me:5024: WARNING: unexpected VERSION value: $VERSION" >&5
5025 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5026                 ;;
5027         esac
5028 fi
5029
5030 LIBTOOL=
5031
5032 # common library maintenance symbols that are convenient for libtool scripts:
5033 LIB_CREATE='${AR} -cr'
5034 LIB_OBJECT='${OBJECTS}'
5035 LIB_SUFFIX=.a
5036 LIB_PREP="$RANLIB"
5037
5038 # symbols used to prop libtool up to enable it to determine what it should be
5039 # doing:
5040 LIB_CLEAN=
5041 LIB_COMPILE=
5042 LIB_LINK='${CC}'
5043 LIB_INSTALL=
5044 LIB_UNINSTALL=
5045
5046 echo "$as_me:5046: checking if you want to build libraries with libtool" >&5
5047 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5048
5049 # Check whether --with-libtool or --without-libtool was given.
5050 if test "${with_libtool+set}" = set; then
5051   withval="$with_libtool"
5052   with_libtool=$withval
5053 else
5054   with_libtool=no
5055 fi;
5056 echo "$as_me:5056: result: $with_libtool" >&5
5057 echo "${ECHO_T}$with_libtool" >&6
5058 if test "$with_libtool" != "no"; then
5059
5060         if test "$with_libtool" != "yes" ; then
5061
5062 if test "x$prefix" != xNONE; then
5063         cf_path_syntax="$prefix"
5064 else
5065         cf_path_syntax="$ac_default_prefix"
5066 fi
5067
5068 case ".$with_libtool" in
5069 (.\$\(*\)*|.\'*\'*)
5070         ;;
5071 (..|./*|.\\*)
5072         ;;
5073 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5074         ;;
5075 (.\${*prefix}*|.\${*dir}*)
5076         eval with_libtool="$with_libtool"
5077         case ".$with_libtool" in
5078         (.NONE/*)
5079                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5080                 ;;
5081         esac
5082         ;;
5083 (.no|.NONE/*)
5084         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5085         ;;
5086 (*)
5087         { { echo "$as_me:5087: error: expected a pathname, not \"$with_libtool\"" >&5
5088 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5089    { (exit 1); exit 1; }; }
5090         ;;
5091 esac
5092
5093                 LIBTOOL=$with_libtool
5094         else
5095                 if test -n "$ac_tool_prefix"; then
5096   for ac_prog in libtool glibtool
5097   do
5098     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5099 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5100 echo "$as_me:5100: checking for $ac_word" >&5
5101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5102 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5103   echo $ECHO_N "(cached) $ECHO_C" >&6
5104 else
5105   if test -n "$LIBTOOL"; then
5106   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5107 else
5108   ac_save_IFS=$IFS; IFS=$ac_path_separator
5109 ac_dummy="$PATH"
5110 for ac_dir in $ac_dummy; do
5111   IFS=$ac_save_IFS
5112   test -z "$ac_dir" && ac_dir=.
5113   $as_executable_p "$ac_dir/$ac_word" || continue
5114 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5115 echo "$as_me:5115: found $ac_dir/$ac_word" >&5
5116 break
5117 done
5118
5119 fi
5120 fi
5121 LIBTOOL=$ac_cv_prog_LIBTOOL
5122 if test -n "$LIBTOOL"; then
5123   echo "$as_me:5123: result: $LIBTOOL" >&5
5124 echo "${ECHO_T}$LIBTOOL" >&6
5125 else
5126   echo "$as_me:5126: result: no" >&5
5127 echo "${ECHO_T}no" >&6
5128 fi
5129
5130     test -n "$LIBTOOL" && break
5131   done
5132 fi
5133 if test -z "$LIBTOOL"; then
5134   ac_ct_LIBTOOL=$LIBTOOL
5135   for ac_prog in libtool glibtool
5136 do
5137   # Extract the first word of "$ac_prog", so it can be a program name with args.
5138 set dummy $ac_prog; ac_word=$2
5139 echo "$as_me:5139: checking for $ac_word" >&5
5140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5141 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5142   echo $ECHO_N "(cached) $ECHO_C" >&6
5143 else
5144   if test -n "$ac_ct_LIBTOOL"; then
5145   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5146 else
5147   ac_save_IFS=$IFS; IFS=$ac_path_separator
5148 ac_dummy="$PATH"
5149 for ac_dir in $ac_dummy; do
5150   IFS=$ac_save_IFS
5151   test -z "$ac_dir" && ac_dir=.
5152   $as_executable_p "$ac_dir/$ac_word" || continue
5153 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5154 echo "$as_me:5154: found $ac_dir/$ac_word" >&5
5155 break
5156 done
5157
5158 fi
5159 fi
5160 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5161 if test -n "$ac_ct_LIBTOOL"; then
5162   echo "$as_me:5162: result: $ac_ct_LIBTOOL" >&5
5163 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5164 else
5165   echo "$as_me:5165: result: no" >&5
5166 echo "${ECHO_T}no" >&6
5167 fi
5168
5169   test -n "$ac_ct_LIBTOOL" && break
5170 done
5171 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5172
5173   LIBTOOL=$ac_ct_LIBTOOL
5174 fi
5175
5176 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5177 then
5178         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.].*//'`
5179 else
5180         cf_cv_libtool_version=
5181 fi
5182 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5183
5184                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5185                 then
5186
5187 unset ac_cv_prog_ac_ct_LIBTOOL
5188 unset ac_ct_LIBTOOL
5189 unset LIBTOOL
5190
5191                         if test -n "$ac_tool_prefix"; then
5192   for ac_prog in glibtool
5193   do
5194     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5195 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5196 echo "$as_me:5196: checking for $ac_word" >&5
5197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5198 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5199   echo $ECHO_N "(cached) $ECHO_C" >&6
5200 else
5201   if test -n "$LIBTOOL"; then
5202   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5203 else
5204   ac_save_IFS=$IFS; IFS=$ac_path_separator
5205 ac_dummy="$PATH"
5206 for ac_dir in $ac_dummy; do
5207   IFS=$ac_save_IFS
5208   test -z "$ac_dir" && ac_dir=.
5209   $as_executable_p "$ac_dir/$ac_word" || continue
5210 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5211 echo "$as_me:5211: found $ac_dir/$ac_word" >&5
5212 break
5213 done
5214
5215 fi
5216 fi
5217 LIBTOOL=$ac_cv_prog_LIBTOOL
5218 if test -n "$LIBTOOL"; then
5219   echo "$as_me:5219: result: $LIBTOOL" >&5
5220 echo "${ECHO_T}$LIBTOOL" >&6
5221 else
5222   echo "$as_me:5222: result: no" >&5
5223 echo "${ECHO_T}no" >&6
5224 fi
5225
5226     test -n "$LIBTOOL" && break
5227   done
5228 fi
5229 if test -z "$LIBTOOL"; then
5230   ac_ct_LIBTOOL=$LIBTOOL
5231   for ac_prog in glibtool
5232 do
5233   # Extract the first word of "$ac_prog", so it can be a program name with args.
5234 set dummy $ac_prog; ac_word=$2
5235 echo "$as_me:5235: checking for $ac_word" >&5
5236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5237 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5238   echo $ECHO_N "(cached) $ECHO_C" >&6
5239 else
5240   if test -n "$ac_ct_LIBTOOL"; then
5241   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5242 else
5243   ac_save_IFS=$IFS; IFS=$ac_path_separator
5244 ac_dummy="$PATH"
5245 for ac_dir in $ac_dummy; do
5246   IFS=$ac_save_IFS
5247   test -z "$ac_dir" && ac_dir=.
5248   $as_executable_p "$ac_dir/$ac_word" || continue
5249 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5250 echo "$as_me:5250: found $ac_dir/$ac_word" >&5
5251 break
5252 done
5253
5254 fi
5255 fi
5256 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5257 if test -n "$ac_ct_LIBTOOL"; then
5258   echo "$as_me:5258: result: $ac_ct_LIBTOOL" >&5
5259 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5260 else
5261   echo "$as_me:5261: result: no" >&5
5262 echo "${ECHO_T}no" >&6
5263 fi
5264
5265   test -n "$ac_ct_LIBTOOL" && break
5266 done
5267 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5268
5269   LIBTOOL=$ac_ct_LIBTOOL
5270 fi
5271
5272 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5273 then
5274         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.].*//'`
5275 else
5276         cf_cv_libtool_version=
5277 fi
5278 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5279
5280                 fi
5281         fi
5282         if test -z "$LIBTOOL" ; then
5283                 { { echo "$as_me:5283: error: Cannot find libtool" >&5
5284 echo "$as_me: error: Cannot find libtool" >&2;}
5285    { (exit 1); exit 1; }; }
5286         fi
5287         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5288         LIB_OBJECT='${OBJECTS:.o=.lo}'
5289         LIB_SUFFIX=.la
5290         LIB_CLEAN='${LIBTOOL} --mode=clean'
5291         LIB_COMPILE='${LIBTOOL} --mode=compile'
5292         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5293         LIB_INSTALL='${LIBTOOL} --mode=install'
5294         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5295         LIB_PREP=:
5296
5297 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5298 then
5299         echo "$as_me:5299: checking version of $LIBTOOL" >&5
5300 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5301
5302 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5303 then
5304         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.].*//'`
5305 else
5306         cf_cv_libtool_version=
5307 fi
5308 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5309
5310         echo "$as_me:5310: result: $cf_cv_libtool_version" >&5
5311 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5312         if test -z "$cf_cv_libtool_version" ; then
5313                 { { echo "$as_me:5313: error: This is not GNU libtool" >&5
5314 echo "$as_me: error: This is not GNU libtool" >&2;}
5315    { (exit 1); exit 1; }; }
5316         fi
5317 else
5318         { { echo "$as_me:5318: error: GNU libtool has not been found" >&5
5319 echo "$as_me: error: GNU libtool has not been found" >&2;}
5320    { (exit 1); exit 1; }; }
5321 fi
5322
5323         # special hack to add -no-undefined (which libtool should do for itself)
5324         LT_UNDEF=
5325         case "$cf_cv_system_name" in
5326         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5327                 LT_UNDEF=-no-undefined
5328                 ;;
5329         esac
5330
5331         # special hack to add --tag option for C++ compiler
5332         case $cf_cv_libtool_version in
5333         (1.[5-9]*|[2-9].[0-9.a-z]*)
5334                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5335                 LIBTOOL="$LIBTOOL --tag=CC"
5336                 ;;
5337         (*)
5338                 LIBTOOL_CXX="$LIBTOOL"
5339                 ;;
5340         esac
5341 else
5342         LIBTOOL=""
5343         LIBTOOL_CXX=""
5344 fi
5345
5346 test -z "$LIBTOOL" && ECHO_LT=
5347
5348 if test "$with_libtool" != "no" ; then
5349
5350 cf_list_models="$cf_list_models libtool"
5351
5352 else
5353
5354 echo "$as_me:5354: checking if you want to build shared libraries" >&5
5355 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5356
5357 # Check whether --with-shared or --without-shared was given.
5358 if test "${with_shared+set}" = set; then
5359   withval="$with_shared"
5360   with_shared=$withval
5361 else
5362   with_shared=no
5363 fi;
5364 echo "$as_me:5364: result: $with_shared" >&5
5365 echo "${ECHO_T}$with_shared" >&6
5366 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5367
5368 echo "$as_me:5368: checking if you want to build static libraries" >&5
5369 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5370
5371 # Check whether --with-normal or --without-normal was given.
5372 if test "${with_normal+set}" = set; then
5373   withval="$with_normal"
5374   with_normal=$withval
5375 else
5376   with_normal=yes
5377 fi;
5378 echo "$as_me:5378: result: $with_normal" >&5
5379 echo "${ECHO_T}$with_normal" >&6
5380 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5381
5382 echo "$as_me:5382: checking if you want to build debug libraries" >&5
5383 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5384
5385 # Check whether --with-debug or --without-debug was given.
5386 if test "${with_debug+set}" = set; then
5387   withval="$with_debug"
5388   with_debug=$withval
5389 else
5390   with_debug=yes
5391 fi;
5392 echo "$as_me:5392: result: $with_debug" >&5
5393 echo "${ECHO_T}$with_debug" >&6
5394 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5395
5396 echo "$as_me:5396: checking if you want to build profiling libraries" >&5
5397 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5398
5399 # Check whether --with-profile or --without-profile was given.
5400 if test "${with_profile+set}" = set; then
5401   withval="$with_profile"
5402   with_profile=$withval
5403 else
5404   with_profile=no
5405 fi;
5406 echo "$as_me:5406: result: $with_profile" >&5
5407 echo "${ECHO_T}$with_profile" >&6
5408 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5409
5410 fi
5411
5412 if test "X$cf_with_cxx_binding" != Xno; then
5413 if test "x$with_shared" = "xyes"; then
5414 echo "$as_me:5414: checking if you want to build C++ shared libraries" >&5
5415 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5416
5417 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5418 if test "${with_cxx_shared+set}" = set; then
5419   withval="$with_cxx_shared"
5420   with_shared_cxx=$withval
5421 else
5422   with_shared_cxx=no
5423 fi;
5424 echo "$as_me:5424: result: $with_shared_cxx" >&5
5425 echo "${ECHO_T}$with_shared_cxx" >&6
5426 fi
5427 fi
5428
5429 ###############################################################################
5430
5431 echo "$as_me:5431: checking for specified models" >&5
5432 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5433 test -z "$cf_list_models" && cf_list_models=normal
5434 test "$with_libtool" != "no" && cf_list_models=libtool
5435 echo "$as_me:5435: result: $cf_list_models" >&5
5436 echo "${ECHO_T}$cf_list_models" >&6
5437
5438 ### Use the first model as the default, and save its suffix for use in building
5439 ### up test-applications.
5440 echo "$as_me:5440: checking for default model" >&5
5441 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5442 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5443 echo "$as_me:5443: result: $DFT_LWR_MODEL" >&5
5444 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5445
5446 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5447
5448 TICS_NAME=tic
5449
5450 TINFO_NAME=tinfo
5451
5452 LIB_NAME=ncurses
5453
5454 LIB_DIR=../lib
5455 LIB_2ND=../../lib
5456
5457 echo "$as_me:5457: checking if you want to have a library-prefix" >&5
5458 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5459
5460 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5461 if test "${with_lib_prefix+set}" = set; then
5462   withval="$with_lib_prefix"
5463   with_lib_prefix=$withval
5464 else
5465   with_lib_prefix=auto
5466 fi;
5467 echo "$as_me:5467: result: $with_lib_prefix" >&5
5468 echo "${ECHO_T}$with_lib_prefix" >&6
5469
5470 if test $with_lib_prefix = auto
5471 then
5472
5473         case $cf_cv_system_name in
5474         (OS/2*|os2*)
5475                 if test "$DFT_LWR_MODEL" = libtool; then
5476                         LIB_PREFIX='lib'
5477                 else
5478                         LIB_PREFIX=''
5479                 fi
5480                 ;;
5481         (*)     LIB_PREFIX='lib'
5482                 ;;
5483         esac
5484 cf_prefix=$LIB_PREFIX
5485
5486 elif test $with_lib_prefix = no
5487 then
5488         LIB_PREFIX=
5489 else
5490         LIB_PREFIX=$with_lib_prefix
5491 fi
5492
5493 LIB_SUFFIX=
5494
5495         echo "$as_me:5495: checking for PATH separator" >&5
5496 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5497         case $cf_cv_system_name in
5498         (os2*)  PATH_SEPARATOR=';'  ;;
5499         (*)     ${PATH_SEPARATOR:=':'}  ;;
5500         esac
5501
5502         echo "$as_me:5502: result: $PATH_SEPARATOR" >&5
5503 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5504
5505 ###############################################################################
5506
5507 echo "$as_me:5507: checking if you want to build a separate terminfo library" >&5
5508 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5509
5510 # Check whether --with-termlib or --without-termlib was given.
5511 if test "${with_termlib+set}" = set; then
5512   withval="$with_termlib"
5513   with_termlib=$withval
5514 else
5515   with_termlib=no
5516 fi;
5517 echo "$as_me:5517: result: $with_termlib" >&5
5518 echo "${ECHO_T}$with_termlib" >&6
5519
5520 echo "$as_me:5520: checking if you want to build a separate tic library" >&5
5521 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5522
5523 # Check whether --with-ticlib or --without-ticlib was given.
5524 if test "${with_ticlib+set}" = set; then
5525   withval="$with_ticlib"
5526   with_ticlib=$withval
5527 else
5528   with_ticlib=no
5529 fi;
5530 echo "$as_me:5530: result: $with_ticlib" >&5
5531 echo "${ECHO_T}$with_ticlib" >&6
5532
5533 if test X"$CC_G_OPT" = X"" ; then
5534         CC_G_OPT='-g'
5535         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5536 fi
5537
5538 if test X"$CXX_G_OPT" = X"" ; then
5539         CXX_G_OPT='-g'
5540         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5541 fi
5542
5543 echo "$as_me:5543: checking for default loader flags" >&5
5544 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5545 case $DFT_LWR_MODEL in
5546 (libtool) LD_MODEL=''   ;;
5547 (normal)  LD_MODEL=''   ;;
5548 (debug)   LD_MODEL=$CC_G_OPT ;;
5549 (profile) LD_MODEL='-pg';;
5550 (shared)  LD_MODEL=''   ;;
5551 esac
5552 echo "$as_me:5552: result: $LD_MODEL" >&5
5553 echo "${ECHO_T}$LD_MODEL" >&6
5554
5555 case $DFT_LWR_MODEL in
5556 (shared)
5557
5558 echo "$as_me:5558: checking if rpath option should be used" >&5
5559 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5560
5561 # Check whether --enable-rpath or --disable-rpath was given.
5562 if test "${enable_rpath+set}" = set; then
5563   enableval="$enable_rpath"
5564   cf_cv_enable_rpath=$enableval
5565 else
5566   cf_cv_enable_rpath=no
5567 fi;
5568 echo "$as_me:5568: result: $cf_cv_enable_rpath" >&5
5569 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5570
5571 echo "$as_me:5571: checking if shared libraries should be relinked during install" >&5
5572 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5573
5574 # Check whether --enable-relink or --disable-relink was given.
5575 if test "${enable_relink+set}" = set; then
5576   enableval="$enable_relink"
5577   cf_cv_do_relink=$enableval
5578 else
5579   cf_cv_do_relink=yes
5580 fi;
5581 echo "$as_me:5581: result: $cf_cv_do_relink" >&5
5582 echo "${ECHO_T}$cf_cv_do_relink" >&6
5583         ;;
5584 esac
5585
5586 # we will build libraries one-level down.
5587 rel_builddir=..
5588
5589 LD_RPATH_OPT=
5590 if test "x$cf_cv_enable_rpath" != xno
5591 then
5592         echo "$as_me:5592: checking for an rpath option" >&5
5593 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5594         case $cf_cv_system_name in
5595         (irix*)
5596                 if test "$GCC" = yes; then
5597                         LD_RPATH_OPT="-Wl,-rpath,"
5598                 else
5599                         LD_RPATH_OPT="-rpath "
5600                 fi
5601                 ;;
5602         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5603                 LD_RPATH_OPT="-Wl,-rpath,"
5604                 ;;
5605         (openbsd[2-9].*|mirbsd*)
5606                 LD_RPATH_OPT="-Wl,-rpath,"
5607                 ;;
5608         (dragonfly*)
5609                 LD_RPATH_OPT="-rpath "
5610                 ;;
5611         (netbsd*)
5612                 LD_RPATH_OPT="-Wl,-rpath,"
5613                 ;;
5614         (osf*|mls+*)
5615                 LD_RPATH_OPT="-rpath "
5616                 ;;
5617         (solaris2*)
5618                 LD_RPATH_OPT="-R"
5619                 ;;
5620         (*)
5621                 ;;
5622         esac
5623         echo "$as_me:5623: result: $LD_RPATH_OPT" >&5
5624 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5625
5626         case "x$LD_RPATH_OPT" in
5627         (x-R*)
5628                 echo "$as_me:5628: checking if we need a space after rpath option" >&5
5629 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5630                 cf_save_LIBS="$LIBS"
5631
5632 cf_add_libs="$LIBS"
5633 # reverse order
5634 cf_add_0lib=
5635 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5636 # filter duplicates
5637 for cf_add_1lib in $cf_add_0lib; do
5638         for cf_add_2lib in $cf_add_libs; do
5639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5640                         cf_add_1lib=
5641                         break
5642                 fi
5643         done
5644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5645 done
5646 LIBS="$cf_add_libs"
5647
5648                 cat >conftest.$ac_ext <<_ACEOF
5649 #line 5649 "configure"
5650 #include "confdefs.h"
5651
5652 int
5653 main (void)
5654 {
5655
5656   ;
5657   return 0;
5658 }
5659 _ACEOF
5660 rm -f conftest.$ac_objext conftest$ac_exeext
5661 if { (eval echo "$as_me:5661: \"$ac_link\"") >&5
5662   (eval $ac_link) 2>&5
5663   ac_status=$?
5664   echo "$as_me:5664: \$? = $ac_status" >&5
5665   (exit $ac_status); } &&
5666          { ac_try='test -s conftest$ac_exeext'
5667   { (eval echo "$as_me:5667: \"$ac_try\"") >&5
5668   (eval $ac_try) 2>&5
5669   ac_status=$?
5670   echo "$as_me:5670: \$? = $ac_status" >&5
5671   (exit $ac_status); }; }; then
5672   cf_rpath_space=no
5673 else
5674   echo "$as_me: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5676 cf_rpath_space=yes
5677 fi
5678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5679                 LIBS="$cf_save_LIBS"
5680                 echo "$as_me:5680: result: $cf_rpath_space" >&5
5681 echo "${ECHO_T}$cf_rpath_space" >&6
5682                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5683                 ;;
5684         esac
5685 fi
5686
5687         RM_SHARED_OPTS=
5688         LOCAL_LDFLAGS=
5689         LOCAL_LDFLAGS2=
5690         LD_SHARED_OPTS=
5691         INSTALL_LIB="-m 644"
5692         : ${rel_builddir:=.}
5693
5694         shlibdir=$libdir
5695
5696         MAKE_DLLS="#"
5697
5698         cf_cv_do_symlinks=no
5699         cf_ld_rpath_opt=
5700         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5701
5702         echo "$as_me:5702: checking if release/abi version should be used for shared libs" >&5
5703 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5704
5705 # Check whether --with-shlib-version or --without-shlib-version was given.
5706 if test "${with_shlib_version+set}" = set; then
5707   withval="$with_shlib_version"
5708   test -z "$withval" && withval=auto
5709         case $withval in
5710         (yes)
5711                 cf_cv_shlib_version=auto
5712                 ;;
5713         (rel|abi|auto)
5714                 cf_cv_shlib_version=$withval
5715                 ;;
5716         (*)
5717                 echo "$as_me:5717: result: $withval" >&5
5718 echo "${ECHO_T}$withval" >&6
5719                 { { echo "$as_me:5719: error: option value must be one of: rel, abi, or auto" >&5
5720 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5721    { (exit 1); exit 1; }; }
5722                 ;;
5723         esac
5724
5725 else
5726   cf_cv_shlib_version=auto
5727 fi;
5728         echo "$as_me:5728: result: $cf_cv_shlib_version" >&5
5729 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5730
5731         cf_cv_rm_so_locs=no
5732         cf_try_cflags=
5733
5734         # Some less-capable ports of gcc support only -fpic
5735         CC_SHARED_OPTS=
5736
5737         cf_try_fPIC=no
5738         if test "$GCC" = yes
5739         then
5740                 cf_try_fPIC=yes
5741         else
5742                 case $cf_cv_system_name in
5743                 (*linux*)       # e.g., PGI compiler
5744                         cf_try_fPIC=yes
5745                         ;;
5746                 esac
5747         fi
5748
5749         if test "$cf_try_fPIC" = yes
5750         then
5751                 echo "$as_me:5751: checking which $CC option to use" >&5
5752 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5753                 cf_save_CFLAGS="$CFLAGS"
5754                 for CC_SHARED_OPTS in -fPIC -fpic ''
5755                 do
5756                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5757                         cat >conftest.$ac_ext <<_ACEOF
5758 #line 5758 "configure"
5759 #include "confdefs.h"
5760 #include <stdio.h>
5761 int
5762 main (void)
5763 {
5764 int x = 1
5765   ;
5766   return 0;
5767 }
5768 _ACEOF
5769 rm -f conftest.$ac_objext
5770 if { (eval echo "$as_me:5770: \"$ac_compile\"") >&5
5771   (eval $ac_compile) 2>&5
5772   ac_status=$?
5773   echo "$as_me:5773: \$? = $ac_status" >&5
5774   (exit $ac_status); } &&
5775          { ac_try='test -s conftest.$ac_objext'
5776   { (eval echo "$as_me:5776: \"$ac_try\"") >&5
5777   (eval $ac_try) 2>&5
5778   ac_status=$?
5779   echo "$as_me:5779: \$? = $ac_status" >&5
5780   (exit $ac_status); }; }; then
5781   break
5782 else
5783   echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 fi
5786 rm -f conftest.$ac_objext conftest.$ac_ext
5787                 done
5788                 echo "$as_me:5788: result: $CC_SHARED_OPTS" >&5
5789 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5790                 CFLAGS="$cf_save_CFLAGS"
5791         fi
5792
5793         cf_cv_shlib_version_infix=no
5794
5795         case $cf_cv_system_name in
5796         (aix4.3-9*|aix[5-7]*)
5797                 if test "$GCC" = yes; then
5798                         CC_SHARED_OPTS='-Wl,-brtl'
5799                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5800                 else
5801                         CC_SHARED_OPTS='-brtl'
5802                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5803                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5804                 fi
5805                 ;;
5806         (beos*)
5807                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5808                 ;;
5809         (cygwin*)
5810                 CC_SHARED_OPTS=
5811                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5812                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5813                 cf_cv_shlib_version=cygdll
5814                 cf_cv_shlib_version_infix=cygdll
5815                 shlibdir=$bindir
5816                 MAKE_DLLS=
5817                 cat >mk_shared_lib.sh <<-CF_EOF
5818                 #!$SHELL
5819                 SHARED_LIB=\$1
5820                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5821                 shift
5822                 cat <<-EOF
5823                 Linking shared library
5824                 ** SHARED_LIB \$SHARED_LIB
5825                 ** IMPORT_LIB \$IMPORT_LIB
5826 EOF
5827                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5828 CF_EOF
5829                 chmod +x mk_shared_lib.sh
5830                 ;;
5831         (msys*)
5832                 CC_SHARED_OPTS=
5833                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5834                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5835                 cf_cv_shlib_version=msysdll
5836                 cf_cv_shlib_version_infix=msysdll
5837                 shlibdir=$bindir
5838                 MAKE_DLLS=
5839                 cat >mk_shared_lib.sh <<-CF_EOF
5840                 #!$SHELL
5841                 SHARED_LIB=\$1
5842                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5843                 shift
5844                 cat <<-EOF
5845                 Linking shared library
5846                 ** SHARED_LIB \$SHARED_LIB
5847                 ** IMPORT_LIB \$IMPORT_LIB
5848 EOF
5849                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5850 CF_EOF
5851                 chmod +x mk_shared_lib.sh
5852                 ;;
5853         (darwin*)
5854                 cf_try_cflags="no-cpp-precomp"
5855                 CC_SHARED_OPTS="-dynamic"
5856                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5857                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5858                 cf_cv_shlib_version_infix=yes
5859                 echo "$as_me:5859: checking if ld -search_paths_first works" >&5
5860 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5861 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5862   echo $ECHO_N "(cached) $ECHO_C" >&6
5863 else
5864
5865                         cf_save_LDFLAGS=$LDFLAGS
5866                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5867                         cat >conftest.$ac_ext <<_ACEOF
5868 #line 5868 "configure"
5869 #include "confdefs.h"
5870
5871 int
5872 main (void)
5873 {
5874 int i;
5875   ;
5876   return 0;
5877 }
5878 _ACEOF
5879 rm -f conftest.$ac_objext conftest$ac_exeext
5880 if { (eval echo "$as_me:5880: \"$ac_link\"") >&5
5881   (eval $ac_link) 2>&5
5882   ac_status=$?
5883   echo "$as_me:5883: \$? = $ac_status" >&5
5884   (exit $ac_status); } &&
5885          { ac_try='test -s conftest$ac_exeext'
5886   { (eval echo "$as_me:5886: \"$ac_try\"") >&5
5887   (eval $ac_try) 2>&5
5888   ac_status=$?
5889   echo "$as_me:5889: \$? = $ac_status" >&5
5890   (exit $ac_status); }; }; then
5891   cf_cv_ldflags_search_paths_first=yes
5892 else
5893   echo "$as_me: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 cf_cv_ldflags_search_paths_first=no
5896 fi
5897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5898                                 LDFLAGS=$cf_save_LDFLAGS
5899 fi
5900 echo "$as_me:5900: result: $cf_cv_ldflags_search_paths_first" >&5
5901 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5902                 if test $cf_cv_ldflags_search_paths_first = yes; then
5903                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5904                 fi
5905                 ;;
5906         (hpux[7-8]*)
5907                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5908                 if test "$GCC" != yes; then
5909                         CC_SHARED_OPTS='+Z'
5910                 fi
5911                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5912                 INSTALL_LIB="-m 555"
5913                 ;;
5914         (hpux*)
5915                 # (tested with gcc 2.7.2 -- I don't have c89)
5916                 if test "$GCC" = yes; then
5917                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5918                 else
5919                         CC_SHARED_OPTS='+Z'
5920                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5921                 fi
5922                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5923                 # HP-UX shared libraries must be executable, and should be
5924                 # readonly to exploit a quirk in the memory manager.
5925                 INSTALL_LIB="-m 555"
5926                 ;;
5927         (interix*)
5928                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5929                 if test "$cf_cv_shlib_version" = rel; then
5930                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5931                 else
5932                         cf_shared_soname='`basename $@`'
5933                 fi
5934                 CC_SHARED_OPTS=
5935                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5936                 ;;
5937         (irix*)
5938                 if test "$cf_cv_enable_rpath" = yes ; then
5939                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5940                 fi
5941                 # tested with IRIX 5.2 and 'cc'.
5942                 if test "$GCC" != yes; then
5943                         CC_SHARED_OPTS='-KPIC'
5944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5945                 else
5946                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5947                 fi
5948                 cf_cv_rm_so_locs=yes
5949                 ;;
5950         (linux*|gnu*|k*bsd*-gnu)
5951                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5952                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5953                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5954                 fi
5955                 if test "$cf_cv_enable_rpath" = yes ; then
5956                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5957                 fi
5958
5959         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5960         if test "$cf_cv_shlib_version" = rel; then
5961                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5962         else
5963                 cf_cv_shared_soname='`basename $@`'
5964         fi
5965
5966                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5967                 ;;
5968         (mingw*msvc*)
5969                 cf_cv_shlib_version=mingw
5970                 cf_cv_shlib_version_infix=mingw
5971                 shlibdir=$bindir
5972                 MAKE_DLLS=
5973                 if test "$DFT_LWR_MODEL" = "shared" ; then
5974                         LOCAL_LDFLAGS="-link -dll"
5975                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5976                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5977                 fi
5978                 CC_SHARED_OPTS=
5979                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh  ${LD} ${CFLAGS}'
5980                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5981                 cat >mk_shared_lib.sh <<-CF_EOF
5982                 #!$SHELL
5983                 SHARED_LIB=\
5984                 IMPORT_LIB=\`echo "\" | sed -e 's/0-9*\.dll$\.dll.a/'\`
5985                 shift
5986                 my_ld=\
5987                 shift
5988                 cat <<-EOF
5989                 Linking shared library
5990                 ** SHARED LIB \$SHARED_LIB
5991                 ** IMPORT_LIB \$IMPORT_LIB
5992 EOF
5993                 args=\$(echo \ | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
5994                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
5995                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
5996 CF_EOF
5997                 chmod +x mk_shared_lib.sh
5998                 ;;
5999         (mingw*)
6000                 cf_cv_shlib_version=mingw
6001                 cf_cv_shlib_version_infix=mingw
6002                 shlibdir=$bindir
6003                 MAKE_DLLS=
6004                 if test "$DFT_LWR_MODEL" = "shared" ; then
6005                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6006                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6007                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6008                 fi
6009                 CC_SHARED_OPTS=
6010                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6011                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6012                 cat >mk_shared_lib.sh <<-CF_EOF
6013                 #!$SHELL
6014                 SHARED_LIB=\$1
6015                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6016                 shift
6017                 cat <<-EOF
6018                 Linking shared library
6019                 ** SHARED_LIB \$SHARED_LIB
6020                 ** IMPORT_LIB \$IMPORT_LIB
6021 EOF
6022                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6023 CF_EOF
6024                 chmod +x mk_shared_lib.sh
6025                 ;;
6026         (openbsd[2-9].*|mirbsd*)
6027                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6028                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6029                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6030                 fi
6031                 if test "$cf_cv_enable_rpath" = yes ; then
6032                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6033                 fi
6034                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6035
6036         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6037         if test "$cf_cv_shlib_version" = rel; then
6038                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6039         else
6040                 cf_cv_shared_soname='`basename $@`'
6041         fi
6042
6043                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6044                 ;;
6045         (nto-qnx*|openbsd*|freebsd[12].*)
6046                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6047                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6048                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6049                 ;;
6050         (dragonfly*|freebsd*)
6051                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6052                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6053                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6054                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6055                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6056                 fi
6057
6058         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6059         if test "$cf_cv_shlib_version" = rel; then
6060                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6061         else
6062                 cf_cv_shared_soname='`basename $@`'
6063         fi
6064
6065                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6066                 ;;
6067         (netbsd*)
6068                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6069                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6070                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6071                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6072                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6073                         if test "$cf_cv_shlib_version" = auto; then
6074                         if test -f /usr/libexec/ld.elf_so; then
6075                                 cf_cv_shlib_version=abi
6076                         else
6077                                 cf_cv_shlib_version=rel
6078                         fi
6079                         fi
6080
6081         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6082         if test "$cf_cv_shlib_version" = rel; then
6083                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6084         else
6085                 cf_cv_shared_soname='`basename $@`'
6086         fi
6087
6088                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6089                 else
6090                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6091                 fi
6092                 ;;
6093         (osf*|mls+*)
6094                 # tested with OSF/1 V3.2 and 'cc'
6095                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6096                 # link with shared libs).
6097                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6098                 case $host_os in
6099                 (osf4*)
6100                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6101                         ;;
6102                 esac
6103                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6104                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6105                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6106                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6107                 fi
6108                 cf_cv_rm_so_locs=yes
6109                 ;;
6110         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6111                 # tested with osr5.0.5
6112                 if test "$GCC" != yes; then
6113                         CC_SHARED_OPTS='-belf -KPIC'
6114                 fi
6115                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6116                 if test "$cf_cv_enable_rpath" = yes ; then
6117                         # only way is to set LD_RUN_PATH but no switch for it
6118                         RUN_PATH=$libdir
6119                 fi
6120                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6121                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6122                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6123                 ;;
6124         (sunos4*)
6125                 # tested with SunOS 4.1.1 and gcc 2.7.0
6126                 if test "$GCC" != yes; then
6127                         CC_SHARED_OPTS='-KPIC'
6128                 fi
6129                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6130                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6131                 ;;
6132         (solaris2*)
6133                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6134                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6135                 if test "$DFT_LWR_MODEL" = "shared" ; then
6136                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6137                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6138                 fi
6139                 if test "$cf_cv_enable_rpath" = yes ; then
6140                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6141                 fi
6142
6143         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6144         if test "$cf_cv_shlib_version" = rel; then
6145                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6146         else
6147                 cf_cv_shared_soname='`basename $@`'
6148         fi
6149
6150                 if test "$GCC" != yes; then
6151                         cf_save_CFLAGS="$CFLAGS"
6152                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6153                         do
6154                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6155                                 cat >conftest.$ac_ext <<_ACEOF
6156 #line 6156 "configure"
6157 #include "confdefs.h"
6158 #include <stdio.h>
6159 int
6160 main (void)
6161 {
6162 printf("Hello\n");
6163   ;
6164   return 0;
6165 }
6166 _ACEOF
6167 rm -f conftest.$ac_objext
6168 if { (eval echo "$as_me:6168: \"$ac_compile\"") >&5
6169   (eval $ac_compile) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); } &&
6173          { ac_try='test -s conftest.$ac_objext'
6174   { (eval echo "$as_me:6174: \"$ac_try\"") >&5
6175   (eval $ac_try) 2>&5
6176   ac_status=$?
6177   echo "$as_me:6177: \$? = $ac_status" >&5
6178   (exit $ac_status); }; }; then
6179   break
6180 else
6181   echo "$as_me: failed program was:" >&5
6182 cat conftest.$ac_ext >&5
6183 fi
6184 rm -f conftest.$ac_objext conftest.$ac_ext
6185                         done
6186                         CFLAGS="$cf_save_CFLAGS"
6187                         CC_SHARED_OPTS=$cf_shared_opts
6188                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6189                 else
6190                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6191                 fi
6192                 ;;
6193         (sysv5uw7*|unix_sv*)
6194                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6195                 if test "$GCC" != yes; then
6196                         CC_SHARED_OPTS='-KPIC'
6197                 fi
6198                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6199                 ;;
6200         (*)
6201                 CC_SHARED_OPTS='unknown'
6202                 MK_SHARED_LIB='echo unknown'
6203                 ;;
6204         esac
6205
6206         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6207         case "$cf_cv_shlib_version" in
6208         (rel|abi)
6209                 case "$MK_SHARED_LIB" in
6210                 (*'-o $@')
6211                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6212                         ;;
6213                 (*)
6214                         { echo "$as_me:6214: WARNING: ignored --with-shlib-version" >&5
6215 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6216                         ;;
6217                 esac
6218                 ;;
6219         esac
6220
6221         if test -n "$cf_try_cflags"
6222         then
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6224 "${as_me:-configure}"
6225 #include <stdio.h>
6226 int main(int argc, char *argv[])
6227 {
6228         printf("hello\n");
6229         return (argv[argc-1] == 0) ;
6230 }
6231 EOF
6232                 cf_save_CFLAGS="$CFLAGS"
6233                 for cf_opt in $cf_try_cflags
6234                 do
6235                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6236                         echo "$as_me:6236: checking if CFLAGS option -$cf_opt works" >&5
6237 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6238                         if { (eval echo "$as_me:6238: \"$ac_compile\"") >&5
6239   (eval $ac_compile) 2>&5
6240   ac_status=$?
6241   echo "$as_me:6241: \$? = $ac_status" >&5
6242   (exit $ac_status); }; then
6243                                 echo "$as_me:6243: result: yes" >&5
6244 echo "${ECHO_T}yes" >&6
6245                                 cf_save_CFLAGS="$CFLAGS"
6246                         else
6247                                 echo "$as_me:6247: result: no" >&5
6248 echo "${ECHO_T}no" >&6
6249                         fi
6250                 done
6251                 CFLAGS="$cf_save_CFLAGS"
6252         fi
6253
6254         # RPATH_LIST is a colon-separated list of directories
6255         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6256         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6257
6258         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6259
6260         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6261
6262 echo "${as_me:-configure}:6262: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6263
6264         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6265
6266 echo "${as_me:-configure}:6266: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6267
6268 for model in $cf_list_models; do
6269         case $model in
6270         (libtool)
6271
6272 echo "$as_me:6272: checking for additional libtool options" >&5
6273 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6274
6275 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6276 if test "${with_libtool_opts+set}" = set; then
6277   withval="$with_libtool_opts"
6278   with_libtool_opts=$withval
6279 else
6280   with_libtool_opts=no
6281 fi;
6282 echo "$as_me:6282: result: $with_libtool_opts" >&5
6283 echo "${ECHO_T}$with_libtool_opts" >&6
6284
6285 case .$with_libtool_opts in
6286 (.yes|.no|.)
6287         ;;
6288 (*)
6289         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6290         ;;
6291 esac
6292
6293 echo "$as_me:6293: checking if exported-symbols file should be used" >&5
6294 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6295
6296 # Check whether --with-export-syms or --without-export-syms was given.
6297 if test "${with_export_syms+set}" = set; then
6298   withval="$with_export_syms"
6299   with_export_syms=$withval
6300 else
6301   with_export_syms=no
6302 fi;
6303 if test "x$with_export_syms" = xyes
6304 then
6305         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6306
6307 fi
6308 echo "$as_me:6308: result: $with_export_syms" >&5
6309 echo "${ECHO_T}$with_export_syms" >&6
6310 if test "x$with_export_syms" != xno
6311 then
6312         EXPORT_SYMS="-export-symbols $with_export_syms"
6313
6314 fi
6315
6316                 ;;
6317         (shared)
6318                 if test "$CC_SHARED_OPTS" = "unknown"; then
6319                         { { echo "$as_me:6319: error: Shared libraries are not supported in this version" >&5
6320 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6321    { (exit 1); exit 1; }; }
6322                 fi
6323                 # workaround for inept transition to PIE vs PIC...
6324                 echo "$as_me:6324: checking if current CFLAGS link properly" >&5
6325 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6326                 cat >conftest.$ac_ext <<_ACEOF
6327 #line 6327 "configure"
6328 #include "confdefs.h"
6329 #include <stdio.h>
6330 int
6331 main (void)
6332 {
6333 printf("Hello work\n");
6334   ;
6335   return 0;
6336 }
6337 _ACEOF
6338 rm -f conftest.$ac_objext conftest$ac_exeext
6339 if { (eval echo "$as_me:6339: \"$ac_link\"") >&5
6340   (eval $ac_link) 2>&5
6341   ac_status=$?
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); } &&
6344          { ac_try='test -s conftest$ac_exeext'
6345   { (eval echo "$as_me:6345: \"$ac_try\"") >&5
6346   (eval $ac_try) 2>&5
6347   ac_status=$?
6348   echo "$as_me:6348: \$? = $ac_status" >&5
6349   (exit $ac_status); }; }; then
6350   cf_cflags_work=yes
6351 else
6352   echo "$as_me: failed program was:" >&5
6353 cat conftest.$ac_ext >&5
6354 cf_cflags_work=no
6355 fi
6356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6357                 echo "$as_me:6357: result: $cf_cflags_work" >&5
6358 echo "${ECHO_T}$cf_cflags_work" >&6
6359                 if test "$cf_cflags_work" = no
6360                 then
6361                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6362
6363 echo "${as_me:-configure}:6363: testing try to work around by appending shared-options ..." 1>&5
6364
6365                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6366                 fi
6367
6368 echo "$as_me:6368: checking if versioned-symbols file should be used" >&5
6369 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6370
6371 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6372 if test "${with_versioned_syms+set}" = set; then
6373   withval="$with_versioned_syms"
6374   with_versioned_syms=$withval
6375 else
6376   with_versioned_syms=no
6377 fi;
6378 case "x$with_versioned_syms" in
6379 (xyes)
6380         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6381
6382         ;;
6383 (xno)
6384         ;;
6385 (x/*)
6386         test -f "$with_versioned_syms" || { { echo "$as_me:6386: error: expected a filename: $with_versioned_syms" >&5
6387 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6388    { (exit 1); exit 1; }; }
6389         ;;
6390 (*)
6391         test -f "$with_versioned_syms" || { { echo "$as_me:6391: error: expected a filename: $with_versioned_syms" >&5
6392 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6393    { (exit 1); exit 1; }; }
6394         with_versioned_syms=`pwd`/"$with_versioned_syms"
6395         ;;
6396 esac
6397 echo "$as_me:6397: result: $with_versioned_syms" >&5
6398 echo "${ECHO_T}$with_versioned_syms" >&6
6399
6400 RESULTING_SYMS=
6401 VERSIONED_SYMS=
6402 WILDCARD_SYMS=
6403
6404 if test "x$with_versioned_syms" != xno
6405 then
6406         RESULTING_SYMS=$with_versioned_syms
6407         case "x$MK_SHARED_LIB" in
6408         (*-Wl,*)
6409                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6410                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6411                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6412
6413 echo "${as_me:-configure}:6413: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6414
6415                 ;;
6416         (*-dy\ *)
6417                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6418                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6419                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6420
6421 echo "${as_me:-configure}:6421: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6422
6423                 ;;
6424         (*)
6425                 { echo "$as_me:6425: WARNING: this system does not support versioned-symbols" >&5
6426 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6427                 ;;
6428         esac
6429
6430         # Linux ld can selectively override scope, e.g., of symbols beginning with
6431         # "_" by first declaring some as global, and then using a wildcard to
6432         # declare the others as local.  Some other loaders cannot do this.  Check
6433         # by constructing a (very) simple shared library and inspecting its
6434         # symbols.
6435         if test "x$VERSIONED_SYMS" != "x"
6436         then
6437                 echo "$as_me:6437: checking if wildcards can be used to selectively omit symbols" >&5
6438 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6439                 WILDCARD_SYMS=no
6440
6441                 # make sources
6442                 rm -f conftest.*
6443
6444                 cat >conftest.ver <<EOF
6445 module_1.0 {
6446 global:
6447         globalf1;
6448 local:
6449         localf1;
6450 };
6451 module_2.0 {
6452 global:
6453         globalf2;
6454 local:
6455         localf2;
6456         _*;
6457 } module_1.0;
6458 submodule_1.0 {
6459 global:
6460         subglobalf1;
6461         _ismissing;
6462 local:
6463         sublocalf1;
6464 };
6465 submodule_2.0 {
6466 global:
6467         subglobalf2;
6468 local:
6469         sublocalf2;
6470         _*;
6471 } submodule_1.0;
6472 EOF
6473                 cat >conftest.$ac_ext <<EOF
6474 #line 6474 "configure"
6475 int     _ismissing(void) { return 1; }
6476 int     _localf1(void) { return 1; }
6477 int     _localf2(void) { return 2; }
6478 int     globalf1(void) { return 1; }
6479 int     globalf2(void) { return 2; }
6480 int     _sublocalf1(void) { return 1; }
6481 int     _sublocalf2(void) { return 2; }
6482 int     subglobalf1(void) { return 1; }
6483 int     subglobalf2(void) { return 2; }
6484 EOF
6485                 cat >conftest.mk <<EOF
6486 CC=${CC}
6487 CFLAGS=${CFLAGS}
6488 CPPFLAGS=${CPPFLAGS}
6489 LDFLAGS=${LDFLAGS}
6490 LIBS=${LIBS}
6491 VERSIONED_SYMS=${VERSIONED_SYMS}
6492 RESULTING_SYMS=conftest.ver
6493 MK_SHARED_LIB=${MK_SHARED_LIB}
6494 conftest.so: conftest.$ac_cv_objext
6495                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6496 EOF
6497
6498                 # compile source, make library
6499                 if make -f conftest.mk 2>&5 >/dev/null
6500                 then
6501                         # test for missing symbol in either Data or Text section
6502                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6503                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6504                 fi
6505                 echo "$as_me:6505: result: $WILDCARD_SYMS" >&5
6506 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6507                 rm -f conftest.*
6508         fi
6509 fi
6510
6511                 ;;
6512         esac
6513 done
6514
6515 ### Checks for special libraries, must be done up-front.
6516 SHLIB_LIST=""
6517
6518 echo "$as_me:6518: checking if you want to link with the GPM mouse library" >&5
6519 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6520
6521 # Check whether --with-gpm or --without-gpm was given.
6522 if test "${with_gpm+set}" = set; then
6523   withval="$with_gpm"
6524   with_gpm=$withval
6525 else
6526   with_gpm=maybe
6527 fi;
6528 echo "$as_me:6528: result: $with_gpm" >&5
6529 echo "${ECHO_T}$with_gpm" >&6
6530
6531 if test "$with_gpm" != no ; then
6532         echo "$as_me:6532: checking for gpm.h" >&5
6533 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6534 if test "${ac_cv_header_gpm_h+set}" = set; then
6535   echo $ECHO_N "(cached) $ECHO_C" >&6
6536 else
6537   cat >conftest.$ac_ext <<_ACEOF
6538 #line 6538 "configure"
6539 #include "confdefs.h"
6540 #include <gpm.h>
6541 _ACEOF
6542 if { (eval echo "$as_me:6542: \"$ac_cpp conftest.$ac_ext\"") >&5
6543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6544   ac_status=$?
6545   egrep -v '^ *\+' conftest.er1 >conftest.err
6546   rm -f conftest.er1
6547   cat conftest.err >&5
6548   echo "$as_me:6548: \$? = $ac_status" >&5
6549   (exit $ac_status); } >/dev/null; then
6550   if test -s conftest.err; then
6551     ac_cpp_err=$ac_c_preproc_warn_flag
6552   else
6553     ac_cpp_err=
6554   fi
6555 else
6556   ac_cpp_err=yes
6557 fi
6558 if test -z "$ac_cpp_err"; then
6559   ac_cv_header_gpm_h=yes
6560 else
6561   echo "$as_me: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   ac_cv_header_gpm_h=no
6564 fi
6565 rm -f conftest.err conftest.$ac_ext
6566 fi
6567 echo "$as_me:6567: result: $ac_cv_header_gpm_h" >&5
6568 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6569 if test $ac_cv_header_gpm_h = yes; then
6570
6571 cat >>confdefs.h <<\EOF
6572 #define HAVE_GPM_H 1
6573 EOF
6574
6575                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6576                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6577
6578 echo "${as_me:-configure}:6578: testing assuming we really have GPM library ..." 1>&5
6579
6580 cat >>confdefs.h <<\EOF
6581 #define HAVE_LIBGPM 1
6582 EOF
6583
6584                         with_gpm=yes
6585                 else
6586                         echo "$as_me:6586: checking for Gpm_Open in -lgpm" >&5
6587 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6588 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6589   echo $ECHO_N "(cached) $ECHO_C" >&6
6590 else
6591   ac_check_lib_save_LIBS=$LIBS
6592 LIBS="-lgpm  $LIBS"
6593 cat >conftest.$ac_ext <<_ACEOF
6594 #line 6594 "configure"
6595 #include "confdefs.h"
6596
6597 /* Override any gcc2 internal prototype to avoid an error.  */
6598 #ifdef __cplusplus
6599 extern "C"
6600 #endif
6601 /* We use char because int might match the return type of a gcc2
6602    builtin and then its argument prototype would still apply.  */
6603 char Gpm_Open ();
6604 int
6605 main (void)
6606 {
6607 Gpm_Open ();
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext conftest$ac_exeext
6613 if { (eval echo "$as_me:6613: \"$ac_link\"") >&5
6614   (eval $ac_link) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit $ac_status); } &&
6618          { ac_try='test -s conftest$ac_exeext'
6619   { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); }; }; then
6624   ac_cv_lib_gpm_Gpm_Open=yes
6625 else
6626   echo "$as_me: failed program was:" >&5
6627 cat conftest.$ac_ext >&5
6628 ac_cv_lib_gpm_Gpm_Open=no
6629 fi
6630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6631 LIBS=$ac_check_lib_save_LIBS
6632 fi
6633 echo "$as_me:6633: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6634 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6635 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6636   with_gpm=yes
6637 else
6638
6639                                 if test "$with_gpm" = maybe; then
6640                                         { echo "$as_me:6640: WARNING: Cannot link with GPM library" >&5
6641 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6642                                         with_gpm=no
6643                                 else
6644                                         { { echo "$as_me:6644: error: Cannot link with GPM library" >&5
6645 echo "$as_me: error: Cannot link with GPM library" >&2;}
6646    { (exit 1); exit 1; }; }
6647                                 fi
6648
6649 fi
6650
6651                 fi
6652
6653 else
6654
6655                 test "$with_gpm" != maybe && { echo "$as_me:6655: WARNING: Cannot find GPM header" >&5
6656 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6657                 with_gpm=no
6658
6659 fi
6660
6661 fi
6662
6663 if test "$with_gpm" != no ; then
6664         echo "$as_me:6664: checking if you want to load GPM dynamically" >&5
6665 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6666
6667 # Check whether --with-dlsym or --without-dlsym was given.
6668 if test "${with_dlsym+set}" = set; then
6669   withval="$with_dlsym"
6670   with_dlsym=$withval
6671 else
6672   with_dlsym=yes
6673 fi;
6674         echo "$as_me:6674: result: $with_dlsym" >&5
6675 echo "${ECHO_T}$with_dlsym" >&6
6676         if test "x$with_dlsym" = xyes ; then
6677
6678 cf_have_dlsym=no
6679 echo "$as_me:6679: checking for dlsym" >&5
6680 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6681 if test "${ac_cv_func_dlsym+set}" = set; then
6682   echo $ECHO_N "(cached) $ECHO_C" >&6
6683 else
6684   cat >conftest.$ac_ext <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6687 #define dlsym autoconf_temporary
6688 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6689 #undef dlsym
6690
6691 #ifdef __cplusplus
6692 extern "C"
6693 #endif
6694
6695 /* We use char because int might match the return type of a gcc2
6696    builtin and then its argument prototype would still apply.  */
6697 char dlsym (void);
6698
6699 int
6700 main (void)
6701 {
6702
6703 /* The GNU C library defines stubs for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6707 #error found stub for dlsym
6708 #endif
6709
6710         return dlsym ();
6711   ;
6712   return 0;
6713 }
6714 _ACEOF
6715 rm -f conftest.$ac_objext conftest$ac_exeext
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717   (eval $ac_link) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); } &&
6721          { ac_try='test -s conftest$ac_exeext'
6722   { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723   (eval $ac_try) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); }; }; then
6727   ac_cv_func_dlsym=yes
6728 else
6729   echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 ac_cv_func_dlsym=no
6732 fi
6733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6734 fi
6735 echo "$as_me:6735: result: $ac_cv_func_dlsym" >&5
6736 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6737 if test $ac_cv_func_dlsym = yes; then
6738   cf_have_dlsym=yes
6739 else
6740
6741 cf_have_libdl=no
6742 echo "$as_me:6742: checking for dlsym in -ldl" >&5
6743 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6744 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6745   echo $ECHO_N "(cached) $ECHO_C" >&6
6746 else
6747   ac_check_lib_save_LIBS=$LIBS
6748 LIBS="-ldl  $LIBS"
6749 cat >conftest.$ac_ext <<_ACEOF
6750 #line 6750 "configure"
6751 #include "confdefs.h"
6752
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 #ifdef __cplusplus
6755 extern "C"
6756 #endif
6757 /* We use char because int might match the return type of a gcc2
6758    builtin and then its argument prototype would still apply.  */
6759 char dlsym ();
6760 int
6761 main (void)
6762 {
6763 dlsym ();
6764   ;
6765   return 0;
6766 }
6767 _ACEOF
6768 rm -f conftest.$ac_objext conftest$ac_exeext
6769 if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770   (eval $ac_link) 2>&5
6771   ac_status=$?
6772   echo "$as_me:6772: \$? = $ac_status" >&5
6773   (exit $ac_status); } &&
6774          { ac_try='test -s conftest$ac_exeext'
6775   { (eval echo "$as_me:6775: \"$ac_try\"") >&5
6776   (eval $ac_try) 2>&5
6777   ac_status=$?
6778   echo "$as_me:6778: \$? = $ac_status" >&5
6779   (exit $ac_status); }; }; then
6780   ac_cv_lib_dl_dlsym=yes
6781 else
6782   echo "$as_me: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 ac_cv_lib_dl_dlsym=no
6785 fi
6786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6787 LIBS=$ac_check_lib_save_LIBS
6788 fi
6789 echo "$as_me:6789: result: $ac_cv_lib_dl_dlsym" >&5
6790 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6791 if test $ac_cv_lib_dl_dlsym = yes; then
6792
6793         cf_have_dlsym=yes
6794         cf_have_libdl=yes
6795 fi
6796
6797 fi
6798
6799 if test "$cf_have_dlsym" = yes ; then
6800         test "$cf_have_libdl" = yes && {
6801 cf_add_libs="$LIBS"
6802 # reverse order
6803 cf_add_0lib=
6804 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6805 # filter duplicates
6806 for cf_add_1lib in $cf_add_0lib; do
6807         for cf_add_2lib in $cf_add_libs; do
6808                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6809                         cf_add_1lib=
6810                         break
6811                 fi
6812         done
6813         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6814 done
6815 LIBS="$cf_add_libs"
6816  }
6817
6818         echo "$as_me:6818: checking whether able to link to dl*() functions" >&5
6819 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6820         cat >conftest.$ac_ext <<_ACEOF
6821 #line 6821 "configure"
6822 #include "confdefs.h"
6823 #include <dlfcn.h>
6824 int
6825 main (void)
6826 {
6827
6828                 void *obj;
6829                 if ((obj = dlopen("filename", 0)) != 0) {
6830                         if (dlsym(obj, "symbolname") == 0) {
6831                         dlclose(obj);
6832                         }
6833                 }
6834   ;
6835   return 0;
6836 }
6837 _ACEOF
6838 rm -f conftest.$ac_objext conftest$ac_exeext
6839 if { (eval echo "$as_me:6839: \"$ac_link\"") >&5
6840   (eval $ac_link) 2>&5
6841   ac_status=$?
6842   echo "$as_me:6842: \$? = $ac_status" >&5
6843   (exit $ac_status); } &&
6844          { ac_try='test -s conftest$ac_exeext'
6845   { (eval echo "$as_me:6845: \"$ac_try\"") >&5
6846   (eval $ac_try) 2>&5
6847   ac_status=$?
6848   echo "$as_me:6848: \$? = $ac_status" >&5
6849   (exit $ac_status); }; }; then
6850
6851 cat >>confdefs.h <<\EOF
6852 #define HAVE_LIBDL 1
6853 EOF
6854
6855 else
6856   echo "$as_me: failed program was:" >&5
6857 cat conftest.$ac_ext >&5
6858
6859                 { { echo "$as_me:6859: error: Cannot link test program for libdl" >&5
6860 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6861    { (exit 1); exit 1; }; }
6862 fi
6863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6864         echo "$as_me:6864: result: ok" >&5
6865 echo "${ECHO_T}ok" >&6
6866 else
6867         { { echo "$as_me:6867: error: Cannot find dlsym function" >&5
6868 echo "$as_me: error: Cannot find dlsym function" >&2;}
6869    { (exit 1); exit 1; }; }
6870 fi
6871
6872                 if test "x$with_gpm" != xyes ; then
6873                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6874
6875 echo "${as_me:-configure}:6875: testing assuming soname for gpm is $with_gpm ..." 1>&5
6876
6877                         cf_cv_gpm_soname="$with_gpm"
6878                 else
6879
6880 echo "$as_me:6880: checking for soname of gpm library" >&5
6881 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6882 if test "${cf_cv_gpm_soname+set}" = set; then
6883   echo $ECHO_N "(cached) $ECHO_C" >&6
6884 else
6885
6886 cf_cv_gpm_soname=unknown
6887 if test "$cross_compiling" != yes ; then
6888 cat >conftest.$ac_ext <<CF_EOF
6889 #include <gpm.h>
6890 int main(void)
6891 {
6892 if (Gpm_Open(0,0)) Gpm_Close();
6893         ${cf_cv_main_return:-return}(0);
6894 }
6895 CF_EOF
6896 cf_save_LIBS="$LIBS"
6897
6898 cf_add_libs="$LIBS"
6899 # reverse order
6900 cf_add_0lib=
6901 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6902 # filter duplicates
6903 for cf_add_1lib in $cf_add_0lib; do
6904         for cf_add_2lib in $cf_add_libs; do
6905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6906                         cf_add_1lib=
6907                         break
6908                 fi
6909         done
6910         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6911 done
6912 LIBS="$cf_add_libs"
6913
6914         if { (eval echo "$as_me:6914: \"$ac_compile\"") >&5
6915   (eval $ac_compile) 2>&5
6916   ac_status=$?
6917   echo "$as_me:6917: \$? = $ac_status" >&5
6918   (exit $ac_status); } ; then
6919                 if { (eval echo "$as_me:6919: \"$ac_link\"") >&5
6920   (eval $ac_link) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); } ; then
6924                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6925                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6926                 fi
6927         fi
6928 rm -rf conftest*
6929 LIBS="$cf_save_LIBS"
6930 fi
6931
6932 fi
6933 echo "$as_me:6933: result: $cf_cv_gpm_soname" >&5
6934 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6935
6936                 fi
6937                 test "$cf_cv_gpm_soname" != "unknown" &&
6938 cat >>confdefs.h <<EOF
6939 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6940 EOF
6941
6942                 SHLIB_LIST="-ldl $SHLIB_LIST"
6943
6944 cf_add_libs="$PRIVATE_LIBS"
6945 # reverse order
6946 cf_add_0lib=
6947 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6948 # filter duplicates
6949 for cf_add_1lib in $cf_add_0lib; do
6950         for cf_add_2lib in $cf_add_libs; do
6951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6952                         cf_add_1lib=
6953                         break
6954                 fi
6955         done
6956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6957 done
6958 PRIVATE_LIBS="$cf_add_libs"
6959
6960         else
6961                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6962
6963 cf_add_libs="$TEST_LIBS"
6964 # reverse order
6965 cf_add_0lib=
6966 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6967 # filter duplicates
6968 for cf_add_1lib in $cf_add_0lib; do
6969         for cf_add_2lib in $cf_add_libs; do
6970                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6971                         cf_add_1lib=
6972                         break
6973                 fi
6974         done
6975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6976 done
6977 TEST_LIBS="$cf_add_libs"
6978
6979 cf_add_libs="$PRIVATE_LIBS"
6980 # reverse order
6981 cf_add_0lib=
6982 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6983 # filter duplicates
6984 for cf_add_1lib in $cf_add_0lib; do
6985         for cf_add_2lib in $cf_add_libs; do
6986                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6987                         cf_add_1lib=
6988                         break
6989                 fi
6990         done
6991         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6992 done
6993 PRIVATE_LIBS="$cf_add_libs"
6994
6995         fi
6996
6997 cat >>confdefs.h <<\EOF
6998 #define HAVE_LIBGPM 1
6999 EOF
7000
7001 echo "$as_me:7001: checking for Gpm_Wgetch in -lgpm" >&5
7002 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7003 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7004   echo $ECHO_N "(cached) $ECHO_C" >&6
7005 else
7006   ac_check_lib_save_LIBS=$LIBS
7007 LIBS="-lgpm  $LIBS"
7008 cat >conftest.$ac_ext <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7011
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 #ifdef __cplusplus
7014 extern "C"
7015 #endif
7016 /* We use char because int might match the return type of a gcc2
7017    builtin and then its argument prototype would still apply.  */
7018 char Gpm_Wgetch ();
7019 int
7020 main (void)
7021 {
7022 Gpm_Wgetch ();
7023   ;
7024   return 0;
7025 }
7026 _ACEOF
7027 rm -f conftest.$ac_objext conftest$ac_exeext
7028 if { (eval echo "$as_me:7028: \"$ac_link\"") >&5
7029   (eval $ac_link) 2>&5
7030   ac_status=$?
7031   echo "$as_me:7031: \$? = $ac_status" >&5
7032   (exit $ac_status); } &&
7033          { ac_try='test -s conftest$ac_exeext'
7034   { (eval echo "$as_me:7034: \"$ac_try\"") >&5
7035   (eval $ac_try) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); }; }; then
7039   ac_cv_lib_gpm_Gpm_Wgetch=yes
7040 else
7041   echo "$as_me: failed program was:" >&5
7042 cat conftest.$ac_ext >&5
7043 ac_cv_lib_gpm_Gpm_Wgetch=no
7044 fi
7045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7046 LIBS=$ac_check_lib_save_LIBS
7047 fi
7048 echo "$as_me:7048: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7049 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7050 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7051
7052 echo "$as_me:7052: checking if GPM is weakly bound to curses library" >&5
7053 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7054 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7055   echo $ECHO_N "(cached) $ECHO_C" >&6
7056 else
7057
7058 cf_cv_check_gpm_wgetch=unknown
7059 if test "$cross_compiling" != yes ; then
7060
7061 cat >conftest.$ac_ext <<CF_EOF
7062 #include <gpm.h>
7063 int main(void)
7064 {
7065         Gpm_Wgetch();
7066         ${cf_cv_main_return:-return}(0);
7067 }
7068 CF_EOF
7069
7070         cf_save_LIBS="$LIBS"
7071         # This only works if we can look at the symbol table.  If a shared
7072         # library is stripped for install, we cannot use that.  So we're forced
7073         # to rely on the static library, noting that some packagers may not
7074         # include it.
7075         LIBS="-static -lgpm -dynamic $LIBS"
7076         if { (eval echo "$as_me:7076: \"$ac_compile\"") >&5
7077   (eval $ac_compile) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); } ; then
7081                 if { (eval echo "$as_me:7081: \"$ac_link\"") >&5
7082   (eval $ac_link) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); } ; then
7086                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7087                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7088                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7089                 fi
7090         fi
7091         rm -rf conftest*
7092         LIBS="$cf_save_LIBS"
7093 fi
7094
7095 fi
7096 echo "$as_me:7096: result: $cf_cv_check_gpm_wgetch" >&5
7097 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7098
7099 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7100         { echo "$as_me:7100: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7101 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7102 fi
7103
7104 fi
7105
7106 fi
7107
7108 echo "$as_me:7108: checking if you want to use PCRE2 for regular-expressions" >&5
7109 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7110
7111 # Check whether --with-pcre2 or --without-pcre2 was given.
7112 if test "${with_pcre2+set}" = set; then
7113   withval="$with_pcre2"
7114
7115 fi;
7116 test -z "$with_pcre2" && with_pcre2=no
7117 echo "$as_me:7117: result: $with_pcre2" >&5
7118 echo "${ECHO_T}$with_pcre2" >&6
7119
7120 if test "x$with_pcre2" != xno ; then
7121
7122 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7123         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7124
7125 echo "${as_me:-configure}:7125: testing found package libpcre2 ..." 1>&5
7126
7127         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7128         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7129         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7130
7131 echo "${as_me:-configure}:7131: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7132
7133         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7134
7135 echo "${as_me:-configure}:7135: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7136
7137 cf_fix_cppflags=no
7138 cf_new_cflags=
7139 cf_new_cppflags=
7140 cf_new_extra_cppflags=
7141
7142 for cf_add_cflags in $cf_pkgconfig_incs
7143 do
7144 case $cf_fix_cppflags in
7145 (no)
7146         case $cf_add_cflags in
7147         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7148                 case $cf_add_cflags in
7149                 (-D*)
7150                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7151
7152                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7153                                 && test -z "${cf_tst_cflags}" \
7154                                 && cf_fix_cppflags=yes
7155
7156                         if test $cf_fix_cppflags = yes ; then
7157
7158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7160
7161                                 continue
7162                         elif test "${cf_tst_cflags}" = "\"'" ; then
7163
7164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7166
7167                                 continue
7168                         fi
7169                         ;;
7170                 esac
7171                 case "$CPPFLAGS" in
7172                 (*$cf_add_cflags)
7173                         ;;
7174                 (*)
7175                         case $cf_add_cflags in
7176                         (-D*)
7177                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7178
7179 CPPFLAGS=`echo "$CPPFLAGS" | \
7180         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7181                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7182
7183                                 ;;
7184                         esac
7185
7186         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7187         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7188
7189                         ;;
7190                 esac
7191                 ;;
7192         (*)
7193
7194         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7195         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7196
7197                 ;;
7198         esac
7199         ;;
7200 (yes)
7201
7202         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7203         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7204
7205         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7206
7207         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7208                 && test -z "${cf_tst_cflags}" \
7209                 && cf_fix_cppflags=no
7210         ;;
7211 esac
7212 done
7213
7214 if test -n "$cf_new_cflags" ; then
7215
7216         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7217         CFLAGS="${CFLAGS}$cf_new_cflags"
7218
7219 fi
7220
7221 if test -n "$cf_new_cppflags" ; then
7222
7223         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7224         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7225
7226 fi
7227
7228 if test -n "$cf_new_extra_cppflags" ; then
7229
7230         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7231         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7232
7233 fi
7234
7235 cf_add_libs="$LIBS"
7236 # reverse order
7237 cf_add_0lib=
7238 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7239 # filter duplicates
7240 for cf_add_1lib in $cf_add_0lib; do
7241         for cf_add_2lib in $cf_add_libs; do
7242                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7243                         cf_add_1lib=
7244                         break
7245                 fi
7246         done
7247         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7248 done
7249 LIBS="$cf_add_libs"
7250
7251         :
7252 else
7253         cf_pkgconfig_incs=
7254         cf_pkgconfig_libs=
7255
7256 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7257         test -n "$verbose" && echo "    found package libpcre" 1>&6
7258
7259 echo "${as_me:-configure}:7259: testing found package libpcre ..." 1>&5
7260
7261         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7262         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7263         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7264
7265 echo "${as_me:-configure}:7265: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7266
7267         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7268
7269 echo "${as_me:-configure}:7269: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7270
7271 cf_fix_cppflags=no
7272 cf_new_cflags=
7273 cf_new_cppflags=
7274 cf_new_extra_cppflags=
7275
7276 for cf_add_cflags in $cf_pkgconfig_incs
7277 do
7278 case $cf_fix_cppflags in
7279 (no)
7280         case $cf_add_cflags in
7281         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7282                 case $cf_add_cflags in
7283                 (-D*)
7284                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7285
7286                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7287                                 && test -z "${cf_tst_cflags}" \
7288                                 && cf_fix_cppflags=yes
7289
7290                         if test $cf_fix_cppflags = yes ; then
7291
7292         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7293         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7294
7295                                 continue
7296                         elif test "${cf_tst_cflags}" = "\"'" ; then
7297
7298         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7299         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7300
7301                                 continue
7302                         fi
7303                         ;;
7304                 esac
7305                 case "$CPPFLAGS" in
7306                 (*$cf_add_cflags)
7307                         ;;
7308                 (*)
7309                         case $cf_add_cflags in
7310                         (-D*)
7311                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7312
7313 CPPFLAGS=`echo "$CPPFLAGS" | \
7314         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7315                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7316
7317                                 ;;
7318                         esac
7319
7320         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7321         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7322
7323                         ;;
7324                 esac
7325                 ;;
7326         (*)
7327
7328         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7329         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7330
7331                 ;;
7332         esac
7333         ;;
7334 (yes)
7335
7336         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7337         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7338
7339         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7340
7341         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7342                 && test -z "${cf_tst_cflags}" \
7343                 && cf_fix_cppflags=no
7344         ;;
7345 esac
7346 done
7347
7348 if test -n "$cf_new_cflags" ; then
7349
7350         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7351         CFLAGS="${CFLAGS}$cf_new_cflags"
7352
7353 fi
7354
7355 if test -n "$cf_new_cppflags" ; then
7356
7357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7358         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7359
7360 fi
7361
7362 if test -n "$cf_new_extra_cppflags" ; then
7363
7364         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7365         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7366
7367 fi
7368
7369 cf_add_libs="$LIBS"
7370 # reverse order
7371 cf_add_0lib=
7372 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7373 # filter duplicates
7374 for cf_add_1lib in $cf_add_0lib; do
7375         for cf_add_2lib in $cf_add_libs; do
7376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7377                         cf_add_1lib=
7378                         break
7379                 fi
7380         done
7381         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7382 done
7383 LIBS="$cf_add_libs"
7384
7385         :
7386 else
7387         cf_pkgconfig_incs=
7388         cf_pkgconfig_libs=
7389
7390                         { { echo "$as_me:7390: error: Cannot find PCRE2 library" >&5
7391 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7392    { (exit 1); exit 1; }; }
7393 fi
7394
7395 fi
7396
7397 cat >>confdefs.h <<\EOF
7398 #define HAVE_LIB_PCRE2 1
7399 EOF
7400
7401         # if pkgconfig gave no results, look for the libraries directly
7402         case $LIBS in
7403         (*pcre2-posix*|*pcreposix*)
7404                 ;;
7405         (*)
7406                 echo "$as_me:7406: checking for regcomp in -lpcre2-posix" >&5
7407 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7408 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7409   echo $ECHO_N "(cached) $ECHO_C" >&6
7410 else
7411   ac_check_lib_save_LIBS=$LIBS
7412 LIBS="-lpcre2-posix  $LIBS"
7413 cat >conftest.$ac_ext <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7416
7417 /* Override any gcc2 internal prototype to avoid an error.  */
7418 #ifdef __cplusplus
7419 extern "C"
7420 #endif
7421 /* We use char because int might match the return type of a gcc2
7422    builtin and then its argument prototype would still apply.  */
7423 char regcomp ();
7424 int
7425 main (void)
7426 {
7427 regcomp ();
7428   ;
7429   return 0;
7430 }
7431 _ACEOF
7432 rm -f conftest.$ac_objext conftest$ac_exeext
7433 if { (eval echo "$as_me:7433: \"$ac_link\"") >&5
7434   (eval $ac_link) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); } &&
7438          { ac_try='test -s conftest$ac_exeext'
7439   { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); }; }; then
7444   ac_cv_lib_pcre2_posix_regcomp=yes
7445 else
7446   echo "$as_me: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 ac_cv_lib_pcre2_posix_regcomp=no
7449 fi
7450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7451 LIBS=$ac_check_lib_save_LIBS
7452 fi
7453 echo "$as_me:7453: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7454 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7455 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7456
7457 cf_add_libs="$LIBS"
7458 # reverse order
7459 cf_add_0lib=
7460 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7461 # filter duplicates
7462 for cf_add_1lib in $cf_add_0lib; do
7463         for cf_add_2lib in $cf_add_libs; do
7464                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7465                         cf_add_1lib=
7466                         break
7467                 fi
7468         done
7469         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7470 done
7471 LIBS="$cf_add_libs"
7472
7473 else
7474   echo "$as_me:7474: checking for regcomp in -lpcreposix" >&5
7475 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7476 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7477   echo $ECHO_N "(cached) $ECHO_C" >&6
7478 else
7479   ac_check_lib_save_LIBS=$LIBS
7480 LIBS="-lpcreposix  $LIBS"
7481 cat >conftest.$ac_ext <<_ACEOF
7482 #line 7482 "configure"
7483 #include "confdefs.h"
7484
7485 /* Override any gcc2 internal prototype to avoid an error.  */
7486 #ifdef __cplusplus
7487 extern "C"
7488 #endif
7489 /* We use char because int might match the return type of a gcc2
7490    builtin and then its argument prototype would still apply.  */
7491 char regcomp ();
7492 int
7493 main (void)
7494 {
7495 regcomp ();
7496   ;
7497   return 0;
7498 }
7499 _ACEOF
7500 rm -f conftest.$ac_objext conftest$ac_exeext
7501 if { (eval echo "$as_me:7501: \"$ac_link\"") >&5
7502   (eval $ac_link) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } &&
7506          { ac_try='test -s conftest$ac_exeext'
7507   { (eval echo "$as_me:7507: \"$ac_try\"") >&5
7508   (eval $ac_try) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); }; }; then
7512   ac_cv_lib_pcreposix_regcomp=yes
7513 else
7514   echo "$as_me: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7516 ac_cv_lib_pcreposix_regcomp=no
7517 fi
7518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7519 LIBS=$ac_check_lib_save_LIBS
7520 fi
7521 echo "$as_me:7521: result: $ac_cv_lib_pcreposix_regcomp" >&5
7522 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7523 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7524
7525 cf_add_libs="$LIBS"
7526 # reverse order
7527 cf_add_0lib=
7528 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7529 # filter duplicates
7530 for cf_add_1lib in $cf_add_0lib; do
7531         for cf_add_2lib in $cf_add_libs; do
7532                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7533                         cf_add_1lib=
7534                         break
7535                 fi
7536         done
7537         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7538 done
7539 LIBS="$cf_add_libs"
7540
7541 else
7542   { { echo "$as_me:7542: error: Cannot find PCRE2 POSIX library" >&5
7543 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7544    { (exit 1); exit 1; }; }
7545 fi
7546
7547 fi
7548
7549                 ;;
7550         esac
7551
7552         # either way, check for the library header files
7553
7554 for ac_header in pcre2posix.h pcreposix.h
7555 do
7556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7557 echo "$as_me:7557: checking for $ac_header" >&5
7558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7560   echo $ECHO_N "(cached) $ECHO_C" >&6
7561 else
7562   cat >conftest.$ac_ext <<_ACEOF
7563 #line 7563 "configure"
7564 #include "confdefs.h"
7565 #include <$ac_header>
7566 _ACEOF
7567 if { (eval echo "$as_me:7567: \"$ac_cpp conftest.$ac_ext\"") >&5
7568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7569   ac_status=$?
7570   egrep -v '^ *\+' conftest.er1 >conftest.err
7571   rm -f conftest.er1
7572   cat conftest.err >&5
7573   echo "$as_me:7573: \$? = $ac_status" >&5
7574   (exit $ac_status); } >/dev/null; then
7575   if test -s conftest.err; then
7576     ac_cpp_err=$ac_c_preproc_warn_flag
7577   else
7578     ac_cpp_err=
7579   fi
7580 else
7581   ac_cpp_err=yes
7582 fi
7583 if test -z "$ac_cpp_err"; then
7584   eval "$as_ac_Header=yes"
7585 else
7586   echo "$as_me: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   eval "$as_ac_Header=no"
7589 fi
7590 rm -f conftest.err conftest.$ac_ext
7591 fi
7592 echo "$as_me:7592: result: `eval echo '${'$as_ac_Header'}'`" >&5
7593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7595   cat >>confdefs.h <<EOF
7596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7597 EOF
7598
7599 fi
7600 done
7601
7602 fi
7603
7604 # not everyone has "test -c"
7605 if test -c /dev/sysmouse 2>/dev/null ; then
7606 echo "$as_me:7606: checking if you want to use sysmouse" >&5
7607 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7608
7609 # Check whether --with-sysmouse or --without-sysmouse was given.
7610 if test "${with_sysmouse+set}" = set; then
7611   withval="$with_sysmouse"
7612   cf_with_sysmouse=$withval
7613 else
7614   cf_with_sysmouse=maybe
7615 fi;
7616         if test "$cf_with_sysmouse" != no ; then
7617         cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620
7621 #include <osreldate.h>
7622 #if (__FreeBSD_version >= 400017)
7623 #include <sys/consio.h>
7624 #include <sys/fbio.h>
7625 #else
7626 #include <machine/console.h>
7627 #endif
7628
7629 int
7630 main (void)
7631 {
7632
7633         struct mouse_info the_mouse;
7634         ioctl(0, CONS_MOUSECTL, &the_mouse);
7635
7636   ;
7637   return 0;
7638 }
7639 _ACEOF
7640 rm -f conftest.$ac_objext
7641 if { (eval echo "$as_me:7641: \"$ac_compile\"") >&5
7642   (eval $ac_compile) 2>&5
7643   ac_status=$?
7644   echo "$as_me:7644: \$? = $ac_status" >&5
7645   (exit $ac_status); } &&
7646          { ac_try='test -s conftest.$ac_objext'
7647   { (eval echo "$as_me:7647: \"$ac_try\"") >&5
7648   (eval $ac_try) 2>&5
7649   ac_status=$?
7650   echo "$as_me:7650: \$? = $ac_status" >&5
7651   (exit $ac_status); }; }; then
7652   cf_with_sysmouse=yes
7653 else
7654   echo "$as_me: failed program was:" >&5
7655 cat conftest.$ac_ext >&5
7656 cf_with_sysmouse=no
7657 fi
7658 rm -f conftest.$ac_objext conftest.$ac_ext
7659         fi
7660 echo "$as_me:7660: result: $cf_with_sysmouse" >&5
7661 echo "${ECHO_T}$cf_with_sysmouse" >&6
7662 test "$cf_with_sysmouse" = yes &&
7663 cat >>confdefs.h <<\EOF
7664 #define USE_SYSMOUSE 1
7665 EOF
7666
7667 fi
7668
7669 # pretend that ncurses==ncursesw==ncursest
7670 echo "$as_me:7670: checking if you want to disable library suffixes" >&5
7671 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7672
7673 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7674 if test "${enable_lib_suffixes+set}" = set; then
7675   enableval="$enable_lib_suffixes"
7676   test "$enableval" != no && enableval=yes
7677         if test "$enableval" != "yes" ; then
7678     disable_lib_suffixes=yes
7679         else
7680                 disable_lib_suffixes=no
7681         fi
7682 else
7683   enableval=yes
7684         disable_lib_suffixes=no
7685
7686 fi;
7687 echo "$as_me:7687: result: $disable_lib_suffixes" >&5
7688 echo "${ECHO_T}$disable_lib_suffixes" >&6
7689
7690 ### If we're building with rpath, try to link non-standard libs that way too.
7691 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7692
7693 echo "$as_me:7693: checking if rpath-hack should be disabled" >&5
7694 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7695
7696 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7697 if test "${enable_rpath_hack+set}" = set; then
7698   enableval="$enable_rpath_hack"
7699   test "$enableval" != no && enableval=yes
7700         if test "$enableval" != "yes" ; then
7701     cf_disable_rpath_hack=yes
7702         else
7703                 cf_disable_rpath_hack=no
7704         fi
7705 else
7706   enableval=yes
7707         cf_disable_rpath_hack=no
7708
7709 fi;
7710 echo "$as_me:7710: result: $cf_disable_rpath_hack" >&5
7711 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7712 if test "$cf_disable_rpath_hack" = no ; then
7713
7714 echo "$as_me:7714: checking for updated LDFLAGS" >&5
7715 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7716 if test -n "$LD_RPATH_OPT" ; then
7717         echo "$as_me:7717: result: maybe" >&5
7718 echo "${ECHO_T}maybe" >&6
7719
7720         for ac_prog in ldd
7721 do
7722   # Extract the first word of "$ac_prog", so it can be a program name with args.
7723 set dummy $ac_prog; ac_word=$2
7724 echo "$as_me:7724: checking for $ac_word" >&5
7725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7726 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7727   echo $ECHO_N "(cached) $ECHO_C" >&6
7728 else
7729   if test -n "$cf_ldd_prog"; then
7730   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7731 else
7732   ac_save_IFS=$IFS; IFS=$ac_path_separator
7733 ac_dummy="$PATH"
7734 for ac_dir in $ac_dummy; do
7735   IFS=$ac_save_IFS
7736   test -z "$ac_dir" && ac_dir=.
7737   $as_executable_p "$ac_dir/$ac_word" || continue
7738 ac_cv_prog_cf_ldd_prog="$ac_prog"
7739 echo "$as_me:7739: found $ac_dir/$ac_word" >&5
7740 break
7741 done
7742
7743 fi
7744 fi
7745 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7746 if test -n "$cf_ldd_prog"; then
7747   echo "$as_me:7747: result: $cf_ldd_prog" >&5
7748 echo "${ECHO_T}$cf_ldd_prog" >&6
7749 else
7750   echo "$as_me:7750: result: no" >&5
7751 echo "${ECHO_T}no" >&6
7752 fi
7753
7754   test -n "$cf_ldd_prog" && break
7755 done
7756 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7757
7758         cf_rpath_list="/usr/lib /lib"
7759         if test "$cf_ldd_prog" != no
7760         then
7761                 cf_rpath_oops=
7762
7763 cat >conftest.$ac_ext <<_ACEOF
7764 #line 7764 "configure"
7765 #include "confdefs.h"
7766 #include <stdio.h>
7767 int
7768 main (void)
7769 {
7770 printf("Hello");
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f conftest.$ac_objext conftest$ac_exeext
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit $ac_status); } &&
7781          { ac_try='test -s conftest$ac_exeext'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit $ac_status); }; }; then
7787   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7788                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7789 else
7790   echo "$as_me: failed program was:" >&5
7791 cat conftest.$ac_ext >&5
7792 fi
7793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7794
7795                 # If we passed the link-test, but get a "not found" on a given library,
7796                 # this could be due to inept reconfiguration of gcc to make it only
7797                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7798                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7799                 # /usr/local libraries.
7800                 if test -n "$cf_rpath_oops"
7801                 then
7802                         for cf_rpath_src in $cf_rpath_oops
7803                         do
7804                                 for cf_rpath_dir in \
7805                                         /usr/local \
7806                                         /usr/pkg \
7807                                         /opt/sfw
7808                                 do
7809                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7810                                         then
7811                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7812
7813 echo "${as_me:-configure}:7813: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7814
7815                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7816                                                 break
7817                                         fi
7818                                 done
7819                         done
7820                 fi
7821         fi
7822
7823         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7824
7825 echo "${as_me:-configure}:7825: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7826
7827 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7828
7829 echo "${as_me:-configure}:7829: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7830
7831 cf_rpath_dst=
7832 for cf_rpath_src in $LDFLAGS
7833 do
7834         case $cf_rpath_src in
7835         (-L*)
7836
7837                 # check if this refers to a directory which we will ignore
7838                 cf_rpath_skip=no
7839                 if test -n "$cf_rpath_list"
7840                 then
7841                         for cf_rpath_item in $cf_rpath_list
7842                         do
7843                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7844                                 then
7845                                         cf_rpath_skip=yes
7846                                         break
7847                                 fi
7848                         done
7849                 fi
7850
7851                 if test "$cf_rpath_skip" = no
7852                 then
7853                         # transform the option
7854                         if test "$LD_RPATH_OPT" = "-R " ; then
7855                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7856                         else
7857                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7858                         fi
7859
7860                         # if we have not already added this, add it now
7861                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7862                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7863                         then
7864                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7865
7866 echo "${as_me:-configure}:7866: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7867
7868                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7869                         fi
7870                 fi
7871                 ;;
7872         esac
7873         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7874 done
7875 LDFLAGS=$cf_rpath_dst
7876
7877 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7878
7879 echo "${as_me:-configure}:7879: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7880
7881 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7882
7883 echo "${as_me:-configure}:7883: testing ...checking LIBS $LIBS ..." 1>&5
7884
7885 cf_rpath_dst=
7886 for cf_rpath_src in $LIBS
7887 do
7888         case $cf_rpath_src in
7889         (-L*)
7890
7891                 # check if this refers to a directory which we will ignore
7892                 cf_rpath_skip=no
7893                 if test -n "$cf_rpath_list"
7894                 then
7895                         for cf_rpath_item in $cf_rpath_list
7896                         do
7897                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7898                                 then
7899                                         cf_rpath_skip=yes
7900                                         break
7901                                 fi
7902                         done
7903                 fi
7904
7905                 if test "$cf_rpath_skip" = no
7906                 then
7907                         # transform the option
7908                         if test "$LD_RPATH_OPT" = "-R " ; then
7909                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7910                         else
7911                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7912                         fi
7913
7914                         # if we have not already added this, add it now
7915                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7916                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7917                         then
7918                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7919
7920 echo "${as_me:-configure}:7920: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7921
7922                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7923                         fi
7924                 fi
7925                 ;;
7926         esac
7927         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7928 done
7929 LIBS=$cf_rpath_dst
7930
7931 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7932
7933 echo "${as_me:-configure}:7933: testing ...checked LIBS $LIBS ..." 1>&5
7934
7935         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7936
7937 echo "${as_me:-configure}:7937: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7938
7939 else
7940         echo "$as_me:7940: result: no" >&5
7941 echo "${ECHO_T}no" >&6
7942 fi
7943
7944 fi
7945
7946 fi
7947
7948 ###############################################################################
7949
7950 ###     use option --with-extra-suffix to append suffix to headers and libraries
7951 echo "$as_me:7951: checking if you wish to append extra suffix to header/library paths" >&5
7952 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7953 EXTRA_SUFFIX=
7954
7955 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7956 if test "${with_extra_suffix+set}" = set; then
7957   withval="$with_extra_suffix"
7958   case x$withval in
7959         (no)
7960                 ;;
7961         (xyes|x)
7962                 EXTRA_SUFFIX=$cf_cv_abi_version
7963                 ;;
7964         (*)
7965                 EXTRA_SUFFIX=$withval
7966                 ;;
7967         esac
7968
7969 fi;
7970 echo "$as_me:7970: result: $EXTRA_SUFFIX" >&5
7971 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7972
7973 ###     use option --disable-overwrite to leave out the link to -lcurses
7974 echo "$as_me:7974: checking if you wish to install ncurses overwriting curses" >&5
7975 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7976
7977 # Check whether --enable-overwrite or --disable-overwrite was given.
7978 if test "${enable_overwrite+set}" = set; then
7979   enableval="$enable_overwrite"
7980   with_overwrite=$enableval
7981 else
7982   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7983 fi;
7984 echo "$as_me:7984: result: $with_overwrite" >&5
7985 echo "${ECHO_T}$with_overwrite" >&6
7986
7987 echo "$as_me:7987: checking if external terminfo-database is used" >&5
7988 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7989
7990 # Check whether --enable-database or --disable-database was given.
7991 if test "${enable_database+set}" = set; then
7992   enableval="$enable_database"
7993   use_database=$enableval
7994 else
7995   use_database=yes
7996 fi;
7997 echo "$as_me:7997: result: $use_database" >&5
7998 echo "${ECHO_T}$use_database" >&6
7999
8000 case $host_os in
8001 (os2*)
8002         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8003         ;;
8004 (*)
8005         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8006         ;;
8007 esac
8008
8009 NCURSES_USE_DATABASE=0
8010 if test "$use_database" != no ; then
8011         NCURSES_USE_DATABASE=1
8012
8013         echo "$as_me:8013: checking which terminfo source-file will be installed" >&5
8014 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8015
8016 # Check whether --with-database or --without-database was given.
8017 if test "${with_database+set}" = set; then
8018   withval="$with_database"
8019   TERMINFO_SRC=$withval
8020 fi;
8021         echo "$as_me:8021: result: $TERMINFO_SRC" >&5
8022 echo "${ECHO_T}$TERMINFO_SRC" >&6
8023
8024         echo "$as_me:8024: checking whether to use hashed database instead of directory/tree" >&5
8025 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8026
8027 # Check whether --with-hashed-db or --without-hashed-db was given.
8028 if test "${with_hashed_db+set}" = set; then
8029   withval="$with_hashed_db"
8030
8031 else
8032   with_hashed_db=no
8033 fi;
8034         echo "$as_me:8034: result: $with_hashed_db" >&5
8035 echo "${ECHO_T}$with_hashed_db" >&6
8036 else
8037         with_hashed_db=no
8038 fi
8039
8040 echo "$as_me:8040: checking for list of fallback descriptions" >&5
8041 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8042
8043 # Check whether --with-fallbacks or --without-fallbacks was given.
8044 if test "${with_fallbacks+set}" = set; then
8045   withval="$with_fallbacks"
8046   with_fallback=$withval
8047 else
8048   with_fallback=
8049 fi;
8050 echo "$as_me:8050: result: $with_fallback" >&5
8051 echo "${ECHO_T}$with_fallback" >&6
8052
8053 case ".$with_fallback" in
8054 (.|.no)
8055         FALLBACK_LIST=
8056         ;;
8057 (.yes)
8058         { echo "$as_me:8058: WARNING: expected a list of terminal descriptions" >&5
8059 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8060         ;;
8061 (*)
8062         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8063         ;;
8064 esac
8065
8066 USE_FALLBACKS=
8067 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8068
8069 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8070 # tree for generating the terminal descriptions that will be compiled into the
8071 # library.  If your toolchain is old, it may not handle current terminal
8072 # databases.  Use configure-options to point to the tools which will be used,
8073 # rather than the first ones found on the $PATH.
8074 if test -n "$FALLBACK_LIST"
8075 then
8076
8077 # Check whether --with-tic-path or --without-tic-path was given.
8078 if test "${with_tic_path+set}" = set; then
8079   withval="$with_tic_path"
8080   echo "$as_me:8080: checking for tic program for fallbacks" >&5
8081 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8082                 TIC=$withval
8083                 echo "$as_me:8083: result: $TIC" >&5
8084 echo "${ECHO_T}$TIC" >&6
8085
8086 if test "x$prefix" != xNONE; then
8087         cf_path_syntax="$prefix"
8088 else
8089         cf_path_syntax="$ac_default_prefix"
8090 fi
8091
8092 case ".$TIC" in
8093 (.\$\(*\)*|.\'*\'*)
8094         ;;
8095 (..|./*|.\\*)
8096         ;;
8097 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8098         ;;
8099 (.\${*prefix}*|.\${*dir}*)
8100         eval TIC="$TIC"
8101         case ".$TIC" in
8102         (.NONE/*)
8103                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8104                 ;;
8105         esac
8106         ;;
8107 (.no|.NONE/*)
8108         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8109         ;;
8110 (*)
8111         { { echo "$as_me:8111: error: expected a pathname, not \"$TIC\"" >&5
8112 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8113    { (exit 1); exit 1; }; }
8114         ;;
8115 esac
8116
8117 else
8118
8119 test -z "$TIC" && TIC=tic
8120 for ac_prog in $TIC tic
8121 do
8122   # Extract the first word of "$ac_prog", so it can be a program name with args.
8123 set dummy $ac_prog; ac_word=$2
8124 echo "$as_me:8124: checking for $ac_word" >&5
8125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8126 if test "${ac_cv_path_TIC+set}" = set; then
8127   echo $ECHO_N "(cached) $ECHO_C" >&6
8128 else
8129   case $TIC in
8130   [\\/]* | ?:[\\/]*)
8131   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8132   ;;
8133   *)
8134   ac_save_IFS=$IFS; IFS=$ac_path_separator
8135 ac_dummy="$PATH:/usr/local/ncurses/bin"
8136 for ac_dir in $ac_dummy; do
8137   IFS=$ac_save_IFS
8138   test -z "$ac_dir" && ac_dir=.
8139   if $as_executable_p "$ac_dir/$ac_word"; then
8140    ac_cv_path_TIC="$ac_dir/$ac_word"
8141    echo "$as_me:8141: found $ac_dir/$ac_word" >&5
8142    break
8143 fi
8144 done
8145
8146   ;;
8147 esac
8148 fi
8149 TIC=$ac_cv_path_TIC
8150
8151 if test -n "$TIC"; then
8152   echo "$as_me:8152: result: $TIC" >&5
8153 echo "${ECHO_T}$TIC" >&6
8154 else
8155   echo "$as_me:8155: result: no" >&5
8156 echo "${ECHO_T}no" >&6
8157 fi
8158
8159   test -n "$TIC" && break
8160 done
8161 test -n "$TIC" || TIC="$TIC"
8162
8163 cf_path_prog=""
8164 cf_path_args=""
8165 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8166 for cf_temp in $ac_cv_path_TIC
8167 do
8168         if test -z "$cf_path_prog" ; then
8169                 if test "$with_full_paths" = yes ; then
8170
8171 if test "x$prefix" != xNONE; then
8172         cf_path_syntax="$prefix"
8173 else
8174         cf_path_syntax="$ac_default_prefix"
8175 fi
8176
8177 case ".$cf_temp" in
8178 (.\$\(*\)*|.\'*\'*)
8179         ;;
8180 (..|./*|.\\*)
8181         ;;
8182 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8183         ;;
8184 (.\${*prefix}*|.\${*dir}*)
8185         eval cf_temp="$cf_temp"
8186         case ".$cf_temp" in
8187         (.NONE/*)
8188                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8189                 ;;
8190         esac
8191         ;;
8192 (.no|.NONE/*)
8193         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8194         ;;
8195 (*)
8196         break
8197         ;;
8198 esac
8199
8200                         cf_path_prog="$cf_temp"
8201                 else
8202                         cf_path_prog="`basename $cf_temp`"
8203                 fi
8204         elif test -z "$cf_path_args" ; then
8205                 cf_path_args="$cf_temp"
8206         else
8207                 cf_path_args="$cf_path_args $cf_temp"
8208         fi
8209 done
8210 IFS="$cf_save_ifs"
8211
8212 if test -n "$cf_path_prog" ; then
8213
8214 echo "${as_me:-configure}:8214: testing defining path for ${cf_path_prog} ..." 1>&5
8215
8216 cat >>confdefs.h <<EOF
8217 #define TIC_PATH "$cf_path_prog"
8218 EOF
8219
8220         test -n "$cf_path_args" &&
8221 cat >>confdefs.h <<EOF
8222 #define TIC_ARGS "$cf_path_args"
8223 EOF
8224
8225 fi
8226
8227                 if test -z "$TIC"
8228                 then
8229                         { echo "$as_me:8229: WARNING: no tic program found for fallbacks" >&5
8230 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8231                 fi
8232
8233 fi;
8234
8235 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8236 if test "${with_infocmp_path+set}" = set; then
8237   withval="$with_infocmp_path"
8238   echo "$as_me:8238: checking for infocmp program for fallbacks" >&5
8239 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8240                 INFOCMP=$withval
8241                 echo "$as_me:8241: result: $INFOCMP" >&5
8242 echo "${ECHO_T}$INFOCMP" >&6
8243
8244 if test "x$prefix" != xNONE; then
8245         cf_path_syntax="$prefix"
8246 else
8247         cf_path_syntax="$ac_default_prefix"
8248 fi
8249
8250 case ".$INFOCMP" in
8251 (.\$\(*\)*|.\'*\'*)
8252         ;;
8253 (..|./*|.\\*)
8254         ;;
8255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8256         ;;
8257 (.\${*prefix}*|.\${*dir}*)
8258         eval INFOCMP="$INFOCMP"
8259         case ".$INFOCMP" in
8260         (.NONE/*)
8261                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8262                 ;;
8263         esac
8264         ;;
8265 (.no|.NONE/*)
8266         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8267         ;;
8268 (*)
8269         { { echo "$as_me:8269: error: expected a pathname, not \"$INFOCMP\"" >&5
8270 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8271    { (exit 1); exit 1; }; }
8272         ;;
8273 esac
8274
8275 else
8276
8277 test -z "$INFOCMP" && INFOCMP=infocmp
8278 for ac_prog in $INFOCMP infocmp
8279 do
8280   # Extract the first word of "$ac_prog", so it can be a program name with args.
8281 set dummy $ac_prog; ac_word=$2
8282 echo "$as_me:8282: checking for $ac_word" >&5
8283 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8284 if test "${ac_cv_path_INFOCMP+set}" = set; then
8285   echo $ECHO_N "(cached) $ECHO_C" >&6
8286 else
8287   case $INFOCMP in
8288   [\\/]* | ?:[\\/]*)
8289   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8290   ;;
8291   *)
8292   ac_save_IFS=$IFS; IFS=$ac_path_separator
8293 ac_dummy="$PATH:/usr/local/ncurses/bin"
8294 for ac_dir in $ac_dummy; do
8295   IFS=$ac_save_IFS
8296   test -z "$ac_dir" && ac_dir=.
8297   if $as_executable_p "$ac_dir/$ac_word"; then
8298    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8299    echo "$as_me:8299: found $ac_dir/$ac_word" >&5
8300    break
8301 fi
8302 done
8303
8304   ;;
8305 esac
8306 fi
8307 INFOCMP=$ac_cv_path_INFOCMP
8308
8309 if test -n "$INFOCMP"; then
8310   echo "$as_me:8310: result: $INFOCMP" >&5
8311 echo "${ECHO_T}$INFOCMP" >&6
8312 else
8313   echo "$as_me:8313: result: no" >&5
8314 echo "${ECHO_T}no" >&6
8315 fi
8316
8317   test -n "$INFOCMP" && break
8318 done
8319 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8320
8321 cf_path_prog=""
8322 cf_path_args=""
8323 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8324 for cf_temp in $ac_cv_path_INFOCMP
8325 do
8326         if test -z "$cf_path_prog" ; then
8327                 if test "$with_full_paths" = yes ; then
8328
8329 if test "x$prefix" != xNONE; then
8330         cf_path_syntax="$prefix"
8331 else
8332         cf_path_syntax="$ac_default_prefix"
8333 fi
8334
8335 case ".$cf_temp" in
8336 (.\$\(*\)*|.\'*\'*)
8337         ;;
8338 (..|./*|.\\*)
8339         ;;
8340 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8341         ;;
8342 (.\${*prefix}*|.\${*dir}*)
8343         eval cf_temp="$cf_temp"
8344         case ".$cf_temp" in
8345         (.NONE/*)
8346                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8347                 ;;
8348         esac
8349         ;;
8350 (.no|.NONE/*)
8351         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8352         ;;
8353 (*)
8354         break
8355         ;;
8356 esac
8357
8358                         cf_path_prog="$cf_temp"
8359                 else
8360                         cf_path_prog="`basename $cf_temp`"
8361                 fi
8362         elif test -z "$cf_path_args" ; then
8363                 cf_path_args="$cf_temp"
8364         else
8365                 cf_path_args="$cf_path_args $cf_temp"
8366         fi
8367 done
8368 IFS="$cf_save_ifs"
8369
8370 if test -n "$cf_path_prog" ; then
8371
8372 echo "${as_me:-configure}:8372: testing defining path for ${cf_path_prog} ..." 1>&5
8373
8374 cat >>confdefs.h <<EOF
8375 #define INFOCMP_PATH "$cf_path_prog"
8376 EOF
8377
8378         test -n "$cf_path_args" &&
8379 cat >>confdefs.h <<EOF
8380 #define INFOCMP_ARGS "$cf_path_args"
8381 EOF
8382
8383 fi
8384
8385                 if test -z "$INFOCMP"
8386                 then
8387                         { echo "$as_me:8387: WARNING: no infocmp program found for fallbacks" >&5
8388 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8389                 fi
8390
8391 fi;
8392
8393 else
8394         : ${TIC:=tic}
8395         : ${INFOCMP:=infocmp}
8396 fi
8397
8398 echo "$as_me:8398: checking if you want modern xterm or antique" >&5
8399 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8400
8401 # Check whether --with-xterm-new or --without-xterm-new was given.
8402 if test "${with_xterm_new+set}" = set; then
8403   withval="$with_xterm_new"
8404   with_xterm_new=$withval
8405 else
8406   with_xterm_new=yes
8407 fi;
8408 case $with_xterm_new in
8409 (no) with_xterm_new=xterm-old;;
8410 (*)      with_xterm_new=xterm-new;;
8411 esac
8412 echo "$as_me:8412: result: $with_xterm_new" >&5
8413 echo "${ECHO_T}$with_xterm_new" >&6
8414 WHICH_XTERM=$with_xterm_new
8415
8416 echo "$as_me:8416: checking if xterm backspace sends BS or DEL" >&5
8417 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8418
8419 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8420 if test "${with_xterm_kbs+set}" = set; then
8421   withval="$with_xterm_kbs"
8422   with_xterm_kbs=$withval
8423 else
8424   with_xterm_kbs=BS
8425 fi;
8426 case x$with_xterm_kbs in
8427 (xyes|xno|xBS|xbs|x8)
8428         with_xterm_kbs=BS
8429         ;;
8430 (xDEL|xdel|x127)
8431         with_xterm_kbs=DEL
8432         ;;
8433 (*)
8434         with_xterm_kbs=$withval
8435         ;;
8436 esac
8437 echo "$as_me:8437: result: $with_xterm_kbs" >&5
8438 echo "${ECHO_T}$with_xterm_kbs" >&6
8439 XTERM_KBS=$with_xterm_kbs
8440
8441 MAKE_TERMINFO=
8442 if test "$use_database" = no ; then
8443         TERMINFO="${datadir}/terminfo"
8444         MAKE_TERMINFO="#"
8445 else
8446
8447 echo "$as_me:8447: checking for list of terminfo directories" >&5
8448 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8449
8450 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8451 if test "${with_terminfo_dirs+set}" = set; then
8452   withval="$with_terminfo_dirs"
8453
8454 else
8455   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8456 fi;
8457 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8458 cf_dst_path=
8459 for cf_src_path in $withval
8460 do
8461
8462 if test "x$prefix" != xNONE; then
8463         cf_path_syntax="$prefix"
8464 else
8465         cf_path_syntax="$ac_default_prefix"
8466 fi
8467
8468 case ".$cf_src_path" in
8469 (.\$\(*\)*|.\'*\'*)
8470         ;;
8471 (..|./*|.\\*)
8472         ;;
8473 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8474         ;;
8475 (.\${*prefix}*|.\${*dir}*)
8476         eval cf_src_path="$cf_src_path"
8477         case ".$cf_src_path" in
8478         (.NONE/*)
8479                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8480                 ;;
8481         esac
8482         ;;
8483 (.no|.NONE/*)
8484         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8485         ;;
8486 (*)
8487         { { echo "$as_me:8487: error: expected a pathname, not \"$cf_src_path\"" >&5
8488 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8489    { (exit 1); exit 1; }; }
8490         ;;
8491 esac
8492
8493   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8494   cf_dst_path="${cf_dst_path}${cf_src_path}"
8495 done
8496 IFS="$ac_save_ifs"
8497
8498 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8499 # so we have to check/work around.  We do prefer the result of "eval"...
8500 eval cf_dst_eval="$cf_dst_path"
8501 case "x$cf_dst_eval" in
8502 (xNONE*)
8503         TERMINFO_DIRS=$cf_dst_path
8504         ;;
8505 (*)
8506         TERMINFO_DIRS="$cf_dst_eval"
8507         ;;
8508 esac
8509
8510 echo "$as_me:8510: result: $TERMINFO_DIRS" >&5
8511 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8512 test -n "$TERMINFO_DIRS" &&
8513 cat >>confdefs.h <<EOF
8514 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8515 EOF
8516
8517 case "x$TERMINFO" in
8518 x???:*)
8519         { echo "$as_me:8519: WARNING: ignoring non-directory/file TERMINFO value" >&5
8520 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8521         unset TERMINFO
8522         ;;
8523 esac
8524
8525 echo "$as_me:8525: checking for default terminfo directory" >&5
8526 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8527
8528 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8529 if test "${with_default_terminfo_dir+set}" = set; then
8530   withval="$with_default_terminfo_dir"
8531
8532 else
8533   withval="${TERMINFO:-${datadir}/terminfo}"
8534 fi; if test -n "${datadir}/terminfo" ; then
8535
8536 if test "x$prefix" != xNONE; then
8537         cf_path_syntax="$prefix"
8538 else
8539         cf_path_syntax="$ac_default_prefix"
8540 fi
8541
8542 case ".$withval" in
8543 (.\$\(*\)*|.\'*\'*)
8544         ;;
8545 (..|./*|.\\*)
8546         ;;
8547 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8548         ;;
8549 (.\${*prefix}*|.\${*dir}*)
8550         eval withval="$withval"
8551         case ".$withval" in
8552         (.NONE/*)
8553                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8554                 ;;
8555         esac
8556         ;;
8557 (.no|.NONE/*)
8558         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8559         ;;
8560 (*)
8561         { { echo "$as_me:8561: error: expected a pathname, not \"$withval\"" >&5
8562 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8563    { (exit 1); exit 1; }; }
8564         ;;
8565 esac
8566
8567 fi
8568 eval TERMINFO="$withval"
8569
8570 echo "$as_me:8570: result: $TERMINFO" >&5
8571 echo "${ECHO_T}$TERMINFO" >&6
8572
8573 cat >>confdefs.h <<EOF
8574 #define TERMINFO "$TERMINFO"
8575 EOF
8576
8577 fi
8578
8579 ###     use option --disable-big-core to make tic run on small machines
8580 ###     We need 4Mb, check if we can allocate 50% more than that.
8581 echo "$as_me:8581: checking if big-core option selected" >&5
8582 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8583
8584 # Check whether --enable-big-core or --disable-big-core was given.
8585 if test "${enable_big_core+set}" = set; then
8586   enableval="$enable_big_core"
8587   with_big_core=$enableval
8588 else
8589   if test "$cross_compiling" = yes; then
8590   with_big_core=no
8591 else
8592   cat >conftest.$ac_ext <<_ACEOF
8593 #line 8593 "configure"
8594 #include "confdefs.h"
8595
8596 #include <stdlib.h>
8597 #include <string.h>
8598 int main() {
8599         unsigned long n = 6000000L;
8600         char *s = malloc(n);
8601         if (s != 0)
8602                 s[0] = s[n-1] = 0;
8603         ${cf_cv_main_return:-return}(s == 0);
8604 }
8605 _ACEOF
8606 rm -f conftest$ac_exeext
8607 if { (eval echo "$as_me:8607: \"$ac_link\"") >&5
8608   (eval $ac_link) 2>&5
8609   ac_status=$?
8610   echo "$as_me:8610: \$? = $ac_status" >&5
8611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8612   { (eval echo "$as_me:8612: \"$ac_try\"") >&5
8613   (eval $ac_try) 2>&5
8614   ac_status=$?
8615   echo "$as_me:8615: \$? = $ac_status" >&5
8616   (exit $ac_status); }; }; then
8617   with_big_core=yes
8618 else
8619   echo "$as_me: program exited with status $ac_status" >&5
8620 echo "$as_me: failed program was:" >&5
8621 cat conftest.$ac_ext >&5
8622 with_big_core=no
8623 fi
8624 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8625 fi
8626 fi;
8627 echo "$as_me:8627: result: $with_big_core" >&5
8628 echo "${ECHO_T}$with_big_core" >&6
8629 test "x$with_big_core" = "xyes" &&
8630 cat >>confdefs.h <<\EOF
8631 #define HAVE_BIG_CORE 1
8632 EOF
8633
8634 ### ISO C only guarantees 512-char strings, we have tables which load faster
8635 ### when constructed using "big" strings.  More than the C compiler, the awk
8636 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8637 echo "$as_me:8637: checking if big-strings option selected" >&5
8638 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8639
8640 # Check whether --enable-big-strings or --disable-big-strings was given.
8641 if test "${enable_big_strings+set}" = set; then
8642   enableval="$enable_big_strings"
8643   with_big_strings=$enableval
8644 else
8645
8646         case x$AWK in
8647         (x)
8648                 eval with_big_strings=no
8649                 ;;
8650         (*)
8651                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8652                         | $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
8653                         eval with_big_strings=yes
8654                 else
8655                         eval with_big_strings=no
8656                 fi
8657                 ;;
8658         esac
8659
8660 fi;
8661 echo "$as_me:8661: result: $with_big_strings" >&5
8662 echo "${ECHO_T}$with_big_strings" >&6
8663
8664 USE_BIG_STRINGS=0
8665 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8666
8667 ###     use option --enable-termcap to compile in the termcap fallback support
8668 echo "$as_me:8668: checking if you want termcap-fallback support" >&5
8669 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8670
8671 # Check whether --enable-termcap or --disable-termcap was given.
8672 if test "${enable_termcap+set}" = set; then
8673   enableval="$enable_termcap"
8674   with_termcap=$enableval
8675 else
8676   with_termcap=no
8677 fi;
8678 echo "$as_me:8678: result: $with_termcap" >&5
8679 echo "${ECHO_T}$with_termcap" >&6
8680
8681 NCURSES_USE_TERMCAP=0
8682 if test "x$with_termcap" != "xyes" ; then
8683         if test "$use_database" = no ; then
8684                 if test -z "$with_fallback" ; then
8685                         { { echo "$as_me:8685: error: You have disabled the database w/o specifying fallbacks" >&5
8686 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8687    { (exit 1); exit 1; }; }
8688                 fi
8689         fi
8690
8691 cat >>confdefs.h <<\EOF
8692 #define PURE_TERMINFO 1
8693 EOF
8694
8695 else
8696
8697         if test "$with_ticlib" != no ; then
8698                 { { echo "$as_me:8698: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8699 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8700    { (exit 1); exit 1; }; }
8701         fi
8702
8703         NCURSES_USE_TERMCAP=1
8704         echo "$as_me:8704: checking for list of termcap files" >&5
8705 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8706
8707 # Check whether --with-termpath or --without-termpath was given.
8708 if test "${with_termpath+set}" = set; then
8709   withval="$with_termpath"
8710
8711 else
8712   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8713 fi;
8714 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8715 cf_dst_path=
8716 for cf_src_path in $withval
8717 do
8718
8719 if test "x$prefix" != xNONE; then
8720         cf_path_syntax="$prefix"
8721 else
8722         cf_path_syntax="$ac_default_prefix"
8723 fi
8724
8725 case ".$cf_src_path" in
8726 (.\$\(*\)*|.\'*\'*)
8727         ;;
8728 (..|./*|.\\*)
8729         ;;
8730 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8731         ;;
8732 (.\${*prefix}*|.\${*dir}*)
8733         eval cf_src_path="$cf_src_path"
8734         case ".$cf_src_path" in
8735         (.NONE/*)
8736                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8737                 ;;
8738         esac
8739         ;;
8740 (.no|.NONE/*)
8741         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8742         ;;
8743 (*)
8744         { { echo "$as_me:8744: error: expected a pathname, not \"$cf_src_path\"" >&5
8745 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8746    { (exit 1); exit 1; }; }
8747         ;;
8748 esac
8749
8750   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8751   cf_dst_path="${cf_dst_path}${cf_src_path}"
8752 done
8753 IFS="$ac_save_ifs"
8754
8755 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8756 # so we have to check/work around.  We do prefer the result of "eval"...
8757 eval cf_dst_eval="$cf_dst_path"
8758 case "x$cf_dst_eval" in
8759 (xNONE*)
8760         TERMPATH=$cf_dst_path
8761         ;;
8762 (*)
8763         TERMPATH="$cf_dst_eval"
8764         ;;
8765 esac
8766
8767         echo "$as_me:8767: result: $TERMPATH" >&5
8768 echo "${ECHO_T}$TERMPATH" >&6
8769         test -n "$TERMPATH" &&
8770 cat >>confdefs.h <<EOF
8771 #define TERMPATH "$TERMPATH"
8772 EOF
8773
8774         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8775         echo "$as_me:8775: checking if fast termcap-loader is needed" >&5
8776 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8777
8778 # Check whether --enable-getcap or --disable-getcap was given.
8779 if test "${enable_getcap+set}" = set; then
8780   enableval="$enable_getcap"
8781   with_getcap=$enableval
8782 else
8783   with_getcap=no
8784 fi;
8785         echo "$as_me:8785: result: $with_getcap" >&5
8786 echo "${ECHO_T}$with_getcap" >&6
8787         test "x$with_getcap" = "xyes" &&
8788 cat >>confdefs.h <<\EOF
8789 #define USE_GETCAP 1
8790 EOF
8791
8792         echo "$as_me:8792: checking if translated termcaps will be cached in ~/.terminfo" >&5
8793 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8794
8795 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8796 if test "${enable_getcap_cache+set}" = set; then
8797   enableval="$enable_getcap_cache"
8798   with_getcap_cache=$enableval
8799 else
8800   with_getcap_cache=no
8801 fi;
8802         echo "$as_me:8802: result: $with_getcap_cache" >&5
8803 echo "${ECHO_T}$with_getcap_cache" >&6
8804         test "x$with_getcap_cache" = "xyes" &&
8805 cat >>confdefs.h <<\EOF
8806 #define USE_GETCAP_CACHE 1
8807 EOF
8808
8809 fi
8810
8811 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8812 echo "$as_me:8812: checking if ~/.terminfo is wanted" >&5
8813 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8814
8815 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8816 if test "${enable_home_terminfo+set}" = set; then
8817   enableval="$enable_home_terminfo"
8818   with_home_terminfo=$enableval
8819 else
8820   with_home_terminfo=yes
8821 fi;
8822 echo "$as_me:8822: result: $with_home_terminfo" >&5
8823 echo "${ECHO_T}$with_home_terminfo" >&6
8824 test "x$with_home_terminfo" = "xyes" &&
8825 cat >>confdefs.h <<\EOF
8826 #define USE_HOME_TERMINFO 1
8827 EOF
8828
8829 echo "$as_me:8829: checking if you want to use restricted environment when running as root" >&5
8830 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8831
8832 # Check whether --enable-root-environ or --disable-root-environ was given.
8833 if test "${enable_root_environ+set}" = set; then
8834   enableval="$enable_root_environ"
8835   with_root_environ=$enableval
8836 else
8837   with_root_environ=yes
8838 fi;
8839 echo "$as_me:8839: result: $with_root_environ" >&5
8840 echo "${ECHO_T}$with_root_environ" >&6
8841 test "x$with_root_environ" = xyes &&
8842 cat >>confdefs.h <<\EOF
8843 #define USE_ROOT_ENVIRON 1
8844 EOF
8845
8846 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8847 ###   to reduce storage requirements for the terminfo database.
8848
8849 for ac_header in \
8850 unistd.h \
8851
8852 do
8853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8854 echo "$as_me:8854: checking for $ac_header" >&5
8855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8857   echo $ECHO_N "(cached) $ECHO_C" >&6
8858 else
8859   cat >conftest.$ac_ext <<_ACEOF
8860 #line 8860 "configure"
8861 #include "confdefs.h"
8862 #include <$ac_header>
8863 _ACEOF
8864 if { (eval echo "$as_me:8864: \"$ac_cpp conftest.$ac_ext\"") >&5
8865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8866   ac_status=$?
8867   egrep -v '^ *\+' conftest.er1 >conftest.err
8868   rm -f conftest.er1
8869   cat conftest.err >&5
8870   echo "$as_me:8870: \$? = $ac_status" >&5
8871   (exit $ac_status); } >/dev/null; then
8872   if test -s conftest.err; then
8873     ac_cpp_err=$ac_c_preproc_warn_flag
8874   else
8875     ac_cpp_err=
8876   fi
8877 else
8878   ac_cpp_err=yes
8879 fi
8880 if test -z "$ac_cpp_err"; then
8881   eval "$as_ac_Header=yes"
8882 else
8883   echo "$as_me: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   eval "$as_ac_Header=no"
8886 fi
8887 rm -f conftest.err conftest.$ac_ext
8888 fi
8889 echo "$as_me:8889: result: `eval echo '${'$as_ac_Header'}'`" >&5
8890 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8891 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8892   cat >>confdefs.h <<EOF
8893 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8894 EOF
8895
8896 fi
8897 done
8898
8899 for ac_func in \
8900         remove \
8901         unlink
8902 do
8903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8904 echo "$as_me:8904: checking for $ac_func" >&5
8905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8906 if eval "test \"\${$as_ac_var+set}\" = set"; then
8907   echo $ECHO_N "(cached) $ECHO_C" >&6
8908 else
8909   cat >conftest.$ac_ext <<_ACEOF
8910 #line 8910 "configure"
8911 #include "confdefs.h"
8912 #define $ac_func autoconf_temporary
8913 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8914 #undef $ac_func
8915
8916 #ifdef __cplusplus
8917 extern "C"
8918 #endif
8919
8920 /* We use char because int might match the return type of a gcc2
8921    builtin and then its argument prototype would still apply.  */
8922 char $ac_func (void);
8923
8924 int
8925 main (void)
8926 {
8927
8928 /* The GNU C library defines stubs for functions which it implements
8929     to always fail with ENOSYS.  Some functions are actually named
8930     something starting with __ and the normal name is an alias.  */
8931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8932 #error found stub for $ac_func
8933 #endif
8934
8935         return $ac_func ();
8936   ;
8937   return 0;
8938 }
8939 _ACEOF
8940 rm -f conftest.$ac_objext conftest$ac_exeext
8941 if { (eval echo "$as_me:8941: \"$ac_link\"") >&5
8942   (eval $ac_link) 2>&5
8943   ac_status=$?
8944   echo "$as_me:8944: \$? = $ac_status" >&5
8945   (exit $ac_status); } &&
8946          { ac_try='test -s conftest$ac_exeext'
8947   { (eval echo "$as_me:8947: \"$ac_try\"") >&5
8948   (eval $ac_try) 2>&5
8949   ac_status=$?
8950   echo "$as_me:8950: \$? = $ac_status" >&5
8951   (exit $ac_status); }; }; then
8952   eval "$as_ac_var=yes"
8953 else
8954   echo "$as_me: failed program was:" >&5
8955 cat conftest.$ac_ext >&5
8956 eval "$as_ac_var=no"
8957 fi
8958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8959 fi
8960 echo "$as_me:8960: result: `eval echo '${'$as_ac_var'}'`" >&5
8961 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8962 if test `eval echo '${'$as_ac_var'}'` = yes; then
8963   cat >>confdefs.h <<EOF
8964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8965 EOF
8966
8967 fi
8968 done
8969
8970 if test "$cross_compiling" = yes ; then
8971
8972 for ac_func in \
8973                 link \
8974                 symlink
8975 do
8976 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8977 echo "$as_me:8977: checking for $ac_func" >&5
8978 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8979 if eval "test \"\${$as_ac_var+set}\" = set"; then
8980   echo $ECHO_N "(cached) $ECHO_C" >&6
8981 else
8982   cat >conftest.$ac_ext <<_ACEOF
8983 #line 8983 "configure"
8984 #include "confdefs.h"
8985 #define $ac_func autoconf_temporary
8986 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8987 #undef $ac_func
8988
8989 #ifdef __cplusplus
8990 extern "C"
8991 #endif
8992
8993 /* We use char because int might match the return type of a gcc2
8994    builtin and then its argument prototype would still apply.  */
8995 char $ac_func (void);
8996
8997 int
8998 main (void)
8999 {
9000
9001 /* The GNU C library defines stubs for functions which it implements
9002     to always fail with ENOSYS.  Some functions are actually named
9003     something starting with __ and the normal name is an alias.  */
9004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9005 #error found stub for $ac_func
9006 #endif
9007
9008         return $ac_func ();
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext conftest$ac_exeext
9014 if { (eval echo "$as_me:9014: \"$ac_link\"") >&5
9015   (eval $ac_link) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest$ac_exeext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   eval "$as_ac_var=yes"
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 eval "$as_ac_var=no"
9030 fi
9031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9032 fi
9033 echo "$as_me:9033: result: `eval echo '${'$as_ac_var'}'`" >&5
9034 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9035 if test `eval echo '${'$as_ac_var'}'` = yes; then
9036   cat >>confdefs.h <<EOF
9037 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9038 EOF
9039
9040 fi
9041 done
9042
9043 else
9044         echo "$as_me:9044: checking if link/symlink functions work" >&5
9045 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9046 if test "${cf_cv_link_funcs+set}" = set; then
9047   echo $ECHO_N "(cached) $ECHO_C" >&6
9048 else
9049
9050                 cf_cv_link_funcs=
9051                 for cf_func in link symlink ; do
9052                         if test "$cross_compiling" = yes; then
9053
9054                         eval 'ac_cv_func_'$cf_func'=error'
9055 else
9056   cat >conftest.$ac_ext <<_ACEOF
9057 #line 9057 "configure"
9058 #include "confdefs.h"
9059
9060 #include <sys/types.h>
9061 #include <sys/stat.h>
9062 #ifdef HAVE_UNISTD_H
9063 #include <unistd.h>
9064 #endif
9065 int main(void)
9066 {
9067         int fail = 0;
9068         char *src = "config.log";
9069         char *dst = "conftest.chk";
9070         struct stat src_sb;
9071         struct stat dst_sb;
9072
9073         stat(src, &src_sb);
9074         fail = ($cf_func("config.log", "conftest.chk") < 0)
9075             || (stat(dst, &dst_sb) < 0)
9076             || (dst_sb.st_mtime != src_sb.st_mtime);
9077 #ifdef HAVE_UNLINK
9078         unlink(dst);
9079 #else
9080         remove(dst);
9081 #endif
9082         ${cf_cv_main_return:-return} (fail);
9083 }
9084
9085 _ACEOF
9086 rm -f conftest$ac_exeext
9087 if { (eval echo "$as_me:9087: \"$ac_link\"") >&5
9088   (eval $ac_link) 2>&5
9089   ac_status=$?
9090   echo "$as_me:9090: \$? = $ac_status" >&5
9091   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9092   { (eval echo "$as_me:9092: \"$ac_try\"") >&5
9093   (eval $ac_try) 2>&5
9094   ac_status=$?
9095   echo "$as_me:9095: \$? = $ac_status" >&5
9096   (exit $ac_status); }; }; then
9097
9098                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9099                         eval 'ac_cv_func_'$cf_func'=yes'
9100 else
9101   echo "$as_me: program exited with status $ac_status" >&5
9102 echo "$as_me: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9104
9105                         eval 'ac_cv_func_'$cf_func'=no'
9106 fi
9107 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9108 fi
9109                 done
9110                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9111
9112 fi
9113 echo "$as_me:9113: result: $cf_cv_link_funcs" >&5
9114 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9115         test "$ac_cv_func_link"    = yes &&
9116 cat >>confdefs.h <<\EOF
9117 #define HAVE_LINK 1
9118 EOF
9119
9120         test "$ac_cv_func_symlink" = yes &&
9121 cat >>confdefs.h <<\EOF
9122 #define HAVE_SYMLINK 1
9123 EOF
9124
9125 fi
9126
9127 with_links=no
9128 with_symlinks=no
9129
9130 # soft links (symbolic links) are useful for some systems where hard links do
9131 # not work, or to make it simpler to copy terminfo trees around.
9132 if test "x$ac_cv_func_symlink" = xyes ; then
9133         echo "$as_me:9133: checking if tic should use symbolic links" >&5
9134 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9135
9136 # Check whether --enable-symlinks or --disable-symlinks was given.
9137 if test "${enable_symlinks+set}" = set; then
9138   enableval="$enable_symlinks"
9139   with_symlinks=$enableval
9140 else
9141   with_symlinks=no
9142 fi;
9143         echo "$as_me:9143: result: $with_symlinks" >&5
9144 echo "${ECHO_T}$with_symlinks" >&6
9145 fi
9146
9147 # If we have hard links and did not choose to use soft links instead, there is
9148 # no reason to make this choice optional - use the hard links.
9149 if test "$with_symlinks" = no ; then
9150         echo "$as_me:9150: checking if tic should use hard links" >&5
9151 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9152         if test "x$ac_cv_func_link" = xyes ; then
9153                 with_links=yes
9154         else
9155                 with_links=no
9156         fi
9157         echo "$as_me:9157: result: $with_links" >&5
9158 echo "${ECHO_T}$with_links" >&6
9159 fi
9160
9161 test "x$with_links" = xyes &&
9162 cat >>confdefs.h <<\EOF
9163 #define USE_LINKS 1
9164 EOF
9165
9166 test "x$with_symlinks" = xyes &&
9167 cat >>confdefs.h <<\EOF
9168 #define USE_SYMLINKS 1
9169 EOF
9170
9171 ###   use option --enable-broken-linker to force on use of broken-linker support
9172
9173 echo "$as_me:9173: checking if you want broken-linker support code" >&5
9174 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9175
9176 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9177 if test "${enable_broken_linker+set}" = set; then
9178   enableval="$enable_broken_linker"
9179   with_broken_linker=$enableval
9180 else
9181   with_broken_linker=no
9182 fi;
9183 echo "$as_me:9183: result: $with_broken_linker" >&5
9184 echo "${ECHO_T}$with_broken_linker" >&6
9185
9186 : ${BROKEN_LINKER:=0}
9187 if test "x$with_broken_linker" = xyes ; then
9188
9189 cat >>confdefs.h <<\EOF
9190 #define BROKEN_LINKER 1
9191 EOF
9192
9193         BROKEN_LINKER=1
9194 fi
9195
9196 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9197 echo "$as_me:9197: checking if tputs should process BSD-style prefix padding" >&5
9198 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9199
9200 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9201 if test "${enable_bsdpad+set}" = set; then
9202   enableval="$enable_bsdpad"
9203   with_bsdpad=$enableval
9204 else
9205   with_bsdpad=no
9206 fi;
9207 echo "$as_me:9207: result: $with_bsdpad" >&5
9208 echo "${ECHO_T}$with_bsdpad" >&6
9209 test "x$with_bsdpad" = xyes &&
9210 cat >>confdefs.h <<\EOF
9211 #define BSD_TPUTS 1
9212 EOF
9213
9214 ###   use option --enable-widec to turn on use of wide-character support
9215 NCURSES_CH_T=chtype
9216 NCURSES_LIBUTF8=0
9217
9218 NEED_WCHAR_H=0
9219 NCURSES_MBSTATE_T=0
9220 NCURSES_WCHAR_T=0
9221 NCURSES_WINT_T=0
9222
9223 # Check to define _XOPEN_SOURCE "automatically"
9224 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9225
9226 echo "$as_me:9226: checking if the POSIX test-macros are already defined" >&5
9227 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9228 if test "${cf_cv_posix_visible+set}" = set; then
9229   echo $ECHO_N "(cached) $ECHO_C" >&6
9230 else
9231
9232 cat >conftest.$ac_ext <<_ACEOF
9233 #line 9233 "configure"
9234 #include "confdefs.h"
9235 #include <stdio.h>
9236 int
9237 main (void)
9238 {
9239
9240 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9241         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9242         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9243         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9244 #error conflicting symbols found
9245 #endif
9246
9247   ;
9248   return 0;
9249 }
9250 _ACEOF
9251 rm -f conftest.$ac_objext
9252 if { (eval echo "$as_me:9252: \"$ac_compile\"") >&5
9253   (eval $ac_compile) 2>&5
9254   ac_status=$?
9255   echo "$as_me:9255: \$? = $ac_status" >&5
9256   (exit $ac_status); } &&
9257          { ac_try='test -s conftest.$ac_objext'
9258   { (eval echo "$as_me:9258: \"$ac_try\"") >&5
9259   (eval $ac_try) 2>&5
9260   ac_status=$?
9261   echo "$as_me:9261: \$? = $ac_status" >&5
9262   (exit $ac_status); }; }; then
9263   cf_cv_posix_visible=no
9264 else
9265   echo "$as_me: failed program was:" >&5
9266 cat conftest.$ac_ext >&5
9267 cf_cv_posix_visible=yes
9268 fi
9269 rm -f conftest.$ac_objext conftest.$ac_ext
9270
9271 fi
9272 echo "$as_me:9272: result: $cf_cv_posix_visible" >&5
9273 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9274
9275 if test "$cf_cv_posix_visible" = no; then
9276
9277 cf_XOPEN_SOURCE=600
9278 cf_POSIX_C_SOURCE=199506L
9279 cf_xopen_source=
9280
9281 case $host_os in
9282 (aix[4-7]*)
9283         cf_xopen_source="-D_ALL_SOURCE"
9284         ;;
9285 (msys)
9286         cf_XOPEN_SOURCE=600
9287         ;;
9288 (darwin[0-8].*)
9289         cf_xopen_source="-D_APPLE_C_SOURCE"
9290         ;;
9291 (darwin*)
9292         cf_xopen_source="-D_DARWIN_C_SOURCE"
9293         cf_XOPEN_SOURCE=
9294         ;;
9295 (freebsd*|dragonfly*|midnightbsd*)
9296         # 5.x headers associate
9297         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9298         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9299         cf_POSIX_C_SOURCE=200112L
9300         cf_XOPEN_SOURCE=600
9301         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9302         ;;
9303 (hpux11*)
9304         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9305         ;;
9306 (hpux*)
9307         cf_xopen_source="-D_HPUX_SOURCE"
9308         ;;
9309 (irix[56].*)
9310         cf_xopen_source="-D_SGI_SOURCE"
9311         cf_XOPEN_SOURCE=
9312         ;;
9313 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9314
9315 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9316
9317 echo "$as_me:9317: checking if this is the GNU C library" >&5
9318 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9319 if test "${cf_cv_gnu_library+set}" = set; then
9320   echo $ECHO_N "(cached) $ECHO_C" >&6
9321 else
9322
9323 cat >conftest.$ac_ext <<_ACEOF
9324 #line 9324 "configure"
9325 #include "confdefs.h"
9326 #include <sys/types.h>
9327 int
9328 main (void)
9329 {
9330
9331         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9332                 return 0;
9333         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9334                 return 0;
9335         #else
9336         #       error not GNU C library
9337         #endif
9338   ;
9339   return 0;
9340 }
9341 _ACEOF
9342 rm -f conftest.$ac_objext
9343 if { (eval echo "$as_me:9343: \"$ac_compile\"") >&5
9344   (eval $ac_compile) 2>&5
9345   ac_status=$?
9346   echo "$as_me:9346: \$? = $ac_status" >&5
9347   (exit $ac_status); } &&
9348          { ac_try='test -s conftest.$ac_objext'
9349   { (eval echo "$as_me:9349: \"$ac_try\"") >&5
9350   (eval $ac_try) 2>&5
9351   ac_status=$?
9352   echo "$as_me:9352: \$? = $ac_status" >&5
9353   (exit $ac_status); }; }; then
9354   cf_cv_gnu_library=yes
9355 else
9356   echo "$as_me: failed program was:" >&5
9357 cat conftest.$ac_ext >&5
9358 cf_cv_gnu_library=no
9359 fi
9360 rm -f conftest.$ac_objext conftest.$ac_ext
9361
9362 fi
9363 echo "$as_me:9363: result: $cf_cv_gnu_library" >&5
9364 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9365
9366 if test x$cf_cv_gnu_library = xyes; then
9367
9368         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9369         # was changed to help a little.  newlib incorporated the change about 4
9370         # years later.
9371         echo "$as_me:9371: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9372 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9373 if test "${cf_cv_gnu_library_219+set}" = set; then
9374   echo $ECHO_N "(cached) $ECHO_C" >&6
9375 else
9376
9377                 cf_save="$CPPFLAGS"
9378
9379         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9380         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9381
9382                 cat >conftest.$ac_ext <<_ACEOF
9383 #line 9383 "configure"
9384 #include "confdefs.h"
9385 #include <sys/types.h>
9386 int
9387 main (void)
9388 {
9389
9390                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9391                                 return 0;
9392                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9393                                 return 0;
9394                         #else
9395                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9396                         #endif
9397   ;
9398   return 0;
9399 }
9400 _ACEOF
9401 rm -f conftest.$ac_objext
9402 if { (eval echo "$as_me:9402: \"$ac_compile\"") >&5
9403   (eval $ac_compile) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); } &&
9407          { ac_try='test -s conftest.$ac_objext'
9408   { (eval echo "$as_me:9408: \"$ac_try\"") >&5
9409   (eval $ac_try) 2>&5
9410   ac_status=$?
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit $ac_status); }; }; then
9413   cf_cv_gnu_library_219=yes
9414 else
9415   echo "$as_me: failed program was:" >&5
9416 cat conftest.$ac_ext >&5
9417 cf_cv_gnu_library_219=no
9418 fi
9419 rm -f conftest.$ac_objext conftest.$ac_ext
9420                 CPPFLAGS="$cf_save"
9421
9422 fi
9423 echo "$as_me:9423: result: $cf_cv_gnu_library_219" >&5
9424 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9425
9426         if test "x$cf_cv_gnu_library_219" = xyes; then
9427                 cf_save="$CPPFLAGS"
9428                 echo "$as_me:9428: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9429 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9430 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9431   echo $ECHO_N "(cached) $ECHO_C" >&6
9432 else
9433
9434 cf_fix_cppflags=no
9435 cf_new_cflags=
9436 cf_new_cppflags=
9437 cf_new_extra_cppflags=
9438
9439 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9440 do
9441 case $cf_fix_cppflags in
9442 (no)
9443         case $cf_add_cflags in
9444         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9445                 case $cf_add_cflags in
9446                 (-D*)
9447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9448
9449                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9450                                 && test -z "${cf_tst_cflags}" \
9451                                 && cf_fix_cppflags=yes
9452
9453                         if test $cf_fix_cppflags = yes ; then
9454
9455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9457
9458                                 continue
9459                         elif test "${cf_tst_cflags}" = "\"'" ; then
9460
9461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9463
9464                                 continue
9465                         fi
9466                         ;;
9467                 esac
9468                 case "$CPPFLAGS" in
9469                 (*$cf_add_cflags)
9470                         ;;
9471                 (*)
9472                         case $cf_add_cflags in
9473                         (-D*)
9474                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9475
9476 CPPFLAGS=`echo "$CPPFLAGS" | \
9477         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9478                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9479
9480                                 ;;
9481                         esac
9482
9483         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9484         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9485
9486                         ;;
9487                 esac
9488                 ;;
9489         (*)
9490
9491         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9492         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9493
9494                 ;;
9495         esac
9496         ;;
9497 (yes)
9498
9499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9501
9502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9503
9504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9505                 && test -z "${cf_tst_cflags}" \
9506                 && cf_fix_cppflags=no
9507         ;;
9508 esac
9509 done
9510
9511 if test -n "$cf_new_cflags" ; then
9512
9513         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9514         CFLAGS="${CFLAGS}$cf_new_cflags"
9515
9516 fi
9517
9518 if test -n "$cf_new_cppflags" ; then
9519
9520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9521         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9522
9523 fi
9524
9525 if test -n "$cf_new_extra_cppflags" ; then
9526
9527         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9528         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9529
9530 fi
9531
9532                         cat >conftest.$ac_ext <<_ACEOF
9533 #line 9533 "configure"
9534 #include "confdefs.h"
9535
9536                                 #include <limits.h>
9537                                 #include <sys/types.h>
9538
9539 int
9540 main (void)
9541 {
9542
9543                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9544                                         return 0;
9545                                 #else
9546                                 #       error GNU C library is too old
9547                                 #endif
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>&5
9555   ac_status=$?
9556   echo "$as_me:9556: \$? = $ac_status" >&5
9557   (exit $ac_status); } &&
9558          { ac_try='test -s conftest.$ac_objext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   cf_cv_gnu_dftsrc_219=yes
9565 else
9566   echo "$as_me: failed program was:" >&5
9567 cat conftest.$ac_ext >&5
9568 cf_cv_gnu_dftsrc_219=no
9569 fi
9570 rm -f conftest.$ac_objext conftest.$ac_ext
9571
9572 fi
9573 echo "$as_me:9573: result: $cf_cv_gnu_dftsrc_219" >&5
9574 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9575                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9576         else
9577                 cf_cv_gnu_dftsrc_219=maybe
9578         fi
9579
9580         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9581
9582                 echo "$as_me:9582: checking if we must define _GNU_SOURCE" >&5
9583 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9584 if test "${cf_cv_gnu_source+set}" = set; then
9585   echo $ECHO_N "(cached) $ECHO_C" >&6
9586 else
9587
9588                 cat >conftest.$ac_ext <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591 #include <sys/types.h>
9592 int
9593 main (void)
9594 {
9595
9596                         #ifndef _XOPEN_SOURCE
9597                         #error  expected _XOPEN_SOURCE to be defined
9598                         #endif
9599   ;
9600   return 0;
9601 }
9602 _ACEOF
9603 rm -f conftest.$ac_objext
9604 if { (eval echo "$as_me:9604: \"$ac_compile\"") >&5
9605   (eval $ac_compile) 2>&5
9606   ac_status=$?
9607   echo "$as_me:9607: \$? = $ac_status" >&5
9608   (exit $ac_status); } &&
9609          { ac_try='test -s conftest.$ac_objext'
9610   { (eval echo "$as_me:9610: \"$ac_try\"") >&5
9611   (eval $ac_try) 2>&5
9612   ac_status=$?
9613   echo "$as_me:9613: \$? = $ac_status" >&5
9614   (exit $ac_status); }; }; then
9615   cf_cv_gnu_source=no
9616 else
9617   echo "$as_me: failed program was:" >&5
9618 cat conftest.$ac_ext >&5
9619 cf_save="$CPPFLAGS"
9620
9621 cf_fix_cppflags=no
9622 cf_new_cflags=
9623 cf_new_cppflags=
9624 cf_new_extra_cppflags=
9625
9626 for cf_add_cflags in -D_GNU_SOURCE
9627 do
9628 case $cf_fix_cppflags in
9629 (no)
9630         case $cf_add_cflags in
9631         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9632                 case $cf_add_cflags in
9633                 (-D*)
9634                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9635
9636                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9637                                 && test -z "${cf_tst_cflags}" \
9638                                 && cf_fix_cppflags=yes
9639
9640                         if test $cf_fix_cppflags = yes ; then
9641
9642         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9643         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9644
9645                                 continue
9646                         elif test "${cf_tst_cflags}" = "\"'" ; then
9647
9648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9650
9651                                 continue
9652                         fi
9653                         ;;
9654                 esac
9655                 case "$CPPFLAGS" in
9656                 (*$cf_add_cflags)
9657                         ;;
9658                 (*)
9659                         case $cf_add_cflags in
9660                         (-D*)
9661                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9662
9663 CPPFLAGS=`echo "$CPPFLAGS" | \
9664         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9665                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9666
9667                                 ;;
9668                         esac
9669
9670         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9671         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9672
9673                         ;;
9674                 esac
9675                 ;;
9676         (*)
9677
9678         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9679         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9680
9681                 ;;
9682         esac
9683         ;;
9684 (yes)
9685
9686         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9687         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9688
9689         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9690
9691         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9692                 && test -z "${cf_tst_cflags}" \
9693                 && cf_fix_cppflags=no
9694         ;;
9695 esac
9696 done
9697
9698 if test -n "$cf_new_cflags" ; then
9699
9700         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9701         CFLAGS="${CFLAGS}$cf_new_cflags"
9702
9703 fi
9704
9705 if test -n "$cf_new_cppflags" ; then
9706
9707         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9708         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9709
9710 fi
9711
9712 if test -n "$cf_new_extra_cppflags" ; then
9713
9714         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9715         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9716
9717 fi
9718
9719                          cat >conftest.$ac_ext <<_ACEOF
9720 #line 9720 "configure"
9721 #include "confdefs.h"
9722 #include <sys/types.h>
9723 int
9724 main (void)
9725 {
9726
9727                                 #ifdef _XOPEN_SOURCE
9728                                 #error  expected _XOPEN_SOURCE to be undefined
9729                                 #endif
9730   ;
9731   return 0;
9732 }
9733 _ACEOF
9734 rm -f conftest.$ac_objext
9735 if { (eval echo "$as_me:9735: \"$ac_compile\"") >&5
9736   (eval $ac_compile) 2>&5
9737   ac_status=$?
9738   echo "$as_me:9738: \$? = $ac_status" >&5
9739   (exit $ac_status); } &&
9740          { ac_try='test -s conftest.$ac_objext'
9741   { (eval echo "$as_me:9741: \"$ac_try\"") >&5
9742   (eval $ac_try) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); }; }; then
9746   cf_cv_gnu_source=no
9747 else
9748   echo "$as_me: failed program was:" >&5
9749 cat conftest.$ac_ext >&5
9750 cf_cv_gnu_source=yes
9751 fi
9752 rm -f conftest.$ac_objext conftest.$ac_ext
9753                         CPPFLAGS="$cf_save"
9754
9755 fi
9756 rm -f conftest.$ac_objext conftest.$ac_ext
9757
9758 fi
9759 echo "$as_me:9759: result: $cf_cv_gnu_source" >&5
9760 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9761
9762                 if test "$cf_cv_gnu_source" = yes
9763                 then
9764                 echo "$as_me:9764: checking if we should also define _DEFAULT_SOURCE" >&5
9765 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9766 if test "${cf_cv_default_source+set}" = set; then
9767   echo $ECHO_N "(cached) $ECHO_C" >&6
9768 else
9769
9770         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9771         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9772
9773                         cat >conftest.$ac_ext <<_ACEOF
9774 #line 9774 "configure"
9775 #include "confdefs.h"
9776 #include <sys/types.h>
9777 int
9778 main (void)
9779 {
9780
9781                                 #ifdef _DEFAULT_SOURCE
9782                                 #error  expected _DEFAULT_SOURCE to be undefined
9783                                 #endif
9784   ;
9785   return 0;
9786 }
9787 _ACEOF
9788 rm -f conftest.$ac_objext
9789 if { (eval echo "$as_me:9789: \"$ac_compile\"") >&5
9790   (eval $ac_compile) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); } &&
9794          { ac_try='test -s conftest.$ac_objext'
9795   { (eval echo "$as_me:9795: \"$ac_try\"") >&5
9796   (eval $ac_try) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); }; }; then
9800   cf_cv_default_source=no
9801 else
9802   echo "$as_me: failed program was:" >&5
9803 cat conftest.$ac_ext >&5
9804 cf_cv_default_source=yes
9805 fi
9806 rm -f conftest.$ac_objext conftest.$ac_ext
9807
9808 fi
9809 echo "$as_me:9809: result: $cf_cv_default_source" >&5
9810 echo "${ECHO_T}$cf_cv_default_source" >&6
9811                         if test "$cf_cv_default_source" = yes
9812                         then
9813
9814         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9815         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9816
9817                         fi
9818                 fi
9819         fi
9820
9821 fi
9822
9823         ;;
9824 (minix*)
9825         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9826         ;;
9827 (mirbsd*)
9828         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9829         cf_XOPEN_SOURCE=
9830
9831 if test "$cf_cv_posix_visible" = no; then
9832
9833 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9834
9835 cf_save_CFLAGS="$CFLAGS"
9836 cf_save_CPPFLAGS="$CPPFLAGS"
9837
9838 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9839         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9840                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9841
9842 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9843         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9844                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9845
9846 echo "$as_me:9846: checking if we should define _POSIX_C_SOURCE" >&5
9847 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9848 if test "${cf_cv_posix_c_source+set}" = set; then
9849   echo $ECHO_N "(cached) $ECHO_C" >&6
9850 else
9851
9852 echo "${as_me:-configure}:9852: testing if the symbol is already defined go no further ..." 1>&5
9853
9854         cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9857 #include <sys/types.h>
9858 int
9859 main (void)
9860 {
9861
9862 #ifndef _POSIX_C_SOURCE
9863 make an error
9864 #endif
9865   ;
9866   return 0;
9867 }
9868 _ACEOF
9869 rm -f conftest.$ac_objext
9870 if { (eval echo "$as_me:9870: \"$ac_compile\"") >&5
9871   (eval $ac_compile) 2>&5
9872   ac_status=$?
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit $ac_status); } &&
9875          { ac_try='test -s conftest.$ac_objext'
9876   { (eval echo "$as_me:9876: \"$ac_try\"") >&5
9877   (eval $ac_try) 2>&5
9878   ac_status=$?
9879   echo "$as_me:9879: \$? = $ac_status" >&5
9880   (exit $ac_status); }; }; then
9881   cf_cv_posix_c_source=no
9882 else
9883   echo "$as_me: failed program was:" >&5
9884 cat conftest.$ac_ext >&5
9885 cf_want_posix_source=no
9886          case .$cf_POSIX_C_SOURCE in
9887          (.[12]??*)
9888                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9889                 ;;
9890          (.2)
9891                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9892                 cf_want_posix_source=yes
9893                 ;;
9894          (.*)
9895                 cf_want_posix_source=yes
9896                 ;;
9897          esac
9898          if test "$cf_want_posix_source" = yes ; then
9899                 cat >conftest.$ac_ext <<_ACEOF
9900 #line 9900 "configure"
9901 #include "confdefs.h"
9902 #include <sys/types.h>
9903 int
9904 main (void)
9905 {
9906
9907 #ifdef _POSIX_SOURCE
9908 make an error
9909 #endif
9910   ;
9911   return 0;
9912 }
9913 _ACEOF
9914 rm -f conftest.$ac_objext
9915 if { (eval echo "$as_me:9915: \"$ac_compile\"") >&5
9916   (eval $ac_compile) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); } &&
9920          { ac_try='test -s conftest.$ac_objext'
9921   { (eval echo "$as_me:9921: \"$ac_try\"") >&5
9922   (eval $ac_try) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); }; }; then
9926   :
9927 else
9928   echo "$as_me: failed program was:" >&5
9929 cat conftest.$ac_ext >&5
9930 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9931 fi
9932 rm -f conftest.$ac_objext conftest.$ac_ext
9933          fi
9934
9935 echo "${as_me:-configure}:9935: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9936
9937          CFLAGS="$cf_trim_CFLAGS"
9938          CPPFLAGS="$cf_trim_CPPFLAGS"
9939
9940         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9941         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9942
9943 echo "${as_me:-configure}:9943: testing if the second compile does not leave our definition intact error ..." 1>&5
9944
9945          cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 #include <sys/types.h>
9949 int
9950 main (void)
9951 {
9952
9953 #ifndef _POSIX_C_SOURCE
9954 make an error
9955 #endif
9956   ;
9957   return 0;
9958 }
9959 _ACEOF
9960 rm -f conftest.$ac_objext
9961 if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962   (eval $ac_compile) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit $ac_status); } &&
9966          { ac_try='test -s conftest.$ac_objext'
9967   { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9968   (eval $ac_try) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); }; }; then
9972   :
9973 else
9974   echo "$as_me: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9976 cf_cv_posix_c_source=no
9977 fi
9978 rm -f conftest.$ac_objext conftest.$ac_ext
9979          CFLAGS="$cf_save_CFLAGS"
9980          CPPFLAGS="$cf_save_CPPFLAGS"
9981
9982 fi
9983 rm -f conftest.$ac_objext conftest.$ac_ext
9984
9985 fi
9986 echo "$as_me:9986: result: $cf_cv_posix_c_source" >&5
9987 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9988
9989 if test "$cf_cv_posix_c_source" != no ; then
9990         CFLAGS="$cf_trim_CFLAGS"
9991         CPPFLAGS="$cf_trim_CPPFLAGS"
9992
9993 cf_fix_cppflags=no
9994 cf_new_cflags=
9995 cf_new_cppflags=
9996 cf_new_extra_cppflags=
9997
9998 for cf_add_cflags in $cf_cv_posix_c_source
9999 do
10000 case $cf_fix_cppflags in
10001 (no)
10002         case $cf_add_cflags in
10003         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10004                 case $cf_add_cflags in
10005                 (-D*)
10006                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10007
10008                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10009                                 && test -z "${cf_tst_cflags}" \
10010                                 && cf_fix_cppflags=yes
10011
10012                         if test $cf_fix_cppflags = yes ; then
10013
10014         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10015         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10016
10017                                 continue
10018                         elif test "${cf_tst_cflags}" = "\"'" ; then
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                                 continue
10024                         fi
10025                         ;;
10026                 esac
10027                 case "$CPPFLAGS" in
10028                 (*$cf_add_cflags)
10029                         ;;
10030                 (*)
10031                         case $cf_add_cflags in
10032                         (-D*)
10033                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10034
10035 CPPFLAGS=`echo "$CPPFLAGS" | \
10036         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10037                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10038
10039                                 ;;
10040                         esac
10041
10042         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10043         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10044
10045                         ;;
10046                 esac
10047                 ;;
10048         (*)
10049
10050         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10051         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10052
10053                 ;;
10054         esac
10055         ;;
10056 (yes)
10057
10058         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10059         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10060
10061         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10062
10063         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10064                 && test -z "${cf_tst_cflags}" \
10065                 && cf_fix_cppflags=no
10066         ;;
10067 esac
10068 done
10069
10070 if test -n "$cf_new_cflags" ; then
10071
10072         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10073         CFLAGS="${CFLAGS}$cf_new_cflags"
10074
10075 fi
10076
10077 if test -n "$cf_new_cppflags" ; then
10078
10079         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10080         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10081
10082 fi
10083
10084 if test -n "$cf_new_extra_cppflags" ; then
10085
10086         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10087         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10088
10089 fi
10090
10091 fi
10092
10093 fi # cf_cv_posix_visible
10094
10095         ;;
10096 (netbsd*)
10097         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10098         ;;
10099 (openbsd[4-9]*)
10100         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10101         cf_xopen_source="-D_BSD_SOURCE"
10102         cf_XOPEN_SOURCE=600
10103         ;;
10104 (openbsd*)
10105         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10106         ;;
10107 (osf[45]*)
10108         cf_xopen_source="-D_OSF_SOURCE"
10109         ;;
10110 (nto-qnx*)
10111         cf_xopen_source="-D_QNX_SOURCE"
10112         ;;
10113 (sco*)
10114         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10115         ;;
10116 (solaris2.*)
10117         cf_xopen_source="-D__EXTENSIONS__"
10118         cf_cv_xopen_source=broken
10119         ;;
10120 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10121         cf_XOPEN_SOURCE=
10122         cf_POSIX_C_SOURCE=
10123         ;;
10124 (*)
10125
10126 echo "$as_me:10126: checking if we should define _XOPEN_SOURCE" >&5
10127 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10128 if test "${cf_cv_xopen_source+set}" = set; then
10129   echo $ECHO_N "(cached) $ECHO_C" >&6
10130 else
10131
10132         cat >conftest.$ac_ext <<_ACEOF
10133 #line 10133 "configure"
10134 #include "confdefs.h"
10135
10136 #include <stdlib.h>
10137 #include <string.h>
10138 #include <sys/types.h>
10139
10140 int
10141 main (void)
10142 {
10143
10144 #ifndef _XOPEN_SOURCE
10145 make an error
10146 #endif
10147   ;
10148   return 0;
10149 }
10150 _ACEOF
10151 rm -f conftest.$ac_objext
10152 if { (eval echo "$as_me:10152: \"$ac_compile\"") >&5
10153   (eval $ac_compile) 2>&5
10154   ac_status=$?
10155   echo "$as_me:10155: \$? = $ac_status" >&5
10156   (exit $ac_status); } &&
10157          { ac_try='test -s conftest.$ac_objext'
10158   { (eval echo "$as_me:10158: \"$ac_try\"") >&5
10159   (eval $ac_try) 2>&5
10160   ac_status=$?
10161   echo "$as_me:10161: \$? = $ac_status" >&5
10162   (exit $ac_status); }; }; then
10163   cf_cv_xopen_source=no
10164 else
10165   echo "$as_me: failed program was:" >&5
10166 cat conftest.$ac_ext >&5
10167 cf_save="$CPPFLAGS"
10168
10169         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10170         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10171
10172          cat >conftest.$ac_ext <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175
10176 #include <stdlib.h>
10177 #include <string.h>
10178 #include <sys/types.h>
10179
10180 int
10181 main (void)
10182 {
10183
10184 #ifdef _XOPEN_SOURCE
10185 make an error
10186 #endif
10187   ;
10188   return 0;
10189 }
10190 _ACEOF
10191 rm -f conftest.$ac_objext
10192 if { (eval echo "$as_me:10192: \"$ac_compile\"") >&5
10193   (eval $ac_compile) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); } &&
10197          { ac_try='test -s conftest.$ac_objext'
10198   { (eval echo "$as_me:10198: \"$ac_try\"") >&5
10199   (eval $ac_try) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); }; }; then
10203   cf_cv_xopen_source=no
10204 else
10205   echo "$as_me: failed program was:" >&5
10206 cat conftest.$ac_ext >&5
10207 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10208 fi
10209 rm -f conftest.$ac_objext conftest.$ac_ext
10210         CPPFLAGS="$cf_save"
10211
10212 fi
10213 rm -f conftest.$ac_objext conftest.$ac_ext
10214
10215 fi
10216 echo "$as_me:10216: result: $cf_cv_xopen_source" >&5
10217 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10218
10219 if test "$cf_cv_xopen_source" != no ; then
10220
10221 CFLAGS=`echo "$CFLAGS" | \
10222         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10223                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10224
10225 CPPFLAGS=`echo "$CPPFLAGS" | \
10226         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10227                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10228
10229         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10230
10231 cf_fix_cppflags=no
10232 cf_new_cflags=
10233 cf_new_cppflags=
10234 cf_new_extra_cppflags=
10235
10236 for cf_add_cflags in $cf_temp_xopen_source
10237 do
10238 case $cf_fix_cppflags in
10239 (no)
10240         case $cf_add_cflags in
10241         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10242                 case $cf_add_cflags in
10243                 (-D*)
10244                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10245
10246                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10247                                 && test -z "${cf_tst_cflags}" \
10248                                 && cf_fix_cppflags=yes
10249
10250                         if test $cf_fix_cppflags = yes ; then
10251
10252         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10253         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10254
10255                                 continue
10256                         elif test "${cf_tst_cflags}" = "\"'" ; then
10257
10258         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10259         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10260
10261                                 continue
10262                         fi
10263                         ;;
10264                 esac
10265                 case "$CPPFLAGS" in
10266                 (*$cf_add_cflags)
10267                         ;;
10268                 (*)
10269                         case $cf_add_cflags in
10270                         (-D*)
10271                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10272
10273 CPPFLAGS=`echo "$CPPFLAGS" | \
10274         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10275                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10276
10277                                 ;;
10278                         esac
10279
10280         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10281         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10282
10283                         ;;
10284                 esac
10285                 ;;
10286         (*)
10287
10288         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10289         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10290
10291                 ;;
10292         esac
10293         ;;
10294 (yes)
10295
10296         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10297         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10298
10299         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10300
10301         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10302                 && test -z "${cf_tst_cflags}" \
10303                 && cf_fix_cppflags=no
10304         ;;
10305 esac
10306 done
10307
10308 if test -n "$cf_new_cflags" ; then
10309
10310         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10311         CFLAGS="${CFLAGS}$cf_new_cflags"
10312
10313 fi
10314
10315 if test -n "$cf_new_cppflags" ; then
10316
10317         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10318         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10319
10320 fi
10321
10322 if test -n "$cf_new_extra_cppflags" ; then
10323
10324         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10325         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10326
10327 fi
10328
10329 fi
10330
10331 if test "$cf_cv_posix_visible" = no; then
10332
10333 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10334
10335 cf_save_CFLAGS="$CFLAGS"
10336 cf_save_CPPFLAGS="$CPPFLAGS"
10337
10338 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10339         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10340                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10341
10342 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10343         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10344                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10345
10346 echo "$as_me:10346: checking if we should define _POSIX_C_SOURCE" >&5
10347 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10348 if test "${cf_cv_posix_c_source+set}" = set; then
10349   echo $ECHO_N "(cached) $ECHO_C" >&6
10350 else
10351
10352 echo "${as_me:-configure}:10352: testing if the symbol is already defined go no further ..." 1>&5
10353
10354         cat >conftest.$ac_ext <<_ACEOF
10355 #line 10355 "configure"
10356 #include "confdefs.h"
10357 #include <sys/types.h>
10358 int
10359 main (void)
10360 {
10361
10362 #ifndef _POSIX_C_SOURCE
10363 make an error
10364 #endif
10365   ;
10366   return 0;
10367 }
10368 _ACEOF
10369 rm -f conftest.$ac_objext
10370 if { (eval echo "$as_me:10370: \"$ac_compile\"") >&5
10371   (eval $ac_compile) 2>&5
10372   ac_status=$?
10373   echo "$as_me:10373: \$? = $ac_status" >&5
10374   (exit $ac_status); } &&
10375          { ac_try='test -s conftest.$ac_objext'
10376   { (eval echo "$as_me:10376: \"$ac_try\"") >&5
10377   (eval $ac_try) 2>&5
10378   ac_status=$?
10379   echo "$as_me:10379: \$? = $ac_status" >&5
10380   (exit $ac_status); }; }; then
10381   cf_cv_posix_c_source=no
10382 else
10383   echo "$as_me: failed program was:" >&5
10384 cat conftest.$ac_ext >&5
10385 cf_want_posix_source=no
10386          case .$cf_POSIX_C_SOURCE in
10387          (.[12]??*)
10388                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10389                 ;;
10390          (.2)
10391                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10392                 cf_want_posix_source=yes
10393                 ;;
10394          (.*)
10395                 cf_want_posix_source=yes
10396                 ;;
10397          esac
10398          if test "$cf_want_posix_source" = yes ; then
10399                 cat >conftest.$ac_ext <<_ACEOF
10400 #line 10400 "configure"
10401 #include "confdefs.h"
10402 #include <sys/types.h>
10403 int
10404 main (void)
10405 {
10406
10407 #ifdef _POSIX_SOURCE
10408 make an error
10409 #endif
10410   ;
10411   return 0;
10412 }
10413 _ACEOF
10414 rm -f conftest.$ac_objext
10415 if { (eval echo "$as_me:10415: \"$ac_compile\"") >&5
10416   (eval $ac_compile) 2>&5
10417   ac_status=$?
10418   echo "$as_me:10418: \$? = $ac_status" >&5
10419   (exit $ac_status); } &&
10420          { ac_try='test -s conftest.$ac_objext'
10421   { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422   (eval $ac_try) 2>&5
10423   ac_status=$?
10424   echo "$as_me:10424: \$? = $ac_status" >&5
10425   (exit $ac_status); }; }; then
10426   :
10427 else
10428   echo "$as_me: failed program was:" >&5
10429 cat conftest.$ac_ext >&5
10430 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10431 fi
10432 rm -f conftest.$ac_objext conftest.$ac_ext
10433          fi
10434
10435 echo "${as_me:-configure}:10435: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10436
10437          CFLAGS="$cf_trim_CFLAGS"
10438          CPPFLAGS="$cf_trim_CPPFLAGS"
10439
10440         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10441         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10442
10443 echo "${as_me:-configure}:10443: testing if the second compile does not leave our definition intact error ..." 1>&5
10444
10445          cat >conftest.$ac_ext <<_ACEOF
10446 #line 10446 "configure"
10447 #include "confdefs.h"
10448 #include <sys/types.h>
10449 int
10450 main (void)
10451 {
10452
10453 #ifndef _POSIX_C_SOURCE
10454 make an error
10455 #endif
10456   ;
10457   return 0;
10458 }
10459 _ACEOF
10460 rm -f conftest.$ac_objext
10461 if { (eval echo "$as_me:10461: \"$ac_compile\"") >&5
10462   (eval $ac_compile) 2>&5
10463   ac_status=$?
10464   echo "$as_me:10464: \$? = $ac_status" >&5
10465   (exit $ac_status); } &&
10466          { ac_try='test -s conftest.$ac_objext'
10467   { (eval echo "$as_me:10467: \"$ac_try\"") >&5
10468   (eval $ac_try) 2>&5
10469   ac_status=$?
10470   echo "$as_me:10470: \$? = $ac_status" >&5
10471   (exit $ac_status); }; }; then
10472   :
10473 else
10474   echo "$as_me: failed program was:" >&5
10475 cat conftest.$ac_ext >&5
10476 cf_cv_posix_c_source=no
10477 fi
10478 rm -f conftest.$ac_objext conftest.$ac_ext
10479          CFLAGS="$cf_save_CFLAGS"
10480          CPPFLAGS="$cf_save_CPPFLAGS"
10481
10482 fi
10483 rm -f conftest.$ac_objext conftest.$ac_ext
10484
10485 fi
10486 echo "$as_me:10486: result: $cf_cv_posix_c_source" >&5
10487 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10488
10489 if test "$cf_cv_posix_c_source" != no ; then
10490         CFLAGS="$cf_trim_CFLAGS"
10491         CPPFLAGS="$cf_trim_CPPFLAGS"
10492
10493 cf_fix_cppflags=no
10494 cf_new_cflags=
10495 cf_new_cppflags=
10496 cf_new_extra_cppflags=
10497
10498 for cf_add_cflags in $cf_cv_posix_c_source
10499 do
10500 case $cf_fix_cppflags in
10501 (no)
10502         case $cf_add_cflags in
10503         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10504                 case $cf_add_cflags in
10505                 (-D*)
10506                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10507
10508                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10509                                 && test -z "${cf_tst_cflags}" \
10510                                 && cf_fix_cppflags=yes
10511
10512                         if test $cf_fix_cppflags = yes ; then
10513
10514         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10515         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10516
10517                                 continue
10518                         elif test "${cf_tst_cflags}" = "\"'" ; then
10519
10520         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10521         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10522
10523                                 continue
10524                         fi
10525                         ;;
10526                 esac
10527                 case "$CPPFLAGS" in
10528                 (*$cf_add_cflags)
10529                         ;;
10530                 (*)
10531                         case $cf_add_cflags in
10532                         (-D*)
10533                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10534
10535 CPPFLAGS=`echo "$CPPFLAGS" | \
10536         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10537                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10538
10539                                 ;;
10540                         esac
10541
10542         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10543         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10544
10545                         ;;
10546                 esac
10547                 ;;
10548         (*)
10549
10550         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10551         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10552
10553                 ;;
10554         esac
10555         ;;
10556 (yes)
10557
10558         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10559         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10560
10561         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10562
10563         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10564                 && test -z "${cf_tst_cflags}" \
10565                 && cf_fix_cppflags=no
10566         ;;
10567 esac
10568 done
10569
10570 if test -n "$cf_new_cflags" ; then
10571
10572         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10573         CFLAGS="${CFLAGS}$cf_new_cflags"
10574
10575 fi
10576
10577 if test -n "$cf_new_cppflags" ; then
10578
10579         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10580         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10581
10582 fi
10583
10584 if test -n "$cf_new_extra_cppflags" ; then
10585
10586         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10587         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10588
10589 fi
10590
10591 fi
10592
10593 fi # cf_cv_posix_visible
10594
10595         ;;
10596 esac
10597
10598 if test -n "$cf_xopen_source" ; then
10599
10600 cf_fix_cppflags=no
10601 cf_new_cflags=
10602 cf_new_cppflags=
10603 cf_new_extra_cppflags=
10604
10605 for cf_add_cflags in $cf_xopen_source
10606 do
10607 case $cf_fix_cppflags in
10608 (no)
10609         case $cf_add_cflags in
10610         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10611                 case $cf_add_cflags in
10612                 (-D*)
10613                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10614
10615                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10616                                 && test -z "${cf_tst_cflags}" \
10617                                 && cf_fix_cppflags=yes
10618
10619                         if test $cf_fix_cppflags = yes ; then
10620
10621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10623
10624                                 continue
10625                         elif test "${cf_tst_cflags}" = "\"'" ; then
10626
10627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10629
10630                                 continue
10631                         fi
10632                         ;;
10633                 esac
10634                 case "$CPPFLAGS" in
10635                 (*$cf_add_cflags)
10636                         ;;
10637                 (*)
10638                         case $cf_add_cflags in
10639                         (-D*)
10640                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10641
10642 CPPFLAGS=`echo "$CPPFLAGS" | \
10643         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10644                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10645
10646                                 ;;
10647                         esac
10648
10649         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10650         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10651
10652                         ;;
10653                 esac
10654                 ;;
10655         (*)
10656
10657         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10658         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10659
10660                 ;;
10661         esac
10662         ;;
10663 (yes)
10664
10665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10667
10668         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10669
10670         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10671                 && test -z "${cf_tst_cflags}" \
10672                 && cf_fix_cppflags=no
10673         ;;
10674 esac
10675 done
10676
10677 if test -n "$cf_new_cflags" ; then
10678         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10679
10680 echo "${as_me:-configure}:10680: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10681
10682         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10683         CFLAGS="${CFLAGS}$cf_new_cflags"
10684
10685 fi
10686
10687 if test -n "$cf_new_cppflags" ; then
10688         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10689
10690 echo "${as_me:-configure}:10690: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10691
10692         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10693         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10694
10695 fi
10696
10697 if test -n "$cf_new_extra_cppflags" ; then
10698         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10699
10700 echo "${as_me:-configure}:10700: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10701
10702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10704
10705 fi
10706
10707 fi
10708
10709 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10710         echo "$as_me:10710: checking if _XOPEN_SOURCE really is set" >&5
10711 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10712         cat >conftest.$ac_ext <<_ACEOF
10713 #line 10713 "configure"
10714 #include "confdefs.h"
10715 #include <stdlib.h>
10716 int
10717 main (void)
10718 {
10719
10720 #ifndef _XOPEN_SOURCE
10721 make an error
10722 #endif
10723   ;
10724   return 0;
10725 }
10726 _ACEOF
10727 rm -f conftest.$ac_objext
10728 if { (eval echo "$as_me:10728: \"$ac_compile\"") >&5
10729   (eval $ac_compile) 2>&5
10730   ac_status=$?
10731   echo "$as_me:10731: \$? = $ac_status" >&5
10732   (exit $ac_status); } &&
10733          { ac_try='test -s conftest.$ac_objext'
10734   { (eval echo "$as_me:10734: \"$ac_try\"") >&5
10735   (eval $ac_try) 2>&5
10736   ac_status=$?
10737   echo "$as_me:10737: \$? = $ac_status" >&5
10738   (exit $ac_status); }; }; then
10739   cf_XOPEN_SOURCE_set=yes
10740 else
10741   echo "$as_me: failed program was:" >&5
10742 cat conftest.$ac_ext >&5
10743 cf_XOPEN_SOURCE_set=no
10744 fi
10745 rm -f conftest.$ac_objext conftest.$ac_ext
10746         echo "$as_me:10746: result: $cf_XOPEN_SOURCE_set" >&5
10747 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10748         if test $cf_XOPEN_SOURCE_set = yes
10749         then
10750                 cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753 #include <stdlib.h>
10754 int
10755 main (void)
10756 {
10757
10758 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10759 make an error
10760 #endif
10761   ;
10762   return 0;
10763 }
10764 _ACEOF
10765 rm -f conftest.$ac_objext
10766 if { (eval echo "$as_me:10766: \"$ac_compile\"") >&5
10767   (eval $ac_compile) 2>&5
10768   ac_status=$?
10769   echo "$as_me:10769: \$? = $ac_status" >&5
10770   (exit $ac_status); } &&
10771          { ac_try='test -s conftest.$ac_objext'
10772   { (eval echo "$as_me:10772: \"$ac_try\"") >&5
10773   (eval $ac_try) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); }; }; then
10777   cf_XOPEN_SOURCE_set_ok=yes
10778 else
10779   echo "$as_me: failed program was:" >&5
10780 cat conftest.$ac_ext >&5
10781 cf_XOPEN_SOURCE_set_ok=no
10782 fi
10783 rm -f conftest.$ac_objext conftest.$ac_ext
10784                 if test $cf_XOPEN_SOURCE_set_ok = no
10785                 then
10786                         { echo "$as_me:10786: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10787 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10788                 fi
10789         else
10790
10791 echo "$as_me:10791: checking if we should define _XOPEN_SOURCE" >&5
10792 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10793 if test "${cf_cv_xopen_source+set}" = set; then
10794   echo $ECHO_N "(cached) $ECHO_C" >&6
10795 else
10796
10797         cat >conftest.$ac_ext <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800
10801 #include <stdlib.h>
10802 #include <string.h>
10803 #include <sys/types.h>
10804
10805 int
10806 main (void)
10807 {
10808
10809 #ifndef _XOPEN_SOURCE
10810 make an error
10811 #endif
10812   ;
10813   return 0;
10814 }
10815 _ACEOF
10816 rm -f conftest.$ac_objext
10817 if { (eval echo "$as_me:10817: \"$ac_compile\"") >&5
10818   (eval $ac_compile) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); } &&
10822          { ac_try='test -s conftest.$ac_objext'
10823   { (eval echo "$as_me:10823: \"$ac_try\"") >&5
10824   (eval $ac_try) 2>&5
10825   ac_status=$?
10826   echo "$as_me:10826: \$? = $ac_status" >&5
10827   (exit $ac_status); }; }; then
10828   cf_cv_xopen_source=no
10829 else
10830   echo "$as_me: failed program was:" >&5
10831 cat conftest.$ac_ext >&5
10832 cf_save="$CPPFLAGS"
10833
10834         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10835         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10836
10837          cat >conftest.$ac_ext <<_ACEOF
10838 #line 10838 "configure"
10839 #include "confdefs.h"
10840
10841 #include <stdlib.h>
10842 #include <string.h>
10843 #include <sys/types.h>
10844
10845 int
10846 main (void)
10847 {
10848
10849 #ifdef _XOPEN_SOURCE
10850 make an error
10851 #endif
10852   ;
10853   return 0;
10854 }
10855 _ACEOF
10856 rm -f conftest.$ac_objext
10857 if { (eval echo "$as_me:10857: \"$ac_compile\"") >&5
10858   (eval $ac_compile) 2>&5
10859   ac_status=$?
10860   echo "$as_me:10860: \$? = $ac_status" >&5
10861   (exit $ac_status); } &&
10862          { ac_try='test -s conftest.$ac_objext'
10863   { (eval echo "$as_me:10863: \"$ac_try\"") >&5
10864   (eval $ac_try) 2>&5
10865   ac_status=$?
10866   echo "$as_me:10866: \$? = $ac_status" >&5
10867   (exit $ac_status); }; }; then
10868   cf_cv_xopen_source=no
10869 else
10870   echo "$as_me: failed program was:" >&5
10871 cat conftest.$ac_ext >&5
10872 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10873 fi
10874 rm -f conftest.$ac_objext conftest.$ac_ext
10875         CPPFLAGS="$cf_save"
10876
10877 fi
10878 rm -f conftest.$ac_objext conftest.$ac_ext
10879
10880 fi
10881 echo "$as_me:10881: result: $cf_cv_xopen_source" >&5
10882 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10883
10884 if test "$cf_cv_xopen_source" != no ; then
10885
10886 CFLAGS=`echo "$CFLAGS" | \
10887         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10888                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10889
10890 CPPFLAGS=`echo "$CPPFLAGS" | \
10891         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10892                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10893
10894         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10895
10896 cf_fix_cppflags=no
10897 cf_new_cflags=
10898 cf_new_cppflags=
10899 cf_new_extra_cppflags=
10900
10901 for cf_add_cflags in $cf_temp_xopen_source
10902 do
10903 case $cf_fix_cppflags in
10904 (no)
10905         case $cf_add_cflags in
10906         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10907                 case $cf_add_cflags in
10908                 (-D*)
10909                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10910
10911                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10912                                 && test -z "${cf_tst_cflags}" \
10913                                 && cf_fix_cppflags=yes
10914
10915                         if test $cf_fix_cppflags = yes ; then
10916
10917         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10918         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10919
10920                                 continue
10921                         elif test "${cf_tst_cflags}" = "\"'" ; then
10922
10923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10925
10926                                 continue
10927                         fi
10928                         ;;
10929                 esac
10930                 case "$CPPFLAGS" in
10931                 (*$cf_add_cflags)
10932                         ;;
10933                 (*)
10934                         case $cf_add_cflags in
10935                         (-D*)
10936                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10937
10938 CPPFLAGS=`echo "$CPPFLAGS" | \
10939         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10940                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10941
10942                                 ;;
10943                         esac
10944
10945         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10946         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10947
10948                         ;;
10949                 esac
10950                 ;;
10951         (*)
10952
10953         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10954         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10955
10956                 ;;
10957         esac
10958         ;;
10959 (yes)
10960
10961         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10962         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10963
10964         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10965
10966         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10967                 && test -z "${cf_tst_cflags}" \
10968                 && cf_fix_cppflags=no
10969         ;;
10970 esac
10971 done
10972
10973 if test -n "$cf_new_cflags" ; then
10974
10975         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10976         CFLAGS="${CFLAGS}$cf_new_cflags"
10977
10978 fi
10979
10980 if test -n "$cf_new_cppflags" ; then
10981
10982         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10983         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10984
10985 fi
10986
10987 if test -n "$cf_new_extra_cppflags" ; then
10988
10989         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10990         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10991
10992 fi
10993
10994 fi
10995
10996         fi
10997 fi
10998 fi # cf_cv_posix_visible
10999
11000 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11001
11002 # Work around breakage on OS X
11003
11004 echo "$as_me:11004: checking if SIGWINCH is defined" >&5
11005 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11006 if test "${cf_cv_define_sigwinch+set}" = set; then
11007   echo $ECHO_N "(cached) $ECHO_C" >&6
11008 else
11009
11010         cat >conftest.$ac_ext <<_ACEOF
11011 #line 11011 "configure"
11012 #include "confdefs.h"
11013
11014 #include <sys/types.h>
11015 #include <sys/signal.h>
11016
11017 int
11018 main (void)
11019 {
11020 int x = SIGWINCH
11021   ;
11022   return 0;
11023 }
11024 _ACEOF
11025 rm -f conftest.$ac_objext
11026 if { (eval echo "$as_me:11026: \"$ac_compile\"") >&5
11027   (eval $ac_compile) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit $ac_status); } &&
11031          { ac_try='test -s conftest.$ac_objext'
11032   { (eval echo "$as_me:11032: \"$ac_try\"") >&5
11033   (eval $ac_try) 2>&5
11034   ac_status=$?
11035   echo "$as_me:11035: \$? = $ac_status" >&5
11036   (exit $ac_status); }; }; then
11037   cf_cv_define_sigwinch=yes
11038 else
11039   echo "$as_me: failed program was:" >&5
11040 cat conftest.$ac_ext >&5
11041 cat >conftest.$ac_ext <<_ACEOF
11042 #line 11042 "configure"
11043 #include "confdefs.h"
11044
11045 #undef _XOPEN_SOURCE
11046 #undef _POSIX_SOURCE
11047 #undef _POSIX_C_SOURCE
11048 #include <sys/types.h>
11049 #include <sys/signal.h>
11050
11051 int
11052 main (void)
11053 {
11054 int x = SIGWINCH
11055   ;
11056   return 0;
11057 }
11058 _ACEOF
11059 rm -f conftest.$ac_objext
11060 if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061   (eval $ac_compile) 2>&5
11062   ac_status=$?
11063   echo "$as_me:11063: \$? = $ac_status" >&5
11064   (exit $ac_status); } &&
11065          { ac_try='test -s conftest.$ac_objext'
11066   { (eval echo "$as_me:11066: \"$ac_try\"") >&5
11067   (eval $ac_try) 2>&5
11068   ac_status=$?
11069   echo "$as_me:11069: \$? = $ac_status" >&5
11070   (exit $ac_status); }; }; then
11071   cf_cv_define_sigwinch=maybe
11072 else
11073   echo "$as_me: failed program was:" >&5
11074 cat conftest.$ac_ext >&5
11075 cf_cv_define_sigwinch=no
11076 fi
11077 rm -f conftest.$ac_objext conftest.$ac_ext
11078
11079 fi
11080 rm -f conftest.$ac_objext conftest.$ac_ext
11081
11082 fi
11083 echo "$as_me:11083: result: $cf_cv_define_sigwinch" >&5
11084 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11085
11086 if test "$cf_cv_define_sigwinch" = maybe ; then
11087 echo "$as_me:11087: checking for actual SIGWINCH definition" >&5
11088 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11089 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11090   echo $ECHO_N "(cached) $ECHO_C" >&6
11091 else
11092
11093 cf_cv_fixup_sigwinch=unknown
11094 cf_sigwinch=32
11095 while test $cf_sigwinch != 1
11096 do
11097         cat >conftest.$ac_ext <<_ACEOF
11098 #line 11098 "configure"
11099 #include "confdefs.h"
11100
11101 #undef _XOPEN_SOURCE
11102 #undef _POSIX_SOURCE
11103 #undef _POSIX_C_SOURCE
11104 #include <sys/types.h>
11105 #include <sys/signal.h>
11106
11107 int
11108 main (void)
11109 {
11110
11111 #if SIGWINCH != $cf_sigwinch
11112 make an error
11113 #endif
11114 int x = SIGWINCH
11115   ;
11116   return 0;
11117 }
11118 _ACEOF
11119 rm -f conftest.$ac_objext
11120 if { (eval echo "$as_me:11120: \"$ac_compile\"") >&5
11121   (eval $ac_compile) 2>&5
11122   ac_status=$?
11123   echo "$as_me:11123: \$? = $ac_status" >&5
11124   (exit $ac_status); } &&
11125          { ac_try='test -s conftest.$ac_objext'
11126   { (eval echo "$as_me:11126: \"$ac_try\"") >&5
11127   (eval $ac_try) 2>&5
11128   ac_status=$?
11129   echo "$as_me:11129: \$? = $ac_status" >&5
11130   (exit $ac_status); }; }; then
11131   cf_cv_fixup_sigwinch=$cf_sigwinch
11132          break
11133 else
11134   echo "$as_me: failed program was:" >&5
11135 cat conftest.$ac_ext >&5
11136 fi
11137 rm -f conftest.$ac_objext conftest.$ac_ext
11138
11139 cf_sigwinch=`expr $cf_sigwinch - 1`
11140 done
11141
11142 fi
11143 echo "$as_me:11143: result: $cf_cv_fixup_sigwinch" >&5
11144 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11145
11146         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11147                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11148         fi
11149 fi
11150
11151 # Checks for CODESET support.
11152
11153 echo "$as_me:11153: checking for nl_langinfo and CODESET" >&5
11154 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11155 if test "${am_cv_langinfo_codeset+set}" = set; then
11156   echo $ECHO_N "(cached) $ECHO_C" >&6
11157 else
11158   cat >conftest.$ac_ext <<_ACEOF
11159 #line 11159 "configure"
11160 #include "confdefs.h"
11161 #include <langinfo.h>
11162 int
11163 main (void)
11164 {
11165 char* cs = nl_langinfo(CODESET);
11166   ;
11167   return 0;
11168 }
11169 _ACEOF
11170 rm -f conftest.$ac_objext conftest$ac_exeext
11171 if { (eval echo "$as_me:11171: \"$ac_link\"") >&5
11172   (eval $ac_link) 2>&5
11173   ac_status=$?
11174   echo "$as_me:11174: \$? = $ac_status" >&5
11175   (exit $ac_status); } &&
11176          { ac_try='test -s conftest$ac_exeext'
11177   { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178   (eval $ac_try) 2>&5
11179   ac_status=$?
11180   echo "$as_me:11180: \$? = $ac_status" >&5
11181   (exit $ac_status); }; }; then
11182   am_cv_langinfo_codeset=yes
11183 else
11184   echo "$as_me: failed program was:" >&5
11185 cat conftest.$ac_ext >&5
11186 am_cv_langinfo_codeset=no
11187 fi
11188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11189
11190 fi
11191 echo "$as_me:11191: result: $am_cv_langinfo_codeset" >&5
11192 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11193         if test $am_cv_langinfo_codeset = yes; then
11194
11195 cat >>confdefs.h <<\EOF
11196 #define HAVE_LANGINFO_CODESET 1
11197 EOF
11198
11199         fi
11200
11201 # use these variables to work around a defect in gcc's fixincludes.
11202 NCURSES_OK_WCHAR_T=
11203 NCURSES_OK_WINT_T=
11204
11205 echo "$as_me:11205: checking if you want wide-character code" >&5
11206 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11207
11208 # Check whether --enable-widec or --disable-widec was given.
11209 if test "${enable_widec+set}" = set; then
11210   enableval="$enable_widec"
11211   with_widec=$enableval
11212 else
11213   with_widec=no
11214 fi;
11215 echo "$as_me:11215: result: $with_widec" >&5
11216 echo "${ECHO_T}$with_widec" >&6
11217
11218 NCURSES_WCWIDTH_GRAPHICS=1
11219
11220 if test "x$with_widec" = xyes ; then
11221         if test "x$disable_lib_suffixes" = xno ; then
11222                 LIB_SUFFIX="w${LIB_SUFFIX}"
11223         fi
11224
11225 cat >>confdefs.h <<\EOF
11226 #define USE_WIDEC_SUPPORT 1
11227 EOF
11228
11229 cat >>confdefs.h <<\EOF
11230 #define NCURSES_WIDECHAR 1
11231 EOF
11232
11233 for ac_header in \
11234 wchar.h \
11235 wctype.h \
11236
11237 do
11238 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11239 echo "$as_me:11239: checking for $ac_header" >&5
11240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11242   echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244   cat >conftest.$ac_ext <<_ACEOF
11245 #line 11245 "configure"
11246 #include "confdefs.h"
11247 #include <$ac_header>
11248 _ACEOF
11249 if { (eval echo "$as_me:11249: \"$ac_cpp conftest.$ac_ext\"") >&5
11250   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11251   ac_status=$?
11252   egrep -v '^ *\+' conftest.er1 >conftest.err
11253   rm -f conftest.er1
11254   cat conftest.err >&5
11255   echo "$as_me:11255: \$? = $ac_status" >&5
11256   (exit $ac_status); } >/dev/null; then
11257   if test -s conftest.err; then
11258     ac_cpp_err=$ac_c_preproc_warn_flag
11259   else
11260     ac_cpp_err=
11261   fi
11262 else
11263   ac_cpp_err=yes
11264 fi
11265 if test -z "$ac_cpp_err"; then
11266   eval "$as_ac_Header=yes"
11267 else
11268   echo "$as_me: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   eval "$as_ac_Header=no"
11271 fi
11272 rm -f conftest.err conftest.$ac_ext
11273 fi
11274 echo "$as_me:11274: result: `eval echo '${'$as_ac_Header'}'`" >&5
11275 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11276 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11277   cat >>confdefs.h <<EOF
11278 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11279 EOF
11280
11281 fi
11282 done
11283
11284 echo "$as_me:11284: checking if wchar.h can be used as is" >&5
11285 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11286 if test "${cf_cv_wchar_h_okay+set}" = set; then
11287   echo $ECHO_N "(cached) $ECHO_C" >&6
11288 else
11289
11290 cat >conftest.$ac_ext <<_ACEOF
11291 #line 11291 "configure"
11292 #include "confdefs.h"
11293
11294 #include <stdlib.h>
11295 #ifdef HAVE_WCHAR_H
11296 #include <wchar.h>
11297 #endif
11298 #ifdef HAVE_WCTYPE_H
11299 #include <wctype.h>
11300 #endif
11301
11302 int
11303 main (void)
11304 {
11305
11306         wint_t foo = 0;
11307         int bar = iswpunct(foo)
11308   ;
11309   return 0;
11310 }
11311 _ACEOF
11312 rm -f conftest.$ac_objext
11313 if { (eval echo "$as_me:11313: \"$ac_compile\"") >&5
11314   (eval $ac_compile) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit $ac_status); } &&
11318          { ac_try='test -s conftest.$ac_objext'
11319   { (eval echo "$as_me:11319: \"$ac_try\"") >&5
11320   (eval $ac_try) 2>&5
11321   ac_status=$?
11322   echo "$as_me:11322: \$? = $ac_status" >&5
11323   (exit $ac_status); }; }; then
11324   cf_cv_wchar_h_okay=yes
11325 else
11326   echo "$as_me: failed program was:" >&5
11327 cat conftest.$ac_ext >&5
11328 cf_cv_wchar_h_okay=no
11329 fi
11330 rm -f conftest.$ac_objext conftest.$ac_ext
11331 fi
11332 echo "$as_me:11332: result: $cf_cv_wchar_h_okay" >&5
11333 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11334
11335 if test $cf_cv_wchar_h_okay = no
11336 then
11337
11338 echo "$as_me:11338: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11339 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11340 cat >conftest.$ac_ext <<_ACEOF
11341 #line 11341 "configure"
11342 #include "confdefs.h"
11343 #include <sys/types.h>
11344
11345 int
11346 main (void)
11347 {
11348
11349 #ifndef _XOPEN_SOURCE_EXTENDED
11350 make an error
11351 #endif
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 rm -f conftest.$ac_objext
11357 if { (eval echo "$as_me:11357: \"$ac_compile\"") >&5
11358   (eval $ac_compile) 2>&5
11359   ac_status=$?
11360   echo "$as_me:11360: \$? = $ac_status" >&5
11361   (exit $ac_status); } &&
11362          { ac_try='test -s conftest.$ac_objext'
11363   { (eval echo "$as_me:11363: \"$ac_try\"") >&5
11364   (eval $ac_try) 2>&5
11365   ac_status=$?
11366   echo "$as_me:11366: \$? = $ac_status" >&5
11367   (exit $ac_status); }; }; then
11368   cf_result=no
11369 else
11370   echo "$as_me: failed program was:" >&5
11371 cat conftest.$ac_ext >&5
11372 cf_result=yes
11373 fi
11374 rm -f conftest.$ac_objext conftest.$ac_ext
11375 echo "$as_me:11375: result: $cf_result" >&5
11376 echo "${ECHO_T}$cf_result" >&6
11377
11378 if test "$cf_result" = yes ; then
11379         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11380 elif test "x" != "x" ; then
11381         echo "$as_me:11381: checking checking for compatible value versus " >&5
11382 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11383         cat >conftest.$ac_ext <<_ACEOF
11384 #line 11384 "configure"
11385 #include "confdefs.h"
11386 #include <sys/types.h>
11387
11388 int
11389 main (void)
11390 {
11391
11392 #if _XOPEN_SOURCE_EXTENDED- < 0
11393 make an error
11394 #endif
11395   ;
11396   return 0;
11397 }
11398 _ACEOF
11399 rm -f conftest.$ac_objext
11400 if { (eval echo "$as_me:11400: \"$ac_compile\"") >&5
11401   (eval $ac_compile) 2>&5
11402   ac_status=$?
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit $ac_status); } &&
11405          { ac_try='test -s conftest.$ac_objext'
11406   { (eval echo "$as_me:11406: \"$ac_try\"") >&5
11407   (eval $ac_try) 2>&5
11408   ac_status=$?
11409   echo "$as_me:11409: \$? = $ac_status" >&5
11410   (exit $ac_status); }; }; then
11411   cf_result=yes
11412 else
11413   echo "$as_me: failed program was:" >&5
11414 cat conftest.$ac_ext >&5
11415 cf_result=no
11416 fi
11417 rm -f conftest.$ac_objext conftest.$ac_ext
11418         echo "$as_me:11418: result: $cf_result" >&5
11419 echo "${ECHO_T}$cf_result" >&6
11420         if test "$cf_result" = no ; then
11421                 # perhaps we can override it - try...
11422                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11423         fi
11424 fi
11425
11426 fi
11427
11428 echo "$as_me:11428: checking if wcwidth agrees graphics are single-width" >&5
11429 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11430 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11431   echo $ECHO_N "(cached) $ECHO_C" >&6
11432 else
11433
11434 cat >conftest.in <<CF_EOF
11435 -       VT100 symbols
11436 0x250c  upper left corner
11437 0x2514  lower left corner
11438 0x2510  upper right corner
11439 0x2518  lower right corner
11440 0x251c  tee pointing left
11441 0x2524  tee pointing right
11442 0x2534  tee pointing up
11443 0x252c  tee pointing down
11444 0x2500  horizontal line
11445 0x2502  vertical line
11446 0x253c  large plus or crossover
11447 0x23ba  scan line 1
11448 0x23bd  scan line 9
11449 0x25c6  diamond
11450 0x2592  checker board (stipple)
11451 0x00b0  degree symbol
11452 0x00b1  plus/minus
11453 0x00b7  bullet
11454 -       Teletype 5410v1 symbols
11455 0x2190  arrow pointing left
11456 0x2192  arrow pointing right
11457 0x2193  arrow pointing down
11458 0x2191  arrow pointing up
11459 0x2592  board of squares
11460 0x2603  lantern symbol
11461 0x25ae  solid square block
11462 -       these defaults were invented for ncurses
11463 0x23bb  scan line 3
11464 0x23bc  scan line 7
11465 0x2264  less-than-or-equal-to
11466 0x2265  greater-than-or-equal-to
11467 0x03c0  greek pi
11468 0x2260  not-equal
11469 0x00a3  pound-sterling symbol
11470 -       thick-line-drawing
11471 0x250f  upper left corner
11472 0x2517  lower left corner
11473 0x2513  upper right corner
11474 0x251b  lower right corner
11475 0x2523  tee pointing left
11476 0x252b  tee pointing right
11477 0x253b  tee pointing up
11478 0x2533  tee pointing down
11479 0x2501  horizontal line
11480 0x2503  vertical line
11481 0x254b  large plus or crossover
11482 -       double-line-drawing
11483 0x2554  upper left corner
11484 0x255a  lower left corner
11485 0x2557  upper right corner
11486 0x255d  lower right corner
11487 0x2563  tee pointing left
11488 0x2560  tee pointing right
11489 0x2569  tee pointing up
11490 0x2566  tee pointing down
11491 0x2550  horizontal line
11492 0x2551  vertical line
11493 0x256c  large plus or crossover
11494 CF_EOF
11495 if test "$cross_compiling" = yes; then
11496   cf_cv_wcwidth_graphics=unknown
11497 else
11498   cat >conftest.$ac_ext <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501
11502 #include <locale.h>
11503 #include <stdio.h>
11504 #include <wchar.h>
11505
11506 #define MY_LEN 80
11507
11508 int
11509 main(void)
11510 {
11511         FILE *fp;
11512         int value;
11513         char buffer[MY_LEN + 1];
11514         char notes[MY_LEN + 1];
11515         int totals = 0;
11516         int passed = 0;
11517
11518         if (setlocale(LC_ALL, "en_US.UTF8") ||
11519                 setlocale(LC_ALL, "en_US.UTF-8") ||
11520                 setlocale(LC_ALL, "en_US.utf8") ||
11521                 setlocale(LC_ALL, "en_US.utf-8")) {
11522                 if ((fp = fopen("conftest.in", "r")) != 0) {
11523                         while (fgets(buffer, MY_LEN, fp) != 0) {
11524                                 if (*buffer == '-') {
11525                                         fprintf(stderr, "\t%s", buffer);
11526                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11527                                         ++totals;
11528                                         if (wcwidth(value) == 1)
11529                                                 ++passed;
11530                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11531                                 } else {
11532                                         fprintf(stderr, "?\t%s", buffer);
11533                                 }
11534                         }
11535                 }
11536         }
11537         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11538         return (totals == passed) ? 0 : 1;
11539 }
11540
11541 _ACEOF
11542 rm -f conftest$ac_exeext
11543 if { (eval echo "$as_me:11543: \"$ac_link\"") >&5
11544   (eval $ac_link) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11548   { (eval echo "$as_me:11548: \"$ac_try\"") >&5
11549   (eval $ac_try) 2>&5
11550   ac_status=$?
11551   echo "$as_me:11551: \$? = $ac_status" >&5
11552   (exit $ac_status); }; }; then
11553   cf_cv_wcwidth_graphics=yes
11554 else
11555   echo "$as_me: program exited with status $ac_status" >&5
11556 echo "$as_me: failed program was:" >&5
11557 cat conftest.$ac_ext >&5
11558 cf_cv_wcwidth_graphics=no
11559 fi
11560 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11561 fi
11562
11563 fi
11564 echo "$as_me:11564: result: $cf_cv_wcwidth_graphics" >&5
11565 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11566
11567         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11568
11569         # with_overwrite=no
11570         NCURSES_CH_T=cchar_t
11571
11572 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11573 do
11574 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11575 echo "$as_me:11575: checking for $ac_func" >&5
11576 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11577 if eval "test \"\${$as_ac_var+set}\" = set"; then
11578   echo $ECHO_N "(cached) $ECHO_C" >&6
11579 else
11580   cat >conftest.$ac_ext <<_ACEOF
11581 #line 11581 "configure"
11582 #include "confdefs.h"
11583 #define $ac_func autoconf_temporary
11584 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11585 #undef $ac_func
11586
11587 #ifdef __cplusplus
11588 extern "C"
11589 #endif
11590
11591 /* We use char because int might match the return type of a gcc2
11592    builtin and then its argument prototype would still apply.  */
11593 char $ac_func (void);
11594
11595 int
11596 main (void)
11597 {
11598
11599 /* The GNU C library defines stubs for functions which it implements
11600     to always fail with ENOSYS.  Some functions are actually named
11601     something starting with __ and the normal name is an alias.  */
11602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11603 #error found stub for $ac_func
11604 #endif
11605
11606         return $ac_func ();
11607   ;
11608   return 0;
11609 }
11610 _ACEOF
11611 rm -f conftest.$ac_objext conftest$ac_exeext
11612 if { (eval echo "$as_me:11612: \"$ac_link\"") >&5
11613   (eval $ac_link) 2>&5
11614   ac_status=$?
11615   echo "$as_me:11615: \$? = $ac_status" >&5
11616   (exit $ac_status); } &&
11617          { ac_try='test -s conftest$ac_exeext'
11618   { (eval echo "$as_me:11618: \"$ac_try\"") >&5
11619   (eval $ac_try) 2>&5
11620   ac_status=$?
11621   echo "$as_me:11621: \$? = $ac_status" >&5
11622   (exit $ac_status); }; }; then
11623   eval "$as_ac_var=yes"
11624 else
11625   echo "$as_me: failed program was:" >&5
11626 cat conftest.$ac_ext >&5
11627 eval "$as_ac_var=no"
11628 fi
11629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11630 fi
11631 echo "$as_me:11631: result: `eval echo '${'$as_ac_var'}'`" >&5
11632 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11633 if test `eval echo '${'$as_ac_var'}'` = yes; then
11634   cat >>confdefs.h <<EOF
11635 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11636 EOF
11637
11638 fi
11639 done
11640
11641         if test "x$ac_cv_func_putwc" != xyes ; then
11642
11643 echo "$as_me:11643: checking for multibyte character support" >&5
11644 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11645 if test "${cf_cv_utf8_lib+set}" = set; then
11646   echo $ECHO_N "(cached) $ECHO_C" >&6
11647 else
11648
11649         cf_save_LIBS="$LIBS"
11650         cat >conftest.$ac_ext <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653
11654 #include <stdlib.h>
11655 int
11656 main (void)
11657 {
11658 putwc(0,0);
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext conftest$ac_exeext
11664 if { (eval echo "$as_me:11664: \"$ac_link\"") >&5
11665   (eval $ac_link) 2>&5
11666   ac_status=$?
11667   echo "$as_me:11667: \$? = $ac_status" >&5
11668   (exit $ac_status); } &&
11669          { ac_try='test -s conftest$ac_exeext'
11670   { (eval echo "$as_me:11670: \"$ac_try\"") >&5
11671   (eval $ac_try) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit $ac_status); }; }; then
11675   cf_cv_utf8_lib=yes
11676 else
11677   echo "$as_me: failed program was:" >&5
11678 cat conftest.$ac_ext >&5
11679
11680 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11681 # will be set on completion of the AC_TRY_LINK below.
11682 cf_cv_header_path_utf8=
11683 cf_cv_library_path_utf8=
11684
11685 echo "${as_me:-configure}:11685: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11686
11687 cf_save_LIBS="$LIBS"
11688
11689 cat >conftest.$ac_ext <<_ACEOF
11690 #line 11690 "configure"
11691 #include "confdefs.h"
11692
11693 #include <libutf8.h>
11694 int
11695 main (void)
11696 {
11697 putwc(0,0);
11698   ;
11699   return 0;
11700 }
11701 _ACEOF
11702 rm -f conftest.$ac_objext conftest$ac_exeext
11703 if { (eval echo "$as_me:11703: \"$ac_link\"") >&5
11704   (eval $ac_link) 2>&5
11705   ac_status=$?
11706   echo "$as_me:11706: \$? = $ac_status" >&5
11707   (exit $ac_status); } &&
11708          { ac_try='test -s conftest$ac_exeext'
11709   { (eval echo "$as_me:11709: \"$ac_try\"") >&5
11710   (eval $ac_try) 2>&5
11711   ac_status=$?
11712   echo "$as_me:11712: \$? = $ac_status" >&5
11713   (exit $ac_status); }; }; then
11714
11715         cf_cv_find_linkage_utf8=yes
11716         cf_cv_header_path_utf8=/usr/include
11717         cf_cv_library_path_utf8=/usr/lib
11718
11719 else
11720   echo "$as_me: failed program was:" >&5
11721 cat conftest.$ac_ext >&5
11722
11723 LIBS="-lutf8  $cf_save_LIBS"
11724
11725 cat >conftest.$ac_ext <<_ACEOF
11726 #line 11726 "configure"
11727 #include "confdefs.h"
11728
11729 #include <libutf8.h>
11730 int
11731 main (void)
11732 {
11733 putwc(0,0);
11734   ;
11735   return 0;
11736 }
11737 _ACEOF
11738 rm -f conftest.$ac_objext conftest$ac_exeext
11739 if { (eval echo "$as_me:11739: \"$ac_link\"") >&5
11740   (eval $ac_link) 2>&5
11741   ac_status=$?
11742   echo "$as_me:11742: \$? = $ac_status" >&5
11743   (exit $ac_status); } &&
11744          { ac_try='test -s conftest$ac_exeext'
11745   { (eval echo "$as_me:11745: \"$ac_try\"") >&5
11746   (eval $ac_try) 2>&5
11747   ac_status=$?
11748   echo "$as_me:11748: \$? = $ac_status" >&5
11749   (exit $ac_status); }; }; then
11750
11751         cf_cv_find_linkage_utf8=yes
11752         cf_cv_header_path_utf8=/usr/include
11753         cf_cv_library_path_utf8=/usr/lib
11754         cf_cv_library_file_utf8="-lutf8"
11755
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759
11760         cf_cv_find_linkage_utf8=no
11761         LIBS="$cf_save_LIBS"
11762
11763         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11764
11765 echo "${as_me:-configure}:11765: testing find linkage for utf8 library ..." 1>&5
11766
11767 echo "${as_me:-configure}:11767: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11768
11769         cf_save_CPPFLAGS="$CPPFLAGS"
11770         cf_test_CPPFLAGS="$CPPFLAGS"
11771
11772 cf_search=
11773
11774 # collect the current set of include-directories from compiler flags
11775 cf_header_path_list=""
11776 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11777         for cf_header_path in $CPPFLAGS $CFLAGS
11778         do
11779                 case $cf_header_path in
11780                 (-I*)
11781                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11782
11783 test "x$cf_header_path" != "xNONE" && \
11784 test -d "$cf_header_path" && \
11785  {
11786         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11787         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11788         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11789         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11790         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11791         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11792 }
11793
11794                         cf_header_path_list="$cf_header_path_list $cf_search"
11795                         ;;
11796                 esac
11797         done
11798 fi
11799
11800 # add the variations for the package we are looking for
11801
11802 cf_search=
11803
11804 test "x$prefix" != "xNONE" && \
11805 test -d "$prefix" && \
11806  {
11807         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11808         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11809         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11810         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11811         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11812         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11813 }
11814
11815 for cf_subdir_prefix in \
11816         /usr \
11817         /usr/local \
11818         /usr/pkg \
11819         /opt \
11820         /opt/local \
11821         $HOME
11822 do
11823
11824 test "x$cf_subdir_prefix" != "x$prefix" && \
11825 test -d "$cf_subdir_prefix" && \
11826 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11827         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11828         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11829         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11830         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11831         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11832         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11833 }
11834
11835 done
11836
11837 test "$includedir" != NONE && \
11838 test "$includedir" != "/usr/include" && \
11839 test -d "$includedir" && {
11840         test -d $includedir &&    cf_search="$cf_search $includedir"
11841         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11842 }
11843
11844 test "$oldincludedir" != NONE && \
11845 test "$oldincludedir" != "/usr/include" && \
11846 test -d "$oldincludedir" && {
11847         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11848         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11849 }
11850
11851 cf_search="$cf_search $cf_header_path_list"
11852
11853         for cf_cv_header_path_utf8 in $cf_search
11854         do
11855                 if test -d $cf_cv_header_path_utf8 ; then
11856                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11857
11858 echo "${as_me:-configure}:11858: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11859
11860                         CPPFLAGS="$cf_save_CPPFLAGS"
11861
11862         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11863         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11864
11865                         cat >conftest.$ac_ext <<_ACEOF
11866 #line 11866 "configure"
11867 #include "confdefs.h"
11868
11869 #include <libutf8.h>
11870 int
11871 main (void)
11872 {
11873 putwc(0,0);
11874   ;
11875   return 0;
11876 }
11877 _ACEOF
11878 rm -f conftest.$ac_objext
11879 if { (eval echo "$as_me:11879: \"$ac_compile\"") >&5
11880   (eval $ac_compile) 2>&5
11881   ac_status=$?
11882   echo "$as_me:11882: \$? = $ac_status" >&5
11883   (exit $ac_status); } &&
11884          { ac_try='test -s conftest.$ac_objext'
11885   { (eval echo "$as_me:11885: \"$ac_try\"") >&5
11886   (eval $ac_try) 2>&5
11887   ac_status=$?
11888   echo "$as_me:11888: \$? = $ac_status" >&5
11889   (exit $ac_status); }; }; then
11890
11891                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11892
11893 echo "${as_me:-configure}:11893: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11894
11895                                 cf_cv_find_linkage_utf8=maybe
11896                                 cf_test_CPPFLAGS="$CPPFLAGS"
11897                                 break
11898 else
11899   echo "$as_me: failed program was:" >&5
11900 cat conftest.$ac_ext >&5
11901
11902                                 CPPFLAGS="$cf_save_CPPFLAGS"
11903
11904 fi
11905 rm -f conftest.$ac_objext conftest.$ac_ext
11906                 fi
11907         done
11908
11909         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11910
11911 echo "${as_me:-configure}:11911: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11912
11913                 cf_save_LIBS="$LIBS"
11914                 cf_save_LDFLAGS="$LDFLAGS"
11915
11916                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11917
11918 cf_search=
11919 cf_library_path_list=""
11920 if test -n "${LDFLAGS}${LIBS}" ; then
11921         for cf_library_path in $LDFLAGS $LIBS
11922         do
11923                 case $cf_library_path in
11924                 (-L*)
11925                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11926
11927 test "x$cf_library_path" != "xNONE" && \
11928 test -d "$cf_library_path" && \
11929  {
11930         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11931         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11932         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11933         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11934         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11935         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11936 }
11937
11938                         cf_library_path_list="$cf_library_path_list $cf_search"
11939                         ;;
11940                 esac
11941         done
11942 fi
11943
11944 cf_search=
11945
11946 test "x$prefix" != "xNONE" && \
11947 test -d "$prefix" && \
11948  {
11949         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11950         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11951         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11952         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11953         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11954         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11955 }
11956
11957 for cf_subdir_prefix in \
11958         /usr \
11959         /usr/local \
11960         /usr/pkg \
11961         /opt \
11962         /opt/local \
11963         $HOME
11964 do
11965
11966 test "x$cf_subdir_prefix" != "x$prefix" && \
11967 test -d "$cf_subdir_prefix" && \
11968 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11969         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11970         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11971         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11972         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11973         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11974         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11975 }
11976
11977 done
11978
11979 cf_search="$cf_library_path_list $cf_search"
11980
11981                         for cf_cv_library_path_utf8 in $cf_search
11982                         do
11983                                 if test -d $cf_cv_library_path_utf8 ; then
11984                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11985
11986 echo "${as_me:-configure}:11986: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11987
11988                                         CPPFLAGS="$cf_test_CPPFLAGS"
11989                                         LIBS="-lutf8  $cf_save_LIBS"
11990                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11991                                         cat >conftest.$ac_ext <<_ACEOF
11992 #line 11992 "configure"
11993 #include "confdefs.h"
11994
11995 #include <libutf8.h>
11996 int
11997 main (void)
11998 {
11999 putwc(0,0);
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004 rm -f conftest.$ac_objext conftest$ac_exeext
12005 if { (eval echo "$as_me:12005: \"$ac_link\"") >&5
12006   (eval $ac_link) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); } &&
12010          { ac_try='test -s conftest$ac_exeext'
12011   { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012   (eval $ac_try) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); }; }; then
12016
12017                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12018
12019 echo "${as_me:-configure}:12019: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12020
12021                                         cf_cv_find_linkage_utf8=yes
12022                                         cf_cv_library_file_utf8="-lutf8"
12023                                         break
12024 else
12025   echo "$as_me: failed program was:" >&5
12026 cat conftest.$ac_ext >&5
12027
12028                                         CPPFLAGS="$cf_save_CPPFLAGS"
12029                                         LIBS="$cf_save_LIBS"
12030                                         LDFLAGS="$cf_save_LDFLAGS"
12031
12032 fi
12033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12034                                 fi
12035                         done
12036                         CPPFLAGS="$cf_save_CPPFLAGS"
12037                         LDFLAGS="$cf_save_LDFLAGS"
12038                 fi
12039
12040         else
12041                 cf_cv_find_linkage_utf8=no
12042         fi
12043
12044 fi
12045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12046
12047 fi
12048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12049
12050 LIBS="$cf_save_LIBS"
12051
12052 if test "$cf_cv_find_linkage_utf8" = yes ; then
12053 cf_cv_utf8_lib=add-on
12054 else
12055 cf_cv_utf8_lib=no
12056 fi
12057
12058 fi
12059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12060 fi
12061 echo "$as_me:12061: result: $cf_cv_utf8_lib" >&5
12062 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12063
12064 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12065 # ncurses/ncursesw:
12066 if test "$cf_cv_utf8_lib" = "add-on" ; then
12067
12068 cat >>confdefs.h <<\EOF
12069 #define HAVE_LIBUTF8_H 1
12070 EOF
12071
12072 if test -n "$cf_cv_header_path_utf8" ; then
12073   for cf_add_incdir in $cf_cv_header_path_utf8
12074   do
12075         while test $cf_add_incdir != /usr/include
12076         do
12077           if test -d $cf_add_incdir
12078           then
12079                 cf_have_incdir=no
12080                 if test -n "$CFLAGS$CPPFLAGS" ; then
12081                   # a loop is needed to ensure we can add subdirs of existing dirs
12082                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12083                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12084                           cf_have_incdir=yes; break
12085                         fi
12086                   done
12087                 fi
12088
12089                 if test "$cf_have_incdir" = no ; then
12090                   if test "$cf_add_incdir" = /usr/local/include ; then
12091                         if test "$GCC" = yes
12092                         then
12093                           cf_save_CPPFLAGS=$CPPFLAGS
12094
12095         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12096         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12097
12098                           cat >conftest.$ac_ext <<_ACEOF
12099 #line 12099 "configure"
12100 #include "confdefs.h"
12101 #include <stdio.h>
12102 int
12103 main (void)
12104 {
12105 printf("Hello")
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f conftest.$ac_objext
12111 if { (eval echo "$as_me:12111: \"$ac_compile\"") >&5
12112   (eval $ac_compile) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit $ac_status); } &&
12116          { ac_try='test -s conftest.$ac_objext'
12117   { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118   (eval $ac_try) 2>&5
12119   ac_status=$?
12120   echo "$as_me:12120: \$? = $ac_status" >&5
12121   (exit $ac_status); }; }; then
12122   :
12123 else
12124   echo "$as_me: failed program was:" >&5
12125 cat conftest.$ac_ext >&5
12126 cf_have_incdir=yes
12127 fi
12128 rm -f conftest.$ac_objext conftest.$ac_ext
12129                           CPPFLAGS=$cf_save_CPPFLAGS
12130                         fi
12131                   fi
12132                 fi
12133
12134                 if test "$cf_have_incdir" = no ; then
12135                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12136
12137 echo "${as_me:-configure}:12137: testing adding $cf_add_incdir to include-path ..." 1>&5
12138
12139                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12140
12141                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12142                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12143                   cf_add_incdir="$cf_top_incdir"
12144                 else
12145                   break
12146                 fi
12147           else
12148                 break
12149           fi
12150         done
12151   done
12152 fi
12153
12154 if test -n "$cf_cv_library_path_utf8" ; then
12155         for cf_add_libdir in $cf_cv_library_path_utf8
12156         do
12157                 if test $cf_add_libdir = /usr/lib ; then
12158                         :
12159                 elif test -d $cf_add_libdir
12160                 then
12161                         cf_have_libdir=no
12162                         if test -n "$LDFLAGS$LIBS" ; then
12163                                 # a loop is needed to ensure we can add subdirs of existing dirs
12164                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12165                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12166                                                 cf_have_libdir=yes; break
12167                                         fi
12168                                 done
12169                         fi
12170                         if test "$cf_have_libdir" = no ; then
12171                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12172
12173 echo "${as_me:-configure}:12173: testing adding $cf_add_libdir to library-path ..." 1>&5
12174
12175                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12176                         fi
12177                 fi
12178         done
12179 fi
12180
12181 cf_add_libs="$LIBS"
12182 # reverse order
12183 cf_add_0lib=
12184 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12185 # filter duplicates
12186 for cf_add_1lib in $cf_add_0lib; do
12187         for cf_add_2lib in $cf_add_libs; do
12188                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12189                         cf_add_1lib=
12190                         break
12191                 fi
12192         done
12193         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12194 done
12195 LIBS="$cf_add_libs"
12196
12197 fi
12198
12199                 if test "$cf_cv_utf8_lib" != no ; then
12200                         NCURSES_LIBUTF8=1
12201                 fi
12202         fi
12203
12204 # This is needed on Tru64 5.0 to declare mbstate_t
12205 echo "$as_me:12205: checking if we must include wchar.h to declare mbstate_t" >&5
12206 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12207 if test "${cf_cv_mbstate_t+set}" = set; then
12208   echo $ECHO_N "(cached) $ECHO_C" >&6
12209 else
12210
12211 cat >conftest.$ac_ext <<_ACEOF
12212 #line 12212 "configure"
12213 #include "confdefs.h"
12214
12215 #include <stdlib.h>
12216 #include <stdarg.h>
12217 #include <stdio.h>
12218 #ifdef HAVE_LIBUTF8_H
12219 #include <libutf8.h>
12220 #endif
12221 int
12222 main (void)
12223 {
12224 mbstate_t state
12225   ;
12226   return 0;
12227 }
12228 _ACEOF
12229 rm -f conftest.$ac_objext
12230 if { (eval echo "$as_me:12230: \"$ac_compile\"") >&5
12231   (eval $ac_compile) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); } &&
12235          { ac_try='test -s conftest.$ac_objext'
12236   { (eval echo "$as_me:12236: \"$ac_try\"") >&5
12237   (eval $ac_try) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); }; }; then
12241   cf_cv_mbstate_t=no
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245 cat >conftest.$ac_ext <<_ACEOF
12246 #line 12246 "configure"
12247 #include "confdefs.h"
12248
12249 #include <stdlib.h>
12250 #include <stdarg.h>
12251 #include <stdio.h>
12252 #include <wchar.h>
12253 #ifdef HAVE_LIBUTF8_H
12254 #include <libutf8.h>
12255 #endif
12256 int
12257 main (void)
12258 {
12259 mbstate_t value
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 rm -f conftest.$ac_objext
12265 if { (eval echo "$as_me:12265: \"$ac_compile\"") >&5
12266   (eval $ac_compile) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); } &&
12270          { ac_try='test -s conftest.$ac_objext'
12271   { (eval echo "$as_me:12271: \"$ac_try\"") >&5
12272   (eval $ac_try) 2>&5
12273   ac_status=$?
12274   echo "$as_me:12274: \$? = $ac_status" >&5
12275   (exit $ac_status); }; }; then
12276   cf_cv_mbstate_t=yes
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 cf_cv_mbstate_t=unknown
12281 fi
12282 rm -f conftest.$ac_objext conftest.$ac_ext
12283 fi
12284 rm -f conftest.$ac_objext conftest.$ac_ext
12285 fi
12286 echo "$as_me:12286: result: $cf_cv_mbstate_t" >&5
12287 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12288
12289 if test "$cf_cv_mbstate_t" = yes ; then
12290
12291 cat >>confdefs.h <<\EOF
12292 #define NEED_WCHAR_H 1
12293 EOF
12294
12295         NEED_WCHAR_H=1
12296 fi
12297
12298 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12299 if test "$cf_cv_mbstate_t" = unknown ; then
12300         NCURSES_MBSTATE_T=1
12301 fi
12302
12303 # This is needed on Tru64 5.0 to declare wchar_t
12304 echo "$as_me:12304: checking if we must include wchar.h to declare wchar_t" >&5
12305 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12306 if test "${cf_cv_wchar_t+set}" = set; then
12307   echo $ECHO_N "(cached) $ECHO_C" >&6
12308 else
12309
12310 cat >conftest.$ac_ext <<_ACEOF
12311 #line 12311 "configure"
12312 #include "confdefs.h"
12313
12314 #include <stdlib.h>
12315 #include <stdarg.h>
12316 #include <stdio.h>
12317 #ifdef HAVE_LIBUTF8_H
12318 #include <libutf8.h>
12319 #endif
12320 int
12321 main (void)
12322 {
12323 wchar_t state
12324   ;
12325   return 0;
12326 }
12327 _ACEOF
12328 rm -f conftest.$ac_objext
12329 if { (eval echo "$as_me:12329: \"$ac_compile\"") >&5
12330   (eval $ac_compile) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); } &&
12334          { ac_try='test -s conftest.$ac_objext'
12335   { (eval echo "$as_me:12335: \"$ac_try\"") >&5
12336   (eval $ac_try) 2>&5
12337   ac_status=$?
12338   echo "$as_me:12338: \$? = $ac_status" >&5
12339   (exit $ac_status); }; }; then
12340   cf_cv_wchar_t=no
12341 else
12342   echo "$as_me: failed program was:" >&5
12343 cat conftest.$ac_ext >&5
12344 cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347
12348 #include <stdlib.h>
12349 #include <stdarg.h>
12350 #include <stdio.h>
12351 #include <wchar.h>
12352 #ifdef HAVE_LIBUTF8_H
12353 #include <libutf8.h>
12354 #endif
12355 int
12356 main (void)
12357 {
12358 wchar_t value
12359   ;
12360   return 0;
12361 }
12362 _ACEOF
12363 rm -f conftest.$ac_objext
12364 if { (eval echo "$as_me:12364: \"$ac_compile\"") >&5
12365   (eval $ac_compile) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); } &&
12369          { ac_try='test -s conftest.$ac_objext'
12370   { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371   (eval $ac_try) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); }; }; then
12375   cf_cv_wchar_t=yes
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 cf_cv_wchar_t=unknown
12380 fi
12381 rm -f conftest.$ac_objext conftest.$ac_ext
12382 fi
12383 rm -f conftest.$ac_objext conftest.$ac_ext
12384 fi
12385 echo "$as_me:12385: result: $cf_cv_wchar_t" >&5
12386 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12387
12388 if test "$cf_cv_wchar_t" = yes ; then
12389
12390 cat >>confdefs.h <<\EOF
12391 #define NEED_WCHAR_H 1
12392 EOF
12393
12394         NEED_WCHAR_H=1
12395 fi
12396
12397 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12398 if test "$cf_cv_wchar_t" = unknown ; then
12399         NCURSES_WCHAR_T=1
12400 fi
12401
12402 # if we find wchar_t in either place, use substitution to provide a fallback.
12403 if test "$cf_cv_wchar_t" != unknown ; then
12404         NCURSES_OK_WCHAR_T=1
12405 fi
12406
12407 # This is needed on Tru64 5.0 to declare wint_t
12408 echo "$as_me:12408: checking if we must include wchar.h to declare wint_t" >&5
12409 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12410 if test "${cf_cv_wint_t+set}" = set; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413
12414 cat >conftest.$ac_ext <<_ACEOF
12415 #line 12415 "configure"
12416 #include "confdefs.h"
12417
12418 #include <stdlib.h>
12419 #include <stdarg.h>
12420 #include <stdio.h>
12421 #ifdef HAVE_LIBUTF8_H
12422 #include <libutf8.h>
12423 #endif
12424 int
12425 main (void)
12426 {
12427 wint_t state
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext
12433 if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434   (eval $ac_compile) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest.$ac_objext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   cf_cv_wint_t=no
12445 else
12446   echo "$as_me: failed program was:" >&5
12447 cat conftest.$ac_ext >&5
12448 cat >conftest.$ac_ext <<_ACEOF
12449 #line 12449 "configure"
12450 #include "confdefs.h"
12451
12452 #include <stdlib.h>
12453 #include <stdarg.h>
12454 #include <stdio.h>
12455 #include <wchar.h>
12456 #ifdef HAVE_LIBUTF8_H
12457 #include <libutf8.h>
12458 #endif
12459 int
12460 main (void)
12461 {
12462 wint_t value
12463   ;
12464   return 0;
12465 }
12466 _ACEOF
12467 rm -f conftest.$ac_objext
12468 if { (eval echo "$as_me:12468: \"$ac_compile\"") >&5
12469   (eval $ac_compile) 2>&5
12470   ac_status=$?
12471   echo "$as_me:12471: \$? = $ac_status" >&5
12472   (exit $ac_status); } &&
12473          { ac_try='test -s conftest.$ac_objext'
12474   { (eval echo "$as_me:12474: \"$ac_try\"") >&5
12475   (eval $ac_try) 2>&5
12476   ac_status=$?
12477   echo "$as_me:12477: \$? = $ac_status" >&5
12478   (exit $ac_status); }; }; then
12479   cf_cv_wint_t=yes
12480 else
12481   echo "$as_me: failed program was:" >&5
12482 cat conftest.$ac_ext >&5
12483 cf_cv_wint_t=unknown
12484 fi
12485 rm -f conftest.$ac_objext conftest.$ac_ext
12486 fi
12487 rm -f conftest.$ac_objext conftest.$ac_ext
12488 fi
12489 echo "$as_me:12489: result: $cf_cv_wint_t" >&5
12490 echo "${ECHO_T}$cf_cv_wint_t" >&6
12491
12492 if test "$cf_cv_wint_t" = yes ; then
12493
12494 cat >>confdefs.h <<\EOF
12495 #define NEED_WCHAR_H 1
12496 EOF
12497
12498         NEED_WCHAR_H=1
12499 fi
12500
12501 # if we do not find wint_t in either place, use substitution to provide a fallback.
12502 if test "$cf_cv_wint_t" = unknown ; then
12503         NCURSES_WINT_T=1
12504 fi
12505
12506 # if we find wint_t in either place, use substitution to provide a fallback.
12507 if test "$cf_cv_wint_t" != unknown ; then
12508         NCURSES_OK_WINT_T=1
12509 fi
12510
12511         if test "$NCURSES_MBSTATE_T" != 0; then
12512
12513 cat >>confdefs.h <<\EOF
12514 #define NEED_MBSTATE_T_DEF 1
12515 EOF
12516
12517         fi
12518 fi
12519
12520 ###   use option --disable-lp64 to allow long chtype
12521 echo "$as_me:12521: checking whether to enable _LP64 definition in curses.h" >&5
12522 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12523
12524 # Check whether --enable-lp64 or --disable-lp64 was given.
12525 if test "${enable_lp64+set}" = set; then
12526   enableval="$enable_lp64"
12527   with_lp64=$enableval
12528 else
12529   with_lp64=$cf_dft_with_lp64
12530 fi;
12531 echo "$as_me:12531: result: $with_lp64" >&5
12532 echo "${ECHO_T}$with_lp64" >&6
12533
12534 if test "x$with_lp64" = xyes ; then
12535         cf_cv_enable_lp64=1
12536 else
12537         cf_cv_enable_lp64=0
12538 fi
12539
12540 # Check whether --enable-largefile or --disable-largefile was given.
12541 if test "${enable_largefile+set}" = set; then
12542   enableval="$enable_largefile"
12543
12544 fi;
12545 if test "$enable_largefile" != no; then
12546
12547   echo "$as_me:12547: checking for special C compiler options needed for large files" >&5
12548 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12549 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12550   echo $ECHO_N "(cached) $ECHO_C" >&6
12551 else
12552   ac_cv_sys_largefile_CC=no
12553      if test "$GCC" != yes; then
12554        ac_save_CC=$CC
12555        while :; do
12556          # IRIX 6.2 and later do not support large files by default,
12557          # so use the C compiler's -n32 option if that helps.
12558          cat >conftest.$ac_ext <<_ACEOF
12559 #line 12559 "configure"
12560 #include "confdefs.h"
12561 #include <sys/types.h>
12562  /* Check that off_t can represent 2**63 - 1 correctly.
12563     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12564     since some C++ compilers masquerading as C compilers
12565     incorrectly reject 9223372036854775807.  */
12566 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12567   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12568                        && LARGE_OFF_T % 2147483647 == 1)
12569                       ? 1 : -1];
12570 int
12571 main (void)
12572 {
12573
12574   ;
12575   return 0;
12576 }
12577 _ACEOF
12578          rm -f conftest.$ac_objext
12579 if { (eval echo "$as_me:12579: \"$ac_compile\"") >&5
12580   (eval $ac_compile) 2>&5
12581   ac_status=$?
12582   echo "$as_me:12582: \$? = $ac_status" >&5
12583   (exit $ac_status); } &&
12584          { ac_try='test -s conftest.$ac_objext'
12585   { (eval echo "$as_me:12585: \"$ac_try\"") >&5
12586   (eval $ac_try) 2>&5
12587   ac_status=$?
12588   echo "$as_me:12588: \$? = $ac_status" >&5
12589   (exit $ac_status); }; }; then
12590   break
12591 else
12592   echo "$as_me: failed program was:" >&5
12593 cat conftest.$ac_ext >&5
12594 fi
12595 rm -f conftest.$ac_objext
12596          CC="$CC -n32"
12597          rm -f conftest.$ac_objext
12598 if { (eval echo "$as_me:12598: \"$ac_compile\"") >&5
12599   (eval $ac_compile) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit $ac_status); } &&
12603          { ac_try='test -s conftest.$ac_objext'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit $ac_status); }; }; then
12609   ac_cv_sys_largefile_CC=' -n32'; break
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 cat conftest.$ac_ext >&5
12613 fi
12614 rm -f conftest.$ac_objext
12615          break
12616        done
12617        CC=$ac_save_CC
12618        rm -f conftest.$ac_ext
12619     fi
12620 fi
12621 echo "$as_me:12621: result: $ac_cv_sys_largefile_CC" >&5
12622 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12623   if test "$ac_cv_sys_largefile_CC" != no; then
12624     CC=$CC$ac_cv_sys_largefile_CC
12625   fi
12626
12627   echo "$as_me:12627: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12628 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12629 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12630   echo $ECHO_N "(cached) $ECHO_C" >&6
12631 else
12632   while :; do
12633   ac_cv_sys_file_offset_bits=no
12634   cat >conftest.$ac_ext <<_ACEOF
12635 #line 12635 "configure"
12636 #include "confdefs.h"
12637 #include <sys/types.h>
12638  /* Check that off_t can represent 2**63 - 1 correctly.
12639     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12640     since some C++ compilers masquerading as C compilers
12641     incorrectly reject 9223372036854775807.  */
12642 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12643   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12644                        && LARGE_OFF_T % 2147483647 == 1)
12645                       ? 1 : -1];
12646 int
12647 main (void)
12648 {
12649
12650   ;
12651   return 0;
12652 }
12653 _ACEOF
12654 rm -f conftest.$ac_objext
12655 if { (eval echo "$as_me:12655: \"$ac_compile\"") >&5
12656   (eval $ac_compile) 2>&5
12657   ac_status=$?
12658   echo "$as_me:12658: \$? = $ac_status" >&5
12659   (exit $ac_status); } &&
12660          { ac_try='test -s conftest.$ac_objext'
12661   { (eval echo "$as_me:12661: \"$ac_try\"") >&5
12662   (eval $ac_try) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); }; }; then
12666   break
12667 else
12668   echo "$as_me: failed program was:" >&5
12669 cat conftest.$ac_ext >&5
12670 fi
12671 rm -f conftest.$ac_objext conftest.$ac_ext
12672   cat >conftest.$ac_ext <<_ACEOF
12673 #line 12673 "configure"
12674 #include "confdefs.h"
12675 #define _FILE_OFFSET_BITS 64
12676 #include <sys/types.h>
12677  /* Check that off_t can represent 2**63 - 1 correctly.
12678     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12679     since some C++ compilers masquerading as C compilers
12680     incorrectly reject 9223372036854775807.  */
12681 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12682   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12683                        && LARGE_OFF_T % 2147483647 == 1)
12684                       ? 1 : -1];
12685 int
12686 main (void)
12687 {
12688
12689   ;
12690   return 0;
12691 }
12692 _ACEOF
12693 rm -f conftest.$ac_objext
12694 if { (eval echo "$as_me:12694: \"$ac_compile\"") >&5
12695   (eval $ac_compile) 2>&5
12696   ac_status=$?
12697   echo "$as_me:12697: \$? = $ac_status" >&5
12698   (exit $ac_status); } &&
12699          { ac_try='test -s conftest.$ac_objext'
12700   { (eval echo "$as_me:12700: \"$ac_try\"") >&5
12701   (eval $ac_try) 2>&5
12702   ac_status=$?
12703   echo "$as_me:12703: \$? = $ac_status" >&5
12704   (exit $ac_status); }; }; then
12705   ac_cv_sys_file_offset_bits=64; break
12706 else
12707   echo "$as_me: failed program was:" >&5
12708 cat conftest.$ac_ext >&5
12709 fi
12710 rm -f conftest.$ac_objext conftest.$ac_ext
12711   break
12712 done
12713 fi
12714 echo "$as_me:12714: result: $ac_cv_sys_file_offset_bits" >&5
12715 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12716 if test "$ac_cv_sys_file_offset_bits" != no; then
12717
12718 cat >>confdefs.h <<EOF
12719 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12720 EOF
12721
12722 fi
12723 rm -rf conftest*
12724   echo "$as_me:12724: checking for _LARGE_FILES value needed for large files" >&5
12725 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12726 if test "${ac_cv_sys_large_files+set}" = set; then
12727   echo $ECHO_N "(cached) $ECHO_C" >&6
12728 else
12729   while :; do
12730   ac_cv_sys_large_files=no
12731   cat >conftest.$ac_ext <<_ACEOF
12732 #line 12732 "configure"
12733 #include "confdefs.h"
12734 #include <sys/types.h>
12735  /* Check that off_t can represent 2**63 - 1 correctly.
12736     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12737     since some C++ compilers masquerading as C compilers
12738     incorrectly reject 9223372036854775807.  */
12739 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12740   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12741                        && LARGE_OFF_T % 2147483647 == 1)
12742                       ? 1 : -1];
12743 int
12744 main (void)
12745 {
12746
12747   ;
12748   return 0;
12749 }
12750 _ACEOF
12751 rm -f conftest.$ac_objext
12752 if { (eval echo "$as_me:12752: \"$ac_compile\"") >&5
12753   (eval $ac_compile) 2>&5
12754   ac_status=$?
12755   echo "$as_me:12755: \$? = $ac_status" >&5
12756   (exit $ac_status); } &&
12757          { ac_try='test -s conftest.$ac_objext'
12758   { (eval echo "$as_me:12758: \"$ac_try\"") >&5
12759   (eval $ac_try) 2>&5
12760   ac_status=$?
12761   echo "$as_me:12761: \$? = $ac_status" >&5
12762   (exit $ac_status); }; }; then
12763   break
12764 else
12765   echo "$as_me: failed program was:" >&5
12766 cat conftest.$ac_ext >&5
12767 fi
12768 rm -f conftest.$ac_objext conftest.$ac_ext
12769   cat >conftest.$ac_ext <<_ACEOF
12770 #line 12770 "configure"
12771 #include "confdefs.h"
12772 #define _LARGE_FILES 1
12773 #include <sys/types.h>
12774  /* Check that off_t can represent 2**63 - 1 correctly.
12775     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12776     since some C++ compilers masquerading as C compilers
12777     incorrectly reject 9223372036854775807.  */
12778 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12779   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12780                        && LARGE_OFF_T % 2147483647 == 1)
12781                       ? 1 : -1];
12782 int
12783 main (void)
12784 {
12785
12786   ;
12787   return 0;
12788 }
12789 _ACEOF
12790 rm -f conftest.$ac_objext
12791 if { (eval echo "$as_me:12791: \"$ac_compile\"") >&5
12792   (eval $ac_compile) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); } &&
12796          { ac_try='test -s conftest.$ac_objext'
12797   { (eval echo "$as_me:12797: \"$ac_try\"") >&5
12798   (eval $ac_try) 2>&5
12799   ac_status=$?
12800   echo "$as_me:12800: \$? = $ac_status" >&5
12801   (exit $ac_status); }; }; then
12802   ac_cv_sys_large_files=1; break
12803 else
12804   echo "$as_me: failed program was:" >&5
12805 cat conftest.$ac_ext >&5
12806 fi
12807 rm -f conftest.$ac_objext conftest.$ac_ext
12808   break
12809 done
12810 fi
12811 echo "$as_me:12811: result: $ac_cv_sys_large_files" >&5
12812 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12813 if test "$ac_cv_sys_large_files" != no; then
12814
12815 cat >>confdefs.h <<EOF
12816 #define _LARGE_FILES $ac_cv_sys_large_files
12817 EOF
12818
12819 fi
12820 rm -rf conftest*
12821 fi
12822
12823         if test "$enable_largefile" != no ; then
12824         echo "$as_me:12824: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12825 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12826 if test "${ac_cv_sys_largefile_source+set}" = set; then
12827   echo $ECHO_N "(cached) $ECHO_C" >&6
12828 else
12829   while :; do
12830   ac_cv_sys_largefile_source=no
12831   cat >conftest.$ac_ext <<_ACEOF
12832 #line 12832 "configure"
12833 #include "confdefs.h"
12834 #include <stdio.h>
12835 int
12836 main (void)
12837 {
12838 return !fseeko;
12839   ;
12840   return 0;
12841 }
12842 _ACEOF
12843 rm -f conftest.$ac_objext
12844 if { (eval echo "$as_me:12844: \"$ac_compile\"") >&5
12845   (eval $ac_compile) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); } &&
12849          { ac_try='test -s conftest.$ac_objext'
12850   { (eval echo "$as_me:12850: \"$ac_try\"") >&5
12851   (eval $ac_try) 2>&5
12852   ac_status=$?
12853   echo "$as_me:12853: \$? = $ac_status" >&5
12854   (exit $ac_status); }; }; then
12855   break
12856 else
12857   echo "$as_me: failed program was:" >&5
12858 cat conftest.$ac_ext >&5
12859 fi
12860 rm -f conftest.$ac_objext conftest.$ac_ext
12861   cat >conftest.$ac_ext <<_ACEOF
12862 #line 12862 "configure"
12863 #include "confdefs.h"
12864 #define _LARGEFILE_SOURCE 1
12865 #include <stdio.h>
12866 int
12867 main (void)
12868 {
12869 return !fseeko;
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -f conftest.$ac_objext
12875 if { (eval echo "$as_me:12875: \"$ac_compile\"") >&5
12876   (eval $ac_compile) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit $ac_status); } &&
12880          { ac_try='test -s conftest.$ac_objext'
12881   { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882   (eval $ac_try) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit $ac_status); }; }; then
12886   ac_cv_sys_largefile_source=1; break
12887 else
12888   echo "$as_me: failed program was:" >&5
12889 cat conftest.$ac_ext >&5
12890 fi
12891 rm -f conftest.$ac_objext conftest.$ac_ext
12892   break
12893 done
12894 fi
12895 echo "$as_me:12895: result: $ac_cv_sys_largefile_source" >&5
12896 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12897 if test "$ac_cv_sys_largefile_source" != no; then
12898
12899 cat >>confdefs.h <<EOF
12900 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12901 EOF
12902
12903 fi
12904 rm -rf conftest*
12905
12906 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12907 # in glibc 2.1.3, but that breaks too many other things.
12908 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12909 echo "$as_me:12909: checking for fseeko" >&5
12910 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12911 if test "${ac_cv_func_fseeko+set}" = set; then
12912   echo $ECHO_N "(cached) $ECHO_C" >&6
12913 else
12914   cat >conftest.$ac_ext <<_ACEOF
12915 #line 12915 "configure"
12916 #include "confdefs.h"
12917 #include <stdio.h>
12918 int
12919 main (void)
12920 {
12921 return fseeko && fseeko (stdin, 0, 0);
12922   ;
12923   return 0;
12924 }
12925 _ACEOF
12926 rm -f conftest.$ac_objext conftest$ac_exeext
12927 if { (eval echo "$as_me:12927: \"$ac_link\"") >&5
12928   (eval $ac_link) 2>&5
12929   ac_status=$?
12930   echo "$as_me:12930: \$? = $ac_status" >&5
12931   (exit $ac_status); } &&
12932          { ac_try='test -s conftest$ac_exeext'
12933   { (eval echo "$as_me:12933: \"$ac_try\"") >&5
12934   (eval $ac_try) 2>&5
12935   ac_status=$?
12936   echo "$as_me:12936: \$? = $ac_status" >&5
12937   (exit $ac_status); }; }; then
12938   ac_cv_func_fseeko=yes
12939 else
12940   echo "$as_me: failed program was:" >&5
12941 cat conftest.$ac_ext >&5
12942 ac_cv_func_fseeko=no
12943 fi
12944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12945 fi
12946 echo "$as_me:12946: result: $ac_cv_func_fseeko" >&5
12947 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12948 if test $ac_cv_func_fseeko = yes; then
12949
12950 cat >>confdefs.h <<\EOF
12951 #define HAVE_FSEEKO 1
12952 EOF
12953
12954 fi
12955
12956         # Normally we would collect these definitions in the config.h,
12957         # but (like _XOPEN_SOURCE), some environments rely on having these
12958         # defined before any of the system headers are included.  Another
12959         # case comes up with C++, e.g., on AIX the compiler compiles the
12960         # header files by themselves before looking at the body files it is
12961         # told to compile.  For ncurses, those header files do not include
12962         # the config.h
12963         if test "$ac_cv_sys_large_files" != no
12964         then
12965
12966         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12967         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12968
12969         fi
12970         if test "$ac_cv_sys_largefile_source" != no
12971         then
12972
12973         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12974         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12975
12976         fi
12977         if test "$ac_cv_sys_file_offset_bits" != no
12978         then
12979
12980         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12981         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12982
12983         fi
12984
12985         echo "$as_me:12985: checking whether to use struct dirent64" >&5
12986 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12987 if test "${cf_cv_struct_dirent64+set}" = set; then
12988   echo $ECHO_N "(cached) $ECHO_C" >&6
12989 else
12990
12991                 cat >conftest.$ac_ext <<_ACEOF
12992 #line 12992 "configure"
12993 #include "confdefs.h"
12994
12995 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12996 #include <sys/types.h>
12997 #include <dirent.h>
12998
12999 int
13000 main (void)
13001 {
13002
13003                 /* if transitional largefile support is setup, this is true */
13004                 extern struct dirent64 * readdir(DIR *);
13005                 struct dirent64 *x = readdir((DIR *)0);
13006                 struct dirent *y = readdir((DIR *)0);
13007                 int z = x - y;
13008
13009   ;
13010   return 0;
13011 }
13012 _ACEOF
13013 rm -f conftest.$ac_objext
13014 if { (eval echo "$as_me:13014: \"$ac_compile\"") >&5
13015   (eval $ac_compile) 2>&5
13016   ac_status=$?
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit $ac_status); } &&
13019          { ac_try='test -s conftest.$ac_objext'
13020   { (eval echo "$as_me:13020: \"$ac_try\"") >&5
13021   (eval $ac_try) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); }; }; then
13025   cf_cv_struct_dirent64=yes
13026 else
13027   echo "$as_me: failed program was:" >&5
13028 cat conftest.$ac_ext >&5
13029 cf_cv_struct_dirent64=no
13030 fi
13031 rm -f conftest.$ac_objext conftest.$ac_ext
13032
13033 fi
13034 echo "$as_me:13034: result: $cf_cv_struct_dirent64" >&5
13035 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13036         test "$cf_cv_struct_dirent64" = yes &&
13037 cat >>confdefs.h <<\EOF
13038 #define HAVE_STRUCT_DIRENT64 1
13039 EOF
13040
13041         fi
13042
13043 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13044 echo "$as_me:13044: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13045 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13046
13047 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13048 if test "${enable_tparm_varargs+set}" = set; then
13049   enableval="$enable_tparm_varargs"
13050   with_tparm_varargs=$enableval
13051 else
13052   with_tparm_varargs=yes
13053 fi;
13054 echo "$as_me:13054: result: $with_tparm_varargs" >&5
13055 echo "${ECHO_T}$with_tparm_varargs" >&6
13056 NCURSES_TPARM_VARARGS=0
13057 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13058
13059 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13060 if test "$with_ticlib" != no ; then
13061 echo "$as_me:13061: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13062 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13063
13064 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13065 if test "${enable_tic_depends+set}" = set; then
13066   enableval="$enable_tic_depends"
13067   with_tic_depends=$enableval
13068 else
13069   with_tic_depends=yes
13070 fi;
13071 echo "$as_me:13071: result: $with_tic_depends" >&5
13072 echo "${ECHO_T}$with_tic_depends" >&6
13073 else
13074         with_tic_depends=no
13075 fi
13076
13077 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13078 echo "$as_me:13078: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13079 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13080
13081 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13082 if test "${enable_wattr_macros+set}" = set; then
13083   enableval="$enable_wattr_macros"
13084   with_wattr_macros=$enableval
13085 else
13086   with_wattr_macros=yes
13087 fi;
13088 if [ "x$with_wattr_macros" != xyes ]; then
13089         NCURSES_WATTR_MACROS=0
13090         echo "$as_me:13090: result: yes" >&5
13091 echo "${ECHO_T}yes" >&6
13092 else
13093         NCURSES_WATTR_MACROS=1
13094         echo "$as_me:13094: result: no" >&5
13095 echo "${ECHO_T}no" >&6
13096 fi
13097
13098 echo "$as_me:13098: checking for X11 rgb file" >&5
13099 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13100
13101 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13102 if test "${with_x11_rgb+set}" = set; then
13103   withval="$with_x11_rgb"
13104   RGB_PATH=$withval
13105 else
13106   RGB_PATH=auto
13107 fi;
13108
13109 if test "x$RGB_PATH" = xauto
13110 then
13111         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13112         for cf_path in \
13113                 /opt/local/share/X11/rgb.txt \
13114                 /opt/X11/share/X11/rgb.txt \
13115                 /usr/share/X11/rgb.txt \
13116                 /usr/X11/share/X11/rgb.txt \
13117                 /usr/X11/lib/X11/rgb.txt \
13118                 /usr/lib/X11/rgb.txt \
13119                 /etc/X11/rgb.txt \
13120                 /usr/pkg/lib/X11/rgb.txt \
13121                 /usr/X11R7/lib/X11/rgb.txt \
13122                 /usr/X11R6/lib/X11/rgb.txt \
13123                 /usr/X11R5/lib/X11/rgb.txt \
13124                 /usr/X11R4/lib/X11/rgb.txt \
13125                 /usr/local/lib/X11/rgb.txt \
13126                 /usr/local/share/X11/rgb.txt \
13127                 /usr/lib64/X11/rgb.txt
13128         do
13129                 if test -f "$cf_path" ; then
13130                         RGB_PATH="$cf_path"
13131                         break
13132                 fi
13133         done
13134 else
13135         cf_path=$RGB_PATH
13136
13137 if test "x$prefix" != xNONE; then
13138         cf_path_syntax="$prefix"
13139 else
13140         cf_path_syntax="$ac_default_prefix"
13141 fi
13142
13143 case ".$cf_path" in
13144 (.\$\(*\)*|.\'*\'*)
13145         ;;
13146 (..|./*|.\\*)
13147         ;;
13148 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13149         ;;
13150 (.\${*prefix}*|.\${*dir}*)
13151         eval cf_path="$cf_path"
13152         case ".$cf_path" in
13153         (.NONE/*)
13154                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13155                 ;;
13156         esac
13157         ;;
13158 (.no|.NONE/*)
13159         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13160         ;;
13161 (*)
13162         { { echo "$as_me:13162: error: expected a pathname, not \"$cf_path\"" >&5
13163 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13164    { (exit 1); exit 1; }; }
13165         ;;
13166 esac
13167
13168 fi
13169
13170 echo "$as_me:13170: result: $RGB_PATH" >&5
13171 echo "${ECHO_T}$RGB_PATH" >&6
13172
13173 cat >>confdefs.h <<EOF
13174 #define RGB_PATH "$cf_path"
13175 EOF
13176
13177 no_x11_rgb=
13178 if test "$RGB_PATH" = no
13179 then
13180         no_x11_rgb="#"
13181 fi
13182
13183 ###   use option --with-bool to override bool's type
13184 echo "$as_me:13184: checking for type of bool" >&5
13185 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13186
13187 # Check whether --with-bool or --without-bool was given.
13188 if test "${with_bool+set}" = set; then
13189   withval="$with_bool"
13190   NCURSES_BOOL="$withval"
13191 else
13192   NCURSES_BOOL=auto
13193 fi;
13194 echo "$as_me:13194: result: $NCURSES_BOOL" >&5
13195 echo "${ECHO_T}$NCURSES_BOOL" >&6
13196
13197 echo "$as_me:13197: checking for alternate terminal capabilities file" >&5
13198 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13199
13200 # Check whether --with-caps or --without-caps was given.
13201 if test "${with_caps+set}" = set; then
13202   withval="$with_caps"
13203   TERMINFO_CAPS=Caps.$withval
13204 else
13205   TERMINFO_CAPS=Caps
13206 fi;
13207 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13208 echo "$as_me:13208: result: $TERMINFO_CAPS" >&5
13209 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13210
13211 ###   use option --with-chtype to override chtype's type
13212 echo "$as_me:13212: checking for type of chtype" >&5
13213 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13214
13215 # Check whether --with-chtype or --without-chtype was given.
13216 if test "${with_chtype+set}" = set; then
13217   withval="$with_chtype"
13218   NCURSES_CHTYPE="$withval"
13219 else
13220   NCURSES_CHTYPE=$cf_dft_chtype
13221 fi;
13222 echo "$as_me:13222: result: $NCURSES_CHTYPE" >&5
13223 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13224
13225 ###   use option --with-ospeed to override ospeed's type
13226 echo "$as_me:13226: checking for type of ospeed" >&5
13227 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13228
13229 # Check whether --with-ospeed or --without-ospeed was given.
13230 if test "${with_ospeed+set}" = set; then
13231   withval="$with_ospeed"
13232   NCURSES_OSPEED="$withval"
13233 else
13234   NCURSES_OSPEED=short
13235 fi;
13236 echo "$as_me:13236: result: $NCURSES_OSPEED" >&5
13237 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13238
13239 ###   use option --with-mmask-t to override mmask_t's type
13240 echo "$as_me:13240: checking for type of mmask_t" >&5
13241 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13242
13243 # Check whether --with-mmask-t or --without-mmask-t was given.
13244 if test "${with_mmask_t+set}" = set; then
13245   withval="$with_mmask_t"
13246   NCURSES_MMASK_T="$withval"
13247 else
13248   NCURSES_MMASK_T=$cf_dft_mmask_t
13249 fi;
13250 echo "$as_me:13250: result: $NCURSES_MMASK_T" >&5
13251 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13252
13253 ###   use option --with-ccharw-max to override CCHARW_MAX size
13254 echo "$as_me:13254: checking for size CCHARW_MAX" >&5
13255 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13256
13257 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13258 if test "${with_ccharw_max+set}" = set; then
13259   withval="$with_ccharw_max"
13260   NCURSES_CCHARW_MAX="$withval"
13261 else
13262   NCURSES_CCHARW_MAX=5
13263 fi;
13264 echo "$as_me:13264: result: $NCURSES_CCHARW_MAX" >&5
13265 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13266
13267 echo "$as_me:13267: checking for ANSI C header files" >&5
13268 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13269 if test "${ac_cv_header_stdc+set}" = set; then
13270   echo $ECHO_N "(cached) $ECHO_C" >&6
13271 else
13272   cat >conftest.$ac_ext <<_ACEOF
13273 #line 13273 "configure"
13274 #include "confdefs.h"
13275 #include <stdlib.h>
13276 #include <stdarg.h>
13277 #include <string.h>
13278 #include <float.h>
13279
13280 _ACEOF
13281 if { (eval echo "$as_me:13281: \"$ac_cpp conftest.$ac_ext\"") >&5
13282   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13283   ac_status=$?
13284   egrep -v '^ *\+' conftest.er1 >conftest.err
13285   rm -f conftest.er1
13286   cat conftest.err >&5
13287   echo "$as_me:13287: \$? = $ac_status" >&5
13288   (exit $ac_status); } >/dev/null; then
13289   if test -s conftest.err; then
13290     ac_cpp_err=$ac_c_preproc_warn_flag
13291   else
13292     ac_cpp_err=
13293   fi
13294 else
13295   ac_cpp_err=yes
13296 fi
13297 if test -z "$ac_cpp_err"; then
13298   ac_cv_header_stdc=yes
13299 else
13300   echo "$as_me: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   ac_cv_header_stdc=no
13303 fi
13304 rm -f conftest.err conftest.$ac_ext
13305
13306 if test $ac_cv_header_stdc = yes; then
13307   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13308   cat >conftest.$ac_ext <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311 #include <string.h>
13312
13313 _ACEOF
13314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13315   egrep "memchr" >/dev/null 2>&1; then
13316   :
13317 else
13318   ac_cv_header_stdc=no
13319 fi
13320 rm -rf conftest*
13321
13322 fi
13323
13324 if test $ac_cv_header_stdc = yes; then
13325   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13326   cat >conftest.$ac_ext <<_ACEOF
13327 #line 13327 "configure"
13328 #include "confdefs.h"
13329 #include <stdlib.h>
13330
13331 _ACEOF
13332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13333   egrep "free" >/dev/null 2>&1; then
13334   :
13335 else
13336   ac_cv_header_stdc=no
13337 fi
13338 rm -rf conftest*
13339
13340 fi
13341
13342 if test $ac_cv_header_stdc = yes; then
13343   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13344   if test "$cross_compiling" = yes; then
13345   :
13346 else
13347   cat >conftest.$ac_ext <<_ACEOF
13348 #line 13348 "configure"
13349 #include "confdefs.h"
13350 #include <ctype.h>
13351 #if ((' ' & 0x0FF) == 0x020)
13352 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13353 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13354 #else
13355 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13356                      || ('j' <= (c) && (c) <= 'r') \
13357                      || ('s' <= (c) && (c) <= 'z'))
13358 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13359 #endif
13360
13361 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13362 int
13363 main (void)
13364 {
13365   int i;
13366   for (i = 0; i < 256; i++)
13367     if (XOR (islower (i), ISLOWER (i))
13368         || toupper (i) != TOUPPER (i))
13369       $ac_main_return(2);
13370   $ac_main_return (0);
13371 }
13372 _ACEOF
13373 rm -f conftest$ac_exeext
13374 if { (eval echo "$as_me:13374: \"$ac_link\"") >&5
13375   (eval $ac_link) 2>&5
13376   ac_status=$?
13377   echo "$as_me:13377: \$? = $ac_status" >&5
13378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13379   { (eval echo "$as_me:13379: \"$ac_try\"") >&5
13380   (eval $ac_try) 2>&5
13381   ac_status=$?
13382   echo "$as_me:13382: \$? = $ac_status" >&5
13383   (exit $ac_status); }; }; then
13384   :
13385 else
13386   echo "$as_me: program exited with status $ac_status" >&5
13387 echo "$as_me: failed program was:" >&5
13388 cat conftest.$ac_ext >&5
13389 ac_cv_header_stdc=no
13390 fi
13391 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13392 fi
13393 fi
13394 fi
13395 echo "$as_me:13395: result: $ac_cv_header_stdc" >&5
13396 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13397 if test $ac_cv_header_stdc = yes; then
13398
13399 cat >>confdefs.h <<\EOF
13400 #define STDC_HEADERS 1
13401 EOF
13402
13403 fi
13404
13405 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13406
13407 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13408                   inttypes.h stdint.h unistd.h
13409 do
13410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13411 echo "$as_me:13411: checking for $ac_header" >&5
13412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13414   echo $ECHO_N "(cached) $ECHO_C" >&6
13415 else
13416   cat >conftest.$ac_ext <<_ACEOF
13417 #line 13417 "configure"
13418 #include "confdefs.h"
13419 $ac_includes_default
13420 #include <$ac_header>
13421 _ACEOF
13422 rm -f conftest.$ac_objext
13423 if { (eval echo "$as_me:13423: \"$ac_compile\"") >&5
13424   (eval $ac_compile) 2>&5
13425   ac_status=$?
13426   echo "$as_me:13426: \$? = $ac_status" >&5
13427   (exit $ac_status); } &&
13428          { ac_try='test -s conftest.$ac_objext'
13429   { (eval echo "$as_me:13429: \"$ac_try\"") >&5
13430   (eval $ac_try) 2>&5
13431   ac_status=$?
13432   echo "$as_me:13432: \$? = $ac_status" >&5
13433   (exit $ac_status); }; }; then
13434   eval "$as_ac_Header=yes"
13435 else
13436   echo "$as_me: failed program was:" >&5
13437 cat conftest.$ac_ext >&5
13438 eval "$as_ac_Header=no"
13439 fi
13440 rm -f conftest.$ac_objext conftest.$ac_ext
13441 fi
13442 echo "$as_me:13442: result: `eval echo '${'$as_ac_Header'}'`" >&5
13443 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13444 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13445   cat >>confdefs.h <<EOF
13446 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13447 EOF
13448
13449 fi
13450 done
13451
13452 echo "$as_me:13452: checking for signed char" >&5
13453 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13454 if test "${ac_cv_type_signed_char+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457   cat >conftest.$ac_ext <<_ACEOF
13458 #line 13458 "configure"
13459 #include "confdefs.h"
13460 $ac_includes_default
13461 int
13462 main (void)
13463 {
13464 if ((signed char *) 0)
13465   return 0;
13466 if (sizeof (signed char))
13467   return 0;
13468   ;
13469   return 0;
13470 }
13471 _ACEOF
13472 rm -f conftest.$ac_objext
13473 if { (eval echo "$as_me:13473: \"$ac_compile\"") >&5
13474   (eval $ac_compile) 2>&5
13475   ac_status=$?
13476   echo "$as_me:13476: \$? = $ac_status" >&5
13477   (exit $ac_status); } &&
13478          { ac_try='test -s conftest.$ac_objext'
13479   { (eval echo "$as_me:13479: \"$ac_try\"") >&5
13480   (eval $ac_try) 2>&5
13481   ac_status=$?
13482   echo "$as_me:13482: \$? = $ac_status" >&5
13483   (exit $ac_status); }; }; then
13484   ac_cv_type_signed_char=yes
13485 else
13486   echo "$as_me: failed program was:" >&5
13487 cat conftest.$ac_ext >&5
13488 ac_cv_type_signed_char=no
13489 fi
13490 rm -f conftest.$ac_objext conftest.$ac_ext
13491 fi
13492 echo "$as_me:13492: result: $ac_cv_type_signed_char" >&5
13493 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13494
13495 echo "$as_me:13495: checking size of signed char" >&5
13496 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13497 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500   if test "$ac_cv_type_signed_char" = yes; then
13501   if test "$cross_compiling" = yes; then
13502   # Depending upon the size, compute the lo and hi bounds.
13503 cat >conftest.$ac_ext <<_ACEOF
13504 #line 13504 "configure"
13505 #include "confdefs.h"
13506 $ac_includes_default
13507 int
13508 main (void)
13509 {
13510 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f conftest.$ac_objext
13516 if { (eval echo "$as_me:13516: \"$ac_compile\"") >&5
13517   (eval $ac_compile) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit $ac_status); } &&
13521          { ac_try='test -s conftest.$ac_objext'
13522   { (eval echo "$as_me:13522: \"$ac_try\"") >&5
13523   (eval $ac_try) 2>&5
13524   ac_status=$?
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit $ac_status); }; }; then
13527   ac_lo=0 ac_mid=0
13528   while :; do
13529     cat >conftest.$ac_ext <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532 $ac_includes_default
13533 int
13534 main (void)
13535 {
13536 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13537   ;
13538   return 0;
13539 }
13540 _ACEOF
13541 rm -f conftest.$ac_objext
13542 if { (eval echo "$as_me:13542: \"$ac_compile\"") >&5
13543   (eval $ac_compile) 2>&5
13544   ac_status=$?
13545   echo "$as_me:13545: \$? = $ac_status" >&5
13546   (exit $ac_status); } &&
13547          { ac_try='test -s conftest.$ac_objext'
13548   { (eval echo "$as_me:13548: \"$ac_try\"") >&5
13549   (eval $ac_try) 2>&5
13550   ac_status=$?
13551   echo "$as_me:13551: \$? = $ac_status" >&5
13552   (exit $ac_status); }; }; then
13553   ac_hi=$ac_mid; break
13554 else
13555   echo "$as_me: failed program was:" >&5
13556 cat conftest.$ac_ext >&5
13557 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13558 fi
13559 rm -f conftest.$ac_objext conftest.$ac_ext
13560   done
13561 else
13562   echo "$as_me: failed program was:" >&5
13563 cat conftest.$ac_ext >&5
13564 ac_hi=-1 ac_mid=-1
13565   while :; do
13566     cat >conftest.$ac_ext <<_ACEOF
13567 #line 13567 "configure"
13568 #include "confdefs.h"
13569 $ac_includes_default
13570 int
13571 main (void)
13572 {
13573 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13574   ;
13575   return 0;
13576 }
13577 _ACEOF
13578 rm -f conftest.$ac_objext
13579 if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
13580   (eval $ac_compile) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit $ac_status); } &&
13584          { ac_try='test -s conftest.$ac_objext'
13585   { (eval echo "$as_me:13585: \"$ac_try\"") >&5
13586   (eval $ac_try) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); }; }; then
13590   ac_lo=$ac_mid; break
13591 else
13592   echo "$as_me: failed program was:" >&5
13593 cat conftest.$ac_ext >&5
13594 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13595 fi
13596 rm -f conftest.$ac_objext conftest.$ac_ext
13597   done
13598 fi
13599 rm -f conftest.$ac_objext conftest.$ac_ext
13600 # Binary search between lo and hi bounds.
13601 while test "x$ac_lo" != "x$ac_hi"; do
13602   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13603   cat >conftest.$ac_ext <<_ACEOF
13604 #line 13604 "configure"
13605 #include "confdefs.h"
13606 $ac_includes_default
13607 int
13608 main (void)
13609 {
13610 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13611   ;
13612   return 0;
13613 }
13614 _ACEOF
13615 rm -f conftest.$ac_objext
13616 if { (eval echo "$as_me:13616: \"$ac_compile\"") >&5
13617   (eval $ac_compile) 2>&5
13618   ac_status=$?
13619   echo "$as_me:13619: \$? = $ac_status" >&5
13620   (exit $ac_status); } &&
13621          { ac_try='test -s conftest.$ac_objext'
13622   { (eval echo "$as_me:13622: \"$ac_try\"") >&5
13623   (eval $ac_try) 2>&5
13624   ac_status=$?
13625   echo "$as_me:13625: \$? = $ac_status" >&5
13626   (exit $ac_status); }; }; then
13627   ac_hi=$ac_mid
13628 else
13629   echo "$as_me: failed program was:" >&5
13630 cat conftest.$ac_ext >&5
13631 ac_lo=`expr $ac_mid + 1`
13632 fi
13633 rm -f conftest.$ac_objext conftest.$ac_ext
13634 done
13635 ac_cv_sizeof_signed_char=$ac_lo
13636 else
13637   if test "$cross_compiling" = yes; then
13638   { { echo "$as_me:13638: error: cannot run test program while cross compiling" >&5
13639 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13640    { (exit 1); exit 1; }; }
13641 else
13642   cat >conftest.$ac_ext <<_ACEOF
13643 #line 13643 "configure"
13644 #include "confdefs.h"
13645 $ac_includes_default
13646 int
13647 main (void)
13648 {
13649 FILE *f = fopen ("conftest.val", "w");
13650 if (!f)
13651   $ac_main_return (1);
13652 fprintf (f, "%d", (sizeof (signed char)));
13653 fclose (f);
13654   ;
13655   return 0;
13656 }
13657 _ACEOF
13658 rm -f conftest$ac_exeext
13659 if { (eval echo "$as_me:13659: \"$ac_link\"") >&5
13660   (eval $ac_link) 2>&5
13661   ac_status=$?
13662   echo "$as_me:13662: \$? = $ac_status" >&5
13663   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13664   { (eval echo "$as_me:13664: \"$ac_try\"") >&5
13665   (eval $ac_try) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); }; }; then
13669   ac_cv_sizeof_signed_char=`cat conftest.val`
13670 else
13671   echo "$as_me: program exited with status $ac_status" >&5
13672 echo "$as_me: failed program was:" >&5
13673 cat conftest.$ac_ext >&5
13674 fi
13675 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13676 fi
13677 fi
13678 rm -f conftest.val
13679 else
13680   ac_cv_sizeof_signed_char=0
13681 fi
13682 fi
13683 echo "$as_me:13683: result: $ac_cv_sizeof_signed_char" >&5
13684 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13685 cat >>confdefs.h <<EOF
13686 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13687 EOF
13688
13689 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13690         NCURSES_SBOOL="signed char"
13691 else
13692         NCURSES_SBOOL="char"
13693 fi
13694 echo "$as_me:13694: checking if you want to use signed Boolean array in term.h" >&5
13695 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13696
13697 # Check whether --enable-signed-char or --disable-signed-char was given.
13698 if test "${enable_signed_char+set}" = set; then
13699   enableval="$enable_signed_char"
13700   with_signed_char=$enableval
13701 else
13702   with_signed_char=no
13703 fi;
13704 echo "$as_me:13704: result: $with_signed_char" >&5
13705 echo "${ECHO_T}$with_signed_char" >&6
13706 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13707
13708 ###   use option --with-tparm-arg to override tparm's argument type
13709 echo "$as_me:13709: checking for type of tparm args" >&5
13710 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13711
13712 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13713 if test "${with_tparm_arg+set}" = set; then
13714   withval="$with_tparm_arg"
13715   NCURSES_TPARM_ARG="$withval"
13716 else
13717   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13718 fi;
13719 echo "$as_me:13719: result: $NCURSES_TPARM_ARG" >&5
13720 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13721
13722 ### Enable compiling-in rcs id's
13723 echo "$as_me:13723: checking if RCS identifiers should be compiled-in" >&5
13724 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13725
13726 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13727 if test "${with_rcs_ids+set}" = set; then
13728   withval="$with_rcs_ids"
13729   with_rcs_ids=$withval
13730 else
13731   with_rcs_ids=no
13732 fi;
13733 echo "$as_me:13733: result: $with_rcs_ids" >&5
13734 echo "${ECHO_T}$with_rcs_ids" >&6
13735 test "x$with_rcs_ids" = xyes &&
13736 cat >>confdefs.h <<\EOF
13737 #define USE_RCS_IDS 1
13738 EOF
13739
13740 ###############################################################################
13741
13742 echo "$as_me:13742: checking format of man-pages" >&5
13743 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13744
13745 # Check whether --with-manpage-format or --without-manpage-format was given.
13746 if test "${with_manpage_format+set}" = set; then
13747   withval="$with_manpage_format"
13748   MANPAGE_FORMAT=$withval
13749 else
13750   MANPAGE_FORMAT=unknown
13751 fi;
13752
13753 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13754 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13755
13756 cf_unknown=
13757
13758 case $MANPAGE_FORMAT in
13759 (unknown)
13760         if test -z "$MANPATH" ; then
13761                 MANPATH="/usr/man:/usr/share/man"
13762         fi
13763
13764         # look for the 'date' man-page (it's most likely to be installed!)
13765         MANPAGE_FORMAT=
13766         cf_preform=no
13767         cf_catonly=yes
13768         cf_example=date
13769
13770         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13771         for cf_dir in $MANPATH; do
13772                 test -z "$cf_dir" && cf_dir=/usr/man
13773                 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
13774                 do
13775                         cf_test=`echo $cf_name | sed -e 's/*//'`
13776                         if test "x$cf_test" = "x$cf_name" ; then
13777
13778                                 case "$cf_name" in
13779                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13780                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13781                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13782                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13783                                 esac
13784
13785                                 case "$cf_name" in
13786                                 ($cf_dir/man*)
13787                                         cf_catonly=no
13788                                         ;;
13789                                 ($cf_dir/cat*)
13790                                         cf_preform=yes
13791                                         ;;
13792                                 esac
13793                                 break
13794                         fi
13795
13796                         # if we found a match in either man* or cat*, stop looking
13797                         if test -n "$MANPAGE_FORMAT" ; then
13798                                 cf_found=no
13799                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13800                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13801                                 case "$cf_name" in
13802                                 ($cf_dir/cat*)
13803                                         cf_found=yes
13804                                         ;;
13805                                 esac
13806                                 test $cf_found=yes && break
13807                         fi
13808                 done
13809                 # only check the first directory in $MANPATH where we find manpages
13810                 if test -n "$MANPAGE_FORMAT" ; then
13811                         break
13812                 fi
13813         done
13814         # if we did not find the example, just assume it is normal
13815         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13816         IFS="$ac_save_ifs"
13817         ;;
13818 (*)
13819         for cf_option in $MANPAGE_FORMAT; do
13820         case $cf_option in
13821         (gzip|compress|BSDI|normal|formatted|catonly)
13822                 ;;
13823         (*)
13824                 cf_unknown="$cf_unknown $cf_option"
13825                 ;;
13826         esac
13827         done
13828         ;;
13829 esac
13830
13831 echo "$as_me:13831: result: $MANPAGE_FORMAT" >&5
13832 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13833 if test -n "$cf_unknown" ; then
13834         { echo "$as_me:13834: WARNING: Unexpected manpage-format $cf_unknown" >&5
13835 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13836 fi
13837
13838 echo "$as_me:13838: checking for manpage renaming" >&5
13839 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13840
13841 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13842 if test "${with_manpage_renames+set}" = set; then
13843   withval="$with_manpage_renames"
13844   MANPAGE_RENAMES=$withval
13845 else
13846   MANPAGE_RENAMES=yes
13847 fi;
13848
13849 case ".$MANPAGE_RENAMES" in
13850 (.no)
13851         ;;
13852 (.|.yes)
13853         # Debian 'man' program?
13854         if test -f /etc/debian_version ; then
13855                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13856         else
13857                 MANPAGE_RENAMES=no
13858         fi
13859         ;;
13860 esac
13861
13862 if test "$MANPAGE_RENAMES" != no ; then
13863         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13864                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13865         elif test ! -f $MANPAGE_RENAMES ; then
13866                 { { echo "$as_me:13866: error: not a filename: $MANPAGE_RENAMES" >&5
13867 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13868    { (exit 1); exit 1; }; }
13869         fi
13870
13871         test ! -d man && mkdir man
13872
13873         # Construct a sed-script to perform renaming within man-pages
13874         if test -n "$MANPAGE_RENAMES" ; then
13875                 test ! -d man && mkdir man
13876                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13877         fi
13878 fi
13879
13880 echo "$as_me:13880: result: $MANPAGE_RENAMES" >&5
13881 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13882
13883 echo "$as_me:13883: checking if manpage aliases will be installed" >&5
13884 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13885
13886 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13887 if test "${with_manpage_aliases+set}" = set; then
13888   withval="$with_manpage_aliases"
13889   MANPAGE_ALIASES=$withval
13890 else
13891   MANPAGE_ALIASES=yes
13892 fi;
13893
13894 echo "$as_me:13894: result: $MANPAGE_ALIASES" >&5
13895 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13896
13897 case "x$LN_S" in
13898 (xln*)
13899         cf_use_symlinks=yes
13900         ;;
13901 (*)
13902         cf_use_symlinks=no
13903         ;;
13904 esac
13905
13906 MANPAGE_SYMLINKS=no
13907 if test "$MANPAGE_ALIASES" = yes ; then
13908 echo "$as_me:13908: checking if manpage symlinks should be used" >&5
13909 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13910
13911 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13912 if test "${with_manpage_symlinks+set}" = set; then
13913   withval="$with_manpage_symlinks"
13914   MANPAGE_SYMLINKS=$withval
13915 else
13916   MANPAGE_SYMLINKS=$cf_use_symlinks
13917 fi;
13918
13919 if test "$$cf_use_symlinks" = no; then
13920 if test "$MANPAGE_SYMLINKS" = yes ; then
13921         { echo "$as_me:13921: WARNING: cannot make symlinks" >&5
13922 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13923         MANPAGE_SYMLINKS=no
13924 fi
13925 fi
13926
13927 echo "$as_me:13927: result: $MANPAGE_SYMLINKS" >&5
13928 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13929 fi
13930
13931 echo "$as_me:13931: checking for manpage tbl" >&5
13932 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13933
13934 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13935 if test "${with_manpage_tbl+set}" = set; then
13936   withval="$with_manpage_tbl"
13937   MANPAGE_TBL=$withval
13938 else
13939   MANPAGE_TBL=no
13940 fi;
13941
13942 echo "$as_me:13942: result: $MANPAGE_TBL" >&5
13943 echo "${ECHO_T}$MANPAGE_TBL" >&6
13944
13945 if test "$prefix" = "NONE" ; then
13946         cf_prefix="$ac_default_prefix"
13947 else
13948         cf_prefix="$prefix"
13949 fi
13950
13951 case "$MANPAGE_FORMAT" in
13952 (*catonly*)
13953         cf_format=yes
13954         cf_inboth=no
13955         ;;
13956 (*formatted*)
13957         cf_format=yes
13958         cf_inboth=yes
13959         ;;
13960 (*)
13961         cf_format=no
13962         cf_inboth=no
13963         ;;
13964 esac
13965
13966 test ! -d man && mkdir man
13967
13968 cf_so_strip=
13969 cf_compress=
13970 case "$MANPAGE_FORMAT" in
13971 (*compress*)
13972         cf_so_strip="Z"
13973         cf_compress=compress
13974         ;;
13975 (*gzip*)
13976         cf_so_strip="gz"
13977         cf_compress=gzip
13978         ;;
13979 esac
13980
13981 cf_edit_man=./edit_man.sh
13982 cf_man_alias=`pwd`/man_alias.sed
13983
13984 cat >$cf_edit_man <<CF_EOF
13985 #! $SHELL
13986 # this script is generated by the configure-script CF_MAN_PAGES macro.
13987
13988 prefix="$cf_prefix"
13989 datarootdir="$datarootdir"
13990 datadir="$datadir"
13991
13992 NCURSES_MAJOR="$NCURSES_MAJOR"
13993 NCURSES_MINOR="$NCURSES_MINOR"
13994 NCURSES_PATCH="$NCURSES_PATCH"
13995
13996 NCURSES_OSPEED="$NCURSES_OSPEED"
13997 TERMINFO="$TERMINFO"
13998
13999 INSTALL="$INSTALL"
14000 INSTALL_DATA="$INSTALL_DATA"
14001
14002 transform="$program_transform_name"
14003
14004 TMP=\${TMPDIR:=/tmp}/man\$\$
14005 trap "rm -f \$TMP" 0 1 2 3 15
14006
14007 form=\$1
14008 shift || exit 1
14009
14010 verb=\$1
14011 shift || exit 1
14012
14013 mandir=\$1
14014 shift || exit 1
14015
14016 srcdir=\$1
14017 top_srcdir=\$srcdir/..
14018 shift || exit 1
14019
14020 if test "\$form" = normal ; then
14021         if test "$cf_format" = yes ; then
14022         if test "$cf_inboth" = no ; then
14023                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14024                 exit $?
14025         fi
14026         fi
14027         cf_subdir=\$mandir/man
14028         cf_tables=$MANPAGE_TBL
14029 else
14030         cf_subdir=\$mandir/cat
14031         cf_tables=yes
14032 fi
14033
14034 # process the list of source-files
14035 for i in \$* ; do
14036 case \$i in
14037 (*.orig|*.rej) ;;
14038 (*.[0-9]*)
14039         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14040         if test \$verb = installing ; then
14041         if test ! -d \$cf_subdir\${section} ; then
14042                 mkdir -p \$cf_subdir\$section
14043         fi
14044         fi
14045
14046         # replace variables in man page
14047         if test ! -f $cf_man_alias ; then
14048 cat >>$cf_man_alias <<-CF_EOF2
14049                 s,@DATADIR@,\$datadir,g
14050                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14051                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14052                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14053                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14054                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14055                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14056 CF_EOF
14057
14058         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14059         do
14060                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14061                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14062 cat >>$cf_edit_man <<-CF_EOF
14063                 s,@$cf_NAME@,$cf_name,g
14064 CF_EOF
14065         done
14066
14067 cat >>$cf_edit_man <<CF_EOF
14068 CF_EOF2
14069                 echo "...made $cf_man_alias"
14070         fi
14071
14072         aliases=
14073         cf_source=\`basename \$i\`
14074         inalias=\$cf_source
14075         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14076         if test ! -f \$inalias ; then
14077                 echo .. skipped \$cf_source
14078                 continue
14079         fi
14080 CF_EOF
14081
14082 if test "$MANPAGE_ALIASES" != no ; then
14083 cat >>$cf_edit_man <<CF_EOF
14084         nCurses=ignore.3x
14085         test $with_curses_h = yes && nCurses=ncurses.3x
14086         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14087 CF_EOF
14088 fi
14089
14090 if test "$MANPAGE_RENAMES" = no ; then
14091 cat >>$cf_edit_man <<CF_EOF
14092         # perform program transformations for section 1 man pages
14093         if test \$section = 1 ; then
14094                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14095         else
14096                 cf_target=\$cf_subdir\${section}/\$cf_source
14097         fi
14098 CF_EOF
14099 else
14100 cat >>$cf_edit_man <<CF_EOF
14101         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14102         if test -z "\$cf_target" ; then
14103                 echo '? missing rename for '\$cf_source
14104                 cf_target="\$cf_source"
14105         fi
14106         cf_target="\$cf_subdir\${section}/\${cf_target}"
14107
14108 CF_EOF
14109 fi
14110
14111 cat >>$cf_edit_man <<CF_EOF
14112         sed     -f $cf_man_alias \\
14113 CF_EOF
14114
14115 if test -f $MANPAGE_RENAMES ; then
14116 cat >>$cf_edit_man <<CF_EOF
14117                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14118 CF_EOF
14119 else
14120 cat >>$cf_edit_man <<CF_EOF
14121                 < \$i >\$TMP
14122 CF_EOF
14123 fi
14124
14125 cat >>$cf_edit_man <<CF_EOF
14126 if test \$cf_tables = yes ; then
14127         tbl \$TMP >\$TMP.out
14128         mv \$TMP.out \$TMP
14129 fi
14130 CF_EOF
14131
14132 if test $with_overwrite != yes ; then
14133 cat >>$cf_edit_man <<CF_EOF
14134         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14135         mv \$TMP.out \$TMP
14136 CF_EOF
14137 fi
14138
14139 if test $with_curses_h != yes ; then
14140 cat >>$cf_edit_man <<CF_EOF
14141         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14142         mv \$TMP.out \$TMP
14143 CF_EOF
14144 fi
14145
14146 cat >>$cf_edit_man <<CF_EOF
14147         if test \$form = format ; then
14148                 nroff -man \$TMP >\$TMP.out
14149                 mv \$TMP.out \$TMP
14150         fi
14151 CF_EOF
14152
14153 if test -n "$cf_compress" ; then
14154 cat >>$cf_edit_man <<CF_EOF
14155         if test \$verb = installing ; then
14156         if ( $cf_compress -f \$TMP )
14157         then
14158                 mv \$TMP.$cf_so_strip \$TMP
14159         fi
14160         fi
14161         cf_target="\$cf_target.$cf_so_strip"
14162 CF_EOF
14163 fi
14164
14165 case "$MANPAGE_FORMAT" in
14166 (*BSDI*)
14167 cat >>$cf_edit_man <<CF_EOF
14168         if test \$form = format ; then
14169                 # BSDI installs only .0 suffixes in the cat directories
14170                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14171         fi
14172 CF_EOF
14173   ;;
14174 esac
14175
14176 cat >>$cf_edit_man <<CF_EOF
14177         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14178         if test \$verb = installing ; then
14179                 echo \$verb \$cf_target
14180                 \$INSTALL_DATA \$TMP \$cf_target
14181                 test -d \$cf_subdir\${section} &&
14182                 test -n "\$aliases" && (
14183                         cd \$cf_subdir\${section} && (
14184                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14185                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14186                                 cf_target=\`basename \$cf_target\`
14187                                 for cf_alias in \$aliases
14188                                 do
14189                                         if test \$section = 1 ; then
14190                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14191                                         fi
14192
14193                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14194                                                 if test -f \$cf_alias\${suffix} ; then
14195                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14196                                                         then
14197                                                                 continue
14198                                                         fi
14199                                                 fi
14200                                                 echo .. \$verb alias \$cf_alias\${suffix}
14201 CF_EOF
14202 case "x$LN_S" in
14203 (*-f)
14204 cat >>$cf_edit_man <<CF_EOF
14205                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14206 CF_EOF
14207         ;;
14208 (*)
14209 cat >>$cf_edit_man <<CF_EOF
14210                                                 rm -f \$cf_alias\${suffix}
14211                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14212 CF_EOF
14213         ;;
14214 esac
14215 cat >>$cf_edit_man <<CF_EOF
14216                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14217                                                 echo ".so \$cf_source" >\$TMP
14218 CF_EOF
14219 if test -n "$cf_compress" ; then
14220 cat >>$cf_edit_man <<CF_EOF
14221                                                 if test -n "$cf_so_strip" ; then
14222                                                         $cf_compress -f \$TMP
14223                                                         mv \$TMP.$cf_so_strip \$TMP
14224                                                 fi
14225 CF_EOF
14226 fi
14227 cat >>$cf_edit_man <<CF_EOF
14228                                                 echo .. \$verb alias \$cf_alias\${suffix}
14229                                                 rm -f \$cf_alias\${suffix}
14230                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14231                                         fi
14232                                 done
14233                         )
14234                 )
14235         elif test \$verb = removing ; then
14236                 test -f \$cf_target && (
14237                         echo \$verb \$cf_target
14238                         rm -f \$cf_target
14239                 )
14240                 test -d \$cf_subdir\${section} &&
14241                 test -n "\$aliases" && (
14242                         cd \$cf_subdir\${section} && (
14243                                 for cf_alias in \$aliases
14244                                 do
14245                                         if test \$section = 1 ; then
14246                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14247                                         fi
14248
14249                                         echo .. \$verb alias \$cf_alias\${suffix}
14250                                         rm -f \$cf_alias\${suffix}
14251                                 done
14252                         )
14253                 )
14254         else
14255 #               echo ".hy 0"
14256                 cat \$TMP
14257         fi
14258         ;;
14259 esac
14260 done
14261
14262 if test $cf_inboth = yes ; then
14263 if test \$form != format ; then
14264         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14265 fi
14266 fi
14267
14268 exit 0
14269 CF_EOF
14270 chmod 755 $cf_edit_man
14271
14272 ###############################################################################
14273
14274 ### Note that some functions (such as const) are normally disabled anyway.
14275 echo "$as_me:14275: checking if you want to build with function extensions" >&5
14276 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14277
14278 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14279 if test "${enable_ext_funcs+set}" = set; then
14280   enableval="$enable_ext_funcs"
14281   with_ext_funcs=$enableval
14282 else
14283   with_ext_funcs=yes
14284 fi;
14285 echo "$as_me:14285: result: $with_ext_funcs" >&5
14286 echo "${ECHO_T}$with_ext_funcs" >&6
14287 if test "x$with_ext_funcs" = xyes ; then
14288         NCURSES_EXT_FUNCS=1
14289
14290 cat >>confdefs.h <<\EOF
14291 #define NCURSES_EXT_FUNCS 1
14292 EOF
14293
14294 cat >>confdefs.h <<\EOF
14295 #define HAVE_ASSUME_DEFAULT_COLORS 1
14296 EOF
14297
14298 cat >>confdefs.h <<\EOF
14299 #define HAVE_CURSES_VERSION 1
14300 EOF
14301
14302 cat >>confdefs.h <<\EOF
14303 #define HAVE_HAS_KEY 1
14304 EOF
14305
14306 cat >>confdefs.h <<\EOF
14307 #define HAVE_RESIZETERM 1
14308 EOF
14309
14310 cat >>confdefs.h <<\EOF
14311 #define HAVE_RESIZE_TERM 1
14312 EOF
14313
14314 cat >>confdefs.h <<\EOF
14315 #define HAVE_TERM_ENTRY_H 1
14316 EOF
14317
14318 cat >>confdefs.h <<\EOF
14319 #define HAVE_USE_DEFAULT_COLORS 1
14320 EOF
14321
14322 cat >>confdefs.h <<\EOF
14323 #define HAVE_USE_EXTENDED_NAMES 1
14324 EOF
14325
14326 cat >>confdefs.h <<\EOF
14327 #define HAVE_USE_SCREEN 1
14328 EOF
14329
14330 cat >>confdefs.h <<\EOF
14331 #define HAVE_USE_WINDOW 1
14332 EOF
14333
14334 cat >>confdefs.h <<\EOF
14335 #define HAVE_WRESIZE 1
14336 EOF
14337
14338         GENERATED_EXT_FUNCS=generated
14339         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14340 else
14341         NCURSES_EXT_FUNCS=0
14342         GENERATED_EXT_FUNCS=
14343 fi
14344
14345 echo "$as_me:14345: checking if you want to build with SCREEN extensions" >&5
14346 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14347
14348 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14349 if test "${enable_sp_funcs+set}" = set; then
14350   enableval="$enable_sp_funcs"
14351   with_sp_funcs=$enableval
14352 else
14353   with_sp_funcs=$cf_dft_ext_spfuncs
14354 fi;
14355 echo "$as_me:14355: result: $with_sp_funcs" >&5
14356 echo "${ECHO_T}$with_sp_funcs" >&6
14357 if test "x$with_sp_funcs" = xyes ; then
14358         NCURSES_SP_FUNCS=1
14359
14360 cat >>confdefs.h <<\EOF
14361 #define NCURSES_SP_FUNCS 1
14362 EOF
14363
14364 cat >>confdefs.h <<\EOF
14365 #define HAVE_TPUTS_SP 1
14366 EOF
14367
14368         GENERATED_SP_FUNCS=generated
14369 else
14370         NCURSES_SP_FUNCS=0
14371         GENERATED_SP_FUNCS=
14372 fi
14373
14374 echo "$as_me:14374: checking if you want to build with terminal-driver" >&5
14375 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14376
14377 # Check whether --enable-term-driver or --disable-term-driver was given.
14378 if test "${enable_term_driver+set}" = set; then
14379   enableval="$enable_term_driver"
14380   with_term_driver=$enableval
14381 else
14382   with_term_driver=no
14383 fi;
14384 echo "$as_me:14384: result: $with_term_driver" >&5
14385 echo "${ECHO_T}$with_term_driver" >&6
14386 if test "x$with_term_driver" = xyes ; then
14387
14388 cat >>confdefs.h <<\EOF
14389 #define USE_TERM_DRIVER 1
14390 EOF
14391
14392         if test "x$with_termlib" != xno ; then
14393                 { { echo "$as_me:14393: error: The term-driver option conflicts with the termlib option" >&5
14394 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14395    { (exit 1); exit 1; }; }
14396         fi
14397         if test "x$with_sp_funcs" != xyes ; then
14398                 { { echo "$as_me:14398: error: The term-driver option relies upon sp-funcs" >&5
14399 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14400    { (exit 1); exit 1; }; }
14401         fi
14402 fi
14403
14404 ###   use option --enable-const to turn on use of const beyond that in XSI.
14405 echo "$as_me:14405: checking for extended use of const keyword" >&5
14406 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14407
14408 # Check whether --enable-const or --disable-const was given.
14409 if test "${enable_const+set}" = set; then
14410   enableval="$enable_const"
14411   with_ext_const=$enableval
14412 else
14413   with_ext_const=$cf_dft_ext_const
14414 fi;
14415 echo "$as_me:14415: result: $with_ext_const" >&5
14416 echo "${ECHO_T}$with_ext_const" >&6
14417 NCURSES_CONST='/*nothing*/'
14418 if test "x$with_ext_const" = xyes ; then
14419         NCURSES_CONST=const
14420 fi
14421
14422 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14423 echo "$as_me:14423: checking if you want to use extended colors" >&5
14424 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14425
14426 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14427 if test "${enable_ext_colors+set}" = set; then
14428   enableval="$enable_ext_colors"
14429   with_ext_colors=$enableval
14430 else
14431   with_ext_colors=$cf_dft_ext_colors
14432 fi;
14433 echo "$as_me:14433: result: $with_ext_colors" >&5
14434 echo "${ECHO_T}$with_ext_colors" >&6
14435 NCURSES_EXT_COLORS=0
14436 if test "x$with_ext_colors" = xyes ; then
14437         if test "x$with_widec" != xyes ; then
14438                 { echo "$as_me:14438: WARNING: This option applies only to wide-character library" >&5
14439 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14440         else
14441                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14442
14443 if test "${with_abi_version+set}" != set; then
14444         case $cf_cv_rel_version in
14445         (5.*)
14446                 cf_cv_rel_version=6.0
14447                 cf_cv_abi_version=6
14448                 { echo "$as_me:14448: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14449 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14450                 ;;
14451         esac
14452 fi
14453
14454                 NCURSES_EXT_COLORS=1
14455
14456 cat >>confdefs.h <<\EOF
14457 #define NCURSES_EXT_COLORS 1
14458 EOF
14459
14460 cat >>confdefs.h <<\EOF
14461 #define HAVE_ALLOC_PAIR 1
14462 EOF
14463
14464 cat >>confdefs.h <<\EOF
14465 #define HAVE_INIT_EXTENDED_COLOR 1
14466 EOF
14467
14468 cat >>confdefs.h <<\EOF
14469 #define HAVE_RESET_COLOR_PAIRS 1
14470 EOF
14471
14472         fi
14473 fi
14474
14475 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14476 echo "$as_me:14476: checking if you want to use extended mouse encoding" >&5
14477 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14478
14479 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14480 if test "${enable_ext_mouse+set}" = set; then
14481   enableval="$enable_ext_mouse"
14482   with_ext_mouse=$enableval
14483 else
14484   with_ext_mouse=$cf_dft_ext_mouse
14485 fi;
14486 echo "$as_me:14486: result: $with_ext_mouse" >&5
14487 echo "${ECHO_T}$with_ext_mouse" >&6
14488 NCURSES_MOUSE_VERSION=1
14489 if test "x$with_ext_mouse" = xyes ; then
14490         NCURSES_MOUSE_VERSION=2
14491
14492 if test "${with_abi_version+set}" != set; then
14493         case $cf_cv_rel_version in
14494         (5.*)
14495                 cf_cv_rel_version=6.0
14496                 cf_cv_abi_version=6
14497                 { echo "$as_me:14497: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14498 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14499                 ;;
14500         esac
14501 fi
14502
14503 fi
14504
14505 ###   use option --enable-ext-putwin to turn on extended screendumps
14506 echo "$as_me:14506: checking if you want to use extended putwin/screendump" >&5
14507 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14508
14509 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14510 if test "${enable_ext_putwin+set}" = set; then
14511   enableval="$enable_ext_putwin"
14512   with_ext_putwin=$enableval
14513 else
14514   with_ext_putwin=$cf_dft_ext_putwin
14515 fi;
14516 echo "$as_me:14516: result: $with_ext_putwin" >&5
14517 echo "${ECHO_T}$with_ext_putwin" >&6
14518 if test "x$with_ext_putwin" = xyes ; then
14519
14520 cat >>confdefs.h <<\EOF
14521 #define NCURSES_EXT_PUTWIN 1
14522 EOF
14523
14524 fi
14525
14526 echo "$as_me:14526: checking if you want \$NCURSES_NO_PADDING code" >&5
14527 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14528
14529 # Check whether --enable-no-padding or --disable-no-padding was given.
14530 if test "${enable_no_padding+set}" = set; then
14531   enableval="$enable_no_padding"
14532   with_no_padding=$enableval
14533 else
14534   with_no_padding=$with_ext_funcs
14535 fi;
14536 echo "$as_me:14536: result: $with_no_padding" >&5
14537 echo "${ECHO_T}$with_no_padding" >&6
14538 test "x$with_no_padding" = xyes &&
14539 cat >>confdefs.h <<\EOF
14540 #define NCURSES_NO_PADDING 1
14541 EOF
14542
14543 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14544 echo "$as_me:14544: checking if you want SIGWINCH handler" >&5
14545 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14546
14547 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14548 if test "${enable_sigwinch+set}" = set; then
14549   enableval="$enable_sigwinch"
14550   with_sigwinch=$enableval
14551 else
14552   with_sigwinch=$with_ext_funcs
14553 fi;
14554 echo "$as_me:14554: result: $with_sigwinch" >&5
14555 echo "${ECHO_T}$with_sigwinch" >&6
14556 test "x$with_sigwinch" = xyes &&
14557 cat >>confdefs.h <<\EOF
14558 #define USE_SIGWINCH 1
14559 EOF
14560
14561 ###   use option --enable-tcap-names to allow user to define new capabilities
14562 echo "$as_me:14562: checking if you want user-definable terminal capabilities like termcap" >&5
14563 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14564
14565 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14566 if test "${enable_tcap_names+set}" = set; then
14567   enableval="$enable_tcap_names"
14568   with_tcap_names=$enableval
14569 else
14570   with_tcap_names=$with_ext_funcs
14571 fi;
14572 echo "$as_me:14572: result: $with_tcap_names" >&5
14573 echo "${ECHO_T}$with_tcap_names" >&6
14574 NCURSES_XNAMES=0
14575 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14576
14577 ##############################################################################
14578
14579 echo "$as_me:14579: checking if you want to link with the pthread library" >&5
14580 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14581
14582 # Check whether --with-pthread or --without-pthread was given.
14583 if test "${with_pthread+set}" = set; then
14584   withval="$with_pthread"
14585   with_pthread=$withval
14586 else
14587   with_pthread=no
14588 fi;
14589 echo "$as_me:14589: result: $with_pthread" >&5
14590 echo "${ECHO_T}$with_pthread" >&6
14591
14592 if test "$with_pthread" != no ; then
14593         echo "$as_me:14593: checking for pthread.h" >&5
14594 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14595 if test "${ac_cv_header_pthread_h+set}" = set; then
14596   echo $ECHO_N "(cached) $ECHO_C" >&6
14597 else
14598   cat >conftest.$ac_ext <<_ACEOF
14599 #line 14599 "configure"
14600 #include "confdefs.h"
14601 #include <pthread.h>
14602 _ACEOF
14603 if { (eval echo "$as_me:14603: \"$ac_cpp conftest.$ac_ext\"") >&5
14604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14605   ac_status=$?
14606   egrep -v '^ *\+' conftest.er1 >conftest.err
14607   rm -f conftest.er1
14608   cat conftest.err >&5
14609   echo "$as_me:14609: \$? = $ac_status" >&5
14610   (exit $ac_status); } >/dev/null; then
14611   if test -s conftest.err; then
14612     ac_cpp_err=$ac_c_preproc_warn_flag
14613   else
14614     ac_cpp_err=
14615   fi
14616 else
14617   ac_cpp_err=yes
14618 fi
14619 if test -z "$ac_cpp_err"; then
14620   ac_cv_header_pthread_h=yes
14621 else
14622   echo "$as_me: failed program was:" >&5
14623   cat conftest.$ac_ext >&5
14624   ac_cv_header_pthread_h=no
14625 fi
14626 rm -f conftest.err conftest.$ac_ext
14627 fi
14628 echo "$as_me:14628: result: $ac_cv_header_pthread_h" >&5
14629 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14630 if test $ac_cv_header_pthread_h = yes; then
14631
14632 cat >>confdefs.h <<\EOF
14633 #define HAVE_PTHREADS_H 1
14634 EOF
14635
14636         for cf_lib_pthread in pthread c_r
14637         do
14638             echo "$as_me:14638: checking if we can link with the $cf_lib_pthread library" >&5
14639 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14640             cf_save_LIBS="$LIBS"
14641
14642 cf_add_libs="$LIBS"
14643 # reverse order
14644 cf_add_0lib=
14645 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14646 # filter duplicates
14647 for cf_add_1lib in $cf_add_0lib; do
14648         for cf_add_2lib in $cf_add_libs; do
14649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14650                         cf_add_1lib=
14651                         break
14652                 fi
14653         done
14654         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14655 done
14656 LIBS="$cf_add_libs"
14657
14658             cat >conftest.$ac_ext <<_ACEOF
14659 #line 14659 "configure"
14660 #include "confdefs.h"
14661
14662 #include <pthread.h>
14663
14664 int
14665 main (void)
14666 {
14667
14668                 int rc = pthread_create(0,0,0,0);
14669                 int r2 = pthread_mutexattr_settype(0, 0);
14670
14671   ;
14672   return 0;
14673 }
14674 _ACEOF
14675 rm -f conftest.$ac_objext conftest$ac_exeext
14676 if { (eval echo "$as_me:14676: \"$ac_link\"") >&5
14677   (eval $ac_link) 2>&5
14678   ac_status=$?
14679   echo "$as_me:14679: \$? = $ac_status" >&5
14680   (exit $ac_status); } &&
14681          { ac_try='test -s conftest$ac_exeext'
14682   { (eval echo "$as_me:14682: \"$ac_try\"") >&5
14683   (eval $ac_try) 2>&5
14684   ac_status=$?
14685   echo "$as_me:14685: \$? = $ac_status" >&5
14686   (exit $ac_status); }; }; then
14687   with_pthread=yes
14688 else
14689   echo "$as_me: failed program was:" >&5
14690 cat conftest.$ac_ext >&5
14691 with_pthread=no
14692 fi
14693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14694             LIBS="$cf_save_LIBS"
14695             echo "$as_me:14695: result: $with_pthread" >&5
14696 echo "${ECHO_T}$with_pthread" >&6
14697             test "$with_pthread" = yes && break
14698         done
14699
14700         if test "$with_pthread" = yes ; then
14701
14702 cf_add_libs="$LIBS"
14703 # reverse order
14704 cf_add_0lib=
14705 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14706 # filter duplicates
14707 for cf_add_1lib in $cf_add_0lib; do
14708         for cf_add_2lib in $cf_add_libs; do
14709                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14710                         cf_add_1lib=
14711                         break
14712                 fi
14713         done
14714         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14715 done
14716 LIBS="$cf_add_libs"
14717
14718 cat >>confdefs.h <<\EOF
14719 #define HAVE_LIBPTHREADS 1
14720 EOF
14721
14722         else
14723             { { echo "$as_me:14723: error: Cannot link with pthread library" >&5
14724 echo "$as_me: error: Cannot link with pthread library" >&2;}
14725    { (exit 1); exit 1; }; }
14726         fi
14727
14728 fi
14729
14730 fi
14731
14732 if test "x$with_pthread" != xno; then
14733         echo "$as_me:14733: checking for pthread_kill" >&5
14734 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14735 if test "${ac_cv_func_pthread_kill+set}" = set; then
14736   echo $ECHO_N "(cached) $ECHO_C" >&6
14737 else
14738   cat >conftest.$ac_ext <<_ACEOF
14739 #line 14739 "configure"
14740 #include "confdefs.h"
14741 #define pthread_kill autoconf_temporary
14742 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14743 #undef pthread_kill
14744
14745 #ifdef __cplusplus
14746 extern "C"
14747 #endif
14748
14749 /* We use char because int might match the return type of a gcc2
14750    builtin and then its argument prototype would still apply.  */
14751 char pthread_kill (void);
14752
14753 int
14754 main (void)
14755 {
14756
14757 /* The GNU C library defines stubs for functions which it implements
14758     to always fail with ENOSYS.  Some functions are actually named
14759     something starting with __ and the normal name is an alias.  */
14760 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14761 #error found stub for pthread_kill
14762 #endif
14763
14764         return pthread_kill ();
14765   ;
14766   return 0;
14767 }
14768 _ACEOF
14769 rm -f conftest.$ac_objext conftest$ac_exeext
14770 if { (eval echo "$as_me:14770: \"$ac_link\"") >&5
14771   (eval $ac_link) 2>&5
14772   ac_status=$?
14773   echo "$as_me:14773: \$? = $ac_status" >&5
14774   (exit $ac_status); } &&
14775          { ac_try='test -s conftest$ac_exeext'
14776   { (eval echo "$as_me:14776: \"$ac_try\"") >&5
14777   (eval $ac_try) 2>&5
14778   ac_status=$?
14779   echo "$as_me:14779: \$? = $ac_status" >&5
14780   (exit $ac_status); }; }; then
14781   ac_cv_func_pthread_kill=yes
14782 else
14783   echo "$as_me: failed program was:" >&5
14784 cat conftest.$ac_ext >&5
14785 ac_cv_func_pthread_kill=no
14786 fi
14787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14788 fi
14789 echo "$as_me:14789: result: $ac_cv_func_pthread_kill" >&5
14790 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14791 if test $ac_cv_func_pthread_kill = yes; then
14792
14793                 echo "$as_me:14793: checking if you want to allow EINTR in wgetch with pthreads" >&5
14794 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14795
14796 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14797 if test "${enable_pthreads_eintr+set}" = set; then
14798   enableval="$enable_pthreads_eintr"
14799   use_pthreads_eintr=$enableval
14800 else
14801   use_pthreads_eintr=no
14802 fi;
14803                 echo "$as_me:14803: result: $use_pthreads_eintr" >&5
14804 echo "${ECHO_T}$use_pthreads_eintr" >&6
14805                 if test "x$use_pthreads_eintr" = xyes ; then
14806
14807 cat >>confdefs.h <<\EOF
14808 #define USE_PTHREADS_EINTR 1
14809 EOF
14810
14811                 fi
14812 fi
14813
14814         echo "$as_me:14814: checking if you want to use weak-symbols for pthreads" >&5
14815 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14816
14817 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14818 if test "${enable_weak_symbols+set}" = set; then
14819   enableval="$enable_weak_symbols"
14820   use_weak_symbols=$enableval
14821 else
14822   use_weak_symbols=no
14823 fi;
14824         echo "$as_me:14824: result: $use_weak_symbols" >&5
14825 echo "${ECHO_T}$use_weak_symbols" >&6
14826         if test "x$use_weak_symbols" = xyes ; then
14827
14828 echo "$as_me:14828: checking if $CC supports weak symbols" >&5
14829 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14830 if test "${cf_cv_weak_symbols+set}" = set; then
14831   echo $ECHO_N "(cached) $ECHO_C" >&6
14832 else
14833
14834 cat >conftest.$ac_ext <<_ACEOF
14835 #line 14835 "configure"
14836 #include "confdefs.h"
14837
14838 #include <stdio.h>
14839 int
14840 main (void)
14841 {
14842
14843 #if defined(__GNUC__)
14844 #  if defined __USE_ISOC99
14845 #    define _cat_pragma(exp)    _Pragma(#exp)
14846 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14847 #  else
14848 #    define _weak_pragma(exp)
14849 #  endif
14850 #  define _declare(name)        __extension__ extern __typeof__(name) name
14851 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14852 #endif
14853
14854 weak_symbol(fopen);
14855
14856   ;
14857   return 0;
14858 }
14859 _ACEOF
14860 rm -f conftest.$ac_objext
14861 if { (eval echo "$as_me:14861: \"$ac_compile\"") >&5
14862   (eval $ac_compile) 2>&5
14863   ac_status=$?
14864   echo "$as_me:14864: \$? = $ac_status" >&5
14865   (exit $ac_status); } &&
14866          { ac_try='test -s conftest.$ac_objext'
14867   { (eval echo "$as_me:14867: \"$ac_try\"") >&5
14868   (eval $ac_try) 2>&5
14869   ac_status=$?
14870   echo "$as_me:14870: \$? = $ac_status" >&5
14871   (exit $ac_status); }; }; then
14872   cf_cv_weak_symbols=yes
14873 else
14874   echo "$as_me: failed program was:" >&5
14875 cat conftest.$ac_ext >&5
14876 cf_cv_weak_symbols=no
14877 fi
14878 rm -f conftest.$ac_objext conftest.$ac_ext
14879
14880 fi
14881 echo "$as_me:14881: result: $cf_cv_weak_symbols" >&5
14882 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14883
14884         else
14885                 cf_cv_weak_symbols=no
14886         fi
14887
14888         if test "x$cf_cv_weak_symbols" = xyes ; then
14889
14890 cat >>confdefs.h <<\EOF
14891 #define USE_WEAK_SYMBOLS 1
14892 EOF
14893
14894         fi
14895 fi
14896
14897 PTHREAD=
14898 if test "x$with_pthread" = "xyes" ; then
14899
14900 cat >>confdefs.h <<\EOF
14901 #define USE_PTHREADS 1
14902 EOF
14903
14904         enable_reentrant=yes
14905         if test "x$cf_cv_weak_symbols" = xyes ; then
14906                 PTHREAD=-lpthread
14907
14908 cf_add_libs="$PRIVATE_LIBS"
14909 # reverse order
14910 cf_add_0lib=
14911 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14912 # filter duplicates
14913 for cf_add_1lib in $cf_add_0lib; do
14914         for cf_add_2lib in $cf_add_libs; do
14915                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14916                         cf_add_1lib=
14917                         break
14918                 fi
14919         done
14920         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14921 done
14922 PRIVATE_LIBS="$cf_add_libs"
14923
14924         fi
14925 fi
14926
14927 # Reentrant code has to be opaque; there's little advantage to making ncurses
14928 # opaque outside of that, so there is no --enable-opaque option.  We can use
14929 # this option without --with-pthreads, but this will be always set for
14930 # pthreads.
14931 echo "$as_me:14931: checking if you want reentrant code" >&5
14932 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14933
14934 # Check whether --enable-reentrant or --disable-reentrant was given.
14935 if test "${enable_reentrant+set}" = set; then
14936   enableval="$enable_reentrant"
14937   with_reentrant=$enableval
14938 else
14939   with_reentrant=no
14940 fi;
14941 echo "$as_me:14941: result: $with_reentrant" >&5
14942 echo "${ECHO_T}$with_reentrant" >&6
14943 if test "x$with_reentrant" = xyes ; then
14944         cf_cv_enable_reentrant=1
14945         cf_cv_enable_opaque="NCURSES_INTERNALS"
14946         NCURSES_SIZE_T=int
14947         if test "x$cf_cv_weak_symbols" = xyes ; then
14948
14949 # remove pthread library from $LIBS
14950 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14951
14952 cf_add_libs="$TEST_LIBS"
14953 # reverse order
14954 cf_add_0lib=
14955 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14956 # filter duplicates
14957 for cf_add_1lib in $cf_add_0lib; do
14958         for cf_add_2lib in $cf_add_libs; do
14959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14960                         cf_add_1lib=
14961                         break
14962                 fi
14963         done
14964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14965 done
14966 TEST_LIBS="$cf_add_libs"
14967
14968 cf_add_libs="$TEST_LIBS2"
14969 # reverse order
14970 cf_add_0lib=
14971 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14972 # filter duplicates
14973 for cf_add_1lib in $cf_add_0lib; do
14974         for cf_add_2lib in $cf_add_libs; do
14975                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14976                         cf_add_1lib=
14977                         break
14978                 fi
14979         done
14980         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14981 done
14982 TEST_LIBS2="$cf_add_libs"
14983
14984 cf_add_libs="$PRIVATE_LIBS"
14985 # reverse order
14986 cf_add_0lib=
14987 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14988 # filter duplicates
14989 for cf_add_1lib in $cf_add_0lib; do
14990         for cf_add_2lib in $cf_add_libs; do
14991                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14992                         cf_add_1lib=
14993                         break
14994                 fi
14995         done
14996         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14997 done
14998 PRIVATE_LIBS="$cf_add_libs"
14999
15000         else
15001                 # when not using weak symbols but with_reentrant,
15002                 # add 't' to the library suffix on all platforms
15003                 # except cygwin, where we only do that if ALSO
15004                 # compiling with full thread support.
15005                 case "$host" in
15006                 (*cygwin* | *msys*)
15007                         if test "$with_pthread" = "yes" ; then
15008                                 if test "x$disable_lib_suffixes" = "xno" ; then
15009                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15010                                 fi
15011                         fi ;;
15012                 (*)
15013                         if test "x$disable_lib_suffixes" = "xno" ; then
15014                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15015                         fi
15016                         ;;
15017                 esac
15018         fi
15019
15020 cat >>confdefs.h <<\EOF
15021 #define USE_REENTRANT 1
15022 EOF
15023
15024 if test "${with_abi_version+set}" != set; then
15025         case $cf_cv_rel_version in
15026         (5.*)
15027                 cf_cv_rel_version=6.0
15028                 cf_cv_abi_version=6
15029                 { echo "$as_me:15029: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15030 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15031                 ;;
15032         esac
15033 fi
15034
15035 else
15036         cf_cv_enable_reentrant=0
15037         cf_cv_enable_opaque="NCURSES_OPAQUE"
15038         NCURSES_SIZE_T=short
15039 fi
15040
15041 echo "$as_me:15041: checking if you want opaque curses-library structures" >&5
15042 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15043
15044 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15045 if test "${enable_opaque_curses+set}" = set; then
15046   enableval="$enable_opaque_curses"
15047   test "$enableval" != yes && enableval=no
15048         if test "$enableval" != "no" ; then
15049     enable_opaque_curses=yes
15050         else
15051
15052          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15053          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15054
15055         fi
15056 else
15057   enableval=no
15058
15059          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15060          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15061
15062 fi;
15063 echo "$as_me:15063: result: $enable_opaque_curses" >&5
15064 echo "${ECHO_T}$enable_opaque_curses" >&6
15065
15066 test "$cf_cv_enable_reentrant" = 1 && \
15067 test "$enable_opaque_curses" = no && \
15068 { { echo "$as_me:15068: error: reentrant configuration requires opaque library" >&5
15069 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15070    { (exit 1); exit 1; }; }
15071
15072 echo "$as_me:15072: checking if you want opaque form-library structures" >&5
15073 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15074
15075 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15076 if test "${enable_opaque_form+set}" = set; then
15077   enableval="$enable_opaque_form"
15078   enable_opaque_form=yes
15079 else
15080   enable_opaque_form=no
15081 fi;
15082 echo "$as_me:15082: result: $enable_opaque_form" >&5
15083 echo "${ECHO_T}$enable_opaque_form" >&6
15084
15085 echo "$as_me:15085: checking if you want opaque menu-library structures" >&5
15086 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15087
15088 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15089 if test "${enable_opaque_menu+set}" = set; then
15090   enableval="$enable_opaque_menu"
15091   enable_opaque_menu=yes
15092 else
15093   enable_opaque_menu=no
15094 fi;
15095 echo "$as_me:15095: result: $enable_opaque_menu" >&5
15096 echo "${ECHO_T}$enable_opaque_menu" >&6
15097
15098 echo "$as_me:15098: checking if you want opaque panel-library structures" >&5
15099 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15100
15101 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15102 if test "${enable_opaque_panel+set}" = set; then
15103   enableval="$enable_opaque_panel"
15104   enable_opaque_panel=yes
15105 else
15106   enable_opaque_panel=no
15107 fi;
15108 echo "$as_me:15108: result: $enable_opaque_panel" >&5
15109 echo "${ECHO_T}$enable_opaque_panel" >&6
15110
15111 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15112 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15113 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15114 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15115
15116 ### Allow using a different wrap-prefix
15117 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15118         echo "$as_me:15118: checking for prefix used to wrap public variables" >&5
15119 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15120
15121 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15122 if test "${with_wrap_prefix+set}" = set; then
15123   withval="$with_wrap_prefix"
15124   NCURSES_WRAP_PREFIX=$withval
15125 else
15126   NCURSES_WRAP_PREFIX=_nc_
15127 fi;
15128         echo "$as_me:15128: result: $NCURSES_WRAP_PREFIX" >&5
15129 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15130 else
15131         NCURSES_WRAP_PREFIX=_nc_
15132 fi
15133
15134 cat >>confdefs.h <<EOF
15135 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15136 EOF
15137
15138 ###############################################################################
15139 # These options are relatively safe to experiment with.
15140
15141 echo "$as_me:15141: checking if you want all development code" >&5
15142 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15143
15144 # Check whether --with-develop or --without-develop was given.
15145 if test "${with_develop+set}" = set; then
15146   withval="$with_develop"
15147   with_develop=$withval
15148 else
15149   with_develop=no
15150 fi;
15151 echo "$as_me:15151: result: $with_develop" >&5
15152 echo "${ECHO_T}$with_develop" >&6
15153
15154 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15155 echo "$as_me:15155: checking if you want hard-tabs code" >&5
15156 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15157
15158 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15159 if test "${enable_hard_tabs+set}" = set; then
15160   enableval="$enable_hard_tabs"
15161
15162 else
15163   enable_hard_tabs=$with_develop
15164 fi;
15165 echo "$as_me:15165: result: $enable_hard_tabs" >&5
15166 echo "${ECHO_T}$enable_hard_tabs" >&6
15167 test "x$enable_hard_tabs" = xyes &&
15168 cat >>confdefs.h <<\EOF
15169 #define USE_HARD_TABS 1
15170 EOF
15171
15172 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15173 echo "$as_me:15173: checking if you want limited support for xmc" >&5
15174 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15175
15176 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15177 if test "${enable_xmc_glitch+set}" = set; then
15178   enableval="$enable_xmc_glitch"
15179
15180 else
15181   enable_xmc_glitch=$with_develop
15182 fi;
15183 echo "$as_me:15183: result: $enable_xmc_glitch" >&5
15184 echo "${ECHO_T}$enable_xmc_glitch" >&6
15185 test "x$enable_xmc_glitch" = xyes &&
15186 cat >>confdefs.h <<\EOF
15187 #define USE_XMC_SUPPORT 1
15188 EOF
15189
15190 ###############################################################################
15191 # These are just experimental, probably should not be in a package:
15192
15193 echo "$as_me:15193: checking if you do not want to assume colors are white-on-black" >&5
15194 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15195
15196 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15197 if test "${enable_assumed_color+set}" = set; then
15198   enableval="$enable_assumed_color"
15199   with_assumed_color=$enableval
15200 else
15201   with_assumed_color=yes
15202 fi;
15203 echo "$as_me:15203: result: $with_assumed_color" >&5
15204 echo "${ECHO_T}$with_assumed_color" >&6
15205 test "x$with_assumed_color" = xyes &&
15206 cat >>confdefs.h <<\EOF
15207 #define USE_ASSUMED_COLOR 1
15208 EOF
15209
15210 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15211 echo "$as_me:15211: checking if you want hashmap scrolling-optimization code" >&5
15212 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15213
15214 # Check whether --enable-hashmap or --disable-hashmap was given.
15215 if test "${enable_hashmap+set}" = set; then
15216   enableval="$enable_hashmap"
15217   with_hashmap=$enableval
15218 else
15219   with_hashmap=yes
15220 fi;
15221 echo "$as_me:15221: result: $with_hashmap" >&5
15222 echo "${ECHO_T}$with_hashmap" >&6
15223 test "x$with_hashmap" = xyes &&
15224 cat >>confdefs.h <<\EOF
15225 #define USE_HASHMAP 1
15226 EOF
15227
15228 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15229 echo "$as_me:15229: checking if you want colorfgbg code" >&5
15230 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15231
15232 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15233 if test "${enable_colorfgbg+set}" = set; then
15234   enableval="$enable_colorfgbg"
15235   with_colorfgbg=$enableval
15236 else
15237   with_colorfgbg=no
15238 fi;
15239 echo "$as_me:15239: result: $with_colorfgbg" >&5
15240 echo "${ECHO_T}$with_colorfgbg" >&6
15241 test "x$with_colorfgbg" = xyes &&
15242 cat >>confdefs.h <<\EOF
15243 #define USE_COLORFGBG 1
15244 EOF
15245
15246 ###   use option --enable-interop to turn on use of bindings used for interop
15247 echo "$as_me:15247: checking if you want interop bindings" >&5
15248 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15249
15250 # Check whether --enable-interop or --disable-interop was given.
15251 if test "${enable_interop+set}" = set; then
15252   enableval="$enable_interop"
15253   with_exp_interop=$enableval
15254 else
15255   with_exp_interop=$cf_dft_interop
15256 fi;
15257 echo "$as_me:15257: result: $with_exp_interop" >&5
15258 echo "${ECHO_T}$with_exp_interop" >&6
15259
15260 NCURSES_INTEROP_FUNCS=0
15261 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15262
15263 echo "$as_me:15263: checking if you want experimental safe-sprintf code" >&5
15264 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15265
15266 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15267 if test "${enable_safe_sprintf+set}" = set; then
15268   enableval="$enable_safe_sprintf"
15269   with_safe_sprintf=$enableval
15270 else
15271   with_safe_sprintf=no
15272 fi;
15273 echo "$as_me:15273: result: $with_safe_sprintf" >&5
15274 echo "${ECHO_T}$with_safe_sprintf" >&6
15275
15276 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15277 # when hashmap is used scroll hints are useless
15278 if test "$with_hashmap" = no ; then
15279 echo "$as_me:15279: checking if you want to experiment without scrolling-hints code" >&5
15280 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15281
15282 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15283 if test "${enable_scroll_hints+set}" = set; then
15284   enableval="$enable_scroll_hints"
15285   with_scroll_hints=$enableval
15286 else
15287   with_scroll_hints=yes
15288 fi;
15289 echo "$as_me:15289: result: $with_scroll_hints" >&5
15290 echo "${ECHO_T}$with_scroll_hints" >&6
15291 test "x$with_scroll_hints" = xyes &&
15292 cat >>confdefs.h <<\EOF
15293 #define USE_SCROLL_HINTS 1
15294 EOF
15295
15296 fi
15297
15298 echo "$as_me:15298: checking if you want wgetch-events code" >&5
15299 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15300
15301 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15302 if test "${enable_wgetch_events+set}" = set; then
15303   enableval="$enable_wgetch_events"
15304   with_wgetch_events=$enableval
15305 else
15306   with_wgetch_events=no
15307 fi;
15308 echo "$as_me:15308: result: $with_wgetch_events" >&5
15309 echo "${ECHO_T}$with_wgetch_events" >&6
15310 test "x$with_wgetch_events" = xyes &&
15311 cat >>confdefs.h <<\EOF
15312 #define NCURSES_WGETCH_EVENTS 1
15313 EOF
15314
15315 ###############################################################################
15316
15317 ###     use option --disable-echo to suppress full display compiling commands
15318
15319 echo "$as_me:15319: checking if you want to see long compiling messages" >&5
15320 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15321
15322 # Check whether --enable-echo or --disable-echo was given.
15323 if test "${enable_echo+set}" = set; then
15324   enableval="$enable_echo"
15325   test "$enableval" != no && enableval=yes
15326         if test "$enableval" != "yes" ; then
15327
15328         ECHO_LT='--silent'
15329         ECHO_LD='@echo linking $@;'
15330         RULE_CC='@echo compiling $<'
15331         SHOW_CC='@echo compiling $@'
15332         ECHO_CC='@'
15333
15334         else
15335
15336         ECHO_LT=''
15337         ECHO_LD=''
15338         RULE_CC=''
15339         SHOW_CC=''
15340         ECHO_CC=''
15341
15342         fi
15343 else
15344   enableval=yes
15345
15346         ECHO_LT=''
15347         ECHO_LD=''
15348         RULE_CC=''
15349         SHOW_CC=''
15350         ECHO_CC=''
15351
15352 fi;
15353 echo "$as_me:15353: result: $enableval" >&5
15354 echo "${ECHO_T}$enableval" >&6
15355
15356 if test "x$enable_echo" = xyes; then
15357         ECHO_LINK=
15358 else
15359         ECHO_LINK='@ echo linking $@ ... ;'
15360         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15361         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15362 fi
15363
15364 # --disable-stripping is used for debugging
15365
15366 echo "$as_me:15366: checking if you want to install stripped executables" >&5
15367 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15368
15369 # Check whether --enable-stripping or --disable-stripping was given.
15370 if test "${enable_stripping+set}" = set; then
15371   enableval="$enable_stripping"
15372   test "$enableval" != no && enableval=yes
15373         if test "$enableval" != "yes" ; then
15374     with_stripping=no
15375         else
15376                 with_stripping=yes
15377         fi
15378 else
15379   enableval=yes
15380         with_stripping=yes
15381
15382 fi;
15383 echo "$as_me:15383: result: $with_stripping" >&5
15384 echo "${ECHO_T}$with_stripping" >&6
15385
15386 if test "$with_stripping" = yes
15387 then
15388         INSTALL_OPT_S="-s"
15389 else
15390         INSTALL_OPT_S=
15391 fi
15392
15393 : ${INSTALL:=install}
15394 echo "$as_me:15394: checking if install accepts -p option" >&5
15395 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15396 if test "${cf_cv_install_p+set}" = set; then
15397   echo $ECHO_N "(cached) $ECHO_C" >&6
15398 else
15399
15400         rm -rf conftest*
15401         date >conftest.in
15402         mkdir conftest.out
15403         sleep 3
15404         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15405         then
15406                 if test -f conftest.out/conftest.in
15407                 then
15408                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15409                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15410                         if test -s conftest.err
15411                         then
15412                                 cf_cv_install_p=no
15413                         else
15414                                 cf_cv_install_p=yes
15415                         fi
15416                 else
15417                         cf_cv_install_p=no
15418                 fi
15419         else
15420                 cf_cv_install_p=no
15421         fi
15422         rm -rf conftest*
15423
15424 fi
15425 echo "$as_me:15425: result: $cf_cv_install_p" >&5
15426 echo "${ECHO_T}$cf_cv_install_p" >&6
15427
15428 echo "$as_me:15428: checking if install needs to be told about ownership" >&5
15429 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15430 case `$ac_config_guess` in
15431 (*minix)
15432         with_install_o=yes
15433         ;;
15434 (*)
15435         with_install_o=no
15436         ;;
15437 esac
15438
15439 echo "$as_me:15439: result: $with_install_o" >&5
15440 echo "${ECHO_T}$with_install_o" >&6
15441 if test "x$with_install_o" = xyes
15442 then
15443         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'`
15444 else
15445         INSTALL_OPT_O=
15446 fi
15447
15448 # If we're avoiding relinking of shared libraries during install, that is to
15449 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15450 # the install program has "-p" (for preserving timestamps).
15451 cf_cv_do_reranlib=yes
15452 if test "x$cf_cv_install_p" = xyes
15453 then
15454         if test "x$cf_cv_do_relink" != xyes
15455         then
15456                 cf_cv_do_reranlib=no
15457                 INSTALL_OPT_P="-p"
15458                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15459         fi
15460 fi
15461
15462 ###     use option --enable-warnings to turn on all gcc warnings
15463 echo "$as_me:15463: checking if you want to see compiler warnings" >&5
15464 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15465
15466 # Check whether --enable-warnings or --disable-warnings was given.
15467 if test "${enable_warnings+set}" = set; then
15468   enableval="$enable_warnings"
15469   with_warnings=$enableval
15470 fi;
15471 echo "$as_me:15471: result: $with_warnings" >&5
15472 echo "${ECHO_T}$with_warnings" >&6
15473
15474 if test "x$with_warnings" = "xyes"; then
15475
15476         ADAFLAGS="$ADAFLAGS -gnatg"
15477
15478 if test "x$have_x" = xyes; then
15479
15480 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15481 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15482 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15483 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15484 for cf_X_CFLAGS in $X_CFLAGS
15485 do
15486         case "x$cf_X_CFLAGS" in
15487         x-[IUD]*)
15488                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15489                 ;;
15490         *)
15491                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15492                 ;;
15493         esac
15494 done
15495
15496 cat >conftest.$ac_ext <<_ACEOF
15497 #line 15497 "configure"
15498 #include "confdefs.h"
15499
15500 #include <stdlib.h>
15501 #include <X11/Intrinsic.h>
15502
15503 int
15504 main (void)
15505 {
15506 String foo = malloc(1)
15507   ;
15508   return 0;
15509 }
15510 _ACEOF
15511 rm -f conftest.$ac_objext
15512 if { (eval echo "$as_me:15512: \"$ac_compile\"") >&5
15513   (eval $ac_compile) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); } &&
15517          { ac_try='test -s conftest.$ac_objext'
15518   { (eval echo "$as_me:15518: \"$ac_try\"") >&5
15519   (eval $ac_try) 2>&5
15520   ac_status=$?
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit $ac_status); }; }; then
15523
15524 echo "$as_me:15524: checking for X11/Xt const-feature" >&5
15525 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15526 if test "${cf_cv_const_x_string+set}" = set; then
15527   echo $ECHO_N "(cached) $ECHO_C" >&6
15528 else
15529
15530         cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15533
15534 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15535 #undef  XTSTRINGDEFINES /* X11R5 and later */
15536 #include <stdlib.h>
15537 #include <X11/Intrinsic.h>
15538
15539 int
15540 main (void)
15541 {
15542 String foo = malloc(1); *foo = 0
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 rm -f conftest.$ac_objext
15548 if { (eval echo "$as_me:15548: \"$ac_compile\"") >&5
15549   (eval $ac_compile) 2>&5
15550   ac_status=$?
15551   echo "$as_me:15551: \$? = $ac_status" >&5
15552   (exit $ac_status); } &&
15553          { ac_try='test -s conftest.$ac_objext'
15554   { (eval echo "$as_me:15554: \"$ac_try\"") >&5
15555   (eval $ac_try) 2>&5
15556   ac_status=$?
15557   echo "$as_me:15557: \$? = $ac_status" >&5
15558   (exit $ac_status); }; }; then
15559
15560                         cf_cv_const_x_string=no
15561
15562 else
15563   echo "$as_me: failed program was:" >&5
15564 cat conftest.$ac_ext >&5
15565
15566                         cf_cv_const_x_string=yes
15567
15568 fi
15569 rm -f conftest.$ac_objext conftest.$ac_ext
15570
15571 fi
15572 echo "$as_me:15572: result: $cf_cv_const_x_string" >&5
15573 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15574
15575 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15576 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15577 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15578
15579 case $cf_cv_const_x_string in
15580 (no)
15581
15582         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15583         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15584
15585         ;;
15586 (*)
15587
15588         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15589         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15590
15591         ;;
15592 esac
15593
15594 else
15595   echo "$as_me: failed program was:" >&5
15596 cat conftest.$ac_ext >&5
15597 fi
15598 rm -f conftest.$ac_objext conftest.$ac_ext
15599  fi
15600 cat > conftest.$ac_ext <<EOF
15601 #line 15601 "${as_me:-configure}"
15602 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15603 EOF
15604 if test "$INTEL_COMPILER" = yes
15605 then
15606 # The "-wdXXX" options suppress warnings:
15607 # remark #1419: external declaration in primary source file
15608 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15609 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15610 # remark #193: zero used for undefined preprocessing identifier
15611 # remark #593: variable "curs_sb_left_arrow" was set but never used
15612 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15613 # remark #869: parameter "tw" was never referenced
15614 # remark #981: operands are evaluated in unspecified order
15615 # warning #279: controlling expression is constant
15616
15617         { echo "$as_me:15617: checking for $CC warning options..." >&5
15618 echo "$as_me: checking for $CC warning options..." >&6;}
15619         cf_save_CFLAGS="$CFLAGS"
15620         EXTRA_CFLAGS="-Wall"
15621         for cf_opt in \
15622                 wd1419 \
15623                 wd1683 \
15624                 wd1684 \
15625                 wd193 \
15626                 wd593 \
15627                 wd279 \
15628                 wd810 \
15629                 wd869 \
15630                 wd981
15631         do
15632                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15633                 if { (eval echo "$as_me:15633: \"$ac_compile\"") >&5
15634   (eval $ac_compile) 2>&5
15635   ac_status=$?
15636   echo "$as_me:15636: \$? = $ac_status" >&5
15637   (exit $ac_status); }; then
15638                         test -n "$verbose" && echo "$as_me:15638: result: ... -$cf_opt" >&5
15639 echo "${ECHO_T}... -$cf_opt" >&6
15640                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15641                 fi
15642         done
15643         CFLAGS="$cf_save_CFLAGS"
15644 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15645 then
15646         { echo "$as_me:15646: checking for $CC warning options..." >&5
15647 echo "$as_me: checking for $CC warning options..." >&6;}
15648         cf_save_CFLAGS="$CFLAGS"
15649         EXTRA_CFLAGS=
15650         cf_warn_CONST=""
15651         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15652         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15653         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15654         for cf_opt in W Wall \
15655                 Wbad-function-cast \
15656                 Wcast-align \
15657                 Wcast-qual \
15658                 Wdeclaration-after-statement \
15659                 Wextra \
15660                 Winline \
15661                 Wmissing-declarations \
15662                 Wmissing-prototypes \
15663                 Wnested-externs \
15664                 Wpointer-arith \
15665                 Wshadow \
15666                 Wstrict-prototypes \
15667                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15668         do
15669                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15670                 if { (eval echo "$as_me:15670: \"$ac_compile\"") >&5
15671   (eval $ac_compile) 2>&5
15672   ac_status=$?
15673   echo "$as_me:15673: \$? = $ac_status" >&5
15674   (exit $ac_status); }; then
15675                         test -n "$verbose" && echo "$as_me:15675: result: ... -$cf_opt" >&5
15676 echo "${ECHO_T}... -$cf_opt" >&6
15677                         case $cf_opt in
15678                         (Winline)
15679                                 case $GCC_VERSION in
15680                                 ([34].*)
15681                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15682
15683 echo "${as_me:-configure}:15683: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15684
15685                                         continue;;
15686                                 esac
15687                                 ;;
15688                         (Wpointer-arith)
15689                                 case $GCC_VERSION in
15690                                 ([12].*)
15691                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15692
15693 echo "${as_me:-configure}:15693: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15694
15695                                         continue;;
15696                                 esac
15697                                 ;;
15698                         esac
15699                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15700                 fi
15701         done
15702         CFLAGS="$cf_save_CFLAGS"
15703 fi
15704 rm -rf conftest*
15705
15706         if test "x$cf_with_cxx" = xyes ; then
15707
15708 INTEL_CPLUSPLUS=no
15709
15710 if test "$GCC" = yes ; then
15711         case $host_os in
15712         (linux*|gnu*)
15713                 echo "$as_me:15713: checking if this is really Intel C++ compiler" >&5
15714 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15715                 cf_save_CFLAGS="$CXXFLAGS"
15716                 CXXFLAGS="$CXXFLAGS -no-gcc"
15717                 cat >conftest.$ac_ext <<_ACEOF
15718 #line 15718 "configure"
15719 #include "confdefs.h"
15720
15721 int
15722 main (void)
15723 {
15724
15725 #ifdef __INTEL_COMPILER
15726 #else
15727 make an error
15728 #endif
15729
15730   ;
15731   return 0;
15732 }
15733 _ACEOF
15734 rm -f conftest.$ac_objext
15735 if { (eval echo "$as_me:15735: \"$ac_compile\"") >&5
15736   (eval $ac_compile) 2>&5
15737   ac_status=$?
15738   echo "$as_me:15738: \$? = $ac_status" >&5
15739   (exit $ac_status); } &&
15740          { ac_try='test -s conftest.$ac_objext'
15741   { (eval echo "$as_me:15741: \"$ac_try\"") >&5
15742   (eval $ac_try) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit $ac_status); }; }; then
15746   INTEL_CPLUSPLUS=yes
15747 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15748
15749 else
15750   echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 fi
15753 rm -f conftest.$ac_objext conftest.$ac_ext
15754                 CXXFLAGS="$cf_save_CFLAGS"
15755                 echo "$as_me:15755: result: $INTEL_CPLUSPLUS" >&5
15756 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15757                 ;;
15758         esac
15759 fi
15760
15761 CLANG_CPLUSPLUS=no
15762
15763 if test "$GCC" = yes ; then
15764         echo "$as_me:15764: checking if this is really Clang C++ compiler" >&5
15765 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15766         cf_save_CFLAGS="$CXXFLAGS"
15767         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15768         cat >conftest.$ac_ext <<_ACEOF
15769 #line 15769 "configure"
15770 #include "confdefs.h"
15771
15772 int
15773 main (void)
15774 {
15775
15776 #ifdef __clang__
15777 #else
15778 make an error
15779 #endif
15780
15781   ;
15782   return 0;
15783 }
15784 _ACEOF
15785 rm -f conftest.$ac_objext
15786 if { (eval echo "$as_me:15786: \"$ac_compile\"") >&5
15787   (eval $ac_compile) 2>&5
15788   ac_status=$?
15789   echo "$as_me:15789: \$? = $ac_status" >&5
15790   (exit $ac_status); } &&
15791          { ac_try='test -s conftest.$ac_objext'
15792   { (eval echo "$as_me:15792: \"$ac_try\"") >&5
15793   (eval $ac_try) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); }; }; then
15797   CLANG_CPLUSPLUS=yes
15798 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15799
15800 else
15801   echo "$as_me: failed program was:" >&5
15802 cat conftest.$ac_ext >&5
15803 fi
15804 rm -f conftest.$ac_objext conftest.$ac_ext
15805         CXXFLAGS="$cf_save_CFLAGS"
15806         echo "$as_me:15806: result: $CLANG_CPLUSPLUS" >&5
15807 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15808 fi
15809
15810 ac_ext=cc
15811 ac_cpp='$CXXCPP $CPPFLAGS'
15812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15815 ac_main_return=return
15816
15817 cat > conftest.$ac_ext <<EOF
15818 #line 15818 "configure"
15819 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15820 EOF
15821
15822 if test "$INTEL_CPLUSPLUS" = yes
15823 then
15824 # The "-wdXXX" options suppress warnings:
15825 # remark #1419: external declaration in primary source file
15826 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15827 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15828 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15829 # remark #193: zero used for undefined preprocessing identifier
15830 # remark #593: variable "curs_sb_left_arrow" was set but never used
15831 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15832 # remark #869: parameter "tw" was never referenced
15833 # remark #981: operands are evaluated in unspecified order
15834 # warning #269: invalid format string conversion
15835
15836         { echo "$as_me:15836: checking for $CC warning options..." >&5
15837 echo "$as_me: checking for $CC warning options..." >&6;}
15838         cf_save_CXXFLAGS="$CXXFLAGS"
15839         EXTRA_CXXFLAGS="-Wall"
15840         for cf_opt in \
15841                 wd1419 \
15842                 wd1682 \
15843                 wd1683 \
15844                 wd1684 \
15845                 wd193 \
15846                 wd279 \
15847                 wd593 \
15848                 wd810 \
15849                 wd869 \
15850                 wd981
15851         do
15852                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15853                 if { (eval echo "$as_me:15853: \"$ac_compile\"") >&5
15854   (eval $ac_compile) 2>&5
15855   ac_status=$?
15856   echo "$as_me:15856: \$? = $ac_status" >&5
15857   (exit $ac_status); }; then
15858                         test -n "$verbose" && echo "$as_me:15858: result: ... -$cf_opt" >&5
15859 echo "${ECHO_T}... -$cf_opt" >&6
15860                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15861                 fi
15862         done
15863         CXXFLAGS="$cf_save_CXXFLAGS"
15864
15865 elif test "$GXX" = yes
15866 then
15867         { echo "$as_me:15867: checking for $CXX warning options..." >&5
15868 echo "$as_me: checking for $CXX warning options..." >&6;}
15869         cf_save_CXXFLAGS="$CXXFLAGS"
15870         EXTRA_CXXFLAGS="-W -Wall"
15871         cf_gxx_extra_warnings=""
15872         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15873         case "$GCC_VERSION" in
15874         ([1-2].*)
15875                 ;;
15876         (*)
15877                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15878                 ;;
15879         esac
15880         for cf_opt in \
15881                 Wabi \
15882                 fabi-version=0 \
15883                 Wextra \
15884                 Wignored-qualifiers \
15885                 Wlogical-op \
15886                 Woverloaded-virtual \
15887                 Wsign-promo \
15888                 Wsynth \
15889                 Wold-style-cast \
15890                 Wcast-align \
15891                 Wcast-qual \
15892                 Wpointer-arith \
15893                 Wshadow \
15894                 Wundef $cf_gxx_extra_warnings Wno-unused
15895         do
15896                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15897                 if { (eval echo "$as_me:15897: \"$ac_compile\"") >&5
15898   (eval $ac_compile) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); }; then
15902                         test -n "$verbose" && echo "$as_me:15902: result: ... -$cf_opt" >&5
15903 echo "${ECHO_T}... -$cf_opt" >&6
15904                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15905                 else
15906                         test -n "$verbose" && echo "$as_me:15906: result: ... no -$cf_opt" >&5
15907 echo "${ECHO_T}... no -$cf_opt" >&6
15908                 fi
15909         done
15910         CXXFLAGS="$cf_save_CXXFLAGS"
15911 fi
15912
15913 rm -rf conftest*
15914 ac_ext=c
15915 ac_cpp='$CPP $CPPFLAGS'
15916 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15917 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15918 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15919 ac_main_return=return
15920
15921         fi
15922 fi
15923
15924 if test "$GCC" = yes
15925 then
15926 cat > conftest.i <<EOF
15927 #ifndef GCC_PRINTF
15928 #define GCC_PRINTF 0
15929 #endif
15930 #ifndef GCC_SCANF
15931 #define GCC_SCANF 0
15932 #endif
15933 #ifndef GCC_NORETURN
15934 #define GCC_NORETURN /* nothing */
15935 #endif
15936 #ifndef GCC_UNUSED
15937 #define GCC_UNUSED /* nothing */
15938 #endif
15939 EOF
15940 if test "$GCC" = yes
15941 then
15942         { echo "$as_me:15942: checking for $CC __attribute__ directives..." >&5
15943 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15944 cat > conftest.$ac_ext <<EOF
15945 #line 15945 "${as_me:-configure}"
15946 #include "confdefs.h"
15947 #include "conftest.h"
15948 #include "conftest.i"
15949 #if     GCC_PRINTF
15950 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15951 #else
15952 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15953 #endif
15954 #if     GCC_SCANF
15955 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15956 #else
15957 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15958 #endif
15959 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15960 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15961 extern void foo(void) GCC_NORETURN;
15962 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15963 EOF
15964         cf_printf_attribute=no
15965         cf_scanf_attribute=no
15966         for cf_attribute in scanf printf unused noreturn
15967         do
15968
15969 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15970
15971                 cf_directive="__attribute__(($cf_attribute))"
15972                 echo "checking for $CC $cf_directive" 1>&5
15973
15974                 case $cf_attribute in
15975                 (printf)
15976                         cf_printf_attribute=yes
15977                         cat >conftest.h <<EOF
15978 #define GCC_$cf_ATTRIBUTE 1
15979 EOF
15980                         ;;
15981                 (scanf)
15982                         cf_scanf_attribute=yes
15983                         cat >conftest.h <<EOF
15984 #define GCC_$cf_ATTRIBUTE 1
15985 EOF
15986                         ;;
15987                 (*)
15988                         cat >conftest.h <<EOF
15989 #define GCC_$cf_ATTRIBUTE $cf_directive
15990 EOF
15991                         ;;
15992                 esac
15993
15994                 if { (eval echo "$as_me:15994: \"$ac_compile\"") >&5
15995   (eval $ac_compile) 2>&5
15996   ac_status=$?
15997   echo "$as_me:15997: \$? = $ac_status" >&5
15998   (exit $ac_status); }; then
15999                         test -n "$verbose" && echo "$as_me:15999: result: ... $cf_attribute" >&5
16000 echo "${ECHO_T}... $cf_attribute" >&6
16001                         cat conftest.h >>confdefs.h
16002                         case $cf_attribute in
16003                         (noreturn)
16004
16005 cat >>confdefs.h <<EOF
16006 #define GCC_NORETURN $cf_directive
16007 EOF
16008
16009                                 ;;
16010                         (printf)
16011                                 cf_value='/* nothing */'
16012                                 if test "$cf_printf_attribute" != no ; then
16013                                         cf_value='__attribute__((format(printf,fmt,var)))'
16014
16015 cat >>confdefs.h <<\EOF
16016 #define GCC_PRINTF 1
16017 EOF
16018
16019                                 fi
16020
16021 cat >>confdefs.h <<EOF
16022 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16023 EOF
16024
16025                                 ;;
16026                         (scanf)
16027                                 cf_value='/* nothing */'
16028                                 if test "$cf_scanf_attribute" != no ; then
16029                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16030
16031 cat >>confdefs.h <<\EOF
16032 #define GCC_SCANF 1
16033 EOF
16034
16035                                 fi
16036
16037 cat >>confdefs.h <<EOF
16038 #define GCC_SCANFLIKE(fmt,var) $cf_value
16039 EOF
16040
16041                                 ;;
16042                         (unused)
16043
16044 cat >>confdefs.h <<EOF
16045 #define GCC_UNUSED $cf_directive
16046 EOF
16047
16048                                 ;;
16049                         esac
16050                 fi
16051         done
16052 else
16053         fgrep define conftest.i >>confdefs.h
16054 fi
16055 rm -rf conftest*
16056 fi
16057
16058 echo "$as_me:16058: checking if you want to work around bogus compiler/loader warnings" >&5
16059 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16060
16061 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16062 if test "${enable_string_hacks+set}" = set; then
16063   enableval="$enable_string_hacks"
16064   with_string_hacks=$enableval
16065 else
16066   with_string_hacks=no
16067 fi;
16068 echo "$as_me:16068: result: $with_string_hacks" >&5
16069 echo "${ECHO_T}$with_string_hacks" >&6
16070
16071 if test "x$with_string_hacks" = "xyes"; then
16072
16073 cat >>confdefs.h <<\EOF
16074 #define USE_STRING_HACKS 1
16075 EOF
16076
16077         { echo "$as_me:16077: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16078 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16079         echo "$as_me:16079: checking for strlcat" >&5
16080 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16081 if test "${ac_cv_func_strlcat+set}" = set; then
16082   echo $ECHO_N "(cached) $ECHO_C" >&6
16083 else
16084   cat >conftest.$ac_ext <<_ACEOF
16085 #line 16085 "configure"
16086 #include "confdefs.h"
16087 #define strlcat autoconf_temporary
16088 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16089 #undef strlcat
16090
16091 #ifdef __cplusplus
16092 extern "C"
16093 #endif
16094
16095 /* We use char because int might match the return type of a gcc2
16096    builtin and then its argument prototype would still apply.  */
16097 char strlcat (void);
16098
16099 int
16100 main (void)
16101 {
16102
16103 /* The GNU C library defines stubs for functions which it implements
16104     to always fail with ENOSYS.  Some functions are actually named
16105     something starting with __ and the normal name is an alias.  */
16106 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16107 #error found stub for strlcat
16108 #endif
16109
16110         return strlcat ();
16111   ;
16112   return 0;
16113 }
16114 _ACEOF
16115 rm -f conftest.$ac_objext conftest$ac_exeext
16116 if { (eval echo "$as_me:16116: \"$ac_link\"") >&5
16117   (eval $ac_link) 2>&5
16118   ac_status=$?
16119   echo "$as_me:16119: \$? = $ac_status" >&5
16120   (exit $ac_status); } &&
16121          { ac_try='test -s conftest$ac_exeext'
16122   { (eval echo "$as_me:16122: \"$ac_try\"") >&5
16123   (eval $ac_try) 2>&5
16124   ac_status=$?
16125   echo "$as_me:16125: \$? = $ac_status" >&5
16126   (exit $ac_status); }; }; then
16127   ac_cv_func_strlcat=yes
16128 else
16129   echo "$as_me: failed program was:" >&5
16130 cat conftest.$ac_ext >&5
16131 ac_cv_func_strlcat=no
16132 fi
16133 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16134 fi
16135 echo "$as_me:16135: result: $ac_cv_func_strlcat" >&5
16136 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16137 if test $ac_cv_func_strlcat = yes; then
16138
16139 cat >>confdefs.h <<\EOF
16140 #define HAVE_STRLCAT 1
16141 EOF
16142
16143 else
16144
16145                 echo "$as_me:16145: checking for strlcat in -lbsd" >&5
16146 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16147 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16148   echo $ECHO_N "(cached) $ECHO_C" >&6
16149 else
16150   ac_check_lib_save_LIBS=$LIBS
16151 LIBS="-lbsd  $LIBS"
16152 cat >conftest.$ac_ext <<_ACEOF
16153 #line 16153 "configure"
16154 #include "confdefs.h"
16155
16156 /* Override any gcc2 internal prototype to avoid an error.  */
16157 #ifdef __cplusplus
16158 extern "C"
16159 #endif
16160 /* We use char because int might match the return type of a gcc2
16161    builtin and then its argument prototype would still apply.  */
16162 char strlcat ();
16163 int
16164 main (void)
16165 {
16166 strlcat ();
16167   ;
16168   return 0;
16169 }
16170 _ACEOF
16171 rm -f conftest.$ac_objext conftest$ac_exeext
16172 if { (eval echo "$as_me:16172: \"$ac_link\"") >&5
16173   (eval $ac_link) 2>&5
16174   ac_status=$?
16175   echo "$as_me:16175: \$? = $ac_status" >&5
16176   (exit $ac_status); } &&
16177          { ac_try='test -s conftest$ac_exeext'
16178   { (eval echo "$as_me:16178: \"$ac_try\"") >&5
16179   (eval $ac_try) 2>&5
16180   ac_status=$?
16181   echo "$as_me:16181: \$? = $ac_status" >&5
16182   (exit $ac_status); }; }; then
16183   ac_cv_lib_bsd_strlcat=yes
16184 else
16185   echo "$as_me: failed program was:" >&5
16186 cat conftest.$ac_ext >&5
16187 ac_cv_lib_bsd_strlcat=no
16188 fi
16189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16190 LIBS=$ac_check_lib_save_LIBS
16191 fi
16192 echo "$as_me:16192: result: $ac_cv_lib_bsd_strlcat" >&5
16193 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16194 if test $ac_cv_lib_bsd_strlcat = yes; then
16195
16196 cf_add_libs="$LIBS"
16197 # reverse order
16198 cf_add_0lib=
16199 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16200 # filter duplicates
16201 for cf_add_1lib in $cf_add_0lib; do
16202         for cf_add_2lib in $cf_add_libs; do
16203                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16204                         cf_add_1lib=
16205                         break
16206                 fi
16207         done
16208         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16209 done
16210 LIBS="$cf_add_libs"
16211
16212 for ac_header in bsd/string.h
16213 do
16214 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16215 echo "$as_me:16215: checking for $ac_header" >&5
16216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16218   echo $ECHO_N "(cached) $ECHO_C" >&6
16219 else
16220   cat >conftest.$ac_ext <<_ACEOF
16221 #line 16221 "configure"
16222 #include "confdefs.h"
16223 #include <$ac_header>
16224 _ACEOF
16225 if { (eval echo "$as_me:16225: \"$ac_cpp conftest.$ac_ext\"") >&5
16226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16227   ac_status=$?
16228   egrep -v '^ *\+' conftest.er1 >conftest.err
16229   rm -f conftest.er1
16230   cat conftest.err >&5
16231   echo "$as_me:16231: \$? = $ac_status" >&5
16232   (exit $ac_status); } >/dev/null; then
16233   if test -s conftest.err; then
16234     ac_cpp_err=$ac_c_preproc_warn_flag
16235   else
16236     ac_cpp_err=
16237   fi
16238 else
16239   ac_cpp_err=yes
16240 fi
16241 if test -z "$ac_cpp_err"; then
16242   eval "$as_ac_Header=yes"
16243 else
16244   echo "$as_me: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   eval "$as_ac_Header=no"
16247 fi
16248 rm -f conftest.err conftest.$ac_ext
16249 fi
16250 echo "$as_me:16250: result: `eval echo '${'$as_ac_Header'}'`" >&5
16251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16252 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16253   cat >>confdefs.h <<EOF
16254 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16255 EOF
16256
16257 fi
16258 done
16259
16260 cat >>confdefs.h <<\EOF
16261 #define HAVE_STRLCAT 1
16262 EOF
16263
16264 fi
16265
16266 fi
16267
16268 for ac_func in strlcpy snprintf
16269 do
16270 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16271 echo "$as_me:16271: checking for $ac_func" >&5
16272 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16273 if eval "test \"\${$as_ac_var+set}\" = set"; then
16274   echo $ECHO_N "(cached) $ECHO_C" >&6
16275 else
16276   cat >conftest.$ac_ext <<_ACEOF
16277 #line 16277 "configure"
16278 #include "confdefs.h"
16279 #define $ac_func autoconf_temporary
16280 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16281 #undef $ac_func
16282
16283 #ifdef __cplusplus
16284 extern "C"
16285 #endif
16286
16287 /* We use char because int might match the return type of a gcc2
16288    builtin and then its argument prototype would still apply.  */
16289 char $ac_func (void);
16290
16291 int
16292 main (void)
16293 {
16294
16295 /* The GNU C library defines stubs for functions which it implements
16296     to always fail with ENOSYS.  Some functions are actually named
16297     something starting with __ and the normal name is an alias.  */
16298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16299 #error found stub for $ac_func
16300 #endif
16301
16302         return $ac_func ();
16303   ;
16304   return 0;
16305 }
16306 _ACEOF
16307 rm -f conftest.$ac_objext conftest$ac_exeext
16308 if { (eval echo "$as_me:16308: \"$ac_link\"") >&5
16309   (eval $ac_link) 2>&5
16310   ac_status=$?
16311   echo "$as_me:16311: \$? = $ac_status" >&5
16312   (exit $ac_status); } &&
16313          { ac_try='test -s conftest$ac_exeext'
16314   { (eval echo "$as_me:16314: \"$ac_try\"") >&5
16315   (eval $ac_try) 2>&5
16316   ac_status=$?
16317   echo "$as_me:16317: \$? = $ac_status" >&5
16318   (exit $ac_status); }; }; then
16319   eval "$as_ac_var=yes"
16320 else
16321   echo "$as_me: failed program was:" >&5
16322 cat conftest.$ac_ext >&5
16323 eval "$as_ac_var=no"
16324 fi
16325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16326 fi
16327 echo "$as_me:16327: result: `eval echo '${'$as_ac_var'}'`" >&5
16328 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16329 if test `eval echo '${'$as_ac_var'}'` = yes; then
16330   cat >>confdefs.h <<EOF
16331 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16332 EOF
16333
16334 fi
16335 done
16336
16337 fi
16338
16339 ###     use option --enable-assertions to turn on generation of assertion code
16340 echo "$as_me:16340: checking if you want to enable runtime assertions" >&5
16341 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16342
16343 # Check whether --enable-assertions or --disable-assertions was given.
16344 if test "${enable_assertions+set}" = set; then
16345   enableval="$enable_assertions"
16346   with_assertions=$enableval
16347 else
16348   with_assertions=no
16349 fi;
16350 echo "$as_me:16350: result: $with_assertions" >&5
16351 echo "${ECHO_T}$with_assertions" >&6
16352 if test -n "$GCC"
16353 then
16354         if test "$with_assertions" = no
16355         then
16356                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16357         else
16358
16359         ADAFLAGS="$ADAFLAGS -gnata"
16360
16361         fi
16362 fi
16363
16364 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16365
16366 echo "$as_me:16366: checking if you want to use dmalloc for testing" >&5
16367 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16368
16369 # Check whether --with-dmalloc or --without-dmalloc was given.
16370 if test "${with_dmalloc+set}" = set; then
16371   withval="$with_dmalloc"
16372
16373 cat >>confdefs.h <<EOF
16374 #define USE_DMALLOC 1
16375 EOF
16376
16377         : ${with_cflags:=-g}
16378         : ${with_no_leaks:=yes}
16379          with_dmalloc=yes
16380 else
16381   with_dmalloc=
16382 fi;
16383 echo "$as_me:16383: result: ${with_dmalloc:-no}" >&5
16384 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16385
16386 case .$with_cflags in
16387 (.*-g*)
16388         case .$CFLAGS in
16389         (.*-g*)
16390                 ;;
16391         (*)
16392
16393 cf_fix_cppflags=no
16394 cf_new_cflags=
16395 cf_new_cppflags=
16396 cf_new_extra_cppflags=
16397
16398 for cf_add_cflags in -g
16399 do
16400 case $cf_fix_cppflags in
16401 (no)
16402         case $cf_add_cflags in
16403         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16404                 case $cf_add_cflags in
16405                 (-D*)
16406                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16407
16408                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16409                                 && test -z "${cf_tst_cflags}" \
16410                                 && cf_fix_cppflags=yes
16411
16412                         if test $cf_fix_cppflags = yes ; then
16413
16414         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16415         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16416
16417                                 continue
16418                         elif test "${cf_tst_cflags}" = "\"'" ; then
16419
16420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16422
16423                                 continue
16424                         fi
16425                         ;;
16426                 esac
16427                 case "$CPPFLAGS" in
16428                 (*$cf_add_cflags)
16429                         ;;
16430                 (*)
16431                         case $cf_add_cflags in
16432                         (-D*)
16433                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16434
16435 CPPFLAGS=`echo "$CPPFLAGS" | \
16436         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16437                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16438
16439                                 ;;
16440                         esac
16441
16442         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16443         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16444
16445                         ;;
16446                 esac
16447                 ;;
16448         (*)
16449
16450         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16451         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16452
16453                 ;;
16454         esac
16455         ;;
16456 (yes)
16457
16458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16460
16461         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16462
16463         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16464                 && test -z "${cf_tst_cflags}" \
16465                 && cf_fix_cppflags=no
16466         ;;
16467 esac
16468 done
16469
16470 if test -n "$cf_new_cflags" ; then
16471
16472         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16473         CFLAGS="${CFLAGS}$cf_new_cflags"
16474
16475 fi
16476
16477 if test -n "$cf_new_cppflags" ; then
16478
16479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16480         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16481
16482 fi
16483
16484 if test -n "$cf_new_extra_cppflags" ; then
16485
16486         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16487         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16488
16489 fi
16490
16491                 ;;
16492         esac
16493         ;;
16494 esac
16495
16496 if test "$with_dmalloc" = yes ; then
16497         echo "$as_me:16497: checking for dmalloc.h" >&5
16498 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16499 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16500   echo $ECHO_N "(cached) $ECHO_C" >&6
16501 else
16502   cat >conftest.$ac_ext <<_ACEOF
16503 #line 16503 "configure"
16504 #include "confdefs.h"
16505 #include <dmalloc.h>
16506 _ACEOF
16507 if { (eval echo "$as_me:16507: \"$ac_cpp conftest.$ac_ext\"") >&5
16508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16509   ac_status=$?
16510   egrep -v '^ *\+' conftest.er1 >conftest.err
16511   rm -f conftest.er1
16512   cat conftest.err >&5
16513   echo "$as_me:16513: \$? = $ac_status" >&5
16514   (exit $ac_status); } >/dev/null; then
16515   if test -s conftest.err; then
16516     ac_cpp_err=$ac_c_preproc_warn_flag
16517   else
16518     ac_cpp_err=
16519   fi
16520 else
16521   ac_cpp_err=yes
16522 fi
16523 if test -z "$ac_cpp_err"; then
16524   ac_cv_header_dmalloc_h=yes
16525 else
16526   echo "$as_me: failed program was:" >&5
16527   cat conftest.$ac_ext >&5
16528   ac_cv_header_dmalloc_h=no
16529 fi
16530 rm -f conftest.err conftest.$ac_ext
16531 fi
16532 echo "$as_me:16532: result: $ac_cv_header_dmalloc_h" >&5
16533 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16534 if test $ac_cv_header_dmalloc_h = yes; then
16535
16536 echo "$as_me:16536: checking for dmalloc_debug in -ldmalloc" >&5
16537 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16538 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16539   echo $ECHO_N "(cached) $ECHO_C" >&6
16540 else
16541   ac_check_lib_save_LIBS=$LIBS
16542 LIBS="-ldmalloc  $LIBS"
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546
16547 /* Override any gcc2 internal prototype to avoid an error.  */
16548 #ifdef __cplusplus
16549 extern "C"
16550 #endif
16551 /* We use char because int might match the return type of a gcc2
16552    builtin and then its argument prototype would still apply.  */
16553 char dmalloc_debug ();
16554 int
16555 main (void)
16556 {
16557 dmalloc_debug ();
16558   ;
16559   return 0;
16560 }
16561 _ACEOF
16562 rm -f conftest.$ac_objext conftest$ac_exeext
16563 if { (eval echo "$as_me:16563: \"$ac_link\"") >&5
16564   (eval $ac_link) 2>&5
16565   ac_status=$?
16566   echo "$as_me:16566: \$? = $ac_status" >&5
16567   (exit $ac_status); } &&
16568          { ac_try='test -s conftest$ac_exeext'
16569   { (eval echo "$as_me:16569: \"$ac_try\"") >&5
16570   (eval $ac_try) 2>&5
16571   ac_status=$?
16572   echo "$as_me:16572: \$? = $ac_status" >&5
16573   (exit $ac_status); }; }; then
16574   ac_cv_lib_dmalloc_dmalloc_debug=yes
16575 else
16576   echo "$as_me: failed program was:" >&5
16577 cat conftest.$ac_ext >&5
16578 ac_cv_lib_dmalloc_dmalloc_debug=no
16579 fi
16580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16581 LIBS=$ac_check_lib_save_LIBS
16582 fi
16583 echo "$as_me:16583: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16584 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16585 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16586   cat >>confdefs.h <<EOF
16587 #define HAVE_LIBDMALLOC 1
16588 EOF
16589
16590   LIBS="-ldmalloc $LIBS"
16591
16592 fi
16593
16594 fi
16595
16596 fi
16597
16598 echo "$as_me:16598: checking if you want to use dbmalloc for testing" >&5
16599 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16600
16601 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16602 if test "${with_dbmalloc+set}" = set; then
16603   withval="$with_dbmalloc"
16604
16605 cat >>confdefs.h <<EOF
16606 #define USE_DBMALLOC 1
16607 EOF
16608
16609         : ${with_cflags:=-g}
16610         : ${with_no_leaks:=yes}
16611          with_dbmalloc=yes
16612 else
16613   with_dbmalloc=
16614 fi;
16615 echo "$as_me:16615: result: ${with_dbmalloc:-no}" >&5
16616 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16617
16618 case .$with_cflags in
16619 (.*-g*)
16620         case .$CFLAGS in
16621         (.*-g*)
16622                 ;;
16623         (*)
16624
16625 cf_fix_cppflags=no
16626 cf_new_cflags=
16627 cf_new_cppflags=
16628 cf_new_extra_cppflags=
16629
16630 for cf_add_cflags in -g
16631 do
16632 case $cf_fix_cppflags in
16633 (no)
16634         case $cf_add_cflags in
16635         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16636                 case $cf_add_cflags in
16637                 (-D*)
16638                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16639
16640                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16641                                 && test -z "${cf_tst_cflags}" \
16642                                 && cf_fix_cppflags=yes
16643
16644                         if test $cf_fix_cppflags = yes ; then
16645
16646         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16647         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16648
16649                                 continue
16650                         elif test "${cf_tst_cflags}" = "\"'" ; then
16651
16652         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16653         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16654
16655                                 continue
16656                         fi
16657                         ;;
16658                 esac
16659                 case "$CPPFLAGS" in
16660                 (*$cf_add_cflags)
16661                         ;;
16662                 (*)
16663                         case $cf_add_cflags in
16664                         (-D*)
16665                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16666
16667 CPPFLAGS=`echo "$CPPFLAGS" | \
16668         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16669                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16670
16671                                 ;;
16672                         esac
16673
16674         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16675         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16676
16677                         ;;
16678                 esac
16679                 ;;
16680         (*)
16681
16682         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16683         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16684
16685                 ;;
16686         esac
16687         ;;
16688 (yes)
16689
16690         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16691         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16692
16693         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16694
16695         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16696                 && test -z "${cf_tst_cflags}" \
16697                 && cf_fix_cppflags=no
16698         ;;
16699 esac
16700 done
16701
16702 if test -n "$cf_new_cflags" ; then
16703
16704         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16705         CFLAGS="${CFLAGS}$cf_new_cflags"
16706
16707 fi
16708
16709 if test -n "$cf_new_cppflags" ; then
16710
16711         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16712         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16713
16714 fi
16715
16716 if test -n "$cf_new_extra_cppflags" ; then
16717
16718         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16719         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16720
16721 fi
16722
16723                 ;;
16724         esac
16725         ;;
16726 esac
16727
16728 if test "$with_dbmalloc" = yes ; then
16729         echo "$as_me:16729: checking for dbmalloc.h" >&5
16730 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16731 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16732   echo $ECHO_N "(cached) $ECHO_C" >&6
16733 else
16734   cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16737 #include <dbmalloc.h>
16738 _ACEOF
16739 if { (eval echo "$as_me:16739: \"$ac_cpp conftest.$ac_ext\"") >&5
16740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16741   ac_status=$?
16742   egrep -v '^ *\+' conftest.er1 >conftest.err
16743   rm -f conftest.er1
16744   cat conftest.err >&5
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } >/dev/null; then
16747   if test -s conftest.err; then
16748     ac_cpp_err=$ac_c_preproc_warn_flag
16749   else
16750     ac_cpp_err=
16751   fi
16752 else
16753   ac_cpp_err=yes
16754 fi
16755 if test -z "$ac_cpp_err"; then
16756   ac_cv_header_dbmalloc_h=yes
16757 else
16758   echo "$as_me: failed program was:" >&5
16759   cat conftest.$ac_ext >&5
16760   ac_cv_header_dbmalloc_h=no
16761 fi
16762 rm -f conftest.err conftest.$ac_ext
16763 fi
16764 echo "$as_me:16764: result: $ac_cv_header_dbmalloc_h" >&5
16765 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16766 if test $ac_cv_header_dbmalloc_h = yes; then
16767
16768 echo "$as_me:16768: checking for debug_malloc in -ldbmalloc" >&5
16769 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16770 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16771   echo $ECHO_N "(cached) $ECHO_C" >&6
16772 else
16773   ac_check_lib_save_LIBS=$LIBS
16774 LIBS="-ldbmalloc  $LIBS"
16775 cat >conftest.$ac_ext <<_ACEOF
16776 #line 16776 "configure"
16777 #include "confdefs.h"
16778
16779 /* Override any gcc2 internal prototype to avoid an error.  */
16780 #ifdef __cplusplus
16781 extern "C"
16782 #endif
16783 /* We use char because int might match the return type of a gcc2
16784    builtin and then its argument prototype would still apply.  */
16785 char debug_malloc ();
16786 int
16787 main (void)
16788 {
16789 debug_malloc ();
16790   ;
16791   return 0;
16792 }
16793 _ACEOF
16794 rm -f conftest.$ac_objext conftest$ac_exeext
16795 if { (eval echo "$as_me:16795: \"$ac_link\"") >&5
16796   (eval $ac_link) 2>&5
16797   ac_status=$?
16798   echo "$as_me:16798: \$? = $ac_status" >&5
16799   (exit $ac_status); } &&
16800          { ac_try='test -s conftest$ac_exeext'
16801   { (eval echo "$as_me:16801: \"$ac_try\"") >&5
16802   (eval $ac_try) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); }; }; then
16806   ac_cv_lib_dbmalloc_debug_malloc=yes
16807 else
16808   echo "$as_me: failed program was:" >&5
16809 cat conftest.$ac_ext >&5
16810 ac_cv_lib_dbmalloc_debug_malloc=no
16811 fi
16812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16813 LIBS=$ac_check_lib_save_LIBS
16814 fi
16815 echo "$as_me:16815: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16816 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16817 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16818   cat >>confdefs.h <<EOF
16819 #define HAVE_LIBDBMALLOC 1
16820 EOF
16821
16822   LIBS="-ldbmalloc $LIBS"
16823
16824 fi
16825
16826 fi
16827
16828 fi
16829
16830 echo "$as_me:16830: checking if you want to use valgrind for testing" >&5
16831 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16832
16833 # Check whether --with-valgrind or --without-valgrind was given.
16834 if test "${with_valgrind+set}" = set; then
16835   withval="$with_valgrind"
16836
16837 cat >>confdefs.h <<EOF
16838 #define USE_VALGRIND 1
16839 EOF
16840
16841         : ${with_cflags:=-g}
16842         : ${with_no_leaks:=yes}
16843          with_valgrind=yes
16844 else
16845   with_valgrind=
16846 fi;
16847 echo "$as_me:16847: result: ${with_valgrind:-no}" >&5
16848 echo "${ECHO_T}${with_valgrind:-no}" >&6
16849
16850 case .$with_cflags in
16851 (.*-g*)
16852         case .$CFLAGS in
16853         (.*-g*)
16854                 ;;
16855         (*)
16856
16857 cf_fix_cppflags=no
16858 cf_new_cflags=
16859 cf_new_cppflags=
16860 cf_new_extra_cppflags=
16861
16862 for cf_add_cflags in -g
16863 do
16864 case $cf_fix_cppflags in
16865 (no)
16866         case $cf_add_cflags in
16867         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16868                 case $cf_add_cflags in
16869                 (-D*)
16870                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16871
16872                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16873                                 && test -z "${cf_tst_cflags}" \
16874                                 && cf_fix_cppflags=yes
16875
16876                         if test $cf_fix_cppflags = yes ; then
16877
16878         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16879         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16880
16881                                 continue
16882                         elif test "${cf_tst_cflags}" = "\"'" ; then
16883
16884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16886
16887                                 continue
16888                         fi
16889                         ;;
16890                 esac
16891                 case "$CPPFLAGS" in
16892                 (*$cf_add_cflags)
16893                         ;;
16894                 (*)
16895                         case $cf_add_cflags in
16896                         (-D*)
16897                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16898
16899 CPPFLAGS=`echo "$CPPFLAGS" | \
16900         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16901                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16902
16903                                 ;;
16904                         esac
16905
16906         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16907         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16908
16909                         ;;
16910                 esac
16911                 ;;
16912         (*)
16913
16914         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16915         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16916
16917                 ;;
16918         esac
16919         ;;
16920 (yes)
16921
16922         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16923         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16924
16925         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16926
16927         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16928                 && test -z "${cf_tst_cflags}" \
16929                 && cf_fix_cppflags=no
16930         ;;
16931 esac
16932 done
16933
16934 if test -n "$cf_new_cflags" ; then
16935
16936         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16937         CFLAGS="${CFLAGS}$cf_new_cflags"
16938
16939 fi
16940
16941 if test -n "$cf_new_cppflags" ; then
16942
16943         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16944         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16945
16946 fi
16947
16948 if test -n "$cf_new_extra_cppflags" ; then
16949
16950         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16951         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16952
16953 fi
16954
16955                 ;;
16956         esac
16957         ;;
16958 esac
16959
16960 echo "$as_me:16960: checking if you want to perform memory-leak testing" >&5
16961 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16962
16963 # Check whether --enable-leaks or --disable-leaks was given.
16964 if test "${enable_leaks+set}" = set; then
16965   enableval="$enable_leaks"
16966   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16967 else
16968   : ${with_no_leaks:=no}
16969 fi;
16970 echo "$as_me:16970: result: $with_no_leaks" >&5
16971 echo "${ECHO_T}$with_no_leaks" >&6
16972
16973 if test "$with_no_leaks" = yes ; then
16974
16975 cat >>confdefs.h <<\EOF
16976 #define NO_LEAKS 1
16977 EOF
16978
16979 cat >>confdefs.h <<\EOF
16980 #define YY_NO_LEAKS 1
16981 EOF
16982
16983 fi
16984
16985 cat >>confdefs.h <<\EOF
16986 #define HAVE_NC_ALLOC_H 1
16987 EOF
16988
16989 ###     use option --enable-expanded to generate certain macros as functions
16990
16991 # Check whether --enable-expanded or --disable-expanded was given.
16992 if test "${enable_expanded+set}" = set; then
16993   enableval="$enable_expanded"
16994   test "x$enableval" = xyes &&
16995 cat >>confdefs.h <<\EOF
16996 #define NCURSES_EXPANDED 1
16997 EOF
16998
16999 fi;
17000
17001 ###     use option --disable-macros to suppress macros in favor of functions
17002
17003 # Check whether --enable-macros or --disable-macros was given.
17004 if test "${enable_macros+set}" = set; then
17005   enableval="$enable_macros"
17006   test "$enableval" = no &&
17007 cat >>confdefs.h <<\EOF
17008 #define NCURSES_NOMACROS 1
17009 EOF
17010
17011 fi;
17012
17013 # Normally we only add trace() to the debug-library.  Allow this to be
17014 # extended to all models of the ncurses library:
17015 cf_all_traces=no
17016 case "$CFLAGS $CPPFLAGS" in
17017 (*-DTRACE*)
17018         cf_all_traces=yes
17019         ;;
17020 esac
17021
17022 echo "$as_me:17022: checking whether to add trace feature to all models" >&5
17023 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17024
17025 # Check whether --with-trace or --without-trace was given.
17026 if test "${with_trace+set}" = set; then
17027   withval="$with_trace"
17028   cf_with_trace=$withval
17029 else
17030   cf_with_trace=$cf_all_traces
17031 fi;
17032 echo "$as_me:17032: result: $cf_with_trace" >&5
17033 echo "${ECHO_T}$cf_with_trace" >&6
17034
17035 if test "x$cf_with_trace" = xyes ; then
17036         LIB_TRACING=all
17037         ADA_TRACE=TRUE
17038
17039 cf_fix_cppflags=no
17040 cf_new_cflags=
17041 cf_new_cppflags=
17042 cf_new_extra_cppflags=
17043
17044 for cf_add_cflags in -DTRACE
17045 do
17046 case $cf_fix_cppflags in
17047 (no)
17048         case $cf_add_cflags in
17049         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17050                 case $cf_add_cflags in
17051                 (-D*)
17052                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17053
17054                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17055                                 && test -z "${cf_tst_cflags}" \
17056                                 && cf_fix_cppflags=yes
17057
17058                         if test $cf_fix_cppflags = yes ; then
17059
17060         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17061         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17062
17063                                 continue
17064                         elif test "${cf_tst_cflags}" = "\"'" ; then
17065
17066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17068
17069                                 continue
17070                         fi
17071                         ;;
17072                 esac
17073                 case "$CPPFLAGS" in
17074                 (*$cf_add_cflags)
17075                         ;;
17076                 (*)
17077                         case $cf_add_cflags in
17078                         (-D*)
17079                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17080
17081 CPPFLAGS=`echo "$CPPFLAGS" | \
17082         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17083                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17084
17085                                 ;;
17086                         esac
17087
17088         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17089         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17090
17091                         ;;
17092                 esac
17093                 ;;
17094         (*)
17095
17096         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17097         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17098
17099                 ;;
17100         esac
17101         ;;
17102 (yes)
17103
17104         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17105         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17106
17107         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17108
17109         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17110                 && test -z "${cf_tst_cflags}" \
17111                 && cf_fix_cppflags=no
17112         ;;
17113 esac
17114 done
17115
17116 if test -n "$cf_new_cflags" ; then
17117
17118         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17119         CFLAGS="${CFLAGS}$cf_new_cflags"
17120
17121 fi
17122
17123 if test -n "$cf_new_cppflags" ; then
17124
17125         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17126         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17127
17128 fi
17129
17130 if test -n "$cf_new_extra_cppflags" ; then
17131
17132         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17133         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17134
17135 fi
17136
17137 cat >>confdefs.h <<\EOF
17138 #define HAVE__TRACEF 1
17139 EOF
17140
17141 else
17142         LIB_TRACING=DEBUG
17143         ADA_TRACE=FALSE
17144 fi
17145
17146 echo "$as_me:17146: checking if we want to use GNAT projects" >&5
17147 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17148
17149 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17150 if test "${enable_gnat_projects+set}" = set; then
17151   enableval="$enable_gnat_projects"
17152   test "$enableval" != no && enableval=yes
17153         if test "$enableval" != "yes" ; then
17154     enable_gnat_projects=no
17155         else
17156                 enable_gnat_projects=yes
17157         fi
17158 else
17159   enableval=yes
17160         enable_gnat_projects=yes
17161
17162 fi;
17163 echo "$as_me:17163: result: $enable_gnat_projects" >&5
17164 echo "${ECHO_T}$enable_gnat_projects" >&6
17165
17166 ###     Checks for libraries.
17167 case $cf_cv_system_name in
17168 (*mingw32*|*mingw64*)
17169         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17170         # Note: WINVER may be a problem with Windows 10
17171         ;;
17172 (*)
17173 echo "$as_me:17173: checking for gettimeofday" >&5
17174 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17175 if test "${ac_cv_func_gettimeofday+set}" = set; then
17176   echo $ECHO_N "(cached) $ECHO_C" >&6
17177 else
17178   cat >conftest.$ac_ext <<_ACEOF
17179 #line 17179 "configure"
17180 #include "confdefs.h"
17181 #define gettimeofday autoconf_temporary
17182 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17183 #undef gettimeofday
17184
17185 #ifdef __cplusplus
17186 extern "C"
17187 #endif
17188
17189 /* We use char because int might match the return type of a gcc2
17190    builtin and then its argument prototype would still apply.  */
17191 char gettimeofday (void);
17192
17193 int
17194 main (void)
17195 {
17196
17197 /* The GNU C library defines stubs for functions which it implements
17198     to always fail with ENOSYS.  Some functions are actually named
17199     something starting with __ and the normal name is an alias.  */
17200 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17201 #error found stub for gettimeofday
17202 #endif
17203
17204         return gettimeofday ();
17205   ;
17206   return 0;
17207 }
17208 _ACEOF
17209 rm -f conftest.$ac_objext conftest$ac_exeext
17210 if { (eval echo "$as_me:17210: \"$ac_link\"") >&5
17211   (eval $ac_link) 2>&5
17212   ac_status=$?
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); } &&
17215          { ac_try='test -s conftest$ac_exeext'
17216   { (eval echo "$as_me:17216: \"$ac_try\"") >&5
17217   (eval $ac_try) 2>&5
17218   ac_status=$?
17219   echo "$as_me:17219: \$? = $ac_status" >&5
17220   (exit $ac_status); }; }; then
17221   ac_cv_func_gettimeofday=yes
17222 else
17223   echo "$as_me: failed program was:" >&5
17224 cat conftest.$ac_ext >&5
17225 ac_cv_func_gettimeofday=no
17226 fi
17227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17228 fi
17229 echo "$as_me:17229: result: $ac_cv_func_gettimeofday" >&5
17230 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17231 if test $ac_cv_func_gettimeofday = yes; then
17232
17233 cat >>confdefs.h <<\EOF
17234 #define HAVE_GETTIMEOFDAY 1
17235 EOF
17236
17237 else
17238
17239 echo "$as_me:17239: checking for gettimeofday in -lbsd" >&5
17240 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17241 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17242   echo $ECHO_N "(cached) $ECHO_C" >&6
17243 else
17244   ac_check_lib_save_LIBS=$LIBS
17245 LIBS="-lbsd  $LIBS"
17246 cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249
17250 /* Override any gcc2 internal prototype to avoid an error.  */
17251 #ifdef __cplusplus
17252 extern "C"
17253 #endif
17254 /* We use char because int might match the return type of a gcc2
17255    builtin and then its argument prototype would still apply.  */
17256 char gettimeofday ();
17257 int
17258 main (void)
17259 {
17260 gettimeofday ();
17261   ;
17262   return 0;
17263 }
17264 _ACEOF
17265 rm -f conftest.$ac_objext conftest$ac_exeext
17266 if { (eval echo "$as_me:17266: \"$ac_link\"") >&5
17267   (eval $ac_link) 2>&5
17268   ac_status=$?
17269   echo "$as_me:17269: \$? = $ac_status" >&5
17270   (exit $ac_status); } &&
17271          { ac_try='test -s conftest$ac_exeext'
17272   { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); }; }; then
17277   ac_cv_lib_bsd_gettimeofday=yes
17278 else
17279   echo "$as_me: failed program was:" >&5
17280 cat conftest.$ac_ext >&5
17281 ac_cv_lib_bsd_gettimeofday=no
17282 fi
17283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17284 LIBS=$ac_check_lib_save_LIBS
17285 fi
17286 echo "$as_me:17286: result: $ac_cv_lib_bsd_gettimeofday" >&5
17287 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17288 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17289
17290 cat >>confdefs.h <<\EOF
17291 #define HAVE_GETTIMEOFDAY 1
17292 EOF
17293
17294 cf_add_libs="$LIBS"
17295 # reverse order
17296 cf_add_0lib=
17297 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17298 # filter duplicates
17299 for cf_add_1lib in $cf_add_0lib; do
17300         for cf_add_2lib in $cf_add_libs; do
17301                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17302                         cf_add_1lib=
17303                         break
17304                 fi
17305         done
17306         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17307 done
17308 LIBS="$cf_add_libs"
17309
17310 fi
17311
17312 fi
17313         ;;
17314 esac
17315
17316 echo "$as_me:17316: checking if -lm needed for math functions" >&5
17317 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17318 if test "${cf_cv_need_libm+set}" = set; then
17319   echo $ECHO_N "(cached) $ECHO_C" >&6
17320 else
17321
17322         cat >conftest.$ac_ext <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17325
17326         #include <stdio.h>
17327         #include <stdlib.h>
17328         #include <math.h>
17329
17330 int
17331 main (void)
17332 {
17333 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 rm -f conftest.$ac_objext conftest$ac_exeext
17339 if { (eval echo "$as_me:17339: \"$ac_link\"") >&5
17340   (eval $ac_link) 2>&5
17341   ac_status=$?
17342   echo "$as_me:17342: \$? = $ac_status" >&5
17343   (exit $ac_status); } &&
17344          { ac_try='test -s conftest$ac_exeext'
17345   { (eval echo "$as_me:17345: \"$ac_try\"") >&5
17346   (eval $ac_try) 2>&5
17347   ac_status=$?
17348   echo "$as_me:17348: \$? = $ac_status" >&5
17349   (exit $ac_status); }; }; then
17350   cf_cv_need_libm=no
17351 else
17352   echo "$as_me: failed program was:" >&5
17353 cat conftest.$ac_ext >&5
17354 cf_cv_need_libm=yes
17355 fi
17356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17357 fi
17358 echo "$as_me:17358: result: $cf_cv_need_libm" >&5
17359 echo "${ECHO_T}$cf_cv_need_libm" >&6
17360 if test "$cf_cv_need_libm" = yes
17361 then
17362 MATH_LIB=-lm
17363 fi
17364
17365 ###     Checks for header files.
17366 echo "$as_me:17366: checking for ANSI C header files" >&5
17367 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17368 if test "${ac_cv_header_stdc+set}" = set; then
17369   echo $ECHO_N "(cached) $ECHO_C" >&6
17370 else
17371   cat >conftest.$ac_ext <<_ACEOF
17372 #line 17372 "configure"
17373 #include "confdefs.h"
17374 #include <stdlib.h>
17375 #include <stdarg.h>
17376 #include <string.h>
17377 #include <float.h>
17378
17379 _ACEOF
17380 if { (eval echo "$as_me:17380: \"$ac_cpp conftest.$ac_ext\"") >&5
17381   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17382   ac_status=$?
17383   egrep -v '^ *\+' conftest.er1 >conftest.err
17384   rm -f conftest.er1
17385   cat conftest.err >&5
17386   echo "$as_me:17386: \$? = $ac_status" >&5
17387   (exit $ac_status); } >/dev/null; then
17388   if test -s conftest.err; then
17389     ac_cpp_err=$ac_c_preproc_warn_flag
17390   else
17391     ac_cpp_err=
17392   fi
17393 else
17394   ac_cpp_err=yes
17395 fi
17396 if test -z "$ac_cpp_err"; then
17397   ac_cv_header_stdc=yes
17398 else
17399   echo "$as_me: failed program was:" >&5
17400   cat conftest.$ac_ext >&5
17401   ac_cv_header_stdc=no
17402 fi
17403 rm -f conftest.err conftest.$ac_ext
17404
17405 if test $ac_cv_header_stdc = yes; then
17406   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17407   cat >conftest.$ac_ext <<_ACEOF
17408 #line 17408 "configure"
17409 #include "confdefs.h"
17410 #include <string.h>
17411
17412 _ACEOF
17413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17414   egrep "memchr" >/dev/null 2>&1; then
17415   :
17416 else
17417   ac_cv_header_stdc=no
17418 fi
17419 rm -rf conftest*
17420
17421 fi
17422
17423 if test $ac_cv_header_stdc = yes; then
17424   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17425   cat >conftest.$ac_ext <<_ACEOF
17426 #line 17426 "configure"
17427 #include "confdefs.h"
17428 #include <stdlib.h>
17429
17430 _ACEOF
17431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17432   egrep "free" >/dev/null 2>&1; then
17433   :
17434 else
17435   ac_cv_header_stdc=no
17436 fi
17437 rm -rf conftest*
17438
17439 fi
17440
17441 if test $ac_cv_header_stdc = yes; then
17442   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17443   if test "$cross_compiling" = yes; then
17444   :
17445 else
17446   cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449 #include <ctype.h>
17450 #if ((' ' & 0x0FF) == 0x020)
17451 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17452 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17453 #else
17454 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17455                      || ('j' <= (c) && (c) <= 'r') \
17456                      || ('s' <= (c) && (c) <= 'z'))
17457 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17458 #endif
17459
17460 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17461 int
17462 main (void)
17463 {
17464   int i;
17465   for (i = 0; i < 256; i++)
17466     if (XOR (islower (i), ISLOWER (i))
17467         || toupper (i) != TOUPPER (i))
17468       $ac_main_return(2);
17469   $ac_main_return (0);
17470 }
17471 _ACEOF
17472 rm -f conftest$ac_exeext
17473 if { (eval echo "$as_me:17473: \"$ac_link\"") >&5
17474   (eval $ac_link) 2>&5
17475   ac_status=$?
17476   echo "$as_me:17476: \$? = $ac_status" >&5
17477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17478   { (eval echo "$as_me:17478: \"$ac_try\"") >&5
17479   (eval $ac_try) 2>&5
17480   ac_status=$?
17481   echo "$as_me:17481: \$? = $ac_status" >&5
17482   (exit $ac_status); }; }; then
17483   :
17484 else
17485   echo "$as_me: program exited with status $ac_status" >&5
17486 echo "$as_me: failed program was:" >&5
17487 cat conftest.$ac_ext >&5
17488 ac_cv_header_stdc=no
17489 fi
17490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17491 fi
17492 fi
17493 fi
17494 echo "$as_me:17494: result: $ac_cv_header_stdc" >&5
17495 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17496 if test $ac_cv_header_stdc = yes; then
17497
17498 cat >>confdefs.h <<\EOF
17499 #define STDC_HEADERS 1
17500 EOF
17501
17502 fi
17503
17504 ac_header_dirent=no
17505 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17506   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17507 echo "$as_me:17507: checking for $ac_hdr that defines DIR" >&5
17508 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17509 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17510   echo $ECHO_N "(cached) $ECHO_C" >&6
17511 else
17512   cat >conftest.$ac_ext <<_ACEOF
17513 #line 17513 "configure"
17514 #include "confdefs.h"
17515 #include <sys/types.h>
17516 #include <$ac_hdr>
17517
17518 int
17519 main (void)
17520 {
17521 if ((DIR *) 0)
17522 return 0;
17523   ;
17524   return 0;
17525 }
17526 _ACEOF
17527 rm -f conftest.$ac_objext
17528 if { (eval echo "$as_me:17528: \"$ac_compile\"") >&5
17529   (eval $ac_compile) 2>&5
17530   ac_status=$?
17531   echo "$as_me:17531: \$? = $ac_status" >&5
17532   (exit $ac_status); } &&
17533          { ac_try='test -s conftest.$ac_objext'
17534   { (eval echo "$as_me:17534: \"$ac_try\"") >&5
17535   (eval $ac_try) 2>&5
17536   ac_status=$?
17537   echo "$as_me:17537: \$? = $ac_status" >&5
17538   (exit $ac_status); }; }; then
17539   eval "$as_ac_Header=yes"
17540 else
17541   echo "$as_me: failed program was:" >&5
17542 cat conftest.$ac_ext >&5
17543 eval "$as_ac_Header=no"
17544 fi
17545 rm -f conftest.$ac_objext conftest.$ac_ext
17546 fi
17547 echo "$as_me:17547: result: `eval echo '${'$as_ac_Header'}'`" >&5
17548 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17549 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17550   cat >>confdefs.h <<EOF
17551 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17552 EOF
17553
17554 ac_header_dirent=$ac_hdr; break
17555 fi
17556
17557 done
17558 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17559 if test $ac_header_dirent = dirent.h; then
17560   echo "$as_me:17560: checking for opendir in -ldir" >&5
17561 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17562 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17563   echo $ECHO_N "(cached) $ECHO_C" >&6
17564 else
17565   ac_check_lib_save_LIBS=$LIBS
17566 LIBS="-ldir  $LIBS"
17567 cat >conftest.$ac_ext <<_ACEOF
17568 #line 17568 "configure"
17569 #include "confdefs.h"
17570
17571 /* Override any gcc2 internal prototype to avoid an error.  */
17572 #ifdef __cplusplus
17573 extern "C"
17574 #endif
17575 /* We use char because int might match the return type of a gcc2
17576    builtin and then its argument prototype would still apply.  */
17577 char opendir ();
17578 int
17579 main (void)
17580 {
17581 opendir ();
17582   ;
17583   return 0;
17584 }
17585 _ACEOF
17586 rm -f conftest.$ac_objext conftest$ac_exeext
17587 if { (eval echo "$as_me:17587: \"$ac_link\"") >&5
17588   (eval $ac_link) 2>&5
17589   ac_status=$?
17590   echo "$as_me:17590: \$? = $ac_status" >&5
17591   (exit $ac_status); } &&
17592          { ac_try='test -s conftest$ac_exeext'
17593   { (eval echo "$as_me:17593: \"$ac_try\"") >&5
17594   (eval $ac_try) 2>&5
17595   ac_status=$?
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); }; }; then
17598   ac_cv_lib_dir_opendir=yes
17599 else
17600   echo "$as_me: failed program was:" >&5
17601 cat conftest.$ac_ext >&5
17602 ac_cv_lib_dir_opendir=no
17603 fi
17604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17605 LIBS=$ac_check_lib_save_LIBS
17606 fi
17607 echo "$as_me:17607: result: $ac_cv_lib_dir_opendir" >&5
17608 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17609 if test $ac_cv_lib_dir_opendir = yes; then
17610   LIBS="$LIBS -ldir"
17611 fi
17612
17613 else
17614   echo "$as_me:17614: checking for opendir in -lx" >&5
17615 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17616 if test "${ac_cv_lib_x_opendir+set}" = set; then
17617   echo $ECHO_N "(cached) $ECHO_C" >&6
17618 else
17619   ac_check_lib_save_LIBS=$LIBS
17620 LIBS="-lx  $LIBS"
17621 cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17624
17625 /* Override any gcc2 internal prototype to avoid an error.  */
17626 #ifdef __cplusplus
17627 extern "C"
17628 #endif
17629 /* We use char because int might match the return type of a gcc2
17630    builtin and then its argument prototype would still apply.  */
17631 char opendir ();
17632 int
17633 main (void)
17634 {
17635 opendir ();
17636   ;
17637   return 0;
17638 }
17639 _ACEOF
17640 rm -f conftest.$ac_objext conftest$ac_exeext
17641 if { (eval echo "$as_me:17641: \"$ac_link\"") >&5
17642   (eval $ac_link) 2>&5
17643   ac_status=$?
17644   echo "$as_me:17644: \$? = $ac_status" >&5
17645   (exit $ac_status); } &&
17646          { ac_try='test -s conftest$ac_exeext'
17647   { (eval echo "$as_me:17647: \"$ac_try\"") >&5
17648   (eval $ac_try) 2>&5
17649   ac_status=$?
17650   echo "$as_me:17650: \$? = $ac_status" >&5
17651   (exit $ac_status); }; }; then
17652   ac_cv_lib_x_opendir=yes
17653 else
17654   echo "$as_me: failed program was:" >&5
17655 cat conftest.$ac_ext >&5
17656 ac_cv_lib_x_opendir=no
17657 fi
17658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17659 LIBS=$ac_check_lib_save_LIBS
17660 fi
17661 echo "$as_me:17661: result: $ac_cv_lib_x_opendir" >&5
17662 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17663 if test $ac_cv_lib_x_opendir = yes; then
17664   LIBS="$LIBS -lx"
17665 fi
17666
17667 fi
17668
17669 echo "$as_me:17669: checking whether time.h and sys/time.h may both be included" >&5
17670 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17671 if test "${ac_cv_header_time+set}" = set; then
17672   echo $ECHO_N "(cached) $ECHO_C" >&6
17673 else
17674   cat >conftest.$ac_ext <<_ACEOF
17675 #line 17675 "configure"
17676 #include "confdefs.h"
17677 #include <sys/types.h>
17678 #include <sys/time.h>
17679 #include <time.h>
17680
17681 int
17682 main (void)
17683 {
17684 if ((struct tm *) 0)
17685 return 0;
17686   ;
17687   return 0;
17688 }
17689 _ACEOF
17690 rm -f conftest.$ac_objext
17691 if { (eval echo "$as_me:17691: \"$ac_compile\"") >&5
17692   (eval $ac_compile) 2>&5
17693   ac_status=$?
17694   echo "$as_me:17694: \$? = $ac_status" >&5
17695   (exit $ac_status); } &&
17696          { ac_try='test -s conftest.$ac_objext'
17697   { (eval echo "$as_me:17697: \"$ac_try\"") >&5
17698   (eval $ac_try) 2>&5
17699   ac_status=$?
17700   echo "$as_me:17700: \$? = $ac_status" >&5
17701   (exit $ac_status); }; }; then
17702   ac_cv_header_time=yes
17703 else
17704   echo "$as_me: failed program was:" >&5
17705 cat conftest.$ac_ext >&5
17706 ac_cv_header_time=no
17707 fi
17708 rm -f conftest.$ac_objext conftest.$ac_ext
17709 fi
17710 echo "$as_me:17710: result: $ac_cv_header_time" >&5
17711 echo "${ECHO_T}$ac_cv_header_time" >&6
17712 if test $ac_cv_header_time = yes; then
17713
17714 cat >>confdefs.h <<\EOF
17715 #define TIME_WITH_SYS_TIME 1
17716 EOF
17717
17718 fi
17719
17720 cf_regex_func=no
17721
17722 cf_regex_libs="regex re"
17723 case $host_os in
17724 (mingw*)
17725         cf_regex_libs="gnurx $cf_regex_libs"
17726         ;;
17727 esac
17728
17729 echo "$as_me:17729: checking for regcomp" >&5
17730 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17731 if test "${ac_cv_func_regcomp+set}" = set; then
17732   echo $ECHO_N "(cached) $ECHO_C" >&6
17733 else
17734   cat >conftest.$ac_ext <<_ACEOF
17735 #line 17735 "configure"
17736 #include "confdefs.h"
17737 #define regcomp autoconf_temporary
17738 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17739 #undef regcomp
17740
17741 #ifdef __cplusplus
17742 extern "C"
17743 #endif
17744
17745 /* We use char because int might match the return type of a gcc2
17746    builtin and then its argument prototype would still apply.  */
17747 char regcomp (void);
17748
17749 int
17750 main (void)
17751 {
17752
17753 /* The GNU C library defines stubs for functions which it implements
17754     to always fail with ENOSYS.  Some functions are actually named
17755     something starting with __ and the normal name is an alias.  */
17756 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17757 #error found stub for regcomp
17758 #endif
17759
17760         return regcomp ();
17761   ;
17762   return 0;
17763 }
17764 _ACEOF
17765 rm -f conftest.$ac_objext conftest$ac_exeext
17766 if { (eval echo "$as_me:17766: \"$ac_link\"") >&5
17767   (eval $ac_link) 2>&5
17768   ac_status=$?
17769   echo "$as_me:17769: \$? = $ac_status" >&5
17770   (exit $ac_status); } &&
17771          { ac_try='test -s conftest$ac_exeext'
17772   { (eval echo "$as_me:17772: \"$ac_try\"") >&5
17773   (eval $ac_try) 2>&5
17774   ac_status=$?
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); }; }; then
17777   ac_cv_func_regcomp=yes
17778 else
17779   echo "$as_me: failed program was:" >&5
17780 cat conftest.$ac_ext >&5
17781 ac_cv_func_regcomp=no
17782 fi
17783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17784 fi
17785 echo "$as_me:17785: result: $ac_cv_func_regcomp" >&5
17786 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17787 if test $ac_cv_func_regcomp = yes; then
17788   cf_regex_func=regcomp
17789 else
17790
17791         for cf_regex_lib in $cf_regex_libs
17792         do
17793                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17794 echo "$as_me:17794: checking for regcomp in -l$cf_regex_lib" >&5
17795 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17796 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17797   echo $ECHO_N "(cached) $ECHO_C" >&6
17798 else
17799   ac_check_lib_save_LIBS=$LIBS
17800 LIBS="-l$cf_regex_lib  $LIBS"
17801 cat >conftest.$ac_ext <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804
17805 /* Override any gcc2 internal prototype to avoid an error.  */
17806 #ifdef __cplusplus
17807 extern "C"
17808 #endif
17809 /* We use char because int might match the return type of a gcc2
17810    builtin and then its argument prototype would still apply.  */
17811 char regcomp ();
17812 int
17813 main (void)
17814 {
17815 regcomp ();
17816   ;
17817   return 0;
17818 }
17819 _ACEOF
17820 rm -f conftest.$ac_objext conftest$ac_exeext
17821 if { (eval echo "$as_me:17821: \"$ac_link\"") >&5
17822   (eval $ac_link) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit $ac_status); } &&
17826          { ac_try='test -s conftest$ac_exeext'
17827   { (eval echo "$as_me:17827: \"$ac_try\"") >&5
17828   (eval $ac_try) 2>&5
17829   ac_status=$?
17830   echo "$as_me:17830: \$? = $ac_status" >&5
17831   (exit $ac_status); }; }; then
17832   eval "$as_ac_Lib=yes"
17833 else
17834   echo "$as_me: failed program was:" >&5
17835 cat conftest.$ac_ext >&5
17836 eval "$as_ac_Lib=no"
17837 fi
17838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17839 LIBS=$ac_check_lib_save_LIBS
17840 fi
17841 echo "$as_me:17841: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17842 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17843 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17844
17845 cf_add_libs="$LIBS"
17846 # reverse order
17847 cf_add_0lib=
17848 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17849 # filter duplicates
17850 for cf_add_1lib in $cf_add_0lib; do
17851         for cf_add_2lib in $cf_add_libs; do
17852                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17853                         cf_add_1lib=
17854                         break
17855                 fi
17856         done
17857         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17858 done
17859 LIBS="$cf_add_libs"
17860
17861                                 cf_regex_func=regcomp
17862                                 break
17863 fi
17864
17865         done
17866
17867 fi
17868
17869 if test "$cf_regex_func" = no ; then
17870         echo "$as_me:17870: checking for compile" >&5
17871 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17872 if test "${ac_cv_func_compile+set}" = set; then
17873   echo $ECHO_N "(cached) $ECHO_C" >&6
17874 else
17875   cat >conftest.$ac_ext <<_ACEOF
17876 #line 17876 "configure"
17877 #include "confdefs.h"
17878 #define compile autoconf_temporary
17879 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17880 #undef compile
17881
17882 #ifdef __cplusplus
17883 extern "C"
17884 #endif
17885
17886 /* We use char because int might match the return type of a gcc2
17887    builtin and then its argument prototype would still apply.  */
17888 char compile (void);
17889
17890 int
17891 main (void)
17892 {
17893
17894 /* The GNU C library defines stubs for functions which it implements
17895     to always fail with ENOSYS.  Some functions are actually named
17896     something starting with __ and the normal name is an alias.  */
17897 #if defined (__stub_compile) || defined (__stub___compile)
17898 #error found stub for compile
17899 #endif
17900
17901         return compile ();
17902   ;
17903   return 0;
17904 }
17905 _ACEOF
17906 rm -f conftest.$ac_objext conftest$ac_exeext
17907 if { (eval echo "$as_me:17907: \"$ac_link\"") >&5
17908   (eval $ac_link) 2>&5
17909   ac_status=$?
17910   echo "$as_me:17910: \$? = $ac_status" >&5
17911   (exit $ac_status); } &&
17912          { ac_try='test -s conftest$ac_exeext'
17913   { (eval echo "$as_me:17913: \"$ac_try\"") >&5
17914   (eval $ac_try) 2>&5
17915   ac_status=$?
17916   echo "$as_me:17916: \$? = $ac_status" >&5
17917   (exit $ac_status); }; }; then
17918   ac_cv_func_compile=yes
17919 else
17920   echo "$as_me: failed program was:" >&5
17921 cat conftest.$ac_ext >&5
17922 ac_cv_func_compile=no
17923 fi
17924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17925 fi
17926 echo "$as_me:17926: result: $ac_cv_func_compile" >&5
17927 echo "${ECHO_T}$ac_cv_func_compile" >&6
17928 if test $ac_cv_func_compile = yes; then
17929   cf_regex_func=compile
17930 else
17931
17932                 echo "$as_me:17932: checking for compile in -lgen" >&5
17933 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17934 if test "${ac_cv_lib_gen_compile+set}" = set; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937   ac_check_lib_save_LIBS=$LIBS
17938 LIBS="-lgen  $LIBS"
17939 cat >conftest.$ac_ext <<_ACEOF
17940 #line 17940 "configure"
17941 #include "confdefs.h"
17942
17943 /* Override any gcc2 internal prototype to avoid an error.  */
17944 #ifdef __cplusplus
17945 extern "C"
17946 #endif
17947 /* We use char because int might match the return type of a gcc2
17948    builtin and then its argument prototype would still apply.  */
17949 char compile ();
17950 int
17951 main (void)
17952 {
17953 compile ();
17954   ;
17955   return 0;
17956 }
17957 _ACEOF
17958 rm -f conftest.$ac_objext conftest$ac_exeext
17959 if { (eval echo "$as_me:17959: \"$ac_link\"") >&5
17960   (eval $ac_link) 2>&5
17961   ac_status=$?
17962   echo "$as_me:17962: \$? = $ac_status" >&5
17963   (exit $ac_status); } &&
17964          { ac_try='test -s conftest$ac_exeext'
17965   { (eval echo "$as_me:17965: \"$ac_try\"") >&5
17966   (eval $ac_try) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); }; }; then
17970   ac_cv_lib_gen_compile=yes
17971 else
17972   echo "$as_me: failed program was:" >&5
17973 cat conftest.$ac_ext >&5
17974 ac_cv_lib_gen_compile=no
17975 fi
17976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17977 LIBS=$ac_check_lib_save_LIBS
17978 fi
17979 echo "$as_me:17979: result: $ac_cv_lib_gen_compile" >&5
17980 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17981 if test $ac_cv_lib_gen_compile = yes; then
17982
17983 cf_add_libs="$LIBS"
17984 # reverse order
17985 cf_add_0lib=
17986 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17987 # filter duplicates
17988 for cf_add_1lib in $cf_add_0lib; do
17989         for cf_add_2lib in $cf_add_libs; do
17990                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17991                         cf_add_1lib=
17992                         break
17993                 fi
17994         done
17995         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17996 done
17997 LIBS="$cf_add_libs"
17998
17999                                 cf_regex_func=compile
18000 fi
18001
18002 fi
18003
18004 fi
18005
18006 if test "$cf_regex_func" = no ; then
18007         { echo "$as_me:18007: WARNING: cannot find regular expression library" >&5
18008 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18009 fi
18010
18011 echo "$as_me:18011: checking for regular-expression headers" >&5
18012 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18013 if test "${cf_cv_regex_hdrs+set}" = set; then
18014   echo $ECHO_N "(cached) $ECHO_C" >&6
18015 else
18016
18017 cf_cv_regex_hdrs=no
18018 case $cf_regex_func in
18019 (compile)
18020         for cf_regex_hdr in regexp.h regexpr.h
18021         do
18022                 cat >conftest.$ac_ext <<_ACEOF
18023 #line 18023 "configure"
18024 #include "confdefs.h"
18025 #include <$cf_regex_hdr>
18026 int
18027 main (void)
18028 {
18029
18030                         char *p = compile("", "", "", 0);
18031                         int x = step("", "");
18032
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext conftest$ac_exeext
18038 if { (eval echo "$as_me:18038: \"$ac_link\"") >&5
18039   (eval $ac_link) 2>&5
18040   ac_status=$?
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -s conftest$ac_exeext'
18044   { (eval echo "$as_me:18044: \"$ac_try\"") >&5
18045   (eval $ac_try) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); }; }; then
18049
18050                         cf_cv_regex_hdrs=$cf_regex_hdr
18051                         break
18052
18053 else
18054   echo "$as_me: failed program was:" >&5
18055 cat conftest.$ac_ext >&5
18056 fi
18057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18058         done
18059         ;;
18060 (*)
18061         for cf_regex_hdr in regex.h
18062         do
18063                 cat >conftest.$ac_ext <<_ACEOF
18064 #line 18064 "configure"
18065 #include "confdefs.h"
18066 #include <sys/types.h>
18067 #include <$cf_regex_hdr>
18068 int
18069 main (void)
18070 {
18071
18072                         regex_t *p;
18073                         int x = regcomp(p, "", 0);
18074                         int y = regexec(p, "", 0, 0, 0);
18075                         regfree(p);
18076
18077   ;
18078   return 0;
18079 }
18080 _ACEOF
18081 rm -f conftest.$ac_objext conftest$ac_exeext
18082 if { (eval echo "$as_me:18082: \"$ac_link\"") >&5
18083   (eval $ac_link) 2>&5
18084   ac_status=$?
18085   echo "$as_me:18085: \$? = $ac_status" >&5
18086   (exit $ac_status); } &&
18087          { ac_try='test -s conftest$ac_exeext'
18088   { (eval echo "$as_me:18088: \"$ac_try\"") >&5
18089   (eval $ac_try) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); }; }; then
18093
18094                         cf_cv_regex_hdrs=$cf_regex_hdr
18095                         break
18096
18097 else
18098   echo "$as_me: failed program was:" >&5
18099 cat conftest.$ac_ext >&5
18100 fi
18101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18102         done
18103         ;;
18104 esac
18105
18106 fi
18107 echo "$as_me:18107: result: $cf_cv_regex_hdrs" >&5
18108 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18109
18110 case $cf_cv_regex_hdrs in
18111         (no)            { echo "$as_me:18111: WARNING: no regular expression header found" >&5
18112 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18113         (regex.h)
18114 cat >>confdefs.h <<\EOF
18115 #define HAVE_REGEX_H_FUNCS 1
18116 EOF
18117  ;;
18118         (regexp.h)
18119 cat >>confdefs.h <<\EOF
18120 #define HAVE_REGEXP_H_FUNCS 1
18121 EOF
18122  ;;
18123         (regexpr.h)
18124 cat >>confdefs.h <<\EOF
18125 #define HAVE_REGEXPR_H_FUNCS 1
18126 EOF
18127  ;;
18128 esac
18129
18130 for ac_header in \
18131 fcntl.h \
18132 getopt.h \
18133 limits.h \
18134 locale.h \
18135 math.h \
18136 poll.h \
18137 sys/bsdtypes.h \
18138 sys/ioctl.h \
18139 sys/param.h \
18140 sys/poll.h \
18141 sys/select.h \
18142 sys/time.h \
18143 sys/times.h \
18144 ttyent.h \
18145 unistd.h \
18146 wctype.h \
18147
18148 do
18149 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18150 echo "$as_me:18150: checking for $ac_header" >&5
18151 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18152 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18153   echo $ECHO_N "(cached) $ECHO_C" >&6
18154 else
18155   cat >conftest.$ac_ext <<_ACEOF
18156 #line 18156 "configure"
18157 #include "confdefs.h"
18158 #include <$ac_header>
18159 _ACEOF
18160 if { (eval echo "$as_me:18160: \"$ac_cpp conftest.$ac_ext\"") >&5
18161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18162   ac_status=$?
18163   egrep -v '^ *\+' conftest.er1 >conftest.err
18164   rm -f conftest.er1
18165   cat conftest.err >&5
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit $ac_status); } >/dev/null; then
18168   if test -s conftest.err; then
18169     ac_cpp_err=$ac_c_preproc_warn_flag
18170   else
18171     ac_cpp_err=
18172   fi
18173 else
18174   ac_cpp_err=yes
18175 fi
18176 if test -z "$ac_cpp_err"; then
18177   eval "$as_ac_Header=yes"
18178 else
18179   echo "$as_me: failed program was:" >&5
18180   cat conftest.$ac_ext >&5
18181   eval "$as_ac_Header=no"
18182 fi
18183 rm -f conftest.err conftest.$ac_ext
18184 fi
18185 echo "$as_me:18185: result: `eval echo '${'$as_ac_Header'}'`" >&5
18186 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18187 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18188   cat >>confdefs.h <<EOF
18189 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18190 EOF
18191
18192 fi
18193 done
18194
18195 for ac_header in unistd.h getopt.h
18196 do
18197 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18198 echo "$as_me:18198: checking for $ac_header" >&5
18199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18201   echo $ECHO_N "(cached) $ECHO_C" >&6
18202 else
18203   cat >conftest.$ac_ext <<_ACEOF
18204 #line 18204 "configure"
18205 #include "confdefs.h"
18206 #include <$ac_header>
18207 _ACEOF
18208 if { (eval echo "$as_me:18208: \"$ac_cpp conftest.$ac_ext\"") >&5
18209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18210   ac_status=$?
18211   egrep -v '^ *\+' conftest.er1 >conftest.err
18212   rm -f conftest.er1
18213   cat conftest.err >&5
18214   echo "$as_me:18214: \$? = $ac_status" >&5
18215   (exit $ac_status); } >/dev/null; then
18216   if test -s conftest.err; then
18217     ac_cpp_err=$ac_c_preproc_warn_flag
18218   else
18219     ac_cpp_err=
18220   fi
18221 else
18222   ac_cpp_err=yes
18223 fi
18224 if test -z "$ac_cpp_err"; then
18225   eval "$as_ac_Header=yes"
18226 else
18227   echo "$as_me: failed program was:" >&5
18228   cat conftest.$ac_ext >&5
18229   eval "$as_ac_Header=no"
18230 fi
18231 rm -f conftest.err conftest.$ac_ext
18232 fi
18233 echo "$as_me:18233: result: `eval echo '${'$as_ac_Header'}'`" >&5
18234 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18235 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18236   cat >>confdefs.h <<EOF
18237 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18238 EOF
18239
18240 fi
18241 done
18242
18243 echo "$as_me:18243: checking for header declaring getopt variables" >&5
18244 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18245 if test "${cf_cv_getopt_header+set}" = set; then
18246   echo $ECHO_N "(cached) $ECHO_C" >&6
18247 else
18248
18249 cf_cv_getopt_header=none
18250 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18251 do
18252 cat >conftest.$ac_ext <<_ACEOF
18253 #line 18253 "configure"
18254 #include "confdefs.h"
18255
18256 #include <$cf_header>
18257 int
18258 main (void)
18259 {
18260 int x = optind; char *y = optarg
18261   ;
18262   return 0;
18263 }
18264 _ACEOF
18265 rm -f conftest.$ac_objext
18266 if { (eval echo "$as_me:18266: \"$ac_compile\"") >&5
18267   (eval $ac_compile) 2>&5
18268   ac_status=$?
18269   echo "$as_me:18269: \$? = $ac_status" >&5
18270   (exit $ac_status); } &&
18271          { ac_try='test -s conftest.$ac_objext'
18272   { (eval echo "$as_me:18272: \"$ac_try\"") >&5
18273   (eval $ac_try) 2>&5
18274   ac_status=$?
18275   echo "$as_me:18275: \$? = $ac_status" >&5
18276   (exit $ac_status); }; }; then
18277   cf_cv_getopt_header=$cf_header
18278  break
18279 else
18280   echo "$as_me: failed program was:" >&5
18281 cat conftest.$ac_ext >&5
18282 fi
18283 rm -f conftest.$ac_objext conftest.$ac_ext
18284 done
18285
18286 fi
18287 echo "$as_me:18287: result: $cf_cv_getopt_header" >&5
18288 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18289 if test $cf_cv_getopt_header != none ; then
18290
18291 cat >>confdefs.h <<\EOF
18292 #define HAVE_GETOPT_HEADER 1
18293 EOF
18294
18295 fi
18296 if test $cf_cv_getopt_header = getopt.h ; then
18297
18298 cat >>confdefs.h <<\EOF
18299 #define NEED_GETOPT_H 1
18300 EOF
18301
18302 fi
18303
18304 echo "$as_me:18304: checking if external environ is declared" >&5
18305 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18306 if test "${cf_cv_dcl_environ+set}" = set; then
18307   echo $ECHO_N "(cached) $ECHO_C" >&6
18308 else
18309
18310     cat >conftest.$ac_ext <<_ACEOF
18311 #line 18311 "configure"
18312 #include "confdefs.h"
18313
18314 #ifdef HAVE_STDLIB_H
18315 #include <stdlib.h>
18316 #endif
18317 #include <unistd.h>
18318 int
18319 main (void)
18320 {
18321 int x = (int) environ
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -f conftest.$ac_objext
18327 if { (eval echo "$as_me:18327: \"$ac_compile\"") >&5
18328   (eval $ac_compile) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit $ac_status); } &&
18332          { ac_try='test -s conftest.$ac_objext'
18333   { (eval echo "$as_me:18333: \"$ac_try\"") >&5
18334   (eval $ac_try) 2>&5
18335   ac_status=$?
18336   echo "$as_me:18336: \$? = $ac_status" >&5
18337   (exit $ac_status); }; }; then
18338   cf_cv_dcl_environ=yes
18339 else
18340   echo "$as_me: failed program was:" >&5
18341 cat conftest.$ac_ext >&5
18342 cf_cv_dcl_environ=no
18343 fi
18344 rm -f conftest.$ac_objext conftest.$ac_ext
18345
18346 fi
18347 echo "$as_me:18347: result: $cf_cv_dcl_environ" >&5
18348 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18349
18350 if test "$cf_cv_dcl_environ" = no ; then
18351
18352 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18353
18354     cat >>confdefs.h <<EOF
18355 #define $cf_result 1
18356 EOF
18357
18358 fi
18359
18360 # It's possible (for near-UNIX clones) that the data doesn't exist
18361
18362 echo "$as_me:18362: checking if external environ exists" >&5
18363 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18364 if test "${cf_cv_have_environ+set}" = set; then
18365   echo $ECHO_N "(cached) $ECHO_C" >&6
18366 else
18367
18368         cat >conftest.$ac_ext <<_ACEOF
18369 #line 18369 "configure"
18370 #include "confdefs.h"
18371
18372 #undef environ
18373 extern int environ;
18374
18375 int
18376 main (void)
18377 {
18378 environ = 2
18379   ;
18380   return 0;
18381 }
18382 _ACEOF
18383 rm -f conftest.$ac_objext conftest$ac_exeext
18384 if { (eval echo "$as_me:18384: \"$ac_link\"") >&5
18385   (eval $ac_link) 2>&5
18386   ac_status=$?
18387   echo "$as_me:18387: \$? = $ac_status" >&5
18388   (exit $ac_status); } &&
18389          { ac_try='test -s conftest$ac_exeext'
18390   { (eval echo "$as_me:18390: \"$ac_try\"") >&5
18391   (eval $ac_try) 2>&5
18392   ac_status=$?
18393   echo "$as_me:18393: \$? = $ac_status" >&5
18394   (exit $ac_status); }; }; then
18395   cf_cv_have_environ=yes
18396 else
18397   echo "$as_me: failed program was:" >&5
18398 cat conftest.$ac_ext >&5
18399 cf_cv_have_environ=no
18400 fi
18401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18402
18403 fi
18404 echo "$as_me:18404: result: $cf_cv_have_environ" >&5
18405 echo "${ECHO_T}$cf_cv_have_environ" >&6
18406
18407 if test "$cf_cv_have_environ" = yes ; then
18408
18409 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18410
18411         cat >>confdefs.h <<EOF
18412 #define $cf_result 1
18413 EOF
18414
18415 fi
18416
18417 echo "$as_me:18417: checking for getenv" >&5
18418 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18419 if test "${ac_cv_func_getenv+set}" = set; then
18420   echo $ECHO_N "(cached) $ECHO_C" >&6
18421 else
18422   cat >conftest.$ac_ext <<_ACEOF
18423 #line 18423 "configure"
18424 #include "confdefs.h"
18425 #define getenv autoconf_temporary
18426 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18427 #undef getenv
18428
18429 #ifdef __cplusplus
18430 extern "C"
18431 #endif
18432
18433 /* We use char because int might match the return type of a gcc2
18434    builtin and then its argument prototype would still apply.  */
18435 char getenv (void);
18436
18437 int
18438 main (void)
18439 {
18440
18441 /* The GNU C library defines stubs for functions which it implements
18442     to always fail with ENOSYS.  Some functions are actually named
18443     something starting with __ and the normal name is an alias.  */
18444 #if defined (__stub_getenv) || defined (__stub___getenv)
18445 #error found stub for getenv
18446 #endif
18447
18448         return getenv ();
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext conftest$ac_exeext
18454 if { (eval echo "$as_me:18454: \"$ac_link\"") >&5
18455   (eval $ac_link) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); } &&
18459          { ac_try='test -s conftest$ac_exeext'
18460   { (eval echo "$as_me:18460: \"$ac_try\"") >&5
18461   (eval $ac_try) 2>&5
18462   ac_status=$?
18463   echo "$as_me:18463: \$? = $ac_status" >&5
18464   (exit $ac_status); }; }; then
18465   ac_cv_func_getenv=yes
18466 else
18467   echo "$as_me: failed program was:" >&5
18468 cat conftest.$ac_ext >&5
18469 ac_cv_func_getenv=no
18470 fi
18471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18472 fi
18473 echo "$as_me:18473: result: $ac_cv_func_getenv" >&5
18474 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18475
18476 for ac_func in putenv setenv strdup
18477 do
18478 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18479 echo "$as_me:18479: checking for $ac_func" >&5
18480 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18481 if eval "test \"\${$as_ac_var+set}\" = set"; then
18482   echo $ECHO_N "(cached) $ECHO_C" >&6
18483 else
18484   cat >conftest.$ac_ext <<_ACEOF
18485 #line 18485 "configure"
18486 #include "confdefs.h"
18487 #define $ac_func autoconf_temporary
18488 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18489 #undef $ac_func
18490
18491 #ifdef __cplusplus
18492 extern "C"
18493 #endif
18494
18495 /* We use char because int might match the return type of a gcc2
18496    builtin and then its argument prototype would still apply.  */
18497 char $ac_func (void);
18498
18499 int
18500 main (void)
18501 {
18502
18503 /* The GNU C library defines stubs for functions which it implements
18504     to always fail with ENOSYS.  Some functions are actually named
18505     something starting with __ and the normal name is an alias.  */
18506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18507 #error found stub for $ac_func
18508 #endif
18509
18510         return $ac_func ();
18511   ;
18512   return 0;
18513 }
18514 _ACEOF
18515 rm -f conftest.$ac_objext conftest$ac_exeext
18516 if { (eval echo "$as_me:18516: \"$ac_link\"") >&5
18517   (eval $ac_link) 2>&5
18518   ac_status=$?
18519   echo "$as_me:18519: \$? = $ac_status" >&5
18520   (exit $ac_status); } &&
18521          { ac_try='test -s conftest$ac_exeext'
18522   { (eval echo "$as_me:18522: \"$ac_try\"") >&5
18523   (eval $ac_try) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); }; }; then
18527   eval "$as_ac_var=yes"
18528 else
18529   echo "$as_me: failed program was:" >&5
18530 cat conftest.$ac_ext >&5
18531 eval "$as_ac_var=no"
18532 fi
18533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18534 fi
18535 echo "$as_me:18535: result: `eval echo '${'$as_ac_var'}'`" >&5
18536 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18537 if test `eval echo '${'$as_ac_var'}'` = yes; then
18538   cat >>confdefs.h <<EOF
18539 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18540 EOF
18541
18542 fi
18543 done
18544
18545 echo "$as_me:18545: checking if getenv returns consistent values" >&5
18546 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18547 if test "${cf_cv_consistent_getenv+set}" = set; then
18548   echo $ECHO_N "(cached) $ECHO_C" >&6
18549 else
18550
18551 if test "$cross_compiling" = yes; then
18552   cf_cv_consistent_getenv=unknown
18553 else
18554   cat >conftest.$ac_ext <<_ACEOF
18555 #line 18555 "configure"
18556 #include "confdefs.h"
18557
18558 #include <stdlib.h>
18559 #include <unistd.h>
18560 #include <stdio.h>
18561 #include <string.h>
18562 #include <sys/types.h>
18563
18564 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18565 extern char **environ;  /* POSIX, but some systems are not... */
18566 #endif
18567
18568 #if defined(HAVE_STRDUP)
18569 #define str_alloc(s) strdup(s)
18570 #else
18571 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18572 #endif
18573
18574 static void set_value(const char *name, const char *value)
18575 {
18576 #if defined(HAVE_SETENV)
18577         setenv(name, value, 1);
18578 #elif defined(HAVE_PUTENV)
18579         char buffer[1024];
18580         sprintf(buffer, "%s=%s", name, value);
18581         putenv(str_alloc(buffer));
18582 #else
18583 #error neither putenv/setenv found
18584 #endif
18585 }
18586 int main(void)
18587 {
18588         int pass;
18589         size_t numenv, limit, j;
18590         char **mynames;
18591         char **myvalues;
18592         char **mypointer;
18593         char *equals;
18594         for (numenv = 0; environ[numenv]; ++numenv) ;
18595         limit = numenv + 10;
18596         mynames = (char **) calloc(limit + 1, sizeof(char *));
18597         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18598         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18599 #if defined(HAVE_ENVIRON)
18600         for (j = 0; environ[j]; ++j) {
18601                 mynames[j] = str_alloc(environ[j]);
18602                 equals = strchr(mynames[j], '=');
18603                 if (equals != 0) {
18604                         *equals++ = '\0';
18605                         myvalues[j] = str_alloc(equals);
18606                 } else {
18607                         myvalues[j] = str_alloc("");
18608                 }
18609         }
18610 #endif
18611         for (j = numenv; j < limit; ++j) {
18612                 char name[80];
18613                 char value[80];
18614                 size_t found;
18615                 size_t k = 0;
18616                 do {
18617                         size_t jk;
18618                         found = 0;
18619                         sprintf(name, "TERM%lu", (unsigned long) k);
18620                         for (jk = 0; jk < j; ++jk) {
18621                                 if (!strcmp(name, mynames[jk])) {
18622                                         found = 1;
18623                                         ++k;
18624                                         break;
18625                                 }
18626                         }
18627                 } while (found);
18628                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18629                 set_value(name, value);
18630                 mynames[j] = str_alloc(name);
18631                 myvalues[j] = str_alloc(value);
18632         }
18633         for (pass = 0; pass < 3; ++pass) {
18634                 for (j = 0; j < limit; ++j) {
18635                         char *value = getenv(mynames[j]);
18636                         if (pass) {
18637                                 if (value == 0) {
18638                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18639                                         ${cf_cv_main_return:-return}(1);
18640                                 } else if (value != mypointer[j]) {
18641                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18642                                         ${cf_cv_main_return:-return}(1);
18643                                 } else if (strcmp(value, myvalues[j])) {
18644                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18645                                         ${cf_cv_main_return:-return}(1);
18646                                 }
18647                         } else {
18648                                 size_t k;
18649                                 mypointer[j] = value;
18650                                 for (k = 0; k < j; ++k) {
18651                                         if (mypointer[j] == mypointer[k]) {
18652                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18653                                                 ${cf_cv_main_return:-return}(1);
18654                                         }
18655                                 }
18656                         }
18657                 }
18658         }
18659         ${cf_cv_main_return:-return}(0);
18660 }
18661
18662 _ACEOF
18663 rm -f conftest$ac_exeext
18664 if { (eval echo "$as_me:18664: \"$ac_link\"") >&5
18665   (eval $ac_link) 2>&5
18666   ac_status=$?
18667   echo "$as_me:18667: \$? = $ac_status" >&5
18668   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18669   { (eval echo "$as_me:18669: \"$ac_try\"") >&5
18670   (eval $ac_try) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit $ac_status); }; }; then
18674   cf_cv_consistent_getenv=yes
18675 else
18676   echo "$as_me: program exited with status $ac_status" >&5
18677 echo "$as_me: failed program was:" >&5
18678 cat conftest.$ac_ext >&5
18679 cf_cv_consistent_getenv=no
18680 fi
18681 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18682 fi
18683
18684 fi
18685 echo "$as_me:18685: result: $cf_cv_consistent_getenv" >&5
18686 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18687
18688 if test "x$cf_cv_consistent_getenv" = xno
18689 then
18690
18691 cat >>confdefs.h <<\EOF
18692 #define HAVE_CONSISTENT_GETENV 1
18693 EOF
18694
18695 fi
18696
18697 if test "x$cf_cv_consistent_getenv" = xno && \
18698         test "x$cf_with_trace" = xyes
18699 then
18700         { echo "$as_me:18700: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18701 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18702 fi
18703
18704 # check for ISC (this may also define _POSIX_SOURCE)
18705 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18706 if test "x$ISC" = xyes ; then
18707
18708 echo "$as_me:18708: checking for main in -lcposix" >&5
18709 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18710 if test "${ac_cv_lib_cposix_main+set}" = set; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713   ac_check_lib_save_LIBS=$LIBS
18714 LIBS="-lcposix  $LIBS"
18715 cat >conftest.$ac_ext <<_ACEOF
18716 #line 18716 "configure"
18717 #include "confdefs.h"
18718
18719 int
18720 main (void)
18721 {
18722 main ();
18723   ;
18724   return 0;
18725 }
18726 _ACEOF
18727 rm -f conftest.$ac_objext conftest$ac_exeext
18728 if { (eval echo "$as_me:18728: \"$ac_link\"") >&5
18729   (eval $ac_link) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit $ac_status); } &&
18733          { ac_try='test -s conftest$ac_exeext'
18734   { (eval echo "$as_me:18734: \"$ac_try\"") >&5
18735   (eval $ac_try) 2>&5
18736   ac_status=$?
18737   echo "$as_me:18737: \$? = $ac_status" >&5
18738   (exit $ac_status); }; }; then
18739   ac_cv_lib_cposix_main=yes
18740 else
18741   echo "$as_me: failed program was:" >&5
18742 cat conftest.$ac_ext >&5
18743 ac_cv_lib_cposix_main=no
18744 fi
18745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18746 LIBS=$ac_check_lib_save_LIBS
18747 fi
18748 echo "$as_me:18748: result: $ac_cv_lib_cposix_main" >&5
18749 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18750 if test $ac_cv_lib_cposix_main = yes; then
18751   cat >>confdefs.h <<EOF
18752 #define HAVE_LIBCPOSIX 1
18753 EOF
18754
18755   LIBS="-lcposix $LIBS"
18756
18757 fi
18758
18759         echo "$as_me:18759: checking for bzero in -linet" >&5
18760 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18761 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18762   echo $ECHO_N "(cached) $ECHO_C" >&6
18763 else
18764   ac_check_lib_save_LIBS=$LIBS
18765 LIBS="-linet  $LIBS"
18766 cat >conftest.$ac_ext <<_ACEOF
18767 #line 18767 "configure"
18768 #include "confdefs.h"
18769
18770 /* Override any gcc2 internal prototype to avoid an error.  */
18771 #ifdef __cplusplus
18772 extern "C"
18773 #endif
18774 /* We use char because int might match the return type of a gcc2
18775    builtin and then its argument prototype would still apply.  */
18776 char bzero ();
18777 int
18778 main (void)
18779 {
18780 bzero ();
18781   ;
18782   return 0;
18783 }
18784 _ACEOF
18785 rm -f conftest.$ac_objext conftest$ac_exeext
18786 if { (eval echo "$as_me:18786: \"$ac_link\"") >&5
18787   (eval $ac_link) 2>&5
18788   ac_status=$?
18789   echo "$as_me:18789: \$? = $ac_status" >&5
18790   (exit $ac_status); } &&
18791          { ac_try='test -s conftest$ac_exeext'
18792   { (eval echo "$as_me:18792: \"$ac_try\"") >&5
18793   (eval $ac_try) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit $ac_status); }; }; then
18797   ac_cv_lib_inet_bzero=yes
18798 else
18799   echo "$as_me: failed program was:" >&5
18800 cat conftest.$ac_ext >&5
18801 ac_cv_lib_inet_bzero=no
18802 fi
18803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18804 LIBS=$ac_check_lib_save_LIBS
18805 fi
18806 echo "$as_me:18806: result: $ac_cv_lib_inet_bzero" >&5
18807 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18808 if test $ac_cv_lib_inet_bzero = yes; then
18809
18810 cf_add_libs="$LIBS"
18811 # reverse order
18812 cf_add_0lib=
18813 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18814 # filter duplicates
18815 for cf_add_1lib in $cf_add_0lib; do
18816         for cf_add_2lib in $cf_add_libs; do
18817                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18818                         cf_add_1lib=
18819                         break
18820                 fi
18821         done
18822         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18823 done
18824 LIBS="$cf_add_libs"
18825
18826 fi
18827 fi
18828
18829 echo "$as_me:18829: checking if sys/time.h works with sys/select.h" >&5
18830 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18831 if test "${cf_cv_sys_time_select+set}" = set; then
18832   echo $ECHO_N "(cached) $ECHO_C" >&6
18833 else
18834
18835 cat >conftest.$ac_ext <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18838
18839 #include <sys/types.h>
18840 #ifdef HAVE_SYS_TIME_H
18841 #include <sys/time.h>
18842 #endif
18843 #ifdef HAVE_SYS_SELECT_H
18844 #include <sys/select.h>
18845 #endif
18846
18847 int
18848 main (void)
18849 {
18850
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext
18856 if { (eval echo "$as_me:18856: \"$ac_compile\"") >&5
18857   (eval $ac_compile) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest.$ac_objext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867   cf_cv_sys_time_select=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 cf_cv_sys_time_select=no
18872 fi
18873 rm -f conftest.$ac_objext conftest.$ac_ext
18874
18875 fi
18876
18877 echo "$as_me:18877: result: $cf_cv_sys_time_select" >&5
18878 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18879 test "$cf_cv_sys_time_select" = yes &&
18880 cat >>confdefs.h <<\EOF
18881 #define HAVE_SYS_TIME_SELECT 1
18882 EOF
18883
18884 ###     checks for compiler characteristics
18885 ac_ext=c
18886 ac_cpp='$CPP $CPPFLAGS'
18887 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18888 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18889 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18890 ac_main_return=return
18891
18892 echo "$as_me:18892: checking for an ANSI C-conforming const" >&5
18893 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18894 if test "${ac_cv_c_const+set}" = set; then
18895   echo $ECHO_N "(cached) $ECHO_C" >&6
18896 else
18897   cat >conftest.$ac_ext <<_ACEOF
18898 #line 18898 "configure"
18899 #include "confdefs.h"
18900
18901 int
18902 main (void)
18903 {
18904 /* FIXME: Include the comments suggested by Paul. */
18905 #ifndef __cplusplus
18906   /* Ultrix mips cc rejects this.  */
18907   typedef int charset[2];
18908   const charset x;
18909   /* SunOS 4.1.1 cc rejects this.  */
18910   char const *const *ccp;
18911   char **p;
18912   /* NEC SVR4.0.2 mips cc rejects this.  */
18913   struct point {int x, y;};
18914   static struct point const zero = {0,0};
18915   /* AIX XL C 1.02.0.0 rejects this.
18916      It does not let you subtract one const X* pointer from another in
18917      an arm of an if-expression whose if-part is not a constant
18918      expression */
18919   const char *g = "string";
18920   ccp = &g + (g ? g-g : 0);
18921   /* HPUX 7.0 cc rejects these. */
18922   ++ccp;
18923   p = (char**) ccp;
18924   ccp = (char const *const *) p;
18925   { /* SCO 3.2v4 cc rejects this.  */
18926     char *t;
18927     char const *s = 0 ? (char *) 0 : (char const *) 0;
18928
18929     *t++ = 0;
18930   }
18931   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18932     int x[] = {25, 17};
18933     const int *foo = &x[0];
18934     ++foo;
18935   }
18936   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18937     typedef const int *iptr;
18938     iptr p = 0;
18939     ++p;
18940   }
18941   { /* AIX XL C 1.02.0.0 rejects this saying
18942        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18943     struct s { int j; const int *ap[3]; };
18944     struct s *b; b->j = 5;
18945   }
18946   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18947     const int foo = 10;
18948   }
18949 #endif
18950
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f conftest.$ac_objext
18956 if { (eval echo "$as_me:18956: \"$ac_compile\"") >&5
18957   (eval $ac_compile) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit $ac_status); } &&
18961          { ac_try='test -s conftest.$ac_objext'
18962   { (eval echo "$as_me:18962: \"$ac_try\"") >&5
18963   (eval $ac_try) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit $ac_status); }; }; then
18967   ac_cv_c_const=yes
18968 else
18969   echo "$as_me: failed program was:" >&5
18970 cat conftest.$ac_ext >&5
18971 ac_cv_c_const=no
18972 fi
18973 rm -f conftest.$ac_objext conftest.$ac_ext
18974 fi
18975 echo "$as_me:18975: result: $ac_cv_c_const" >&5
18976 echo "${ECHO_T}$ac_cv_c_const" >&6
18977 if test $ac_cv_c_const = no; then
18978
18979 cat >>confdefs.h <<\EOF
18980 #define const
18981 EOF
18982
18983 fi
18984
18985 echo "$as_me:18985: checking for inline" >&5
18986 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18987 if test "${ac_cv_c_inline+set}" = set; then
18988   echo $ECHO_N "(cached) $ECHO_C" >&6
18989 else
18990   ac_cv_c_inline=no
18991 for ac_kw in inline __inline__ __inline; do
18992   cat >conftest.$ac_ext <<_ACEOF
18993 #line 18993 "configure"
18994 #include "confdefs.h"
18995 #ifndef __cplusplus
18996 static $ac_kw int static_foo () {return 0; }
18997 $ac_kw int foo () {return 0; }
18998 #endif
18999
19000 _ACEOF
19001 rm -f conftest.$ac_objext
19002 if { (eval echo "$as_me:19002: \"$ac_compile\"") >&5
19003   (eval $ac_compile) 2>&5
19004   ac_status=$?
19005   echo "$as_me:19005: \$? = $ac_status" >&5
19006   (exit $ac_status); } &&
19007          { ac_try='test -s conftest.$ac_objext'
19008   { (eval echo "$as_me:19008: \"$ac_try\"") >&5
19009   (eval $ac_try) 2>&5
19010   ac_status=$?
19011   echo "$as_me:19011: \$? = $ac_status" >&5
19012   (exit $ac_status); }; }; then
19013   ac_cv_c_inline=$ac_kw; break
19014 else
19015   echo "$as_me: failed program was:" >&5
19016 cat conftest.$ac_ext >&5
19017 fi
19018 rm -f conftest.$ac_objext conftest.$ac_ext
19019 done
19020
19021 fi
19022 echo "$as_me:19022: result: $ac_cv_c_inline" >&5
19023 echo "${ECHO_T}$ac_cv_c_inline" >&6
19024 case $ac_cv_c_inline in
19025   inline | yes) ;;
19026   no)
19027 cat >>confdefs.h <<\EOF
19028 #define inline
19029 EOF
19030  ;;
19031   *)  cat >>confdefs.h <<EOF
19032 #define inline $ac_cv_c_inline
19033 EOF
19034  ;;
19035 esac
19036
19037 NCURSES_INLINE=
19038 if test "$ac_cv_c_inline" != no ; then
19039         NCURSES_INLINE=inline
19040         if test "$INTEL_COMPILER" = yes
19041         then
19042                 :
19043         elif test "$CLANG_COMPILER" = yes
19044         then
19045                 :
19046         elif test "$GCC" = yes
19047         then
19048                 echo "$as_me:19048: checking if $CC supports options to tune inlining" >&5
19049 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19050 if test "${cf_cv_gcc_inline+set}" = set; then
19051   echo $ECHO_N "(cached) $ECHO_C" >&6
19052 else
19053
19054                 cf_save_CFLAGS=$CFLAGS
19055                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19056                 cat >conftest.$ac_ext <<_ACEOF
19057 #line 19057 "configure"
19058 #include "confdefs.h"
19059 inline int foo(void) { return 1; }
19060 int
19061 main (void)
19062 {
19063 ${cf_cv_main_return:-return} foo()
19064   ;
19065   return 0;
19066 }
19067 _ACEOF
19068 rm -f conftest.$ac_objext
19069 if { (eval echo "$as_me:19069: \"$ac_compile\"") >&5
19070   (eval $ac_compile) 2>&5
19071   ac_status=$?
19072   echo "$as_me:19072: \$? = $ac_status" >&5
19073   (exit $ac_status); } &&
19074          { ac_try='test -s conftest.$ac_objext'
19075   { (eval echo "$as_me:19075: \"$ac_try\"") >&5
19076   (eval $ac_try) 2>&5
19077   ac_status=$?
19078   echo "$as_me:19078: \$? = $ac_status" >&5
19079   (exit $ac_status); }; }; then
19080   cf_cv_gcc_inline=yes
19081 else
19082   echo "$as_me: failed program was:" >&5
19083 cat conftest.$ac_ext >&5
19084 cf_cv_gcc_inline=no
19085 fi
19086 rm -f conftest.$ac_objext conftest.$ac_ext
19087                 CFLAGS=$cf_save_CFLAGS
19088
19089 fi
19090 echo "$as_me:19090: result: $cf_cv_gcc_inline" >&5
19091 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19092                 if test "$cf_cv_gcc_inline" = yes ; then
19093
19094 cf_fix_cppflags=no
19095 cf_new_cflags=
19096 cf_new_cppflags=
19097 cf_new_extra_cppflags=
19098
19099 for cf_add_cflags in --param max-inline-insns-single=1200
19100 do
19101 case $cf_fix_cppflags in
19102 (no)
19103         case $cf_add_cflags in
19104         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19105                 case $cf_add_cflags in
19106                 (-D*)
19107                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19108
19109                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19110                                 && test -z "${cf_tst_cflags}" \
19111                                 && cf_fix_cppflags=yes
19112
19113                         if test $cf_fix_cppflags = yes ; then
19114
19115         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19116         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19117
19118                                 continue
19119                         elif test "${cf_tst_cflags}" = "\"'" ; then
19120
19121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19123
19124                                 continue
19125                         fi
19126                         ;;
19127                 esac
19128                 case "$CPPFLAGS" in
19129                 (*$cf_add_cflags)
19130                         ;;
19131                 (*)
19132                         case $cf_add_cflags in
19133                         (-D*)
19134                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19135
19136 CPPFLAGS=`echo "$CPPFLAGS" | \
19137         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19138                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19139
19140                                 ;;
19141                         esac
19142
19143         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19144         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19145
19146                         ;;
19147                 esac
19148                 ;;
19149         (*)
19150
19151         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19152         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19153
19154                 ;;
19155         esac
19156         ;;
19157 (yes)
19158
19159         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19160         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19161
19162         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19163
19164         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19165                 && test -z "${cf_tst_cflags}" \
19166                 && cf_fix_cppflags=no
19167         ;;
19168 esac
19169 done
19170
19171 if test -n "$cf_new_cflags" ; then
19172
19173         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19174         CFLAGS="${CFLAGS}$cf_new_cflags"
19175
19176 fi
19177
19178 if test -n "$cf_new_cppflags" ; then
19179
19180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19181         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19182
19183 fi
19184
19185 if test -n "$cf_new_extra_cppflags" ; then
19186
19187         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19188         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19189
19190 fi
19191
19192                 fi
19193         fi
19194 fi
19195
19196 echo "$as_me:19196: checking for signal global datatype" >&5
19197 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19198 if test "${cf_cv_sig_atomic_t+set}" = set; then
19199   echo $ECHO_N "(cached) $ECHO_C" >&6
19200 else
19201
19202         for cf_type in \
19203                 "volatile sig_atomic_t" \
19204                 "sig_atomic_t" \
19205                 "int"
19206         do
19207         cat >conftest.$ac_ext <<_ACEOF
19208 #line 19208 "configure"
19209 #include "confdefs.h"
19210
19211 #include <sys/types.h>
19212 #include <signal.h>
19213 #include <stdio.h>
19214
19215 extern $cf_type x;
19216 $cf_type x;
19217 static void handler(int sig)
19218 {
19219         x = 5;
19220 }
19221 int
19222 main (void)
19223 {
19224 signal(SIGINT, handler);
19225                  x = 1
19226   ;
19227   return 0;
19228 }
19229 _ACEOF
19230 rm -f conftest.$ac_objext
19231 if { (eval echo "$as_me:19231: \"$ac_compile\"") >&5
19232   (eval $ac_compile) 2>&5
19233   ac_status=$?
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit $ac_status); } &&
19236          { ac_try='test -s conftest.$ac_objext'
19237   { (eval echo "$as_me:19237: \"$ac_try\"") >&5
19238   (eval $ac_try) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit $ac_status); }; }; then
19242   cf_cv_sig_atomic_t=$cf_type
19243 else
19244   echo "$as_me: failed program was:" >&5
19245 cat conftest.$ac_ext >&5
19246 cf_cv_sig_atomic_t=no
19247 fi
19248 rm -f conftest.$ac_objext conftest.$ac_ext
19249                 test "$cf_cv_sig_atomic_t" != no && break
19250         done
19251
19252 fi
19253
19254 echo "$as_me:19254: result: $cf_cv_sig_atomic_t" >&5
19255 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19256 test "$cf_cv_sig_atomic_t" != no &&
19257 cat >>confdefs.h <<EOF
19258 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19259 EOF
19260
19261 if test $NCURSES_CHTYPE = auto ; then
19262
19263 echo "$as_me:19263: checking for type of chtype" >&5
19264 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19265 if test "${cf_cv_typeof_chtype+set}" = set; then
19266   echo $ECHO_N "(cached) $ECHO_C" >&6
19267 else
19268
19269                 if test "$cross_compiling" = yes; then
19270   cf_cv_typeof_chtype=long
19271 else
19272   cat >conftest.$ac_ext <<_ACEOF
19273 #line 19273 "configure"
19274 #include "confdefs.h"
19275
19276 #define WANT_BITS 31
19277 #include <stdio.h>
19278 int main(void)
19279 {
19280         FILE *fp = fopen("cf_test.out", "w");
19281         if (fp != 0) {
19282                 char *result = "long";
19283                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19284                         int n;
19285                         unsigned int x, y;
19286                         for (n = 0; n < WANT_BITS; n++) {
19287                                 x = (1 << n);
19288                                 y = (x >> n);
19289                                 if (y != 1 || x == 0) {
19290                                         x = 0;
19291                                         break;
19292                                 }
19293                         }
19294                         /*
19295                          * If x is nonzero, an int is big enough for the bits
19296                          * that we want.
19297                          */
19298                         result = (x != 0) ? "int" : "long";
19299                 }
19300                 fputs(result, fp);
19301                 fclose(fp);
19302         }
19303         ${cf_cv_main_return:-return}(0);
19304 }
19305
19306 _ACEOF
19307 rm -f conftest$ac_exeext
19308 if { (eval echo "$as_me:19308: \"$ac_link\"") >&5
19309   (eval $ac_link) 2>&5
19310   ac_status=$?
19311   echo "$as_me:19311: \$? = $ac_status" >&5
19312   (exit $ac_status); } && { ac_try='./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_typeof_chtype=`cat cf_test.out`
19319 else
19320   echo "$as_me: program exited with status $ac_status" >&5
19321 echo "$as_me: failed program was:" >&5
19322 cat conftest.$ac_ext >&5
19323 cf_cv_typeof_chtype=long
19324 fi
19325 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19326 fi
19327                 rm -f cf_test.out
19328
19329 fi
19330
19331 echo "$as_me:19331: result: $cf_cv_typeof_chtype" >&5
19332 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19333
19334 cat >>confdefs.h <<EOF
19335 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19336 EOF
19337
19338 else
19339         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19340 fi
19341 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19342
19343 echo "$as_me:19343: checking if unsigned literals are legal" >&5
19344 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19345 if test "${cf_cv_unsigned_literals+set}" = set; then
19346   echo $ECHO_N "(cached) $ECHO_C" >&6
19347 else
19348
19349         cat >conftest.$ac_ext <<_ACEOF
19350 #line 19350 "configure"
19351 #include "confdefs.h"
19352
19353 int
19354 main (void)
19355 {
19356 long x = 1L + 1UL + 1U + 1
19357   ;
19358   return 0;
19359 }
19360 _ACEOF
19361 rm -f conftest.$ac_objext
19362 if { (eval echo "$as_me:19362: \"$ac_compile\"") >&5
19363   (eval $ac_compile) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); } &&
19367          { ac_try='test -s conftest.$ac_objext'
19368   { (eval echo "$as_me:19368: \"$ac_try\"") >&5
19369   (eval $ac_try) 2>&5
19370   ac_status=$?
19371   echo "$as_me:19371: \$? = $ac_status" >&5
19372   (exit $ac_status); }; }; then
19373   cf_cv_unsigned_literals=yes
19374 else
19375   echo "$as_me: failed program was:" >&5
19376 cat conftest.$ac_ext >&5
19377 cf_cv_unsigned_literals=no
19378 fi
19379 rm -f conftest.$ac_objext conftest.$ac_ext
19380
19381 fi
19382
19383 echo "$as_me:19383: result: $cf_cv_unsigned_literals" >&5
19384 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19385
19386 cf_cv_1UL="1"
19387 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19388 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19389
19390 if test $NCURSES_MMASK_T = auto ; then
19391         cf_cv_typeof_mmask_t=long
19392 else
19393         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19394 fi
19395 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19396
19397 ###     Checks for external-data
19398
19399 echo "$as_me:19399: checking if external errno is declared" >&5
19400 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19401 if test "${cf_cv_dcl_errno+set}" = set; then
19402   echo $ECHO_N "(cached) $ECHO_C" >&6
19403 else
19404
19405         cat >conftest.$ac_ext <<_ACEOF
19406 #line 19406 "configure"
19407 #include "confdefs.h"
19408
19409 #ifdef HAVE_STDLIB_H
19410 #include <stdlib.h>
19411 #endif
19412 #include <stdio.h>
19413 #include <sys/types.h>
19414 #include <errno.h>
19415 int
19416 main (void)
19417 {
19418 int x = (int) errno
19419   ;
19420   return 0;
19421 }
19422 _ACEOF
19423 rm -f conftest.$ac_objext
19424 if { (eval echo "$as_me:19424: \"$ac_compile\"") >&5
19425   (eval $ac_compile) 2>&5
19426   ac_status=$?
19427   echo "$as_me:19427: \$? = $ac_status" >&5
19428   (exit $ac_status); } &&
19429          { ac_try='test -s conftest.$ac_objext'
19430   { (eval echo "$as_me:19430: \"$ac_try\"") >&5
19431   (eval $ac_try) 2>&5
19432   ac_status=$?
19433   echo "$as_me:19433: \$? = $ac_status" >&5
19434   (exit $ac_status); }; }; then
19435   cf_cv_dcl_errno=yes
19436 else
19437   echo "$as_me: failed program was:" >&5
19438 cat conftest.$ac_ext >&5
19439 cf_cv_dcl_errno=no
19440 fi
19441 rm -f conftest.$ac_objext conftest.$ac_ext
19442
19443 fi
19444 echo "$as_me:19444: result: $cf_cv_dcl_errno" >&5
19445 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19446
19447 if test "$cf_cv_dcl_errno" = no ; then
19448
19449 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19450
19451         cat >>confdefs.h <<EOF
19452 #define $cf_result 1
19453 EOF
19454
19455 fi
19456
19457 # It's possible (for near-UNIX clones) that the data doesn't exist
19458
19459 echo "$as_me:19459: checking if external errno exists" >&5
19460 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19461 if test "${cf_cv_have_errno+set}" = set; then
19462   echo $ECHO_N "(cached) $ECHO_C" >&6
19463 else
19464
19465         cat >conftest.$ac_ext <<_ACEOF
19466 #line 19466 "configure"
19467 #include "confdefs.h"
19468
19469 #undef errno
19470 extern int errno;
19471
19472 int
19473 main (void)
19474 {
19475 errno = 2
19476   ;
19477   return 0;
19478 }
19479 _ACEOF
19480 rm -f conftest.$ac_objext conftest$ac_exeext
19481 if { (eval echo "$as_me:19481: \"$ac_link\"") >&5
19482   (eval $ac_link) 2>&5
19483   ac_status=$?
19484   echo "$as_me:19484: \$? = $ac_status" >&5
19485   (exit $ac_status); } &&
19486          { ac_try='test -s conftest$ac_exeext'
19487   { (eval echo "$as_me:19487: \"$ac_try\"") >&5
19488   (eval $ac_try) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit $ac_status); }; }; then
19492   cf_cv_have_errno=yes
19493 else
19494   echo "$as_me: failed program was:" >&5
19495 cat conftest.$ac_ext >&5
19496 cf_cv_have_errno=no
19497 fi
19498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19499
19500 fi
19501 echo "$as_me:19501: result: $cf_cv_have_errno" >&5
19502 echo "${ECHO_T}$cf_cv_have_errno" >&6
19503
19504 if test "$cf_cv_have_errno" = yes ; then
19505
19506 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19507
19508         cat >>confdefs.h <<EOF
19509 #define $cf_result 1
19510 EOF
19511
19512 fi
19513
19514 echo "$as_me:19514: checking if data-only library module links" >&5
19515 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19516 if test "${cf_cv_link_dataonly+set}" = set; then
19517   echo $ECHO_N "(cached) $ECHO_C" >&6
19518 else
19519
19520         rm -f conftest.a
19521         cat >conftest.$ac_ext <<EOF
19522 #line 19522 "configure"
19523 int     testdata[3] = { 123, 456, 789 };
19524 EOF
19525         if { (eval echo "$as_me:19525: \"$ac_compile\"") >&5
19526   (eval $ac_compile) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit $ac_status); } ; then
19530                 mv conftest.o data.o && \
19531                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19532         fi
19533         rm -f conftest.$ac_ext data.o
19534         cat >conftest.$ac_ext <<EOF
19535 #line 19535 "configure"
19536 int     testfunc(void)
19537 {
19538 #if defined(NeXT)
19539         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19540 #else
19541         extern int testdata[3];
19542         return testdata[0] == 123
19543            &&  testdata[1] == 456
19544            &&  testdata[2] == 789;
19545 #endif
19546 }
19547 EOF
19548         if { (eval echo "$as_me:19548: \"$ac_compile\"") >&5
19549   (eval $ac_compile) 2>&5
19550   ac_status=$?
19551   echo "$as_me:19551: \$? = $ac_status" >&5
19552   (exit $ac_status); }; then
19553                 mv conftest.o func.o && \
19554                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19555         fi
19556         rm -f conftest.$ac_ext func.o
19557         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19558         cf_saveLIBS="$LIBS"
19559         LIBS="conftest.a $LIBS"
19560         if test "$cross_compiling" = yes; then
19561   cf_cv_link_dataonly=unknown
19562 else
19563   cat >conftest.$ac_ext <<_ACEOF
19564 #line 19564 "configure"
19565 #include "confdefs.h"
19566
19567         int main(void)
19568         {
19569                 extern int testfunc();
19570                 ${cf_cv_main_return:-return} (!testfunc());
19571         }
19572
19573 _ACEOF
19574 rm -f conftest$ac_exeext
19575 if { (eval echo "$as_me:19575: \"$ac_link\"") >&5
19576   (eval $ac_link) 2>&5
19577   ac_status=$?
19578   echo "$as_me:19578: \$? = $ac_status" >&5
19579   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19580   { (eval echo "$as_me:19580: \"$ac_try\"") >&5
19581   (eval $ac_try) 2>&5
19582   ac_status=$?
19583   echo "$as_me:19583: \$? = $ac_status" >&5
19584   (exit $ac_status); }; }; then
19585   cf_cv_link_dataonly=yes
19586 else
19587   echo "$as_me: program exited with status $ac_status" >&5
19588 echo "$as_me: failed program was:" >&5
19589 cat conftest.$ac_ext >&5
19590 cf_cv_link_dataonly=no
19591 fi
19592 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19593 fi
19594         LIBS="$cf_saveLIBS"
19595
19596 fi
19597
19598 echo "$as_me:19598: result: $cf_cv_link_dataonly" >&5
19599 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19600
19601 if test "$cf_cv_link_dataonly" = no ; then
19602
19603 cat >>confdefs.h <<\EOF
19604 #define BROKEN_LINKER 1
19605 EOF
19606
19607         BROKEN_LINKER=1
19608 fi
19609
19610 ###     Checks for library functions.
19611
19612 for ac_func in \
19613 getcwd \
19614 getegid \
19615 geteuid \
19616 getopt \
19617 getttynam \
19618 issetugid \
19619 localeconv \
19620 poll \
19621 putenv \
19622 remove \
19623 select \
19624 setbuf \
19625 setbuffer \
19626 setenv \
19627 setvbuf \
19628 sigaction \
19629 sigvec \
19630 strdup \
19631 strstr \
19632 sysconf \
19633 tcgetpgrp \
19634 times \
19635 tsearch \
19636 vsnprintf \
19637
19638 do
19639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19640 echo "$as_me:19640: checking for $ac_func" >&5
19641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19642 if eval "test \"\${$as_ac_var+set}\" = set"; then
19643   echo $ECHO_N "(cached) $ECHO_C" >&6
19644 else
19645   cat >conftest.$ac_ext <<_ACEOF
19646 #line 19646 "configure"
19647 #include "confdefs.h"
19648 #define $ac_func autoconf_temporary
19649 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19650 #undef $ac_func
19651
19652 #ifdef __cplusplus
19653 extern "C"
19654 #endif
19655
19656 /* We use char because int might match the return type of a gcc2
19657    builtin and then its argument prototype would still apply.  */
19658 char $ac_func (void);
19659
19660 int
19661 main (void)
19662 {
19663
19664 /* The GNU C library defines stubs for functions which it implements
19665     to always fail with ENOSYS.  Some functions are actually named
19666     something starting with __ and the normal name is an alias.  */
19667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19668 #error found stub for $ac_func
19669 #endif
19670
19671         return $ac_func ();
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 rm -f conftest.$ac_objext conftest$ac_exeext
19677 if { (eval echo "$as_me:19677: \"$ac_link\"") >&5
19678   (eval $ac_link) 2>&5
19679   ac_status=$?
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit $ac_status); } &&
19682          { ac_try='test -s conftest$ac_exeext'
19683   { (eval echo "$as_me:19683: \"$ac_try\"") >&5
19684   (eval $ac_try) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit $ac_status); }; }; then
19688   eval "$as_ac_var=yes"
19689 else
19690   echo "$as_me: failed program was:" >&5
19691 cat conftest.$ac_ext >&5
19692 eval "$as_ac_var=no"
19693 fi
19694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19695 fi
19696 echo "$as_me:19696: result: `eval echo '${'$as_ac_var'}'`" >&5
19697 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19698 if test `eval echo '${'$as_ac_var'}'` = yes; then
19699   cat >>confdefs.h <<EOF
19700 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19701 EOF
19702
19703 fi
19704 done
19705
19706 if test "x$ac_cv_func_getopt" = xno && \
19707    test "x$cf_with_progs$cf_with_tests" != xnono; then
19708         { { echo "$as_me:19708: error: getopt is required for building programs" >&5
19709 echo "$as_me: error: getopt is required for building programs" >&2;}
19710    { (exit 1); exit 1; }; }
19711 fi
19712
19713 if test "x$with_safe_sprintf" = xyes
19714 then
19715         if test "x$ac_cv_func_vsnprintf" = xyes
19716         then
19717                 { echo "$as_me:19717: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19718 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19719         else
19720
19721 cat >>confdefs.h <<\EOF
19722 #define USE_SAFE_SPRINTF 1
19723 EOF
19724
19725         fi
19726 fi
19727
19728 if test "x$with_getcap" = "xyes" ; then
19729
19730 echo "$as_me:19730: checking for terminal-capability database functions" >&5
19731 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19732 if test "${cf_cv_cgetent+set}" = set; then
19733   echo $ECHO_N "(cached) $ECHO_C" >&6
19734 else
19735
19736 cat >conftest.$ac_ext <<_ACEOF
19737 #line 19737 "configure"
19738 #include "confdefs.h"
19739
19740 #include <stdlib.h>
19741 int
19742 main (void)
19743 {
19744
19745         char temp[128];
19746         char *buf = temp;
19747         char *db_array = temp;
19748         cgetent(&buf, &db_array, "vt100");
19749         cgetcap(buf, "tc", '=');
19750         cgetmatch(buf, "tc");
19751
19752   ;
19753   return 0;
19754 }
19755 _ACEOF
19756 rm -f conftest.$ac_objext conftest$ac_exeext
19757 if { (eval echo "$as_me:19757: \"$ac_link\"") >&5
19758   (eval $ac_link) 2>&5
19759   ac_status=$?
19760   echo "$as_me:19760: \$? = $ac_status" >&5
19761   (exit $ac_status); } &&
19762          { ac_try='test -s conftest$ac_exeext'
19763   { (eval echo "$as_me:19763: \"$ac_try\"") >&5
19764   (eval $ac_try) 2>&5
19765   ac_status=$?
19766   echo "$as_me:19766: \$? = $ac_status" >&5
19767   (exit $ac_status); }; }; then
19768   cf_cv_cgetent=yes
19769 else
19770   echo "$as_me: failed program was:" >&5
19771 cat conftest.$ac_ext >&5
19772 cf_cv_cgetent=no
19773 fi
19774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19775
19776 fi
19777 echo "$as_me:19777: result: $cf_cv_cgetent" >&5
19778 echo "${ECHO_T}$cf_cv_cgetent" >&6
19779
19780 if test "$cf_cv_cgetent" = yes
19781 then
19782
19783 cat >>confdefs.h <<\EOF
19784 #define HAVE_BSD_CGETENT 1
19785 EOF
19786
19787 echo "$as_me:19787: checking if cgetent uses const parameter" >&5
19788 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19789 if test "${cf_cv_cgetent_const+set}" = set; then
19790   echo $ECHO_N "(cached) $ECHO_C" >&6
19791 else
19792
19793 cat >conftest.$ac_ext <<_ACEOF
19794 #line 19794 "configure"
19795 #include "confdefs.h"
19796
19797 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19798 #include <stdlib.h>
19799 int
19800 main (void)
19801 {
19802
19803         char temp[128];
19804         char *buf = temp;
19805 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19806         const char *db_array = temp;
19807         cgetent(&buf, &db_array, "vt100");
19808 #endif
19809         cgetcap(buf, "tc", '=');
19810         cgetmatch(buf, "tc");
19811
19812   ;
19813   return 0;
19814 }
19815 _ACEOF
19816 rm -f conftest.$ac_objext conftest$ac_exeext
19817 if { (eval echo "$as_me:19817: \"$ac_link\"") >&5
19818   (eval $ac_link) 2>&5
19819   ac_status=$?
19820   echo "$as_me:19820: \$? = $ac_status" >&5
19821   (exit $ac_status); } &&
19822          { ac_try='test -s conftest$ac_exeext'
19823   { (eval echo "$as_me:19823: \"$ac_try\"") >&5
19824   (eval $ac_try) 2>&5
19825   ac_status=$?
19826   echo "$as_me:19826: \$? = $ac_status" >&5
19827   (exit $ac_status); }; }; then
19828   cf_cv_cgetent_const=yes
19829 else
19830   echo "$as_me: failed program was:" >&5
19831 cat conftest.$ac_ext >&5
19832 cf_cv_cgetent_const=no
19833 fi
19834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19835
19836 fi
19837 echo "$as_me:19837: result: $cf_cv_cgetent_const" >&5
19838 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19839         if test "$cf_cv_cgetent_const" = yes
19840         then
19841
19842 cat >>confdefs.h <<EOF
19843 #define CGETENT_CONST const
19844 EOF
19845
19846         fi
19847 fi
19848
19849 fi
19850
19851 echo "$as_me:19851: checking for isascii" >&5
19852 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19853 if test "${cf_cv_have_isascii+set}" = set; then
19854   echo $ECHO_N "(cached) $ECHO_C" >&6
19855 else
19856
19857         cat >conftest.$ac_ext <<_ACEOF
19858 #line 19858 "configure"
19859 #include "confdefs.h"
19860 #include <ctype.h>
19861 int
19862 main (void)
19863 {
19864 int x = isascii(' ')
19865   ;
19866   return 0;
19867 }
19868 _ACEOF
19869 rm -f conftest.$ac_objext conftest$ac_exeext
19870 if { (eval echo "$as_me:19870: \"$ac_link\"") >&5
19871   (eval $ac_link) 2>&5
19872   ac_status=$?
19873   echo "$as_me:19873: \$? = $ac_status" >&5
19874   (exit $ac_status); } &&
19875          { ac_try='test -s conftest$ac_exeext'
19876   { (eval echo "$as_me:19876: \"$ac_try\"") >&5
19877   (eval $ac_try) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit $ac_status); }; }; then
19881   cf_cv_have_isascii=yes
19882 else
19883   echo "$as_me: failed program was:" >&5
19884 cat conftest.$ac_ext >&5
19885 cf_cv_have_isascii=no
19886 fi
19887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19888
19889 fi
19890 echo "$as_me:19890: result: $cf_cv_have_isascii" >&5
19891 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19892 test "$cf_cv_have_isascii" = yes &&
19893 cat >>confdefs.h <<\EOF
19894 #define HAVE_ISASCII 1
19895 EOF
19896
19897 if test "$ac_cv_func_sigaction" = yes; then
19898 echo "$as_me:19898: checking whether sigaction needs _POSIX_SOURCE" >&5
19899 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19900 cat >conftest.$ac_ext <<_ACEOF
19901 #line 19901 "configure"
19902 #include "confdefs.h"
19903
19904 #include <sys/types.h>
19905 #include <signal.h>
19906 int
19907 main (void)
19908 {
19909 struct sigaction act
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 rm -f conftest.$ac_objext
19915 if { (eval echo "$as_me:19915: \"$ac_compile\"") >&5
19916   (eval $ac_compile) 2>&5
19917   ac_status=$?
19918   echo "$as_me:19918: \$? = $ac_status" >&5
19919   (exit $ac_status); } &&
19920          { ac_try='test -s conftest.$ac_objext'
19921   { (eval echo "$as_me:19921: \"$ac_try\"") >&5
19922   (eval $ac_try) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); }; }; then
19926   sigact_bad=no
19927 else
19928   echo "$as_me: failed program was:" >&5
19929 cat conftest.$ac_ext >&5
19930
19931 cat >conftest.$ac_ext <<_ACEOF
19932 #line 19932 "configure"
19933 #include "confdefs.h"
19934
19935 #define _POSIX_SOURCE
19936 #include <sys/types.h>
19937 #include <signal.h>
19938 int
19939 main (void)
19940 {
19941 struct sigaction act
19942   ;
19943   return 0;
19944 }
19945 _ACEOF
19946 rm -f conftest.$ac_objext
19947 if { (eval echo "$as_me:19947: \"$ac_compile\"") >&5
19948   (eval $ac_compile) 2>&5
19949   ac_status=$?
19950   echo "$as_me:19950: \$? = $ac_status" >&5
19951   (exit $ac_status); } &&
19952          { ac_try='test -s conftest.$ac_objext'
19953   { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   sigact_bad=yes
19959
19960 cat >>confdefs.h <<\EOF
19961 #define _POSIX_SOURCE 1
19962 EOF
19963
19964 else
19965   echo "$as_me: failed program was:" >&5
19966 cat conftest.$ac_ext >&5
19967 sigact_bad=unknown
19968 fi
19969 rm -f conftest.$ac_objext conftest.$ac_ext
19970 fi
19971 rm -f conftest.$ac_objext conftest.$ac_ext
19972 echo "$as_me:19972: result: $sigact_bad" >&5
19973 echo "${ECHO_T}$sigact_bad" >&6
19974 fi
19975
19976 echo "$as_me:19976: checking if nanosleep really works" >&5
19977 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19978 if test "${cf_cv_func_nanosleep+set}" = set; then
19979   echo $ECHO_N "(cached) $ECHO_C" >&6
19980 else
19981
19982 if test "$cross_compiling" = yes; then
19983   cf_cv_func_nanosleep=unknown
19984 else
19985   cat >conftest.$ac_ext <<_ACEOF
19986 #line 19986 "configure"
19987 #include "confdefs.h"
19988
19989 #include <stdio.h>
19990 #include <errno.h>
19991 #include <time.h>
19992
19993 #ifdef HAVE_SYS_TIME_H
19994 #include <sys/time.h>
19995 #endif
19996
19997 int main(void) {
19998         struct timespec ts1, ts2;
19999         int code;
20000         ts1.tv_sec  = 0;
20001         ts1.tv_nsec = 750000000;
20002         ts2.tv_sec  = 0;
20003         ts2.tv_nsec = 0;
20004         errno = 0;
20005         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20006         ${cf_cv_main_return:-return}(code != 0);
20007 }
20008
20009 _ACEOF
20010 rm -f conftest$ac_exeext
20011 if { (eval echo "$as_me:20011: \"$ac_link\"") >&5
20012   (eval $ac_link) 2>&5
20013   ac_status=$?
20014   echo "$as_me:20014: \$? = $ac_status" >&5
20015   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20016   { (eval echo "$as_me:20016: \"$ac_try\"") >&5
20017   (eval $ac_try) 2>&5
20018   ac_status=$?
20019   echo "$as_me:20019: \$? = $ac_status" >&5
20020   (exit $ac_status); }; }; then
20021   cf_cv_func_nanosleep=yes
20022 else
20023   echo "$as_me: program exited with status $ac_status" >&5
20024 echo "$as_me: failed program was:" >&5
20025 cat conftest.$ac_ext >&5
20026 cf_cv_func_nanosleep=no
20027 fi
20028 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20029 fi
20030 fi
20031 echo "$as_me:20031: result: $cf_cv_func_nanosleep" >&5
20032 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20033
20034 test "$cf_cv_func_nanosleep" = "yes" &&
20035 cat >>confdefs.h <<\EOF
20036 #define HAVE_NANOSLEEP 1
20037 EOF
20038
20039 for ac_header in \
20040 termio.h \
20041 termios.h \
20042 unistd.h \
20043 sys/ioctl.h \
20044 sys/termio.h \
20045
20046 do
20047 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20048 echo "$as_me:20048: checking for $ac_header" >&5
20049 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20050 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20051   echo $ECHO_N "(cached) $ECHO_C" >&6
20052 else
20053   cat >conftest.$ac_ext <<_ACEOF
20054 #line 20054 "configure"
20055 #include "confdefs.h"
20056 #include <$ac_header>
20057 _ACEOF
20058 if { (eval echo "$as_me:20058: \"$ac_cpp conftest.$ac_ext\"") >&5
20059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20060   ac_status=$?
20061   egrep -v '^ *\+' conftest.er1 >conftest.err
20062   rm -f conftest.er1
20063   cat conftest.err >&5
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit $ac_status); } >/dev/null; then
20066   if test -s conftest.err; then
20067     ac_cpp_err=$ac_c_preproc_warn_flag
20068   else
20069     ac_cpp_err=
20070   fi
20071 else
20072   ac_cpp_err=yes
20073 fi
20074 if test -z "$ac_cpp_err"; then
20075   eval "$as_ac_Header=yes"
20076 else
20077   echo "$as_me: failed program was:" >&5
20078   cat conftest.$ac_ext >&5
20079   eval "$as_ac_Header=no"
20080 fi
20081 rm -f conftest.err conftest.$ac_ext
20082 fi
20083 echo "$as_me:20083: result: `eval echo '${'$as_ac_Header'}'`" >&5
20084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20086   cat >>confdefs.h <<EOF
20087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20088 EOF
20089
20090 fi
20091 done
20092
20093 if test "$ac_cv_header_termios_h" = yes ; then
20094         case "$CFLAGS $CPPFLAGS" in
20095         (*-D_POSIX_SOURCE*)
20096                 termios_bad=dunno ;;
20097         (*)     termios_bad=maybe ;;
20098         esac
20099         if test "$termios_bad" = maybe ; then
20100         echo "$as_me:20100: checking whether termios.h needs _POSIX_SOURCE" >&5
20101 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20102         cat >conftest.$ac_ext <<_ACEOF
20103 #line 20103 "configure"
20104 #include "confdefs.h"
20105 #include <termios.h>
20106 int
20107 main (void)
20108 {
20109 struct termios foo; int x = foo.c_iflag
20110   ;
20111   return 0;
20112 }
20113 _ACEOF
20114 rm -f conftest.$ac_objext
20115 if { (eval echo "$as_me:20115: \"$ac_compile\"") >&5
20116   (eval $ac_compile) 2>&5
20117   ac_status=$?
20118   echo "$as_me:20118: \$? = $ac_status" >&5
20119   (exit $ac_status); } &&
20120          { ac_try='test -s conftest.$ac_objext'
20121   { (eval echo "$as_me:20121: \"$ac_try\"") >&5
20122   (eval $ac_try) 2>&5
20123   ac_status=$?
20124   echo "$as_me:20124: \$? = $ac_status" >&5
20125   (exit $ac_status); }; }; then
20126   termios_bad=no
20127 else
20128   echo "$as_me: failed program was:" >&5
20129 cat conftest.$ac_ext >&5
20130
20131                 cat >conftest.$ac_ext <<_ACEOF
20132 #line 20132 "configure"
20133 #include "confdefs.h"
20134
20135 #define _POSIX_SOURCE
20136 #include <termios.h>
20137 int
20138 main (void)
20139 {
20140 struct termios foo; int x = foo.c_iflag
20141   ;
20142   return 0;
20143 }
20144 _ACEOF
20145 rm -f conftest.$ac_objext
20146 if { (eval echo "$as_me:20146: \"$ac_compile\"") >&5
20147   (eval $ac_compile) 2>&5
20148   ac_status=$?
20149   echo "$as_me:20149: \$? = $ac_status" >&5
20150   (exit $ac_status); } &&
20151          { ac_try='test -s conftest.$ac_objext'
20152   { (eval echo "$as_me:20152: \"$ac_try\"") >&5
20153   (eval $ac_try) 2>&5
20154   ac_status=$?
20155   echo "$as_me:20155: \$? = $ac_status" >&5
20156   (exit $ac_status); }; }; then
20157   termios_bad=unknown
20158 else
20159   echo "$as_me: failed program was:" >&5
20160 cat conftest.$ac_ext >&5
20161 termios_bad=yes
20162 cat >>confdefs.h <<\EOF
20163 #define _POSIX_SOURCE 1
20164 EOF
20165
20166 fi
20167 rm -f conftest.$ac_objext conftest.$ac_ext
20168
20169 fi
20170 rm -f conftest.$ac_objext conftest.$ac_ext
20171         echo "$as_me:20171: result: $termios_bad" >&5
20172 echo "${ECHO_T}$termios_bad" >&6
20173         fi
20174 fi
20175
20176 echo "$as_me:20176: checking for tcgetattr" >&5
20177 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20178 if test "${cf_cv_have_tcgetattr+set}" = set; then
20179   echo $ECHO_N "(cached) $ECHO_C" >&6
20180 else
20181
20182 cat >conftest.$ac_ext <<_ACEOF
20183 #line 20183 "configure"
20184 #include "confdefs.h"
20185
20186 #include <sys/types.h>
20187 #ifdef HAVE_UNISTD_H
20188 #include <unistd.h>
20189 #endif
20190 #ifdef HAVE_TERMIOS_H
20191 #include <termios.h>
20192 #define TTY struct termios
20193 #else
20194 #ifdef HAVE_TERMIO_H
20195 #include <termio.h>
20196 #define TTY struct termio
20197 #endif
20198 #endif
20199
20200 int
20201 main (void)
20202 {
20203
20204 TTY foo;
20205 tcgetattr(1, &foo);
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 rm -f conftest.$ac_objext conftest$ac_exeext
20211 if { (eval echo "$as_me:20211: \"$ac_link\"") >&5
20212   (eval $ac_link) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit $ac_status); } &&
20216          { ac_try='test -s conftest$ac_exeext'
20217   { (eval echo "$as_me:20217: \"$ac_try\"") >&5
20218   (eval $ac_try) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit $ac_status); }; }; then
20222   cf_cv_have_tcgetattr=yes
20223 else
20224   echo "$as_me: failed program was:" >&5
20225 cat conftest.$ac_ext >&5
20226 cf_cv_have_tcgetattr=no
20227 fi
20228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20229 fi
20230 echo "$as_me:20230: result: $cf_cv_have_tcgetattr" >&5
20231 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20232 test "$cf_cv_have_tcgetattr" = yes &&
20233 cat >>confdefs.h <<\EOF
20234 #define HAVE_TCGETATTR 1
20235 EOF
20236
20237 echo "$as_me:20237: checking for vsscanf function or workaround" >&5
20238 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20239 if test "${cf_cv_func_vsscanf+set}" = set; then
20240   echo $ECHO_N "(cached) $ECHO_C" >&6
20241 else
20242
20243 cat >conftest.$ac_ext <<_ACEOF
20244 #line 20244 "configure"
20245 #include "confdefs.h"
20246
20247 #include <stdarg.h>
20248 #include <stdio.h>
20249 int
20250 main (void)
20251 {
20252
20253         va_list ap;
20254         vsscanf("from", "%d", ap)
20255   ;
20256   return 0;
20257 }
20258 _ACEOF
20259 rm -f conftest.$ac_objext conftest$ac_exeext
20260 if { (eval echo "$as_me:20260: \"$ac_link\"") >&5
20261   (eval $ac_link) 2>&5
20262   ac_status=$?
20263   echo "$as_me:20263: \$? = $ac_status" >&5
20264   (exit $ac_status); } &&
20265          { ac_try='test -s conftest$ac_exeext'
20266   { (eval echo "$as_me:20266: \"$ac_try\"") >&5
20267   (eval $ac_try) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); }; }; then
20271   cf_cv_func_vsscanf=vsscanf
20272 else
20273   echo "$as_me: failed program was:" >&5
20274 cat conftest.$ac_ext >&5
20275
20276 cat >conftest.$ac_ext <<_ACEOF
20277 #line 20277 "configure"
20278 #include "confdefs.h"
20279
20280 #include <stdarg.h>
20281 #include <stdio.h>
20282 int
20283 main (void)
20284 {
20285
20286         FILE strbuf;
20287         char *str = "from";
20288
20289         strbuf._flag = _IOREAD;
20290         strbuf._ptr = strbuf._base = (unsigned char *) str;
20291         strbuf._cnt = strlen(str);
20292         strbuf._file = _NFILE;
20293         return (vfscanf(&strbuf, "%d", ap))
20294   ;
20295   return 0;
20296 }
20297 _ACEOF
20298 rm -f conftest.$ac_objext conftest$ac_exeext
20299 if { (eval echo "$as_me:20299: \"$ac_link\"") >&5
20300   (eval $ac_link) 2>&5
20301   ac_status=$?
20302   echo "$as_me:20302: \$? = $ac_status" >&5
20303   (exit $ac_status); } &&
20304          { ac_try='test -s conftest$ac_exeext'
20305   { (eval echo "$as_me:20305: \"$ac_try\"") >&5
20306   (eval $ac_try) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit $ac_status); }; }; then
20310   cf_cv_func_vsscanf=vfscanf
20311 else
20312   echo "$as_me: failed program was:" >&5
20313 cat conftest.$ac_ext >&5
20314
20315 cat >conftest.$ac_ext <<_ACEOF
20316 #line 20316 "configure"
20317 #include "confdefs.h"
20318
20319 #include <stdarg.h>
20320 #include <stdio.h>
20321 int
20322 main (void)
20323 {
20324
20325         FILE strbuf;
20326         char *str = "from";
20327
20328         strbuf._flag = _IOREAD;
20329         strbuf._ptr = strbuf._base = (unsigned char *) str;
20330         strbuf._cnt = strlen(str);
20331         strbuf._file = _NFILE;
20332         return (_doscan(&strbuf, "%d", ap))
20333   ;
20334   return 0;
20335 }
20336 _ACEOF
20337 rm -f conftest.$ac_objext conftest$ac_exeext
20338 if { (eval echo "$as_me:20338: \"$ac_link\"") >&5
20339   (eval $ac_link) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit $ac_status); } &&
20343          { ac_try='test -s conftest$ac_exeext'
20344   { (eval echo "$as_me:20344: \"$ac_try\"") >&5
20345   (eval $ac_try) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); }; }; then
20349   cf_cv_func_vsscanf=_doscan
20350 else
20351   echo "$as_me: failed program was:" >&5
20352 cat conftest.$ac_ext >&5
20353
20354 cf_cv_func_vsscanf=no
20355 fi
20356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20357 fi
20358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20359 fi
20360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20361 fi
20362 echo "$as_me:20362: result: $cf_cv_func_vsscanf" >&5
20363 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20364
20365 case $cf_cv_func_vsscanf in
20366 (vsscanf)
20367 cat >>confdefs.h <<\EOF
20368 #define HAVE_VSSCANF 1
20369 EOF
20370 ;;
20371 (vfscanf)
20372 cat >>confdefs.h <<\EOF
20373 #define HAVE_VFSCANF 1
20374 EOF
20375 ;;
20376 (_doscan)
20377 cat >>confdefs.h <<\EOF
20378 #define HAVE__DOSCAN 1
20379 EOF
20380 ;;
20381 esac
20382
20383 for ac_header in \
20384 unistd.h \
20385
20386 do
20387 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20388 echo "$as_me:20388: checking for $ac_header" >&5
20389 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20390 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20391   echo $ECHO_N "(cached) $ECHO_C" >&6
20392 else
20393   cat >conftest.$ac_ext <<_ACEOF
20394 #line 20394 "configure"
20395 #include "confdefs.h"
20396 #include <$ac_header>
20397 _ACEOF
20398 if { (eval echo "$as_me:20398: \"$ac_cpp conftest.$ac_ext\"") >&5
20399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20400   ac_status=$?
20401   egrep -v '^ *\+' conftest.er1 >conftest.err
20402   rm -f conftest.er1
20403   cat conftest.err >&5
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); } >/dev/null; then
20406   if test -s conftest.err; then
20407     ac_cpp_err=$ac_c_preproc_warn_flag
20408   else
20409     ac_cpp_err=
20410   fi
20411 else
20412   ac_cpp_err=yes
20413 fi
20414 if test -z "$ac_cpp_err"; then
20415   eval "$as_ac_Header=yes"
20416 else
20417   echo "$as_me: failed program was:" >&5
20418   cat conftest.$ac_ext >&5
20419   eval "$as_ac_Header=no"
20420 fi
20421 rm -f conftest.err conftest.$ac_ext
20422 fi
20423 echo "$as_me:20423: result: `eval echo '${'$as_ac_Header'}'`" >&5
20424 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20425 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20426   cat >>confdefs.h <<EOF
20427 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20428 EOF
20429
20430 fi
20431 done
20432
20433 echo "$as_me:20433: checking for working mkstemp" >&5
20434 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20435 if test "${cf_cv_func_mkstemp+set}" = set; then
20436   echo $ECHO_N "(cached) $ECHO_C" >&6
20437 else
20438
20439 rm -rf conftest*
20440 if test "$cross_compiling" = yes; then
20441   cf_cv_func_mkstemp=maybe
20442 else
20443   cat >conftest.$ac_ext <<_ACEOF
20444 #line 20444 "configure"
20445 #include "confdefs.h"
20446
20447 #include <sys/types.h>
20448 #ifdef HAVE_UNISTD_H
20449 #include <unistd.h>
20450 #endif
20451 #include <stdlib.h>
20452 #include <stdio.h>
20453 #include <string.h>
20454 #include <sys/stat.h>
20455 int main(void)
20456 {
20457         char *tmpl = "conftestXXXXXX";
20458         char name[2][80];
20459         int n;
20460         int result = 0;
20461         int fd;
20462         struct stat sb;
20463
20464         umask(077);
20465         for (n = 0; n < 2; ++n) {
20466                 strcpy(name[n], tmpl);
20467                 if ((fd = mkstemp(name[n])) >= 0) {
20468                         if (!strcmp(name[n], tmpl)
20469                          || stat(name[n], &sb) != 0
20470                          || (sb.st_mode & S_IFMT) != S_IFREG
20471                          || (sb.st_mode & 077) != 0) {
20472                                 result = 1;
20473                         }
20474                         close(fd);
20475                 }
20476         }
20477         if (result == 0
20478          && !strcmp(name[0], name[1]))
20479                 result = 1;
20480         ${cf_cv_main_return:-return}(result);
20481 }
20482
20483 _ACEOF
20484 rm -f conftest$ac_exeext
20485 if { (eval echo "$as_me:20485: \"$ac_link\"") >&5
20486   (eval $ac_link) 2>&5
20487   ac_status=$?
20488   echo "$as_me:20488: \$? = $ac_status" >&5
20489   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20490   { (eval echo "$as_me:20490: \"$ac_try\"") >&5
20491   (eval $ac_try) 2>&5
20492   ac_status=$?
20493   echo "$as_me:20493: \$? = $ac_status" >&5
20494   (exit $ac_status); }; }; then
20495   cf_cv_func_mkstemp=yes
20496
20497 else
20498   echo "$as_me: program exited with status $ac_status" >&5
20499 echo "$as_me: failed program was:" >&5
20500 cat conftest.$ac_ext >&5
20501 cf_cv_func_mkstemp=no
20502
20503 fi
20504 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20505 fi
20506
20507 fi
20508 echo "$as_me:20508: result: $cf_cv_func_mkstemp" >&5
20509 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20510 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20511         echo "$as_me:20511: checking for mkstemp" >&5
20512 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20513 if test "${ac_cv_func_mkstemp+set}" = set; then
20514   echo $ECHO_N "(cached) $ECHO_C" >&6
20515 else
20516   cat >conftest.$ac_ext <<_ACEOF
20517 #line 20517 "configure"
20518 #include "confdefs.h"
20519 #define mkstemp autoconf_temporary
20520 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20521 #undef mkstemp
20522
20523 #ifdef __cplusplus
20524 extern "C"
20525 #endif
20526
20527 /* We use char because int might match the return type of a gcc2
20528    builtin and then its argument prototype would still apply.  */
20529 char mkstemp (void);
20530
20531 int
20532 main (void)
20533 {
20534
20535 /* The GNU C library defines stubs for functions which it implements
20536     to always fail with ENOSYS.  Some functions are actually named
20537     something starting with __ and the normal name is an alias.  */
20538 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20539 #error found stub for mkstemp
20540 #endif
20541
20542         return mkstemp ();
20543   ;
20544   return 0;
20545 }
20546 _ACEOF
20547 rm -f conftest.$ac_objext conftest$ac_exeext
20548 if { (eval echo "$as_me:20548: \"$ac_link\"") >&5
20549   (eval $ac_link) 2>&5
20550   ac_status=$?
20551   echo "$as_me:20551: \$? = $ac_status" >&5
20552   (exit $ac_status); } &&
20553          { ac_try='test -s conftest$ac_exeext'
20554   { (eval echo "$as_me:20554: \"$ac_try\"") >&5
20555   (eval $ac_try) 2>&5
20556   ac_status=$?
20557   echo "$as_me:20557: \$? = $ac_status" >&5
20558   (exit $ac_status); }; }; then
20559   ac_cv_func_mkstemp=yes
20560 else
20561   echo "$as_me: failed program was:" >&5
20562 cat conftest.$ac_ext >&5
20563 ac_cv_func_mkstemp=no
20564 fi
20565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20566 fi
20567 echo "$as_me:20567: result: $ac_cv_func_mkstemp" >&5
20568 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20569
20570 fi
20571 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20572
20573 cat >>confdefs.h <<\EOF
20574 #define HAVE_MKSTEMP 1
20575 EOF
20576
20577 fi
20578
20579 # setup for prototype of fallback for vsscanf()
20580
20581 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20582         HAVE_VSSCANF=1
20583 else
20584         HAVE_VSSCANF=0
20585 fi
20586
20587 if test "x$cross_compiling" = xyes ; then
20588         { echo "$as_me:20588: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20589 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20590 else
20591         echo "$as_me:20591: checking whether setvbuf arguments are reversed" >&5
20592 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20593 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20594   echo $ECHO_N "(cached) $ECHO_C" >&6
20595 else
20596   if test "$cross_compiling" = yes; then
20597   { { echo "$as_me:20597: error: cannot run test program while cross compiling" >&5
20598 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20599    { (exit 1); exit 1; }; }
20600 else
20601   cat >conftest.$ac_ext <<_ACEOF
20602 #line 20602 "configure"
20603 #include "confdefs.h"
20604 #include <stdio.h>
20605 /* If setvbuf has the reversed format, exit 0. */
20606 int
20607 main (void)
20608 {
20609   /* This call has the arguments reversed.
20610      A reversed system may check and see that the address of main
20611      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20612   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20613     $ac_main_return(1);
20614   putc('\r', stdout);
20615   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20616 }
20617 _ACEOF
20618 rm -f conftest$ac_exeext
20619 if { (eval echo "$as_me:20619: \"$ac_link\"") >&5
20620   (eval $ac_link) 2>&5
20621   ac_status=$?
20622   echo "$as_me:20622: \$? = $ac_status" >&5
20623   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20624   { (eval echo "$as_me:20624: \"$ac_try\"") >&5
20625   (eval $ac_try) 2>&5
20626   ac_status=$?
20627   echo "$as_me:20627: \$? = $ac_status" >&5
20628   (exit $ac_status); }; }; then
20629   ac_cv_func_setvbuf_reversed=yes
20630 else
20631   echo "$as_me: program exited with status $ac_status" >&5
20632 echo "$as_me: failed program was:" >&5
20633 cat conftest.$ac_ext >&5
20634 ac_cv_func_setvbuf_reversed=no
20635 fi
20636 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20637 fi
20638 rm -f core core.* *.core
20639 fi
20640 echo "$as_me:20640: result: $ac_cv_func_setvbuf_reversed" >&5
20641 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20642 if test $ac_cv_func_setvbuf_reversed = yes; then
20643
20644 cat >>confdefs.h <<\EOF
20645 #define SETVBUF_REVERSED 1
20646 EOF
20647
20648 fi
20649
20650 fi
20651 echo "$as_me:20651: checking for intptr_t" >&5
20652 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20653 if test "${ac_cv_type_intptr_t+set}" = set; then
20654   echo $ECHO_N "(cached) $ECHO_C" >&6
20655 else
20656   cat >conftest.$ac_ext <<_ACEOF
20657 #line 20657 "configure"
20658 #include "confdefs.h"
20659 $ac_includes_default
20660 int
20661 main (void)
20662 {
20663 if ((intptr_t *) 0)
20664   return 0;
20665 if (sizeof (intptr_t))
20666   return 0;
20667   ;
20668   return 0;
20669 }
20670 _ACEOF
20671 rm -f conftest.$ac_objext
20672 if { (eval echo "$as_me:20672: \"$ac_compile\"") >&5
20673   (eval $ac_compile) 2>&5
20674   ac_status=$?
20675   echo "$as_me:20675: \$? = $ac_status" >&5
20676   (exit $ac_status); } &&
20677          { ac_try='test -s conftest.$ac_objext'
20678   { (eval echo "$as_me:20678: \"$ac_try\"") >&5
20679   (eval $ac_try) 2>&5
20680   ac_status=$?
20681   echo "$as_me:20681: \$? = $ac_status" >&5
20682   (exit $ac_status); }; }; then
20683   ac_cv_type_intptr_t=yes
20684 else
20685   echo "$as_me: failed program was:" >&5
20686 cat conftest.$ac_ext >&5
20687 ac_cv_type_intptr_t=no
20688 fi
20689 rm -f conftest.$ac_objext conftest.$ac_ext
20690 fi
20691 echo "$as_me:20691: result: $ac_cv_type_intptr_t" >&5
20692 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20693 if test $ac_cv_type_intptr_t = yes; then
20694   :
20695 else
20696
20697 cat >>confdefs.h <<EOF
20698 #define intptr_t long
20699 EOF
20700
20701 fi
20702
20703 echo "$as_me:20703: checking for ssize_t" >&5
20704 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20705 if test "${ac_cv_type_ssize_t+set}" = set; then
20706   echo $ECHO_N "(cached) $ECHO_C" >&6
20707 else
20708   cat >conftest.$ac_ext <<_ACEOF
20709 #line 20709 "configure"
20710 #include "confdefs.h"
20711 $ac_includes_default
20712 int
20713 main (void)
20714 {
20715 if ((ssize_t *) 0)
20716   return 0;
20717 if (sizeof (ssize_t))
20718   return 0;
20719   ;
20720   return 0;
20721 }
20722 _ACEOF
20723 rm -f conftest.$ac_objext
20724 if { (eval echo "$as_me:20724: \"$ac_compile\"") >&5
20725   (eval $ac_compile) 2>&5
20726   ac_status=$?
20727   echo "$as_me:20727: \$? = $ac_status" >&5
20728   (exit $ac_status); } &&
20729          { ac_try='test -s conftest.$ac_objext'
20730   { (eval echo "$as_me:20730: \"$ac_try\"") >&5
20731   (eval $ac_try) 2>&5
20732   ac_status=$?
20733   echo "$as_me:20733: \$? = $ac_status" >&5
20734   (exit $ac_status); }; }; then
20735   ac_cv_type_ssize_t=yes
20736 else
20737   echo "$as_me: failed program was:" >&5
20738 cat conftest.$ac_ext >&5
20739 ac_cv_type_ssize_t=no
20740 fi
20741 rm -f conftest.$ac_objext conftest.$ac_ext
20742 fi
20743 echo "$as_me:20743: result: $ac_cv_type_ssize_t" >&5
20744 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20745 if test $ac_cv_type_ssize_t = yes; then
20746   :
20747 else
20748
20749 cat >>confdefs.h <<EOF
20750 #define ssize_t int
20751 EOF
20752
20753 fi
20754
20755 echo "$as_me:20755: checking for type sigaction_t" >&5
20756 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20757 if test "${cf_cv_type_sigaction+set}" = set; then
20758   echo $ECHO_N "(cached) $ECHO_C" >&6
20759 else
20760
20761         cat >conftest.$ac_ext <<_ACEOF
20762 #line 20762 "configure"
20763 #include "confdefs.h"
20764
20765 #include <signal.h>
20766 int
20767 main (void)
20768 {
20769 sigaction_t x
20770   ;
20771   return 0;
20772 }
20773 _ACEOF
20774 rm -f conftest.$ac_objext
20775 if { (eval echo "$as_me:20775: \"$ac_compile\"") >&5
20776   (eval $ac_compile) 2>&5
20777   ac_status=$?
20778   echo "$as_me:20778: \$? = $ac_status" >&5
20779   (exit $ac_status); } &&
20780          { ac_try='test -s conftest.$ac_objext'
20781   { (eval echo "$as_me:20781: \"$ac_try\"") >&5
20782   (eval $ac_try) 2>&5
20783   ac_status=$?
20784   echo "$as_me:20784: \$? = $ac_status" >&5
20785   (exit $ac_status); }; }; then
20786   cf_cv_type_sigaction=yes
20787 else
20788   echo "$as_me: failed program was:" >&5
20789 cat conftest.$ac_ext >&5
20790 cf_cv_type_sigaction=no
20791 fi
20792 rm -f conftest.$ac_objext conftest.$ac_ext
20793 fi
20794
20795 echo "$as_me:20795: result: $cf_cv_type_sigaction" >&5
20796 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20797 test "$cf_cv_type_sigaction" = yes &&
20798 cat >>confdefs.h <<\EOF
20799 #define HAVE_TYPE_SIGACTION 1
20800 EOF
20801
20802 echo "$as_me:20802: checking declaration of size-change" >&5
20803 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20804 if test "${cf_cv_sizechange+set}" = set; then
20805   echo $ECHO_N "(cached) $ECHO_C" >&6
20806 else
20807
20808         cf_cv_sizechange=unknown
20809         cf_save_CPPFLAGS="$CPPFLAGS"
20810
20811 for cf_opts in "" "NEED_PTEM_H"
20812 do
20813
20814         CPPFLAGS="$cf_save_CPPFLAGS"
20815         if test -n "$cf_opts"
20816         then
20817
20818         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20819         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20820
20821         fi
20822         cat >conftest.$ac_ext <<_ACEOF
20823 #line 20823 "configure"
20824 #include "confdefs.h"
20825 #include <sys/types.h>
20826 #ifdef HAVE_TERMIOS_H
20827 #include <termios.h>
20828 #else
20829 #ifdef HAVE_TERMIO_H
20830 #include <termio.h>
20831 #endif
20832 #endif
20833
20834 #ifdef NEED_PTEM_H
20835 /* This is a workaround for SCO:  they neglected to define struct winsize in
20836  * termios.h -- it's only in termio.h and ptem.h
20837  */
20838 #include <sys/stream.h>
20839 #include <sys/ptem.h>
20840 #endif
20841
20842 #ifdef HAVE_SYS_IOCTL_H
20843 #include <sys/ioctl.h>
20844 #endif
20845
20846 int
20847 main (void)
20848 {
20849
20850 #ifdef TIOCGSIZE
20851         struct ttysize win;     /* SunOS 3.0... */
20852         int y = win.ts_lines;
20853         int x = win.ts_cols;
20854 #else
20855 #ifdef TIOCGWINSZ
20856         struct winsize win;     /* everything else */
20857         int y = win.ws_row;
20858         int x = win.ws_col;
20859 #else
20860         no TIOCGSIZE or TIOCGWINSZ
20861 #endif /* TIOCGWINSZ */
20862 #endif /* TIOCGSIZE */
20863
20864   ;
20865   return 0;
20866 }
20867 _ACEOF
20868 rm -f conftest.$ac_objext
20869 if { (eval echo "$as_me:20869: \"$ac_compile\"") >&5
20870   (eval $ac_compile) 2>&5
20871   ac_status=$?
20872   echo "$as_me:20872: \$? = $ac_status" >&5
20873   (exit $ac_status); } &&
20874          { ac_try='test -s conftest.$ac_objext'
20875   { (eval echo "$as_me:20875: \"$ac_try\"") >&5
20876   (eval $ac_try) 2>&5
20877   ac_status=$?
20878   echo "$as_me:20878: \$? = $ac_status" >&5
20879   (exit $ac_status); }; }; then
20880   cf_cv_sizechange=yes
20881 else
20882   echo "$as_me: failed program was:" >&5
20883 cat conftest.$ac_ext >&5
20884 cf_cv_sizechange=no
20885 fi
20886 rm -f conftest.$ac_objext conftest.$ac_ext
20887
20888         CPPFLAGS="$cf_save_CPPFLAGS"
20889         if test "$cf_cv_sizechange" = yes ; then
20890                 echo "size-change succeeded ($cf_opts)" >&5
20891                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20892                 break
20893         fi
20894 done
20895
20896 fi
20897 echo "$as_me:20897: result: $cf_cv_sizechange" >&5
20898 echo "${ECHO_T}$cf_cv_sizechange" >&6
20899 if test "$cf_cv_sizechange" != no ; then
20900
20901 cat >>confdefs.h <<\EOF
20902 #define HAVE_SIZECHANGE 1
20903 EOF
20904
20905         case $cf_cv_sizechange in
20906         (NEED*)
20907                 cat >>confdefs.h <<EOF
20908 #define $cf_cv_sizechange  1
20909 EOF
20910
20911                 ;;
20912         esac
20913 fi
20914
20915 echo "$as_me:20915: checking for memmove" >&5
20916 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20917 if test "${ac_cv_func_memmove+set}" = set; then
20918   echo $ECHO_N "(cached) $ECHO_C" >&6
20919 else
20920   cat >conftest.$ac_ext <<_ACEOF
20921 #line 20921 "configure"
20922 #include "confdefs.h"
20923 #define memmove autoconf_temporary
20924 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20925 #undef memmove
20926
20927 #ifdef __cplusplus
20928 extern "C"
20929 #endif
20930
20931 /* We use char because int might match the return type of a gcc2
20932    builtin and then its argument prototype would still apply.  */
20933 char memmove (void);
20934
20935 int
20936 main (void)
20937 {
20938
20939 /* The GNU C library defines stubs for functions which it implements
20940     to always fail with ENOSYS.  Some functions are actually named
20941     something starting with __ and the normal name is an alias.  */
20942 #if defined (__stub_memmove) || defined (__stub___memmove)
20943 #error found stub for memmove
20944 #endif
20945
20946         return memmove ();
20947   ;
20948   return 0;
20949 }
20950 _ACEOF
20951 rm -f conftest.$ac_objext conftest$ac_exeext
20952 if { (eval echo "$as_me:20952: \"$ac_link\"") >&5
20953   (eval $ac_link) 2>&5
20954   ac_status=$?
20955   echo "$as_me:20955: \$? = $ac_status" >&5
20956   (exit $ac_status); } &&
20957          { ac_try='test -s conftest$ac_exeext'
20958   { (eval echo "$as_me:20958: \"$ac_try\"") >&5
20959   (eval $ac_try) 2>&5
20960   ac_status=$?
20961   echo "$as_me:20961: \$? = $ac_status" >&5
20962   (exit $ac_status); }; }; then
20963   ac_cv_func_memmove=yes
20964 else
20965   echo "$as_me: failed program was:" >&5
20966 cat conftest.$ac_ext >&5
20967 ac_cv_func_memmove=no
20968 fi
20969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20970 fi
20971 echo "$as_me:20971: result: $ac_cv_func_memmove" >&5
20972 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20973 if test $ac_cv_func_memmove = yes; then
20974   :
20975 else
20976
20977 echo "$as_me:20977: checking for bcopy" >&5
20978 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20979 if test "${ac_cv_func_bcopy+set}" = set; then
20980   echo $ECHO_N "(cached) $ECHO_C" >&6
20981 else
20982   cat >conftest.$ac_ext <<_ACEOF
20983 #line 20983 "configure"
20984 #include "confdefs.h"
20985 #define bcopy autoconf_temporary
20986 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20987 #undef bcopy
20988
20989 #ifdef __cplusplus
20990 extern "C"
20991 #endif
20992
20993 /* We use char because int might match the return type of a gcc2
20994    builtin and then its argument prototype would still apply.  */
20995 char bcopy (void);
20996
20997 int
20998 main (void)
20999 {
21000
21001 /* The GNU C library defines stubs for functions which it implements
21002     to always fail with ENOSYS.  Some functions are actually named
21003     something starting with __ and the normal name is an alias.  */
21004 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21005 #error found stub for bcopy
21006 #endif
21007
21008         return bcopy ();
21009   ;
21010   return 0;
21011 }
21012 _ACEOF
21013 rm -f conftest.$ac_objext conftest$ac_exeext
21014 if { (eval echo "$as_me:21014: \"$ac_link\"") >&5
21015   (eval $ac_link) 2>&5
21016   ac_status=$?
21017   echo "$as_me:21017: \$? = $ac_status" >&5
21018   (exit $ac_status); } &&
21019          { ac_try='test -s conftest$ac_exeext'
21020   { (eval echo "$as_me:21020: \"$ac_try\"") >&5
21021   (eval $ac_try) 2>&5
21022   ac_status=$?
21023   echo "$as_me:21023: \$? = $ac_status" >&5
21024   (exit $ac_status); }; }; then
21025   ac_cv_func_bcopy=yes
21026 else
21027   echo "$as_me: failed program was:" >&5
21028 cat conftest.$ac_ext >&5
21029 ac_cv_func_bcopy=no
21030 fi
21031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21032 fi
21033 echo "$as_me:21033: result: $ac_cv_func_bcopy" >&5
21034 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21035 if test $ac_cv_func_bcopy = yes; then
21036
21037         echo "$as_me:21037: checking if bcopy does overlapping moves" >&5
21038 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21039 if test "${cf_cv_good_bcopy+set}" = set; then
21040   echo $ECHO_N "(cached) $ECHO_C" >&6
21041 else
21042
21043                 if test "$cross_compiling" = yes; then
21044   cf_cv_good_bcopy=unknown
21045 else
21046   cat >conftest.$ac_ext <<_ACEOF
21047 #line 21047 "configure"
21048 #include "confdefs.h"
21049
21050 int main(void) {
21051         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21052         char temp[40];
21053         bcopy(data, temp, sizeof(data));
21054         bcopy(temp+10, temp, 15);
21055         bcopy(temp+5, temp+15, 10);
21056         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21057 }
21058
21059 _ACEOF
21060 rm -f conftest$ac_exeext
21061 if { (eval echo "$as_me:21061: \"$ac_link\"") >&5
21062   (eval $ac_link) 2>&5
21063   ac_status=$?
21064   echo "$as_me:21064: \$? = $ac_status" >&5
21065   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21066   { (eval echo "$as_me:21066: \"$ac_try\"") >&5
21067   (eval $ac_try) 2>&5
21068   ac_status=$?
21069   echo "$as_me:21069: \$? = $ac_status" >&5
21070   (exit $ac_status); }; }; then
21071   cf_cv_good_bcopy=yes
21072 else
21073   echo "$as_me: program exited with status $ac_status" >&5
21074 echo "$as_me: failed program was:" >&5
21075 cat conftest.$ac_ext >&5
21076 cf_cv_good_bcopy=no
21077 fi
21078 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21079 fi
21080
21081 fi
21082 echo "$as_me:21082: result: $cf_cv_good_bcopy" >&5
21083 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21084
21085 else
21086   cf_cv_good_bcopy=no
21087 fi
21088
21089         if test "$cf_cv_good_bcopy" = yes ; then
21090
21091 cat >>confdefs.h <<\EOF
21092 #define USE_OK_BCOPY 1
21093 EOF
21094
21095         else
21096
21097 cat >>confdefs.h <<\EOF
21098 #define USE_MY_MEMMOVE 1
21099 EOF
21100
21101         fi
21102
21103 fi
21104
21105 tty 2>&1 >/dev/null || {
21106 for ac_func in posix_openpt
21107 do
21108 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21109 echo "$as_me:21109: checking for $ac_func" >&5
21110 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21111 if eval "test \"\${$as_ac_var+set}\" = set"; then
21112   echo $ECHO_N "(cached) $ECHO_C" >&6
21113 else
21114   cat >conftest.$ac_ext <<_ACEOF
21115 #line 21115 "configure"
21116 #include "confdefs.h"
21117 #define $ac_func autoconf_temporary
21118 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21119 #undef $ac_func
21120
21121 #ifdef __cplusplus
21122 extern "C"
21123 #endif
21124
21125 /* We use char because int might match the return type of a gcc2
21126    builtin and then its argument prototype would still apply.  */
21127 char $ac_func (void);
21128
21129 int
21130 main (void)
21131 {
21132
21133 /* The GNU C library defines stubs for functions which it implements
21134     to always fail with ENOSYS.  Some functions are actually named
21135     something starting with __ and the normal name is an alias.  */
21136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21137 #error found stub for $ac_func
21138 #endif
21139
21140         return $ac_func ();
21141   ;
21142   return 0;
21143 }
21144 _ACEOF
21145 rm -f conftest.$ac_objext conftest$ac_exeext
21146 if { (eval echo "$as_me:21146: \"$ac_link\"") >&5
21147   (eval $ac_link) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit $ac_status); } &&
21151          { ac_try='test -s conftest$ac_exeext'
21152   { (eval echo "$as_me:21152: \"$ac_try\"") >&5
21153   (eval $ac_try) 2>&5
21154   ac_status=$?
21155   echo "$as_me:21155: \$? = $ac_status" >&5
21156   (exit $ac_status); }; }; then
21157   eval "$as_ac_var=yes"
21158 else
21159   echo "$as_me: failed program was:" >&5
21160 cat conftest.$ac_ext >&5
21161 eval "$as_ac_var=no"
21162 fi
21163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21164 fi
21165 echo "$as_me:21165: result: `eval echo '${'$as_ac_var'}'`" >&5
21166 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21167 if test `eval echo '${'$as_ac_var'}'` = yes; then
21168   cat >>confdefs.h <<EOF
21169 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21170 EOF
21171
21172 fi
21173 done
21174  }
21175 echo "$as_me:21175: checking if poll really works" >&5
21176 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21177 if test "${cf_cv_working_poll+set}" = set; then
21178   echo $ECHO_N "(cached) $ECHO_C" >&6
21179 else
21180
21181 if test "$cross_compiling" = yes; then
21182   cf_cv_working_poll=unknown
21183 else
21184   cat >conftest.$ac_ext <<_ACEOF
21185 #line 21185 "configure"
21186 #include "confdefs.h"
21187
21188 #include <stdlib.h>
21189 #include <stdio.h>
21190 #include <unistd.h>
21191 #include <fcntl.h>
21192 #ifdef HAVE_POLL_H
21193 #include <poll.h>
21194 #else
21195 #include <sys/poll.h>
21196 #endif
21197 int main(void) {
21198         struct pollfd myfds;
21199         int ret;
21200
21201         /* check for Darwin bug with respect to "devices" */
21202         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21203         if (myfds.fd < 0)
21204                 myfds.fd = 0;
21205         myfds.events = POLLIN;
21206         myfds.revents = 0;
21207
21208         ret = poll(&myfds, 1, 100);
21209
21210         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21211                 ret = -1;
21212         } else {
21213                 int fd = 0;
21214                 if (!isatty(fd)) {
21215                         fd = open("/dev/tty", 2);       /* O_RDWR */
21216                 }
21217 #ifdef HAVE_POSIX_OPENPT
21218                 if (fd < 0) {
21219                         fd = posix_openpt(O_RDWR);
21220                 }
21221 #endif
21222
21223                 if (fd >= 0) {
21224                         /* also check with standard input */
21225                         myfds.fd = fd;
21226                         myfds.events = POLLIN;
21227                         myfds.revents = 0;
21228                         ret = poll(&myfds, 1, 100);
21229                 } else {
21230                         ret = -1;
21231                 }
21232         }
21233         ${cf_cv_main_return:-return}(ret < 0);
21234 }
21235 _ACEOF
21236 rm -f conftest$ac_exeext
21237 if { (eval echo "$as_me:21237: \"$ac_link\"") >&5
21238   (eval $ac_link) 2>&5
21239   ac_status=$?
21240   echo "$as_me:21240: \$? = $ac_status" >&5
21241   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21242   { (eval echo "$as_me:21242: \"$ac_try\"") >&5
21243   (eval $ac_try) 2>&5
21244   ac_status=$?
21245   echo "$as_me:21245: \$? = $ac_status" >&5
21246   (exit $ac_status); }; }; then
21247   cf_cv_working_poll=yes
21248 else
21249   echo "$as_me: program exited with status $ac_status" >&5
21250 echo "$as_me: failed program was:" >&5
21251 cat conftest.$ac_ext >&5
21252 cf_cv_working_poll=no
21253 fi
21254 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21255 fi
21256 fi
21257 echo "$as_me:21257: result: $cf_cv_working_poll" >&5
21258 echo "${ECHO_T}$cf_cv_working_poll" >&6
21259 test "$cf_cv_working_poll" = "yes" &&
21260 cat >>confdefs.h <<\EOF
21261 #define HAVE_WORKING_POLL 1
21262 EOF
21263
21264 echo "$as_me:21264: checking for va_copy" >&5
21265 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21266 if test "${cf_cv_have_va_copy+set}" = set; then
21267   echo $ECHO_N "(cached) $ECHO_C" >&6
21268 else
21269
21270 cat >conftest.$ac_ext <<_ACEOF
21271 #line 21271 "configure"
21272 #include "confdefs.h"
21273
21274 #include <stdarg.h>
21275
21276 int
21277 main (void)
21278 {
21279
21280         static va_list dst;
21281         static va_list src;
21282         va_copy(dst, src)
21283   ;
21284   return 0;
21285 }
21286 _ACEOF
21287 rm -f conftest.$ac_objext conftest$ac_exeext
21288 if { (eval echo "$as_me:21288: \"$ac_link\"") >&5
21289   (eval $ac_link) 2>&5
21290   ac_status=$?
21291   echo "$as_me:21291: \$? = $ac_status" >&5
21292   (exit $ac_status); } &&
21293          { ac_try='test -s conftest$ac_exeext'
21294   { (eval echo "$as_me:21294: \"$ac_try\"") >&5
21295   (eval $ac_try) 2>&5
21296   ac_status=$?
21297   echo "$as_me:21297: \$? = $ac_status" >&5
21298   (exit $ac_status); }; }; then
21299   cf_cv_have_va_copy=yes
21300 else
21301   echo "$as_me: failed program was:" >&5
21302 cat conftest.$ac_ext >&5
21303 cf_cv_have_va_copy=no
21304 fi
21305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21306 fi
21307 echo "$as_me:21307: result: $cf_cv_have_va_copy" >&5
21308 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21309
21310 if test "$cf_cv_have_va_copy" = yes;
21311 then
21312
21313 cat >>confdefs.h <<\EOF
21314 #define HAVE_VA_COPY 1
21315 EOF
21316
21317 else # !cf_cv_have_va_copy
21318
21319 echo "$as_me:21319: checking for __va_copy" >&5
21320 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21321 if test "${cf_cv_have___va_copy+set}" = set; then
21322   echo $ECHO_N "(cached) $ECHO_C" >&6
21323 else
21324
21325 cat >conftest.$ac_ext <<_ACEOF
21326 #line 21326 "configure"
21327 #include "confdefs.h"
21328
21329 #include <stdarg.h>
21330
21331 int
21332 main (void)
21333 {
21334
21335         static va_list dst;
21336         static va_list src;
21337         __va_copy(dst, src)
21338   ;
21339   return 0;
21340 }
21341 _ACEOF
21342 rm -f conftest.$ac_objext conftest$ac_exeext
21343 if { (eval echo "$as_me:21343: \"$ac_link\"") >&5
21344   (eval $ac_link) 2>&5
21345   ac_status=$?
21346   echo "$as_me:21346: \$? = $ac_status" >&5
21347   (exit $ac_status); } &&
21348          { ac_try='test -s conftest$ac_exeext'
21349   { (eval echo "$as_me:21349: \"$ac_try\"") >&5
21350   (eval $ac_try) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit $ac_status); }; }; then
21354   cf_cv_have___va_copy=yes
21355 else
21356   echo "$as_me: failed program was:" >&5
21357 cat conftest.$ac_ext >&5
21358 cf_cv_have___va_copy=no
21359 fi
21360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21361 fi
21362 echo "$as_me:21362: result: $cf_cv_have___va_copy" >&5
21363 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21364
21365 if test "$cf_cv_have___va_copy" = yes
21366 then
21367
21368 cat >>confdefs.h <<\EOF
21369 #define HAVE___VA_COPY 1
21370 EOF
21371
21372 else # !cf_cv_have___va_copy
21373
21374 echo "$as_me:21374: checking for __builtin_va_copy" >&5
21375 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21376 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21377   echo $ECHO_N "(cached) $ECHO_C" >&6
21378 else
21379
21380 cat >conftest.$ac_ext <<_ACEOF
21381 #line 21381 "configure"
21382 #include "confdefs.h"
21383
21384 #include <stdarg.h>
21385
21386 int
21387 main (void)
21388 {
21389
21390         static va_list dst;
21391         static va_list src;
21392         __builtin_va_copy(dst, src)
21393   ;
21394   return 0;
21395 }
21396 _ACEOF
21397 rm -f conftest.$ac_objext conftest$ac_exeext
21398 if { (eval echo "$as_me:21398: \"$ac_link\"") >&5
21399   (eval $ac_link) 2>&5
21400   ac_status=$?
21401   echo "$as_me:21401: \$? = $ac_status" >&5
21402   (exit $ac_status); } &&
21403          { ac_try='test -s conftest$ac_exeext'
21404   { (eval echo "$as_me:21404: \"$ac_try\"") >&5
21405   (eval $ac_try) 2>&5
21406   ac_status=$?
21407   echo "$as_me:21407: \$? = $ac_status" >&5
21408   (exit $ac_status); }; }; then
21409   cf_cv_have___builtin_va_copy=yes
21410 else
21411   echo "$as_me: failed program was:" >&5
21412 cat conftest.$ac_ext >&5
21413 cf_cv_have___builtin_va_copy=no
21414 fi
21415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21416 fi
21417 echo "$as_me:21417: result: $cf_cv_have___builtin_va_copy" >&5
21418 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21419
21420 test "$cf_cv_have___builtin_va_copy" = yes &&
21421
21422 cat >>confdefs.h <<\EOF
21423 #define HAVE___BUILTIN_VA_COPY 1
21424 EOF
21425
21426 fi # cf_cv_have___va_copy
21427
21428 fi # cf_cv_have_va_copy
21429
21430 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21431 (*yes*)
21432         ;;
21433
21434 (*)
21435         echo "$as_me:21435: checking if we can simply copy va_list" >&5
21436 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21437 if test "${cf_cv_pointer_va_list+set}" = set; then
21438   echo $ECHO_N "(cached) $ECHO_C" >&6
21439 else
21440
21441 cat >conftest.$ac_ext <<_ACEOF
21442 #line 21442 "configure"
21443 #include "confdefs.h"
21444
21445 #include <stdarg.h>
21446
21447 int
21448 main (void)
21449 {
21450
21451         va_list dst;
21452         va_list src;
21453         dst = src
21454   ;
21455   return 0;
21456 }
21457 _ACEOF
21458 rm -f conftest.$ac_objext conftest$ac_exeext
21459 if { (eval echo "$as_me:21459: \"$ac_link\"") >&5
21460   (eval $ac_link) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit $ac_status); } &&
21464          { ac_try='test -s conftest$ac_exeext'
21465   { (eval echo "$as_me:21465: \"$ac_try\"") >&5
21466   (eval $ac_try) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit $ac_status); }; }; then
21470   cf_cv_pointer_va_list=yes
21471 else
21472   echo "$as_me: failed program was:" >&5
21473 cat conftest.$ac_ext >&5
21474 cf_cv_pointer_va_list=no
21475 fi
21476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21477 fi
21478 echo "$as_me:21478: result: $cf_cv_pointer_va_list" >&5
21479 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21480
21481         if test "$cf_cv_pointer_va_list" = no
21482         then
21483                 echo "$as_me:21483: checking if we can copy va_list indirectly" >&5
21484 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21485 if test "${cf_cv_array_va_list+set}" = set; then
21486   echo $ECHO_N "(cached) $ECHO_C" >&6
21487 else
21488
21489 cat >conftest.$ac_ext <<_ACEOF
21490 #line 21490 "configure"
21491 #include "confdefs.h"
21492
21493 #include <stdarg.h>
21494
21495 int
21496 main (void)
21497 {
21498
21499         va_list dst;
21500         va_list src;
21501         *dst = *src
21502   ;
21503   return 0;
21504 }
21505 _ACEOF
21506 rm -f conftest.$ac_objext conftest$ac_exeext
21507 if { (eval echo "$as_me:21507: \"$ac_link\"") >&5
21508   (eval $ac_link) 2>&5
21509   ac_status=$?
21510   echo "$as_me:21510: \$? = $ac_status" >&5
21511   (exit $ac_status); } &&
21512          { ac_try='test -s conftest$ac_exeext'
21513   { (eval echo "$as_me:21513: \"$ac_try\"") >&5
21514   (eval $ac_try) 2>&5
21515   ac_status=$?
21516   echo "$as_me:21516: \$? = $ac_status" >&5
21517   (exit $ac_status); }; }; then
21518   cf_cv_array_va_list=yes
21519 else
21520   echo "$as_me: failed program was:" >&5
21521 cat conftest.$ac_ext >&5
21522 cf_cv_array_va_list=no
21523 fi
21524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21525 fi
21526 echo "$as_me:21526: result: $cf_cv_array_va_list" >&5
21527 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21528                 test "$cf_cv_array_va_list" = yes &&
21529 cat >>confdefs.h <<\EOF
21530 #define ARRAY_VA_LIST 1
21531 EOF
21532
21533         fi
21534         ;;
21535 esac
21536
21537 echo "$as_me:21537: checking for pid_t" >&5
21538 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21539 if test "${ac_cv_type_pid_t+set}" = set; then
21540   echo $ECHO_N "(cached) $ECHO_C" >&6
21541 else
21542   cat >conftest.$ac_ext <<_ACEOF
21543 #line 21543 "configure"
21544 #include "confdefs.h"
21545 $ac_includes_default
21546 int
21547 main (void)
21548 {
21549 if ((pid_t *) 0)
21550   return 0;
21551 if (sizeof (pid_t))
21552   return 0;
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 rm -f conftest.$ac_objext
21558 if { (eval echo "$as_me:21558: \"$ac_compile\"") >&5
21559   (eval $ac_compile) 2>&5
21560   ac_status=$?
21561   echo "$as_me:21561: \$? = $ac_status" >&5
21562   (exit $ac_status); } &&
21563          { ac_try='test -s conftest.$ac_objext'
21564   { (eval echo "$as_me:21564: \"$ac_try\"") >&5
21565   (eval $ac_try) 2>&5
21566   ac_status=$?
21567   echo "$as_me:21567: \$? = $ac_status" >&5
21568   (exit $ac_status); }; }; then
21569   ac_cv_type_pid_t=yes
21570 else
21571   echo "$as_me: failed program was:" >&5
21572 cat conftest.$ac_ext >&5
21573 ac_cv_type_pid_t=no
21574 fi
21575 rm -f conftest.$ac_objext conftest.$ac_ext
21576 fi
21577 echo "$as_me:21577: result: $ac_cv_type_pid_t" >&5
21578 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21579 if test $ac_cv_type_pid_t = yes; then
21580   :
21581 else
21582
21583 cat >>confdefs.h <<EOF
21584 #define pid_t int
21585 EOF
21586
21587 fi
21588
21589 for ac_header in unistd.h vfork.h
21590 do
21591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21592 echo "$as_me:21592: checking for $ac_header" >&5
21593 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21595   echo $ECHO_N "(cached) $ECHO_C" >&6
21596 else
21597   cat >conftest.$ac_ext <<_ACEOF
21598 #line 21598 "configure"
21599 #include "confdefs.h"
21600 #include <$ac_header>
21601 _ACEOF
21602 if { (eval echo "$as_me:21602: \"$ac_cpp conftest.$ac_ext\"") >&5
21603   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21604   ac_status=$?
21605   egrep -v '^ *\+' conftest.er1 >conftest.err
21606   rm -f conftest.er1
21607   cat conftest.err >&5
21608   echo "$as_me:21608: \$? = $ac_status" >&5
21609   (exit $ac_status); } >/dev/null; then
21610   if test -s conftest.err; then
21611     ac_cpp_err=$ac_c_preproc_warn_flag
21612   else
21613     ac_cpp_err=
21614   fi
21615 else
21616   ac_cpp_err=yes
21617 fi
21618 if test -z "$ac_cpp_err"; then
21619   eval "$as_ac_Header=yes"
21620 else
21621   echo "$as_me: failed program was:" >&5
21622   cat conftest.$ac_ext >&5
21623   eval "$as_ac_Header=no"
21624 fi
21625 rm -f conftest.err conftest.$ac_ext
21626 fi
21627 echo "$as_me:21627: result: `eval echo '${'$as_ac_Header'}'`" >&5
21628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21629 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21630   cat >>confdefs.h <<EOF
21631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21632 EOF
21633
21634 fi
21635 done
21636
21637 for ac_func in fork vfork
21638 do
21639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21640 echo "$as_me:21640: checking for $ac_func" >&5
21641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21642 if eval "test \"\${$as_ac_var+set}\" = set"; then
21643   echo $ECHO_N "(cached) $ECHO_C" >&6
21644 else
21645   cat >conftest.$ac_ext <<_ACEOF
21646 #line 21646 "configure"
21647 #include "confdefs.h"
21648 #define $ac_func autoconf_temporary
21649 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21650 #undef $ac_func
21651
21652 #ifdef __cplusplus
21653 extern "C"
21654 #endif
21655
21656 /* We use char because int might match the return type of a gcc2
21657    builtin and then its argument prototype would still apply.  */
21658 char $ac_func (void);
21659
21660 int
21661 main (void)
21662 {
21663
21664 /* The GNU C library defines stubs for functions which it implements
21665     to always fail with ENOSYS.  Some functions are actually named
21666     something starting with __ and the normal name is an alias.  */
21667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21668 #error found stub for $ac_func
21669 #endif
21670
21671         return $ac_func ();
21672   ;
21673   return 0;
21674 }
21675 _ACEOF
21676 rm -f conftest.$ac_objext conftest$ac_exeext
21677 if { (eval echo "$as_me:21677: \"$ac_link\"") >&5
21678   (eval $ac_link) 2>&5
21679   ac_status=$?
21680   echo "$as_me:21680: \$? = $ac_status" >&5
21681   (exit $ac_status); } &&
21682          { ac_try='test -s conftest$ac_exeext'
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   eval "$as_ac_var=yes"
21689 else
21690   echo "$as_me: failed program was:" >&5
21691 cat conftest.$ac_ext >&5
21692 eval "$as_ac_var=no"
21693 fi
21694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21695 fi
21696 echo "$as_me:21696: result: `eval echo '${'$as_ac_var'}'`" >&5
21697 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21698 if test `eval echo '${'$as_ac_var'}'` = yes; then
21699   cat >>confdefs.h <<EOF
21700 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21701 EOF
21702
21703 fi
21704 done
21705
21706 ac_cv_func_fork_works=$ac_cv_func_fork
21707 if test "x$ac_cv_func_fork" = xyes; then
21708   echo "$as_me:21708: checking for working fork" >&5
21709 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21710 if test "${ac_cv_func_fork_works+set}" = set; then
21711   echo $ECHO_N "(cached) $ECHO_C" >&6
21712 else
21713   if test "$cross_compiling" = yes; then
21714   ac_cv_func_fork_works=cross
21715 else
21716   cat >conftest.$ac_ext <<_ACEOF
21717 /* By Rüdiger Kuhlmann. */
21718       #include <sys/types.h>
21719       #if HAVE_UNISTD_H
21720       # include <unistd.h>
21721       #endif
21722       /* Some systems only have a dummy stub for fork() */
21723       int main (void)
21724       {
21725         if (fork() < 0)
21726           $ac_main_return (1);
21727         $ac_main_return (0);
21728       }
21729 _ACEOF
21730 rm -f conftest$ac_exeext
21731 if { (eval echo "$as_me:21731: \"$ac_link\"") >&5
21732   (eval $ac_link) 2>&5
21733   ac_status=$?
21734   echo "$as_me:21734: \$? = $ac_status" >&5
21735   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21736   { (eval echo "$as_me:21736: \"$ac_try\"") >&5
21737   (eval $ac_try) 2>&5
21738   ac_status=$?
21739   echo "$as_me:21739: \$? = $ac_status" >&5
21740   (exit $ac_status); }; }; then
21741   ac_cv_func_fork_works=yes
21742 else
21743   echo "$as_me: program exited with status $ac_status" >&5
21744 echo "$as_me: failed program was:" >&5
21745 cat conftest.$ac_ext >&5
21746 ac_cv_func_fork_works=no
21747 fi
21748 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21749 fi
21750 fi
21751 echo "$as_me:21751: result: $ac_cv_func_fork_works" >&5
21752 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21753
21754 fi
21755 if test "x$ac_cv_func_fork_works" = xcross; then
21756   case $host in
21757     *-*-amigaos* | *-*-msdosdjgpp*)
21758       # Override, as these systems have only a dummy fork() stub
21759       ac_cv_func_fork_works=no
21760       ;;
21761     *)
21762       ac_cv_func_fork_works=yes
21763       ;;
21764   esac
21765   { echo "$as_me:21765: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21766 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21767 fi
21768 ac_cv_func_vfork_works=$ac_cv_func_vfork
21769 if test "x$ac_cv_func_vfork" = xyes; then
21770   echo "$as_me:21770: checking for working vfork" >&5
21771 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21772 if test "${ac_cv_func_vfork_works+set}" = set; then
21773   echo $ECHO_N "(cached) $ECHO_C" >&6
21774 else
21775   if test "$cross_compiling" = yes; then
21776   ac_cv_func_vfork_works=cross
21777 else
21778   cat >conftest.$ac_ext <<_ACEOF
21779 #line 21779 "configure"
21780 #include "confdefs.h"
21781 /* Thanks to Paul Eggert for this test.  */
21782 #include <stdio.h>
21783 #include <sys/types.h>
21784 #include <sys/stat.h>
21785 #if HAVE_UNISTD_H
21786 # include <unistd.h>
21787 #endif
21788 #if HAVE_VFORK_H
21789 # include <vfork.h>
21790 #endif
21791 /* On some sparc systems, changes by the child to local and incoming
21792    argument registers are propagated back to the parent.  The compiler
21793    is told about this with #include <vfork.h>, but some compilers
21794    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21795    static variable whose address is put into a register that is
21796    clobbered by the vfork.  */
21797 static
21798 #ifdef __cplusplus
21799 sparc_address_test (int arg)
21800 # else
21801 sparc_address_test (arg) int arg;
21802 #endif
21803 {
21804   static pid_t child;
21805   if (!child) {
21806     child = vfork ();
21807     if (child < 0) {
21808       perror ("vfork");
21809       _exit(2);
21810     }
21811     if (!child) {
21812       arg = getpid();
21813       write(-1, "", 0);
21814       _exit (arg);
21815     }
21816   }
21817 }
21818
21819 int
21820 main (void)
21821 {
21822   pid_t parent = getpid ();
21823   pid_t child;
21824
21825   sparc_address_test ();
21826
21827   child = vfork ();
21828
21829   if (child == 0) {
21830     /* Here is another test for sparc vfork register problems.  This
21831        test uses lots of local variables, at least as many local
21832        variables as main has allocated so far including compiler
21833        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21834        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21835        reuse the register of parent for one of the local variables,
21836        since it will think that parent can't possibly be used any more
21837        in this routine.  Assigning to the local variable will thus
21838        munge parent in the parent process.  */
21839     pid_t
21840       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21841       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21842     /* Convince the compiler that p..p7 are live; otherwise, it might
21843        use the same hardware register for all 8 local variables.  */
21844     if (p != p1 || p != p2 || p != p3 || p != p4
21845         || p != p5 || p != p6 || p != p7)
21846       _exit(1);
21847
21848     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21849        from child file descriptors.  If the child closes a descriptor
21850        before it execs or exits, this munges the parent's descriptor
21851        as well.  Test for this by closing stdout in the child.  */
21852     _exit(close(fileno(stdout)) != 0);
21853   } else {
21854     int status;
21855     struct stat st;
21856
21857     while (wait(&status) != child)
21858       ;
21859     $ac_main_return(
21860          /* Was there some problem with vforking?  */
21861          child < 0
21862
21863          /* Did the child fail?  (This shouldn't happen.)  */
21864          || status
21865
21866          /* Did the vfork/compiler bug occur?  */
21867          || parent != getpid()
21868
21869          /* Did the file descriptor bug occur?  */
21870          || fstat(fileno(stdout), &st) != 0
21871          );
21872   }
21873 }
21874 _ACEOF
21875 rm -f conftest$ac_exeext
21876 if { (eval echo "$as_me:21876: \"$ac_link\"") >&5
21877   (eval $ac_link) 2>&5
21878   ac_status=$?
21879   echo "$as_me:21879: \$? = $ac_status" >&5
21880   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21881   { (eval echo "$as_me:21881: \"$ac_try\"") >&5
21882   (eval $ac_try) 2>&5
21883   ac_status=$?
21884   echo "$as_me:21884: \$? = $ac_status" >&5
21885   (exit $ac_status); }; }; then
21886   ac_cv_func_vfork_works=yes
21887 else
21888   echo "$as_me: program exited with status $ac_status" >&5
21889 echo "$as_me: failed program was:" >&5
21890 cat conftest.$ac_ext >&5
21891 ac_cv_func_vfork_works=no
21892 fi
21893 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21894 fi
21895 fi
21896 echo "$as_me:21896: result: $ac_cv_func_vfork_works" >&5
21897 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21898
21899 fi;
21900 if test "x$ac_cv_func_fork_works" = xcross; then
21901   ac_cv_func_vfork_works=ac_cv_func_vfork
21902   { echo "$as_me:21902: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21903 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21904 fi
21905
21906 if test "x$ac_cv_func_vfork_works" = xyes; then
21907
21908 cat >>confdefs.h <<\EOF
21909 #define HAVE_WORKING_VFORK 1
21910 EOF
21911
21912 else
21913
21914 cat >>confdefs.h <<\EOF
21915 #define vfork fork
21916 EOF
21917
21918 fi
21919 if test "x$ac_cv_func_fork_works" = xyes; then
21920
21921 cat >>confdefs.h <<\EOF
21922 #define HAVE_WORKING_FORK 1
21923 EOF
21924
21925 fi
21926
21927 echo "$as_me:21927: checking if fopen accepts explicit binary mode" >&5
21928 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21929 if test "${cf_cv_fopen_bin_r+set}" = set; then
21930   echo $ECHO_N "(cached) $ECHO_C" >&6
21931 else
21932
21933         if test "$cross_compiling" = yes; then
21934   cf_cv_fopen_bin_r=unknown
21935 else
21936   cat >conftest.$ac_ext <<_ACEOF
21937 #line 21937 "configure"
21938 #include "confdefs.h"
21939
21940 #include <stdio.h>
21941 int main(void) {
21942         FILE *fp = fopen("conftest.tmp", "wb");
21943         int rc = 0;
21944         if (fp != 0) {
21945                 int p, q;
21946                 for (p = 0; p < 256; ++p) {
21947                         fputc(p, fp);
21948                 }
21949                 fclose(fp);
21950                 fp = fopen("conftest.tmp", "rb");
21951                 if (fp != 0) {
21952                         for (p = 0; p < 256; ++p) {
21953                                 q = fgetc(fp);
21954                                 if (q != p) {
21955                                         rc = 1;
21956                                         break;
21957                                 }
21958                         }
21959                 } else {
21960                         rc = 1;
21961                 }
21962         } else {
21963                 rc = 1;
21964         }
21965         ${cf_cv_main_return:-return} (rc);
21966 }
21967
21968 _ACEOF
21969 rm -f conftest$ac_exeext
21970 if { (eval echo "$as_me:21970: \"$ac_link\"") >&5
21971   (eval $ac_link) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21975   { (eval echo "$as_me:21975: \"$ac_try\"") >&5
21976   (eval $ac_try) 2>&5
21977   ac_status=$?
21978   echo "$as_me:21978: \$? = $ac_status" >&5
21979   (exit $ac_status); }; }; then
21980   cf_cv_fopen_bin_r=yes
21981 else
21982   echo "$as_me: program exited with status $ac_status" >&5
21983 echo "$as_me: failed program was:" >&5
21984 cat conftest.$ac_ext >&5
21985 cf_cv_fopen_bin_r=no
21986 fi
21987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21988 fi
21989
21990 fi
21991 echo "$as_me:21991: result: $cf_cv_fopen_bin_r" >&5
21992 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21993 test "x$cf_cv_fopen_bin_r" != xno &&
21994 cat >>confdefs.h <<\EOF
21995 #define USE_FOPEN_BIN_R 1
21996 EOF
21997
21998 # special check for test/ditto.c
21999
22000 echo "$as_me:22000: checking for openpty in -lutil" >&5
22001 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22002 if test "${ac_cv_lib_util_openpty+set}" = set; then
22003   echo $ECHO_N "(cached) $ECHO_C" >&6
22004 else
22005   ac_check_lib_save_LIBS=$LIBS
22006 LIBS="-lutil  $LIBS"
22007 cat >conftest.$ac_ext <<_ACEOF
22008 #line 22008 "configure"
22009 #include "confdefs.h"
22010
22011 /* Override any gcc2 internal prototype to avoid an error.  */
22012 #ifdef __cplusplus
22013 extern "C"
22014 #endif
22015 /* We use char because int might match the return type of a gcc2
22016    builtin and then its argument prototype would still apply.  */
22017 char openpty ();
22018 int
22019 main (void)
22020 {
22021 openpty ();
22022   ;
22023   return 0;
22024 }
22025 _ACEOF
22026 rm -f conftest.$ac_objext conftest$ac_exeext
22027 if { (eval echo "$as_me:22027: \"$ac_link\"") >&5
22028   (eval $ac_link) 2>&5
22029   ac_status=$?
22030   echo "$as_me:22030: \$? = $ac_status" >&5
22031   (exit $ac_status); } &&
22032          { ac_try='test -s conftest$ac_exeext'
22033   { (eval echo "$as_me:22033: \"$ac_try\"") >&5
22034   (eval $ac_try) 2>&5
22035   ac_status=$?
22036   echo "$as_me:22036: \$? = $ac_status" >&5
22037   (exit $ac_status); }; }; then
22038   ac_cv_lib_util_openpty=yes
22039 else
22040   echo "$as_me: failed program was:" >&5
22041 cat conftest.$ac_ext >&5
22042 ac_cv_lib_util_openpty=no
22043 fi
22044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22045 LIBS=$ac_check_lib_save_LIBS
22046 fi
22047 echo "$as_me:22047: result: $ac_cv_lib_util_openpty" >&5
22048 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22049 if test $ac_cv_lib_util_openpty = yes; then
22050   cf_cv_lib_util=yes
22051 else
22052   cf_cv_lib_util=no
22053 fi
22054
22055 echo "$as_me:22055: checking for openpty header" >&5
22056 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22057 if test "${cf_cv_func_openpty+set}" = set; then
22058   echo $ECHO_N "(cached) $ECHO_C" >&6
22059 else
22060
22061         cf_save_LIBS="$LIBS"
22062         test $cf_cv_lib_util = yes && {
22063 cf_add_libs="$LIBS"
22064 # reverse order
22065 cf_add_0lib=
22066 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22067 # filter duplicates
22068 for cf_add_1lib in $cf_add_0lib; do
22069         for cf_add_2lib in $cf_add_libs; do
22070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22071                         cf_add_1lib=
22072                         break
22073                 fi
22074         done
22075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22076 done
22077 LIBS="$cf_add_libs"
22078  }
22079         for cf_header in pty.h libutil.h util.h
22080         do
22081         cat >conftest.$ac_ext <<_ACEOF
22082 #line 22082 "configure"
22083 #include "confdefs.h"
22084
22085 #include <$cf_header>
22086
22087 int
22088 main (void)
22089 {
22090
22091         int x = openpty((int *)0, (int *)0, (char *)0,
22092                                    (struct termios *)0, (struct winsize *)0);
22093
22094   ;
22095   return 0;
22096 }
22097 _ACEOF
22098 rm -f conftest.$ac_objext conftest$ac_exeext
22099 if { (eval echo "$as_me:22099: \"$ac_link\"") >&5
22100   (eval $ac_link) 2>&5
22101   ac_status=$?
22102   echo "$as_me:22102: \$? = $ac_status" >&5
22103   (exit $ac_status); } &&
22104          { ac_try='test -s conftest$ac_exeext'
22105   { (eval echo "$as_me:22105: \"$ac_try\"") >&5
22106   (eval $ac_try) 2>&5
22107   ac_status=$?
22108   echo "$as_me:22108: \$? = $ac_status" >&5
22109   (exit $ac_status); }; }; then
22110
22111                 cf_cv_func_openpty=$cf_header
22112                 break
22113
22114 else
22115   echo "$as_me: failed program was:" >&5
22116 cat conftest.$ac_ext >&5
22117
22118                 cf_cv_func_openpty=no
22119
22120 fi
22121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22122         done
22123         LIBS="$cf_save_LIBS"
22124
22125 fi
22126 echo "$as_me:22126: result: $cf_cv_func_openpty" >&5
22127 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22128
22129 if test "$cf_cv_func_openpty" != no ; then
22130
22131 cat >>confdefs.h <<EOF
22132 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22133 EOF
22134
22135 cat >>confdefs.h <<\EOF
22136 #define USE_XTERM_PTY 1
22137 EOF
22138
22139         if test "x$cf_cv_lib_util" = xyes ; then
22140
22141 cf_add_libs="$TEST_LIBS"
22142 # reverse order
22143 cf_add_0lib=
22144 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22145 # filter duplicates
22146 for cf_add_1lib in $cf_add_0lib; do
22147         for cf_add_2lib in $cf_add_libs; do
22148                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22149                         cf_add_1lib=
22150                         break
22151                 fi
22152         done
22153         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22154 done
22155 TEST_LIBS="$cf_add_libs"
22156
22157         fi
22158 fi
22159
22160 if test "$with_hashed_db" != no ; then
22161
22162 cat >>confdefs.h <<\EOF
22163 #define USE_HASHED_DB 1
22164 EOF
22165
22166 case $with_hashed_db in
22167 (yes|*able*)
22168         ;;
22169 (*)
22170         if test -d "$with_hashed_db" ; then
22171
22172 if test -n "$with_hashed_db/include" ; then
22173   for cf_add_incdir in $with_hashed_db/include
22174   do
22175         while test $cf_add_incdir != /usr/include
22176         do
22177           if test -d $cf_add_incdir
22178           then
22179                 cf_have_incdir=no
22180                 if test -n "$CFLAGS$CPPFLAGS" ; then
22181                   # a loop is needed to ensure we can add subdirs of existing dirs
22182                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22183                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22184                           cf_have_incdir=yes; break
22185                         fi
22186                   done
22187                 fi
22188
22189                 if test "$cf_have_incdir" = no ; then
22190                   if test "$cf_add_incdir" = /usr/local/include ; then
22191                         if test "$GCC" = yes
22192                         then
22193                           cf_save_CPPFLAGS=$CPPFLAGS
22194
22195         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22196         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22197
22198                           cat >conftest.$ac_ext <<_ACEOF
22199 #line 22199 "configure"
22200 #include "confdefs.h"
22201 #include <stdio.h>
22202 int
22203 main (void)
22204 {
22205 printf("Hello")
22206   ;
22207   return 0;
22208 }
22209 _ACEOF
22210 rm -f conftest.$ac_objext
22211 if { (eval echo "$as_me:22211: \"$ac_compile\"") >&5
22212   (eval $ac_compile) 2>&5
22213   ac_status=$?
22214   echo "$as_me:22214: \$? = $ac_status" >&5
22215   (exit $ac_status); } &&
22216          { ac_try='test -s conftest.$ac_objext'
22217   { (eval echo "$as_me:22217: \"$ac_try\"") >&5
22218   (eval $ac_try) 2>&5
22219   ac_status=$?
22220   echo "$as_me:22220: \$? = $ac_status" >&5
22221   (exit $ac_status); }; }; then
22222   :
22223 else
22224   echo "$as_me: failed program was:" >&5
22225 cat conftest.$ac_ext >&5
22226 cf_have_incdir=yes
22227 fi
22228 rm -f conftest.$ac_objext conftest.$ac_ext
22229                           CPPFLAGS=$cf_save_CPPFLAGS
22230                         fi
22231                   fi
22232                 fi
22233
22234                 if test "$cf_have_incdir" = no ; then
22235                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22236
22237 echo "${as_me:-configure}:22237: testing adding $cf_add_incdir to include-path ..." 1>&5
22238
22239                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22240
22241                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22242                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22243                   cf_add_incdir="$cf_top_incdir"
22244                 else
22245                   break
22246                 fi
22247           else
22248                 break
22249           fi
22250         done
22251   done
22252 fi
22253
22254 if test -n "$with_hashed_db/lib" ; then
22255         for cf_add_libdir in $with_hashed_db/lib
22256         do
22257                 if test $cf_add_libdir = /usr/lib ; then
22258                         :
22259                 elif test -d $cf_add_libdir
22260                 then
22261                         cf_have_libdir=no
22262                         if test -n "$LDFLAGS$LIBS" ; then
22263                                 # a loop is needed to ensure we can add subdirs of existing dirs
22264                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22265                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22266                                                 cf_have_libdir=yes; break
22267                                         fi
22268                                 done
22269                         fi
22270                         if test "$cf_have_libdir" = no ; then
22271                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22272
22273 echo "${as_me:-configure}:22273: testing adding $cf_add_libdir to library-path ..." 1>&5
22274
22275                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22276                         fi
22277                 fi
22278         done
22279 fi
22280
22281         else
22282                 case "$with_hashed_db" in
22283                 (./*|../*|/*)
22284                         { echo "$as_me:22284: WARNING: no such directory $with_hashed_db" >&5
22285 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22286                         ;;
22287                 (*)
22288
22289 cf_search=
22290
22291 test "x$prefix" != "xNONE" && \
22292 test -d "$prefix" && \
22293  {
22294         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22295         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22296         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22297         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22298         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22299         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22300 }
22301
22302 for cf_subdir_prefix in \
22303         /usr \
22304         /usr/local \
22305         /usr/pkg \
22306         /opt \
22307         /opt/local \
22308         $HOME
22309 do
22310
22311 test "x$cf_subdir_prefix" != "x$prefix" && \
22312 test -d "$cf_subdir_prefix" && \
22313 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22314         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22315         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22316         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22317         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22318         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22319         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"
22320 }
22321
22322 done
22323
22324         for cf_item in $cf_search
22325         do
22326                 case $cf_item in
22327                 (*/$with_hashed_db)
22328
22329 if test -n "$cf_item" ; then
22330   for cf_add_incdir in $cf_item
22331   do
22332         while test $cf_add_incdir != /usr/include
22333         do
22334           if test -d $cf_add_incdir
22335           then
22336                 cf_have_incdir=no
22337                 if test -n "$CFLAGS$CPPFLAGS" ; then
22338                   # a loop is needed to ensure we can add subdirs of existing dirs
22339                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22340                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22341                           cf_have_incdir=yes; break
22342                         fi
22343                   done
22344                 fi
22345
22346                 if test "$cf_have_incdir" = no ; then
22347                   if test "$cf_add_incdir" = /usr/local/include ; then
22348                         if test "$GCC" = yes
22349                         then
22350                           cf_save_CPPFLAGS=$CPPFLAGS
22351
22352         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22353         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22354
22355                           cat >conftest.$ac_ext <<_ACEOF
22356 #line 22356 "configure"
22357 #include "confdefs.h"
22358 #include <stdio.h>
22359 int
22360 main (void)
22361 {
22362 printf("Hello")
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 rm -f conftest.$ac_objext
22368 if { (eval echo "$as_me:22368: \"$ac_compile\"") >&5
22369   (eval $ac_compile) 2>&5
22370   ac_status=$?
22371   echo "$as_me:22371: \$? = $ac_status" >&5
22372   (exit $ac_status); } &&
22373          { ac_try='test -s conftest.$ac_objext'
22374   { (eval echo "$as_me:22374: \"$ac_try\"") >&5
22375   (eval $ac_try) 2>&5
22376   ac_status=$?
22377   echo "$as_me:22377: \$? = $ac_status" >&5
22378   (exit $ac_status); }; }; then
22379   :
22380 else
22381   echo "$as_me: failed program was:" >&5
22382 cat conftest.$ac_ext >&5
22383 cf_have_incdir=yes
22384 fi
22385 rm -f conftest.$ac_objext conftest.$ac_ext
22386                           CPPFLAGS=$cf_save_CPPFLAGS
22387                         fi
22388                   fi
22389                 fi
22390
22391                 if test "$cf_have_incdir" = no ; then
22392                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22393
22394 echo "${as_me:-configure}:22394: testing adding $cf_add_incdir to include-path ..." 1>&5
22395
22396                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22397
22398                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22399                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22400                   cf_add_incdir="$cf_top_incdir"
22401                 else
22402                   break
22403                 fi
22404           else
22405                 break
22406           fi
22407         done
22408   done
22409 fi
22410
22411                         ;;
22412                 esac
22413         done
22414
22415 cf_search=
22416
22417 test "x$prefix" != "xNONE" && \
22418 test -d "$prefix" && \
22419  {
22420         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22421         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22422         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22423         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22424         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22425         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22426 }
22427
22428 for cf_subdir_prefix in \
22429         /usr \
22430         /usr/local \
22431         /usr/pkg \
22432         /opt \
22433         /opt/local \
22434         $HOME
22435 do
22436
22437 test "x$cf_subdir_prefix" != "x$prefix" && \
22438 test -d "$cf_subdir_prefix" && \
22439 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22440         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22441         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22442         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22443         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22444         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22445         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"
22446 }
22447
22448 done
22449
22450         for cf_item in $cf_search
22451         do
22452                 case $cf_item in
22453                 (*/$with_hashed_db)
22454
22455 if test -n "$cf_item" ; then
22456         for cf_add_libdir in $cf_item
22457         do
22458                 if test $cf_add_libdir = /usr/lib ; then
22459                         :
22460                 elif test -d $cf_add_libdir
22461                 then
22462                         cf_have_libdir=no
22463                         if test -n "$LDFLAGS$LIBS" ; then
22464                                 # a loop is needed to ensure we can add subdirs of existing dirs
22465                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22466                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22467                                                 cf_have_libdir=yes; break
22468                                         fi
22469                                 done
22470                         fi
22471                         if test "$cf_have_libdir" = no ; then
22472                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22473
22474 echo "${as_me:-configure}:22474: testing adding $cf_add_libdir to library-path ..." 1>&5
22475
22476                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22477                         fi
22478                 fi
22479         done
22480 fi
22481
22482                         ;;
22483                 esac
22484         done
22485
22486                         ;;
22487                 esac
22488         fi
22489 esac
22490
22491 echo "$as_me:22491: checking for db.h" >&5
22492 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22493 if test "${ac_cv_header_db_h+set}" = set; then
22494   echo $ECHO_N "(cached) $ECHO_C" >&6
22495 else
22496   cat >conftest.$ac_ext <<_ACEOF
22497 #line 22497 "configure"
22498 #include "confdefs.h"
22499 #include <db.h>
22500 _ACEOF
22501 if { (eval echo "$as_me:22501: \"$ac_cpp conftest.$ac_ext\"") >&5
22502   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22503   ac_status=$?
22504   egrep -v '^ *\+' conftest.er1 >conftest.err
22505   rm -f conftest.er1
22506   cat conftest.err >&5
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit $ac_status); } >/dev/null; then
22509   if test -s conftest.err; then
22510     ac_cpp_err=$ac_c_preproc_warn_flag
22511   else
22512     ac_cpp_err=
22513   fi
22514 else
22515   ac_cpp_err=yes
22516 fi
22517 if test -z "$ac_cpp_err"; then
22518   ac_cv_header_db_h=yes
22519 else
22520   echo "$as_me: failed program was:" >&5
22521   cat conftest.$ac_ext >&5
22522   ac_cv_header_db_h=no
22523 fi
22524 rm -f conftest.err conftest.$ac_ext
22525 fi
22526 echo "$as_me:22526: result: $ac_cv_header_db_h" >&5
22527 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22528 if test $ac_cv_header_db_h = yes; then
22529
22530 echo "$as_me:22530: checking for version of db" >&5
22531 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22532 if test "${cf_cv_hashed_db_version+set}" = set; then
22533   echo $ECHO_N "(cached) $ECHO_C" >&6
22534 else
22535
22536 cf_cv_hashed_db_version=unknown
22537
22538 for cf_db_version in 1 2 3 4 5 6
22539 do
22540
22541 echo "${as_me:-configure}:22541: testing checking for db version $cf_db_version ..." 1>&5
22542
22543         cat >conftest.$ac_ext <<_ACEOF
22544 #line 22544 "configure"
22545 #include "confdefs.h"
22546
22547 $ac_includes_default
22548 #include <db.h>
22549
22550 #ifdef DB_VERSION_MAJOR
22551         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22552 #if $cf_db_version == DB_VERSION_MAJOR
22553         /* ok */
22554 #else
22555         make an error
22556 #endif
22557 #else
22558 #if $cf_db_version == 1
22559         /* ok: assuming this is DB 1.8.5 */
22560 #else
22561         make an error
22562 #endif
22563 #endif
22564
22565 int
22566 main (void)
22567 {
22568 DBT *foo = 0
22569   ;
22570   return 0;
22571 }
22572 _ACEOF
22573 rm -f conftest.$ac_objext
22574 if { (eval echo "$as_me:22574: \"$ac_compile\"") >&5
22575   (eval $ac_compile) 2>&5
22576   ac_status=$?
22577   echo "$as_me:22577: \$? = $ac_status" >&5
22578   (exit $ac_status); } &&
22579          { ac_try='test -s conftest.$ac_objext'
22580   { (eval echo "$as_me:22580: \"$ac_try\"") >&5
22581   (eval $ac_try) 2>&5
22582   ac_status=$?
22583   echo "$as_me:22583: \$? = $ac_status" >&5
22584   (exit $ac_status); }; }; then
22585
22586         cf_cv_hashed_db_version=$cf_db_version
22587         break
22588
22589 else
22590   echo "$as_me: failed program was:" >&5
22591 cat conftest.$ac_ext >&5
22592 fi
22593 rm -f conftest.$ac_objext conftest.$ac_ext
22594 done
22595
22596 fi
22597 echo "$as_me:22597: result: $cf_cv_hashed_db_version" >&5
22598 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22599
22600 if test "$cf_cv_hashed_db_version" = unknown ; then
22601         { { echo "$as_me:22601: error: Cannot determine version of db" >&5
22602 echo "$as_me: error: Cannot determine version of db" >&2;}
22603    { (exit 1); exit 1; }; }
22604 else
22605
22606 echo "$as_me:22606: checking for db libraries" >&5
22607 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22608 if test "${cf_cv_hashed_db_libs+set}" = set; then
22609   echo $ECHO_N "(cached) $ECHO_C" >&6
22610 else
22611
22612 cf_cv_hashed_db_libs=unknown
22613 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22614 do
22615         cf_save_libs="$LIBS"
22616         if test -n "$cf_db_libs"; then
22617
22618 cf_add_libs="$LIBS"
22619 # reverse order
22620 cf_add_0lib=
22621 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22622 # filter duplicates
22623 for cf_add_1lib in $cf_add_0lib; do
22624         for cf_add_2lib in $cf_add_libs; do
22625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22626                         cf_add_1lib=
22627                         break
22628                 fi
22629         done
22630         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22631 done
22632 LIBS="$cf_add_libs"
22633
22634         fi
22635
22636 echo "${as_me:-configure}:22636: testing checking for library "$cf_db_libs" ..." 1>&5
22637
22638         cat >conftest.$ac_ext <<_ACEOF
22639 #line 22639 "configure"
22640 #include "confdefs.h"
22641
22642 $ac_includes_default
22643 #include <db.h>
22644
22645 int
22646 main (void)
22647 {
22648
22649         char *path = "/tmp/foo";
22650 #ifdef DB_VERSION_MAJOR
22651 #if DB_VERSION_MAJOR >= 4
22652         DB *result = 0;
22653         db_create(&result, NULL, 0);
22654         result->open(result,
22655                 NULL,
22656                 path,
22657                 path,
22658                 DB_HASH,
22659                 DB_CREATE,
22660                 0644);
22661 #elif DB_VERSION_MAJOR >= 3
22662         DB *result = 0;
22663         db_create(&result, NULL, 0);
22664         result->open(result,
22665                 path,
22666                 path,
22667                 DB_HASH,
22668                 DB_CREATE,
22669                 0644);
22670 #elif DB_VERSION_MAJOR >= 2
22671         DB *result = 0;
22672         db_open(path,
22673                 DB_HASH,
22674                 DB_CREATE,
22675                 0644,
22676                 (DB_ENV *) 0,
22677                 (DB_INFO *) 0,
22678                 &result);
22679 #endif /* DB_VERSION_MAJOR */
22680 #else
22681         DB *result = dbopen(path,
22682                      2,
22683                      0644,
22684                      DB_HASH,
22685                      0);
22686 #endif
22687         ${cf_cv_main_return:-return}(result != 0)
22688
22689   ;
22690   return 0;
22691 }
22692 _ACEOF
22693 rm -f conftest.$ac_objext conftest$ac_exeext
22694 if { (eval echo "$as_me:22694: \"$ac_link\"") >&5
22695   (eval $ac_link) 2>&5
22696   ac_status=$?
22697   echo "$as_me:22697: \$? = $ac_status" >&5
22698   (exit $ac_status); } &&
22699          { ac_try='test -s conftest$ac_exeext'
22700   { (eval echo "$as_me:22700: \"$ac_try\"") >&5
22701   (eval $ac_try) 2>&5
22702   ac_status=$?
22703   echo "$as_me:22703: \$? = $ac_status" >&5
22704   (exit $ac_status); }; }; then
22705
22706         if test -n "$cf_db_libs" ; then
22707                 cf_cv_hashed_db_libs=$cf_db_libs
22708         else
22709                 cf_cv_hashed_db_libs=default
22710         fi
22711         LIBS="$cf_save_libs"
22712         break
22713
22714 else
22715   echo "$as_me: failed program was:" >&5
22716 cat conftest.$ac_ext >&5
22717 fi
22718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22719         LIBS="$cf_save_libs"
22720 done
22721
22722 fi
22723 echo "$as_me:22723: result: $cf_cv_hashed_db_libs" >&5
22724 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22725
22726         if test "$cf_cv_hashed_db_libs" = unknown ; then
22727                 { { echo "$as_me:22727: error: Cannot determine library for db" >&5
22728 echo "$as_me: error: Cannot determine library for db" >&2;}
22729    { (exit 1); exit 1; }; }
22730         elif test "$cf_cv_hashed_db_libs" != default ; then
22731
22732 cf_add_libs="$LIBS"
22733 # reverse order
22734 cf_add_0lib=
22735 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22736 # filter duplicates
22737 for cf_add_1lib in $cf_add_0lib; do
22738         for cf_add_2lib in $cf_add_libs; do
22739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22740                         cf_add_1lib=
22741                         break
22742                 fi
22743         done
22744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22745 done
22746 LIBS="$cf_add_libs"
22747
22748         fi
22749 fi
22750
22751 else
22752
22753         { { echo "$as_me:22753: error: Cannot find db.h" >&5
22754 echo "$as_me: error: Cannot find db.h" >&2;}
22755    { (exit 1); exit 1; }; }
22756
22757 fi
22758
22759 fi
22760
22761 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22762         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22763         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22764 fi
22765
22766 # Just in case, check if the C compiler has a bool type.
22767
22768 echo "$as_me:22768: checking if we should include stdbool.h" >&5
22769 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22770
22771 if test "${cf_cv_header_stdbool_h+set}" = set; then
22772   echo $ECHO_N "(cached) $ECHO_C" >&6
22773 else
22774
22775         cat >conftest.$ac_ext <<_ACEOF
22776 #line 22776 "configure"
22777 #include "confdefs.h"
22778
22779 int
22780 main (void)
22781 {
22782 bool foo = false
22783   ;
22784   return 0;
22785 }
22786 _ACEOF
22787 rm -f conftest.$ac_objext
22788 if { (eval echo "$as_me:22788: \"$ac_compile\"") >&5
22789   (eval $ac_compile) 2>&5
22790   ac_status=$?
22791   echo "$as_me:22791: \$? = $ac_status" >&5
22792   (exit $ac_status); } &&
22793          { ac_try='test -s conftest.$ac_objext'
22794   { (eval echo "$as_me:22794: \"$ac_try\"") >&5
22795   (eval $ac_try) 2>&5
22796   ac_status=$?
22797   echo "$as_me:22797: \$? = $ac_status" >&5
22798   (exit $ac_status); }; }; then
22799   cf_cv_header_stdbool_h=0
22800 else
22801   echo "$as_me: failed program was:" >&5
22802 cat conftest.$ac_ext >&5
22803 cat >conftest.$ac_ext <<_ACEOF
22804 #line 22804 "configure"
22805 #include "confdefs.h"
22806
22807 #ifndef __BEOS__
22808 #include <stdbool.h>
22809 #endif
22810
22811 int
22812 main (void)
22813 {
22814 bool foo = false
22815   ;
22816   return 0;
22817 }
22818 _ACEOF
22819 rm -f conftest.$ac_objext
22820 if { (eval echo "$as_me:22820: \"$ac_compile\"") >&5
22821   (eval $ac_compile) 2>&5
22822   ac_status=$?
22823   echo "$as_me:22823: \$? = $ac_status" >&5
22824   (exit $ac_status); } &&
22825          { ac_try='test -s conftest.$ac_objext'
22826   { (eval echo "$as_me:22826: \"$ac_try\"") >&5
22827   (eval $ac_try) 2>&5
22828   ac_status=$?
22829   echo "$as_me:22829: \$? = $ac_status" >&5
22830   (exit $ac_status); }; }; then
22831   cf_cv_header_stdbool_h=1
22832 else
22833   echo "$as_me: failed program was:" >&5
22834 cat conftest.$ac_ext >&5
22835 cf_cv_header_stdbool_h=0
22836 fi
22837 rm -f conftest.$ac_objext conftest.$ac_ext
22838 fi
22839 rm -f conftest.$ac_objext conftest.$ac_ext
22840 fi
22841
22842 if test "$cf_cv_header_stdbool_h" = 1
22843 then    echo "$as_me:22843: result: yes" >&5
22844 echo "${ECHO_T}yes" >&6
22845 else    echo "$as_me:22845: result: no" >&5
22846 echo "${ECHO_T}no" >&6
22847 fi
22848
22849 echo "$as_me:22849: checking for builtin bool type" >&5
22850 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22851
22852 if test "${cf_cv_cc_bool_type+set}" = set; then
22853   echo $ECHO_N "(cached) $ECHO_C" >&6
22854 else
22855
22856         cat >conftest.$ac_ext <<_ACEOF
22857 #line 22857 "configure"
22858 #include "confdefs.h"
22859
22860 #include <stdio.h>
22861 #include <sys/types.h>
22862
22863 int
22864 main (void)
22865 {
22866 bool x = false
22867   ;
22868   return 0;
22869 }
22870 _ACEOF
22871 rm -f conftest.$ac_objext
22872 if { (eval echo "$as_me:22872: \"$ac_compile\"") >&5
22873   (eval $ac_compile) 2>&5
22874   ac_status=$?
22875   echo "$as_me:22875: \$? = $ac_status" >&5
22876   (exit $ac_status); } &&
22877          { ac_try='test -s conftest.$ac_objext'
22878   { (eval echo "$as_me:22878: \"$ac_try\"") >&5
22879   (eval $ac_try) 2>&5
22880   ac_status=$?
22881   echo "$as_me:22881: \$? = $ac_status" >&5
22882   (exit $ac_status); }; }; then
22883   cf_cv_cc_bool_type=1
22884 else
22885   echo "$as_me: failed program was:" >&5
22886 cat conftest.$ac_ext >&5
22887 cf_cv_cc_bool_type=0
22888 fi
22889 rm -f conftest.$ac_objext conftest.$ac_ext
22890
22891 fi
22892
22893 if test "$cf_cv_cc_bool_type" = 1
22894 then    echo "$as_me:22894: result: yes" >&5
22895 echo "${ECHO_T}yes" >&6
22896 else    echo "$as_me:22896: result: no" >&5
22897 echo "${ECHO_T}no" >&6
22898 fi
22899
22900 # Check for C++ compiler characteristics (and ensure that it's there!)
22901 if test -n "$CXX" ; then
22902         ac_ext=cc
22903 ac_cpp='$CXXCPP $CPPFLAGS'
22904 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22905 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22906 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22907 ac_main_return=return
22908
22909 if test -n "$GXX" ; then
22910
22911         cf_save="$LIBS"
22912         LIBS="$LIBS $CXXLIBS"
22913         echo "$as_me:22913: checking if we already have C++ library" >&5
22914 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22915         cat >conftest.$ac_ext <<_ACEOF
22916 #line 22916 "configure"
22917 #include "confdefs.h"
22918
22919                         #include <iostream>
22920 int
22921 main (void)
22922 {
22923
22924                         std::cout << "Hello World!" << std::endl;
22925   ;
22926   return 0;
22927 }
22928 _ACEOF
22929 rm -f conftest.$ac_objext conftest$ac_exeext
22930 if { (eval echo "$as_me:22930: \"$ac_link\"") >&5
22931   (eval $ac_link) 2>&5
22932   ac_status=$?
22933   echo "$as_me:22933: \$? = $ac_status" >&5
22934   (exit $ac_status); } &&
22935          { ac_try='test -s conftest$ac_exeext'
22936   { (eval echo "$as_me:22936: \"$ac_try\"") >&5
22937   (eval $ac_try) 2>&5
22938   ac_status=$?
22939   echo "$as_me:22939: \$? = $ac_status" >&5
22940   (exit $ac_status); }; }; then
22941   cf_have_libstdcpp=yes
22942 else
22943   echo "$as_me: failed program was:" >&5
22944 cat conftest.$ac_ext >&5
22945 cf_have_libstdcpp=no
22946 fi
22947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22948         echo "$as_me:22948: result: $cf_have_libstdcpp" >&5
22949 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22950         LIBS="$cf_save"
22951
22952         if test $cf_have_libstdcpp != yes
22953         then
22954                 case $cf_cv_system_name in
22955                 (os2*)
22956                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22957                                 cf_stdcpp_libname=stdcpp
22958                         else
22959                                 cf_stdcpp_libname=stdc++
22960                         fi
22961                         ;;
22962                 (*)
22963                         cf_stdcpp_libname=stdc++
22964                         ;;
22965                 esac
22966
22967                 echo "$as_me:22967: checking for library $cf_stdcpp_libname" >&5
22968 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22969 if test "${cf_cv_libstdcpp+set}" = set; then
22970   echo $ECHO_N "(cached) $ECHO_C" >&6
22971 else
22972
22973                         cf_save="$LIBS"
22974                         LIBS="$LIBS $CXXLIBS"
22975
22976 cf_add_libs="$LIBS"
22977 # reverse order
22978 cf_add_0lib=
22979 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22980 # filter duplicates
22981 for cf_add_1lib in $cf_add_0lib; do
22982         for cf_add_2lib in $cf_add_libs; do
22983                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22984                         cf_add_1lib=
22985                         break
22986                 fi
22987         done
22988         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22989 done
22990 LIBS="$cf_add_libs"
22991
22992                 cat >conftest.$ac_ext <<_ACEOF
22993 #line 22993 "configure"
22994 #include "confdefs.h"
22995
22996                                 #include <iostream>
22997 int
22998 main (void)
22999 {
23000
23001                                 std::cout << "Hello World!" << std::endl;
23002   ;
23003   return 0;
23004 }
23005 _ACEOF
23006 rm -f conftest.$ac_objext conftest$ac_exeext
23007 if { (eval echo "$as_me:23007: \"$ac_link\"") >&5
23008   (eval $ac_link) 2>&5
23009   ac_status=$?
23010   echo "$as_me:23010: \$? = $ac_status" >&5
23011   (exit $ac_status); } &&
23012          { ac_try='test -s conftest$ac_exeext'
23013   { (eval echo "$as_me:23013: \"$ac_try\"") >&5
23014   (eval $ac_try) 2>&5
23015   ac_status=$?
23016   echo "$as_me:23016: \$? = $ac_status" >&5
23017   (exit $ac_status); }; }; then
23018   cf_cv_libstdcpp=yes
23019 else
23020   echo "$as_me: failed program was:" >&5
23021 cat conftest.$ac_ext >&5
23022 cf_cv_libstdcpp=no
23023 fi
23024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23025                         LIBS="$cf_save"
23026
23027 fi
23028 echo "$as_me:23028: result: $cf_cv_libstdcpp" >&5
23029 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23030                 test "$cf_cv_libstdcpp" = yes && {
23031 cf_add_libs="$CXXLIBS"
23032 # reverse order
23033 cf_add_0lib=
23034 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23035 # filter duplicates
23036 for cf_add_1lib in $cf_add_0lib; do
23037         for cf_add_2lib in $cf_add_libs; do
23038                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23039                         cf_add_1lib=
23040                         break
23041                 fi
23042         done
23043         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23044 done
23045 CXXLIBS="$cf_add_libs"
23046  }
23047         fi
23048 fi
23049
23050         echo "$as_me:23050: checking whether $CXX understands -c and -o together" >&5
23051 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23052 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23053   echo $ECHO_N "(cached) $ECHO_C" >&6
23054 else
23055
23056 cat > conftest.$ac_ext <<CF_EOF
23057 int main(void)
23058 {
23059         ${cf_cv_main_return:-return}(0);
23060 }
23061 CF_EOF
23062 # We do the test twice because some compilers refuse to overwrite an
23063 # existing .o file with -o, though they will create one.
23064 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23065 if { (eval echo "$as_me:23065: \"$ac_try\"") >&5
23066   (eval $ac_try) 2>&5
23067   ac_status=$?
23068   echo "$as_me:23068: \$? = $ac_status" >&5
23069   (exit $ac_status); } &&
23070   test -f conftest2.$ac_objext && { (eval echo "$as_me:23070: \"$ac_try\"") >&5
23071   (eval $ac_try) 2>&5
23072   ac_status=$?
23073   echo "$as_me:23073: \$? = $ac_status" >&5
23074   (exit $ac_status); };
23075 then
23076   eval cf_cv_prog_CXX_c_o=yes
23077 else
23078   eval cf_cv_prog_CXX_c_o=no
23079 fi
23080 rm -rf conftest*
23081
23082 fi
23083 if test $cf_cv_prog_CXX_c_o = yes; then
23084   echo "$as_me:23084: result: yes" >&5
23085 echo "${ECHO_T}yes" >&6
23086 else
23087   echo "$as_me:23087: result: no" >&5
23088 echo "${ECHO_T}no" >&6
23089 fi
23090
23091         case $GXX_VERSION in
23092         (1*|2.0-6*)
23093                 cf_cxx_library=yes
23094                 ;;
23095         (*-2.7*|2.7*)
23096
23097 cf_cxx_library=unknown
23098 case $cf_cv_system_name in
23099 (os2*)
23100         cf_gpp_libname=gpp
23101         ;;
23102 (*)
23103         cf_gpp_libname=g++
23104         ;;
23105 esac
23106 if test "$GXX" = yes; then
23107         echo "$as_me:23107: checking for lib$cf_gpp_libname" >&5
23108 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23109         cf_save="$LIBS"
23110
23111 cf_add_libs="$LIBS"
23112 # reverse order
23113 cf_add_0lib=
23114 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23115 # filter duplicates
23116 for cf_add_1lib in $cf_add_0lib; do
23117         for cf_add_2lib in $cf_add_libs; do
23118                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23119                         cf_add_1lib=
23120                         break
23121                 fi
23122         done
23123         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23124 done
23125 LIBS="$cf_add_libs"
23126
23127         cat >conftest.$ac_ext <<_ACEOF
23128 #line 23128 "configure"
23129 #include "confdefs.h"
23130
23131 #include <$cf_gpp_libname/builtin.h>
23132
23133 int
23134 main (void)
23135 {
23136 two_arg_error_handler_t foo2 = lib_error_handler
23137   ;
23138   return 0;
23139 }
23140 _ACEOF
23141 rm -f conftest.$ac_objext conftest$ac_exeext
23142 if { (eval echo "$as_me:23142: \"$ac_link\"") >&5
23143   (eval $ac_link) 2>&5
23144   ac_status=$?
23145   echo "$as_me:23145: \$? = $ac_status" >&5
23146   (exit $ac_status); } &&
23147          { ac_try='test -s conftest$ac_exeext'
23148   { (eval echo "$as_me:23148: \"$ac_try\"") >&5
23149   (eval $ac_try) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit $ac_status); }; }; then
23153   cf_cxx_library=yes
23154
23155 cf_add_libs="$CXXLIBS"
23156 # reverse order
23157 cf_add_0lib=
23158 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23159 # filter duplicates
23160 for cf_add_1lib in $cf_add_0lib; do
23161         for cf_add_2lib in $cf_add_libs; do
23162                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23163                         cf_add_1lib=
23164                         break
23165                 fi
23166         done
23167         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23168 done
23169 CXXLIBS="$cf_add_libs"
23170
23171          if test "$cf_gpp_libname" = cpp ; then
23172
23173 cat >>confdefs.h <<\EOF
23174 #define HAVE_GPP_BUILTIN_H 1
23175 EOF
23176
23177          else
23178
23179 cat >>confdefs.h <<\EOF
23180 #define HAVE_GXX_BUILTIN_H 1
23181 EOF
23182
23183          fi
23184 else
23185   echo "$as_me: failed program was:" >&5
23186 cat conftest.$ac_ext >&5
23187 cat >conftest.$ac_ext <<_ACEOF
23188 #line 23188 "configure"
23189 #include "confdefs.h"
23190
23191 #include <builtin.h>
23192
23193 int
23194 main (void)
23195 {
23196 two_arg_error_handler_t foo2 = lib_error_handler
23197   ;
23198   return 0;
23199 }
23200 _ACEOF
23201 rm -f conftest.$ac_objext conftest$ac_exeext
23202 if { (eval echo "$as_me:23202: \"$ac_link\"") >&5
23203   (eval $ac_link) 2>&5
23204   ac_status=$?
23205   echo "$as_me:23205: \$? = $ac_status" >&5
23206   (exit $ac_status); } &&
23207          { ac_try='test -s conftest$ac_exeext'
23208   { (eval echo "$as_me:23208: \"$ac_try\"") >&5
23209   (eval $ac_try) 2>&5
23210   ac_status=$?
23211   echo "$as_me:23211: \$? = $ac_status" >&5
23212   (exit $ac_status); }; }; then
23213   cf_cxx_library=yes
23214
23215 cf_add_libs="$CXXLIBS"
23216 # reverse order
23217 cf_add_0lib=
23218 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23219 # filter duplicates
23220 for cf_add_1lib in $cf_add_0lib; do
23221         for cf_add_2lib in $cf_add_libs; do
23222                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23223                         cf_add_1lib=
23224                         break
23225                 fi
23226         done
23227         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23228 done
23229 CXXLIBS="$cf_add_libs"
23230
23231 cat >>confdefs.h <<\EOF
23232 #define HAVE_BUILTIN_H 1
23233 EOF
23234
23235 else
23236   echo "$as_me: failed program was:" >&5
23237 cat conftest.$ac_ext >&5
23238 cf_cxx_library=no
23239 fi
23240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23241 fi
23242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23243         LIBS="$cf_save"
23244         echo "$as_me:23244: result: $cf_cxx_library" >&5
23245 echo "${ECHO_T}$cf_cxx_library" >&6
23246 fi
23247
23248                 ;;
23249         (*)
23250                 cf_cxx_library=no
23251                 ;;
23252         esac
23253
23254         ac_ext=cc
23255 ac_cpp='$CXXCPP $CPPFLAGS'
23256 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23257 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23258 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23259 ac_main_return=return
23260 echo "$as_me:23260: checking how to run the C++ preprocessor" >&5
23261 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23262 if test -z "$CXXCPP"; then
23263   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23264   echo $ECHO_N "(cached) $ECHO_C" >&6
23265 else
23266       # Double quotes because CXXCPP needs to be expanded
23267     for CXXCPP in "$CXX -E" "/lib/cpp"
23268     do
23269       ac_preproc_ok=false
23270 for ac_cxx_preproc_warn_flag in '' yes
23271 do
23272   # Use a header file that comes with gcc, so configuring glibc
23273   # with a fresh cross-compiler works.
23274   # On the NeXT, cc -E runs the code through the compiler's parser,
23275   # not just through cpp. "Syntax error" is here to catch this case.
23276   cat >conftest.$ac_ext <<_ACEOF
23277 #line 23277 "configure"
23278 #include "confdefs.h"
23279 #include <assert.h>
23280                      Syntax error
23281 _ACEOF
23282 if { (eval echo "$as_me:23282: \"$ac_cpp conftest.$ac_ext\"") >&5
23283   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23284   ac_status=$?
23285   egrep -v '^ *\+' conftest.er1 >conftest.err
23286   rm -f conftest.er1
23287   cat conftest.err >&5
23288   echo "$as_me:23288: \$? = $ac_status" >&5
23289   (exit $ac_status); } >/dev/null; then
23290   if test -s conftest.err; then
23291     ac_cpp_err=$ac_cxx_preproc_warn_flag
23292   else
23293     ac_cpp_err=
23294   fi
23295 else
23296   ac_cpp_err=yes
23297 fi
23298 if test -z "$ac_cpp_err"; then
23299   :
23300 else
23301   echo "$as_me: failed program was:" >&5
23302   cat conftest.$ac_ext >&5
23303   # Broken: fails on valid input.
23304 continue
23305 fi
23306 rm -f conftest.err conftest.$ac_ext
23307
23308   # OK, works on sane cases.  Now check whether non-existent headers
23309   # can be detected and how.
23310   cat >conftest.$ac_ext <<_ACEOF
23311 #line 23311 "configure"
23312 #include "confdefs.h"
23313 #include <ac_nonexistent.h>
23314 _ACEOF
23315 if { (eval echo "$as_me:23315: \"$ac_cpp conftest.$ac_ext\"") >&5
23316   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23317   ac_status=$?
23318   egrep -v '^ *\+' conftest.er1 >conftest.err
23319   rm -f conftest.er1
23320   cat conftest.err >&5
23321   echo "$as_me:23321: \$? = $ac_status" >&5
23322   (exit $ac_status); } >/dev/null; then
23323   if test -s conftest.err; then
23324     ac_cpp_err=$ac_cxx_preproc_warn_flag
23325   else
23326     ac_cpp_err=
23327   fi
23328 else
23329   ac_cpp_err=yes
23330 fi
23331 if test -z "$ac_cpp_err"; then
23332   # Broken: success on invalid input.
23333 continue
23334 else
23335   echo "$as_me: failed program was:" >&5
23336   cat conftest.$ac_ext >&5
23337   # Passes both tests.
23338 ac_preproc_ok=:
23339 break
23340 fi
23341 rm -f conftest.err conftest.$ac_ext
23342
23343 done
23344 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23345 rm -f conftest.err conftest.$ac_ext
23346 if $ac_preproc_ok; then
23347   break
23348 fi
23349
23350     done
23351     ac_cv_prog_CXXCPP=$CXXCPP
23352
23353 fi
23354   CXXCPP=$ac_cv_prog_CXXCPP
23355 else
23356   ac_cv_prog_CXXCPP=$CXXCPP
23357 fi
23358 echo "$as_me:23358: result: $CXXCPP" >&5
23359 echo "${ECHO_T}$CXXCPP" >&6
23360 ac_preproc_ok=false
23361 for ac_cxx_preproc_warn_flag in '' yes
23362 do
23363   # Use a header file that comes with gcc, so configuring glibc
23364   # with a fresh cross-compiler works.
23365   # On the NeXT, cc -E runs the code through the compiler's parser,
23366   # not just through cpp. "Syntax error" is here to catch this case.
23367   cat >conftest.$ac_ext <<_ACEOF
23368 #line 23368 "configure"
23369 #include "confdefs.h"
23370 #include <assert.h>
23371                      Syntax error
23372 _ACEOF
23373 if { (eval echo "$as_me:23373: \"$ac_cpp conftest.$ac_ext\"") >&5
23374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23375   ac_status=$?
23376   egrep -v '^ *\+' conftest.er1 >conftest.err
23377   rm -f conftest.er1
23378   cat conftest.err >&5
23379   echo "$as_me:23379: \$? = $ac_status" >&5
23380   (exit $ac_status); } >/dev/null; then
23381   if test -s conftest.err; then
23382     ac_cpp_err=$ac_cxx_preproc_warn_flag
23383   else
23384     ac_cpp_err=
23385   fi
23386 else
23387   ac_cpp_err=yes
23388 fi
23389 if test -z "$ac_cpp_err"; then
23390   :
23391 else
23392   echo "$as_me: failed program was:" >&5
23393   cat conftest.$ac_ext >&5
23394   # Broken: fails on valid input.
23395 continue
23396 fi
23397 rm -f conftest.err conftest.$ac_ext
23398
23399   # OK, works on sane cases.  Now check whether non-existent headers
23400   # can be detected and how.
23401   cat >conftest.$ac_ext <<_ACEOF
23402 #line 23402 "configure"
23403 #include "confdefs.h"
23404 #include <ac_nonexistent.h>
23405 _ACEOF
23406 if { (eval echo "$as_me:23406: \"$ac_cpp conftest.$ac_ext\"") >&5
23407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23408   ac_status=$?
23409   egrep -v '^ *\+' conftest.er1 >conftest.err
23410   rm -f conftest.er1
23411   cat conftest.err >&5
23412   echo "$as_me:23412: \$? = $ac_status" >&5
23413   (exit $ac_status); } >/dev/null; then
23414   if test -s conftest.err; then
23415     ac_cpp_err=$ac_cxx_preproc_warn_flag
23416   else
23417     ac_cpp_err=
23418   fi
23419 else
23420   ac_cpp_err=yes
23421 fi
23422 if test -z "$ac_cpp_err"; then
23423   # Broken: success on invalid input.
23424 continue
23425 else
23426   echo "$as_me: failed program was:" >&5
23427   cat conftest.$ac_ext >&5
23428   # Passes both tests.
23429 ac_preproc_ok=:
23430 break
23431 fi
23432 rm -f conftest.err conftest.$ac_ext
23433
23434 done
23435 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23436 rm -f conftest.err conftest.$ac_ext
23437 if $ac_preproc_ok; then
23438   :
23439 else
23440   { { echo "$as_me:23440: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23441 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23442    { (exit 1); exit 1; }; }
23443 fi
23444
23445 ac_ext=cc
23446 ac_cpp='$CXXCPP $CPPFLAGS'
23447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23450 ac_main_return=return
23451
23452 for ac_header in typeinfo
23453 do
23454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23455 echo "$as_me:23455: checking for $ac_header" >&5
23456 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23457 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23458   echo $ECHO_N "(cached) $ECHO_C" >&6
23459 else
23460   cat >conftest.$ac_ext <<_ACEOF
23461 #line 23461 "configure"
23462 #include "confdefs.h"
23463 #include <$ac_header>
23464 _ACEOF
23465 if { (eval echo "$as_me:23465: \"$ac_cpp conftest.$ac_ext\"") >&5
23466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23467   ac_status=$?
23468   egrep -v '^ *\+' conftest.er1 >conftest.err
23469   rm -f conftest.er1
23470   cat conftest.err >&5
23471   echo "$as_me:23471: \$? = $ac_status" >&5
23472   (exit $ac_status); } >/dev/null; then
23473   if test -s conftest.err; then
23474     ac_cpp_err=$ac_cxx_preproc_warn_flag
23475   else
23476     ac_cpp_err=
23477   fi
23478 else
23479   ac_cpp_err=yes
23480 fi
23481 if test -z "$ac_cpp_err"; then
23482   eval "$as_ac_Header=yes"
23483 else
23484   echo "$as_me: failed program was:" >&5
23485   cat conftest.$ac_ext >&5
23486   eval "$as_ac_Header=no"
23487 fi
23488 rm -f conftest.err conftest.$ac_ext
23489 fi
23490 echo "$as_me:23490: result: `eval echo '${'$as_ac_Header'}'`" >&5
23491 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23492 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23493   cat >>confdefs.h <<EOF
23494 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23495 EOF
23496
23497 fi
23498 done
23499
23500 for ac_header in iostream
23501 do
23502 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23503 echo "$as_me:23503: checking for $ac_header" >&5
23504 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23506   echo $ECHO_N "(cached) $ECHO_C" >&6
23507 else
23508   cat >conftest.$ac_ext <<_ACEOF
23509 #line 23509 "configure"
23510 #include "confdefs.h"
23511 #include <$ac_header>
23512 _ACEOF
23513 if { (eval echo "$as_me:23513: \"$ac_cpp conftest.$ac_ext\"") >&5
23514   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23515   ac_status=$?
23516   egrep -v '^ *\+' conftest.er1 >conftest.err
23517   rm -f conftest.er1
23518   cat conftest.err >&5
23519   echo "$as_me:23519: \$? = $ac_status" >&5
23520   (exit $ac_status); } >/dev/null; then
23521   if test -s conftest.err; then
23522     ac_cpp_err=$ac_cxx_preproc_warn_flag
23523   else
23524     ac_cpp_err=
23525   fi
23526 else
23527   ac_cpp_err=yes
23528 fi
23529 if test -z "$ac_cpp_err"; then
23530   eval "$as_ac_Header=yes"
23531 else
23532   echo "$as_me: failed program was:" >&5
23533   cat conftest.$ac_ext >&5
23534   eval "$as_ac_Header=no"
23535 fi
23536 rm -f conftest.err conftest.$ac_ext
23537 fi
23538 echo "$as_me:23538: result: `eval echo '${'$as_ac_Header'}'`" >&5
23539 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23540 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23541   cat >>confdefs.h <<EOF
23542 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23543 EOF
23544
23545 fi
23546 done
23547
23548 if test x"$ac_cv_header_iostream" = xyes ; then
23549         echo "$as_me:23549: checking if iostream uses std-namespace" >&5
23550 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23551         cat >conftest.$ac_ext <<_ACEOF
23552 #line 23552 "configure"
23553 #include "confdefs.h"
23554
23555 #include <iostream>
23556 using std::endl;
23557 using std::cerr;
23558 int
23559 main (void)
23560 {
23561
23562 cerr << "testing" << endl;
23563
23564   ;
23565   return 0;
23566 }
23567 _ACEOF
23568 rm -f conftest.$ac_objext
23569 if { (eval echo "$as_me:23569: \"$ac_compile\"") >&5
23570   (eval $ac_compile) 2>&5
23571   ac_status=$?
23572   echo "$as_me:23572: \$? = $ac_status" >&5
23573   (exit $ac_status); } &&
23574          { ac_try='test -s conftest.$ac_objext'
23575   { (eval echo "$as_me:23575: \"$ac_try\"") >&5
23576   (eval $ac_try) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit $ac_status); }; }; then
23580   cf_iostream_namespace=yes
23581 else
23582   echo "$as_me: failed program was:" >&5
23583 cat conftest.$ac_ext >&5
23584 cf_iostream_namespace=no
23585 fi
23586 rm -f conftest.$ac_objext conftest.$ac_ext
23587         echo "$as_me:23587: result: $cf_iostream_namespace" >&5
23588 echo "${ECHO_T}$cf_iostream_namespace" >&6
23589         if test "$cf_iostream_namespace" = yes ; then
23590
23591 cat >>confdefs.h <<\EOF
23592 #define IOSTREAM_NAMESPACE 1
23593 EOF
23594
23595         fi
23596 fi
23597
23598 echo "$as_me:23598: checking if we should include stdbool.h" >&5
23599 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23600
23601 if test "${cf_cv_header_stdbool_h+set}" = set; then
23602   echo $ECHO_N "(cached) $ECHO_C" >&6
23603 else
23604
23605         cat >conftest.$ac_ext <<_ACEOF
23606 #line 23606 "configure"
23607 #include "confdefs.h"
23608
23609 int
23610 main (void)
23611 {
23612 bool foo = false
23613   ;
23614   return 0;
23615 }
23616 _ACEOF
23617 rm -f conftest.$ac_objext
23618 if { (eval echo "$as_me:23618: \"$ac_compile\"") >&5
23619   (eval $ac_compile) 2>&5
23620   ac_status=$?
23621   echo "$as_me:23621: \$? = $ac_status" >&5
23622   (exit $ac_status); } &&
23623          { ac_try='test -s conftest.$ac_objext'
23624   { (eval echo "$as_me:23624: \"$ac_try\"") >&5
23625   (eval $ac_try) 2>&5
23626   ac_status=$?
23627   echo "$as_me:23627: \$? = $ac_status" >&5
23628   (exit $ac_status); }; }; then
23629   cf_cv_header_stdbool_h=0
23630 else
23631   echo "$as_me: failed program was:" >&5
23632 cat conftest.$ac_ext >&5
23633 cat >conftest.$ac_ext <<_ACEOF
23634 #line 23634 "configure"
23635 #include "confdefs.h"
23636
23637 #ifndef __BEOS__
23638 #include <stdbool.h>
23639 #endif
23640
23641 int
23642 main (void)
23643 {
23644 bool foo = false
23645   ;
23646   return 0;
23647 }
23648 _ACEOF
23649 rm -f conftest.$ac_objext
23650 if { (eval echo "$as_me:23650: \"$ac_compile\"") >&5
23651   (eval $ac_compile) 2>&5
23652   ac_status=$?
23653   echo "$as_me:23653: \$? = $ac_status" >&5
23654   (exit $ac_status); } &&
23655          { ac_try='test -s conftest.$ac_objext'
23656   { (eval echo "$as_me:23656: \"$ac_try\"") >&5
23657   (eval $ac_try) 2>&5
23658   ac_status=$?
23659   echo "$as_me:23659: \$? = $ac_status" >&5
23660   (exit $ac_status); }; }; then
23661   cf_cv_header_stdbool_h=1
23662 else
23663   echo "$as_me: failed program was:" >&5
23664 cat conftest.$ac_ext >&5
23665 cf_cv_header_stdbool_h=0
23666 fi
23667 rm -f conftest.$ac_objext conftest.$ac_ext
23668 fi
23669 rm -f conftest.$ac_objext conftest.$ac_ext
23670 fi
23671
23672 if test "$cf_cv_header_stdbool_h" = 1
23673 then    echo "$as_me:23673: result: yes" >&5
23674 echo "${ECHO_T}yes" >&6
23675 else    echo "$as_me:23675: result: no" >&5
23676 echo "${ECHO_T}no" >&6
23677 fi
23678
23679 echo "$as_me:23679: checking for builtin bool type" >&5
23680 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23681
23682 if test "${cf_cv_builtin_bool+set}" = set; then
23683   echo $ECHO_N "(cached) $ECHO_C" >&6
23684 else
23685
23686         cat >conftest.$ac_ext <<_ACEOF
23687 #line 23687 "configure"
23688 #include "confdefs.h"
23689
23690 #include <stdio.h>
23691 #include <sys/types.h>
23692
23693 int
23694 main (void)
23695 {
23696 bool x = false
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   cf_cv_builtin_bool=1
23714 else
23715   echo "$as_me: failed program was:" >&5
23716 cat conftest.$ac_ext >&5
23717 cf_cv_builtin_bool=0
23718 fi
23719 rm -f conftest.$ac_objext conftest.$ac_ext
23720
23721 fi
23722
23723 if test "$cf_cv_builtin_bool" = 1
23724 then    echo "$as_me:23724: result: yes" >&5
23725 echo "${ECHO_T}yes" >&6
23726 else    echo "$as_me:23726: result: no" >&5
23727 echo "${ECHO_T}no" >&6
23728 fi
23729
23730 echo "$as_me:23730: checking for size of bool" >&5
23731 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23732 if test "${cf_cv_type_of_bool+set}" = set; then
23733   echo $ECHO_N "(cached) $ECHO_C" >&6
23734 else
23735
23736         rm -f cf_test.out
23737         if test "$cross_compiling" = yes; then
23738   cf_cv_type_of_bool=unknown
23739 else
23740   cat >conftest.$ac_ext <<_ACEOF
23741 #line 23741 "configure"
23742 #include "confdefs.h"
23743
23744 #include <stdlib.h>
23745 #include <stdio.h>
23746
23747 #if defined(__cplusplus)
23748
23749 #ifdef HAVE_GXX_BUILTIN_H
23750 #include <g++/builtin.h>
23751 #elif HAVE_GPP_BUILTIN_H
23752 #include <gpp/builtin.h>
23753 #elif HAVE_BUILTIN_H
23754 #include <builtin.h>
23755 #endif
23756
23757 #else
23758
23759 #if $cf_cv_header_stdbool_h
23760 #include <stdbool.h>
23761 #endif
23762
23763 #endif
23764
23765 int main(void)
23766 {
23767         FILE *fp = fopen("cf_test.out", "w");
23768         if (fp != 0) {
23769                 bool x = true;
23770                 if ((bool)(-x) >= 0)
23771                         fputs("unsigned ", fp);
23772                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23773                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23774                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23775                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23776                 fclose(fp);
23777         }
23778         ${cf_cv_main_return:-return}(0);
23779 }
23780
23781 _ACEOF
23782 rm -f conftest$ac_exeext
23783 if { (eval echo "$as_me:23783: \"$ac_link\"") >&5
23784   (eval $ac_link) 2>&5
23785   ac_status=$?
23786   echo "$as_me:23786: \$? = $ac_status" >&5
23787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23788   { (eval echo "$as_me:23788: \"$ac_try\"") >&5
23789   (eval $ac_try) 2>&5
23790   ac_status=$?
23791   echo "$as_me:23791: \$? = $ac_status" >&5
23792   (exit $ac_status); }; }; then
23793   cf_cv_type_of_bool=`cat cf_test.out`
23794                  if test -z "$cf_cv_type_of_bool"; then
23795                    cf_cv_type_of_bool=unknown
23796                  fi
23797 else
23798   echo "$as_me: program exited with status $ac_status" >&5
23799 echo "$as_me: failed program was:" >&5
23800 cat conftest.$ac_ext >&5
23801 cf_cv_type_of_bool=unknown
23802 fi
23803 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23804 fi
23805
23806 fi
23807
23808         rm -f cf_test.out
23809 echo "$as_me:23809: result: $cf_cv_type_of_bool" >&5
23810 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23811 if test "$cf_cv_type_of_bool" = unknown ; then
23812         case .$NCURSES_BOOL in
23813         (.auto|.) NCURSES_BOOL=unsigned;;
23814         esac
23815         { echo "$as_me:23815: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23816 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23817         cf_cv_type_of_bool=$NCURSES_BOOL
23818 fi
23819
23820 echo "$as_me:23820: checking for special defines needed for etip.h" >&5
23821 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23822 cf_save_CXXFLAGS="$CXXFLAGS"
23823 cf_result="none"
23824
23825 # etip.h includes ncurses.h which includes ncurses_dll.h
23826 # But ncurses_dll.h is generated - fix here.
23827 test -d include || mkdir include
23828 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
23829
23830 for cf_math in "" MATH_H
23831 do
23832 for cf_excp in "" MATH_EXCEPTION
23833 do
23834         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23835         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23836         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23837 cat >conftest.$ac_ext <<_ACEOF
23838 #line 23838 "configure"
23839 #include "confdefs.h"
23840
23841 #include <etip.h.in>
23842
23843 int
23844 main (void)
23845 {
23846
23847   ;
23848   return 0;
23849 }
23850 _ACEOF
23851 rm -f conftest.$ac_objext
23852 if { (eval echo "$as_me:23852: \"$ac_compile\"") >&5
23853   (eval $ac_compile) 2>&5
23854   ac_status=$?
23855   echo "$as_me:23855: \$? = $ac_status" >&5
23856   (exit $ac_status); } &&
23857          { ac_try='test -s conftest.$ac_objext'
23858   { (eval echo "$as_me:23858: \"$ac_try\"") >&5
23859   (eval $ac_try) 2>&5
23860   ac_status=$?
23861   echo "$as_me:23861: \$? = $ac_status" >&5
23862   (exit $ac_status); }; }; then
23863
23864         test -n "$cf_math" && cat >>confdefs.h <<EOF
23865 #define ETIP_NEEDS_${cf_math} 1
23866 EOF
23867
23868         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23869 #define ETIP_NEEDS_${cf_excp} 1
23870 EOF
23871
23872         cf_result="$cf_math $cf_excp"
23873         break 2
23874
23875 else
23876   echo "$as_me: failed program was:" >&5
23877 cat conftest.$ac_ext >&5
23878 fi
23879 rm -f conftest.$ac_objext conftest.$ac_ext
23880 done
23881 done
23882 echo "$as_me:23882: result: $cf_result" >&5
23883 echo "${ECHO_T}$cf_result" >&6
23884 CXXFLAGS="$cf_save_CXXFLAGS"
23885
23886 if test -n "$CXX"; then
23887 echo "$as_me:23887: checking if $CXX accepts parameter initialization" >&5
23888 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23889 if test "${cf_cv_cpp_param_init+set}" = set; then
23890   echo $ECHO_N "(cached) $ECHO_C" >&6
23891 else
23892
23893         ac_ext=cc
23894 ac_cpp='$CXXCPP $CPPFLAGS'
23895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23898 ac_main_return=return
23899
23900         if test "$cross_compiling" = yes; then
23901   cf_cv_cpp_param_init=unknown
23902 else
23903   cat >conftest.$ac_ext <<_ACEOF
23904 #line 23904 "configure"
23905 #include "confdefs.h"
23906
23907 class TEST {
23908 private:
23909         int value;
23910 public:
23911         TEST(int x = 1);
23912         ~TEST();
23913 };
23914
23915 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23916 {
23917         value = x;
23918 }
23919 int main(void) { }
23920
23921 _ACEOF
23922 rm -f conftest$ac_exeext
23923 if { (eval echo "$as_me:23923: \"$ac_link\"") >&5
23924   (eval $ac_link) 2>&5
23925   ac_status=$?
23926   echo "$as_me:23926: \$? = $ac_status" >&5
23927   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23928   { (eval echo "$as_me:23928: \"$ac_try\"") >&5
23929   (eval $ac_try) 2>&5
23930   ac_status=$?
23931   echo "$as_me:23931: \$? = $ac_status" >&5
23932   (exit $ac_status); }; }; then
23933   cf_cv_cpp_param_init=yes
23934 else
23935   echo "$as_me: program exited with status $ac_status" >&5
23936 echo "$as_me: failed program was:" >&5
23937 cat conftest.$ac_ext >&5
23938 cf_cv_cpp_param_init=no
23939 fi
23940 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23941 fi
23942         ac_ext=cc
23943 ac_cpp='$CXXCPP $CPPFLAGS'
23944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23947 ac_main_return=return
23948
23949 fi
23950 echo "$as_me:23950: result: $cf_cv_cpp_param_init" >&5
23951 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23952 fi
23953 test "$cf_cv_cpp_param_init" = yes &&
23954 cat >>confdefs.h <<\EOF
23955 #define CPP_HAS_PARAM_INIT 1
23956 EOF
23957
23958 if test -n "$CXX"; then
23959
23960 echo "$as_me:23960: checking if $CXX accepts static_cast" >&5
23961 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23962 if test "${cf_cv_cpp_static_cast+set}" = set; then
23963   echo $ECHO_N "(cached) $ECHO_C" >&6
23964 else
23965
23966         ac_ext=cc
23967 ac_cpp='$CXXCPP $CPPFLAGS'
23968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23971 ac_main_return=return
23972
23973         cat >conftest.$ac_ext <<_ACEOF
23974 #line 23974 "configure"
23975 #include "confdefs.h"
23976
23977 class NCursesPanel
23978 {
23979 public:
23980   NCursesPanel(int nlines,
23981                int ncols,
23982                int begin_y = 0,
23983                int begin_x = 0)
23984   {
23985   }
23986   NCursesPanel();
23987   ~NCursesPanel();
23988 };
23989
23990 template<class T> class NCursesUserPanel : public NCursesPanel
23991 {
23992 public:
23993   NCursesUserPanel (int nlines,
23994                     int ncols,
23995                     int begin_y = 0,
23996                     int begin_x = 0,
23997                     const T* p_UserData = static_cast<T*>(0))
23998     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23999   {
24000   };
24001   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24002   {
24003   };
24004
24005   virtual ~NCursesUserPanel() {};
24006 };
24007
24008 int
24009 main (void)
24010 {
24011
24012         const char* p_UserData = static_cast<char*>(0)
24013   ;
24014   return 0;
24015 }
24016 _ACEOF
24017 rm -f conftest.$ac_objext
24018 if { (eval echo "$as_me:24018: \"$ac_compile\"") >&5
24019   (eval $ac_compile) 2>&5
24020   ac_status=$?
24021   echo "$as_me:24021: \$? = $ac_status" >&5
24022   (exit $ac_status); } &&
24023          { ac_try='test -s conftest.$ac_objext'
24024   { (eval echo "$as_me:24024: \"$ac_try\"") >&5
24025   (eval $ac_try) 2>&5
24026   ac_status=$?
24027   echo "$as_me:24027: \$? = $ac_status" >&5
24028   (exit $ac_status); }; }; then
24029   cf_cv_cpp_static_cast=yes
24030 else
24031   echo "$as_me: failed program was:" >&5
24032 cat conftest.$ac_ext >&5
24033 cf_cv_cpp_static_cast=no
24034 fi
24035 rm -f conftest.$ac_objext conftest.$ac_ext
24036
24037         ac_ext=cc
24038 ac_cpp='$CXXCPP $CPPFLAGS'
24039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24040 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24042 ac_main_return=return
24043
24044 fi
24045 echo "$as_me:24045: result: $cf_cv_cpp_static_cast" >&5
24046 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24047
24048 fi
24049
24050 test "$cf_cv_cpp_static_cast" = yes &&
24051 cat >>confdefs.h <<\EOF
24052 #define CPP_HAS_STATIC_CAST 1
24053 EOF
24054
24055         CXX_AR='$(AR)'
24056         CXX_ARFLAGS='$(ARFLAGS)'
24057         case $cf_cv_system_name in
24058         (irix*)
24059             if test "$GXX" != yes ; then
24060                 CXX_AR='$(CXX)'
24061                 CXX_ARFLAGS='-ar -o'
24062             fi
24063             ;;
24064         (sco3.2v5*)
24065             CXXLDFLAGS="-u main"
24066             ;;
24067         (solaris2*)
24068             if test "$GXX" != yes ; then
24069                 CXX_AR='$(CXX)'
24070                 CXX_ARFLAGS='-xar -o'
24071             fi
24072             ;;
24073         esac
24074
24075 else
24076         cf_cxx_library=no
24077         cf_cv_builtin_bool=1
24078
24079         # Just because we are not configuring against C++ right now does not
24080         # mean that a user will not want to use C++.  Some distributors disable
24081         # the C++ portion of this configuration as a shortcut (or just to avoid
24082         # compiling the demo in the c++ directory).  So we need a reasonable
24083         # default for the 'bool' type.
24084         #
24085         # Caveat: since the storage of the bool type is not standardized, it
24086         # may change.
24087
24088         if test "$NCURSES_BOOL" != auto ; then
24089                 cf_cv_type_of_bool=$NCURSES_BOOL
24090                 cf_cv_header_stdbool_h=0
24091         else
24092                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24093
24094 echo "$as_me:24094: checking for size of bool" >&5
24095 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24096 if test "${cf_cv_type_of_bool+set}" = set; then
24097   echo $ECHO_N "(cached) $ECHO_C" >&6
24098 else
24099
24100         rm -f cf_test.out
24101         if test "$cross_compiling" = yes; then
24102   cf_cv_type_of_bool=unknown
24103 else
24104   cat >conftest.$ac_ext <<_ACEOF
24105 #line 24105 "configure"
24106 #include "confdefs.h"
24107
24108 #include <stdlib.h>
24109 #include <stdio.h>
24110
24111 #if defined(__cplusplus)
24112
24113 #ifdef HAVE_GXX_BUILTIN_H
24114 #include <g++/builtin.h>
24115 #elif HAVE_GPP_BUILTIN_H
24116 #include <gpp/builtin.h>
24117 #elif HAVE_BUILTIN_H
24118 #include <builtin.h>
24119 #endif
24120
24121 #else
24122
24123 #if $cf_cv_header_stdbool_h
24124 #include <stdbool.h>
24125 #endif
24126
24127 #endif
24128
24129 int main(void)
24130 {
24131         FILE *fp = fopen("cf_test.out", "w");
24132         if (fp != 0) {
24133                 bool x = true;
24134                 if ((bool)(-x) >= 0)
24135                         fputs("unsigned ", fp);
24136                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24137                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24138                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24139                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24140                 fclose(fp);
24141         }
24142         ${cf_cv_main_return:-return}(0);
24143 }
24144
24145 _ACEOF
24146 rm -f conftest$ac_exeext
24147 if { (eval echo "$as_me:24147: \"$ac_link\"") >&5
24148   (eval $ac_link) 2>&5
24149   ac_status=$?
24150   echo "$as_me:24150: \$? = $ac_status" >&5
24151   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24152   { (eval echo "$as_me:24152: \"$ac_try\"") >&5
24153   (eval $ac_try) 2>&5
24154   ac_status=$?
24155   echo "$as_me:24155: \$? = $ac_status" >&5
24156   (exit $ac_status); }; }; then
24157   cf_cv_type_of_bool=`cat cf_test.out`
24158                  if test -z "$cf_cv_type_of_bool"; then
24159                    cf_cv_type_of_bool=unknown
24160                  fi
24161 else
24162   echo "$as_me: program exited with status $ac_status" >&5
24163 echo "$as_me: failed program was:" >&5
24164 cat conftest.$ac_ext >&5
24165 cf_cv_type_of_bool=unknown
24166 fi
24167 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24168 fi
24169
24170 fi
24171
24172         rm -f cf_test.out
24173 echo "$as_me:24173: result: $cf_cv_type_of_bool" >&5
24174 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24175 if test "$cf_cv_type_of_bool" = unknown ; then
24176         case .$NCURSES_BOOL in
24177         (.auto|.) NCURSES_BOOL=unsigned;;
24178         esac
24179         { echo "$as_me:24179: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24180 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24181         cf_cv_type_of_bool=$NCURSES_BOOL
24182 fi
24183
24184                 else
24185                         echo "$as_me:24185: checking for fallback type of bool" >&5
24186 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24187                         case "$host_cpu" in
24188                         (i?86)  cf_cv_type_of_bool=char ;;
24189                         (*)     cf_cv_type_of_bool=int  ;;
24190                         esac
24191                         echo "$as_me:24191: result: $cf_cv_type_of_bool" >&5
24192 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24193                 fi
24194         fi
24195 fi
24196
24197 # If the C compiler did not declare bool, and we did not determine that the C++
24198 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24199 # ncurses library use the same type as C++ bool.  Note that this allows one to
24200 # specify the type of bool in a configure-script option and postpone
24201 # integration with the C++ compiler provided that the types are compatible.
24202 USE_CXX_BOOL=1
24203 if test $cf_cv_cc_bool_type = 1
24204 then
24205         # oops: C has a bool.  Unlikely, but C++ could differ.
24206         USE_CXX_BOOL=0
24207 elif test $cf_cv_builtin_bool = 0
24208 then
24209         # C++ has no bool
24210         USE_CXX_BOOL=0
24211 else
24212         # this is the normal case
24213         USE_CXX_BOOL='defined(__cplusplus)'
24214 fi
24215
24216 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24217
24218         if test "$cf_with_ada" != "no" ; then
24219                 if test "$with_libtool" != "no"; then
24220                         { echo "$as_me:24220: WARNING: libtool does not support Ada - disabling feature" >&5
24221 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24222                         cf_with_ada=no
24223                 fi
24224         fi
24225
24226         if test "$cf_with_ada" != "no" ; then
24227
24228 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24229 do
24230
24231 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24232
24233         unset ac_cv_path_cf_TEMP_gnat
24234         unset cf_TEMP_gnat
24235         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24236 set dummy $cf_prog_gnat; ac_word=$2
24237 echo "$as_me:24237: checking for $ac_word" >&5
24238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24239 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24240   echo $ECHO_N "(cached) $ECHO_C" >&6
24241 else
24242   case $cf_TEMP_gnat in
24243   [\\/]* | ?:[\\/]*)
24244   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24245   ;;
24246   *)
24247   ac_save_IFS=$IFS; IFS=$ac_path_separator
24248 ac_dummy="$PATH"
24249 for ac_dir in $ac_dummy; do
24250   IFS=$ac_save_IFS
24251   test -z "$ac_dir" && ac_dir=.
24252   if $as_executable_p "$ac_dir/$ac_word"; then
24253    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24254    echo "$as_me:24254: found $ac_dir/$ac_word" >&5
24255    break
24256 fi
24257 done
24258
24259   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24260   ;;
24261 esac
24262 fi
24263 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24264
24265 if test -n "$cf_TEMP_gnat"; then
24266   echo "$as_me:24266: result: $cf_TEMP_gnat" >&5
24267 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24268 else
24269   echo "$as_me:24269: result: no" >&5
24270 echo "${ECHO_T}no" >&6
24271 fi
24272
24273         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24274
24275         if test "x$cf_TEMP_gnat" != xno; then
24276                 unset cf_cv_gnat_version
24277                 unset cf_TEMP_gnat
24278
24279 echo "$as_me:24279: checking for $cf_prog_gnat version" >&5
24280 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24281 if test "${cf_cv_gnat_version+set}" = set; then
24282   echo $ECHO_N "(cached) $ECHO_C" >&6
24283 else
24284
24285 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24286         grep '[0-9].[0-9][0-9]*' |\
24287         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24288
24289 fi
24290 echo "$as_me:24290: result: $cf_cv_gnat_version" >&5
24291 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24292 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24293 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24294
24295         fi
24296         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24297
24298         unset cf_TEMP_gnat
24299         unset cf_cv_gnat_version
24300         unset ac_cv_path_cf_TEMP_gnat
24301 done
24302
24303 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24304         cf_ada_make=
24305         cf_cv_prog_gnat_correct=no
24306 else
24307         cf_ada_make=gnatmake
24308         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24309                 # gprconfig is newer than gnatmake; we can continue...
24310                 cf_ada_config="##"
24311         else
24312                 rm -rf conftest* *~conftest*
24313                 if mkdir conftest.src
24314                 then
24315                         cf_ada_config=""
24316                         cd conftest.src
24317                         for cf_gprconfig in Ada C
24318                         do
24319                                 echo "$as_me:24319: checking for gprconfig name for $cf_gprconfig" >&5
24320 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24321                                 if test $cf_gprconfig = C
24322                                 then
24323                                         for cf_gprconfig_param in \
24324                                                 $cf_gprconfig,,,,GNATGCC \
24325                                                 $cf_gprconfig,,,,GCC \
24326                                                 $cf_gprconfig
24327                                         do
24328                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24329                                                 test -n "$cf_gprconfig_value" && break
24330                                         done
24331                                 else
24332                                         cf_gprconfig_param=$cf_gprconfig
24333                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24334                                 fi
24335                                 if test -n "$cf_gprconfig_value"
24336                                 then
24337                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24338                                         echo "$as_me:24338: result: $cf_gprconfig_value" >&5
24339 echo "${ECHO_T}$cf_gprconfig_value" >&6
24340                                 else
24341                                         echo "$as_me:24341: result: missing" >&5
24342 echo "${ECHO_T}missing" >&6
24343                                         cf_ada_config="#"
24344                                         break
24345                                 fi
24346                         done
24347                         cd ..
24348                         rm -rf conftest* *~conftest*
24349                 fi
24350         fi
24351         if test "x$cf_ada_config" != "x#"
24352         then
24353
24354 echo "$as_me:24354: checking for gnat version" >&5
24355 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24356 if test "${cf_cv_gnat_version+set}" = set; then
24357   echo $ECHO_N "(cached) $ECHO_C" >&6
24358 else
24359
24360 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24361         grep '[0-9].[0-9][0-9]*' |\
24362         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24363
24364 fi
24365 echo "$as_me:24365: result: $cf_cv_gnat_version" >&5
24366 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24367 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24368
24369 case $cf_cv_gnat_version in
24370 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24371         cf_cv_prog_gnat_correct=yes
24372         ;;
24373 (*)
24374         { echo "$as_me:24374: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24375 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24376         cf_cv_prog_gnat_correct=no
24377         ;;
24378 esac
24379
24380                 # Extract the first word of "m4", so it can be a program name with args.
24381 set dummy m4; ac_word=$2
24382 echo "$as_me:24382: checking for $ac_word" >&5
24383 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24384 if test "${ac_cv_prog_M4_exists+set}" = set; then
24385   echo $ECHO_N "(cached) $ECHO_C" >&6
24386 else
24387   if test -n "$M4_exists"; then
24388   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24389 else
24390   ac_save_IFS=$IFS; IFS=$ac_path_separator
24391 ac_dummy="$PATH"
24392 for ac_dir in $ac_dummy; do
24393   IFS=$ac_save_IFS
24394   test -z "$ac_dir" && ac_dir=.
24395   $as_executable_p "$ac_dir/$ac_word" || continue
24396 ac_cv_prog_M4_exists="yes"
24397 echo "$as_me:24397: found $ac_dir/$ac_word" >&5
24398 break
24399 done
24400
24401   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24402 fi
24403 fi
24404 M4_exists=$ac_cv_prog_M4_exists
24405 if test -n "$M4_exists"; then
24406   echo "$as_me:24406: result: $M4_exists" >&5
24407 echo "${ECHO_T}$M4_exists" >&6
24408 else
24409   echo "$as_me:24409: result: no" >&5
24410 echo "${ECHO_T}no" >&6
24411 fi
24412
24413                 if test "$ac_cv_prog_M4_exists" = no; then
24414                         cf_cv_prog_gnat_correct=no
24415                         { echo "$as_me:24415: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24416 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24417                 fi
24418                 if test "$cf_cv_prog_gnat_correct" = yes; then
24419                         echo "$as_me:24419: checking if GNAT works" >&5
24420 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24421
24422 rm -rf conftest* *~conftest*
24423 cat >>conftest.ads <<CF_EOF
24424 procedure conftest;
24425 CF_EOF
24426 cat >>conftest.adb <<CF_EOF
24427 with Text_IO;
24428 with GNAT.OS_Lib;
24429 procedure conftest is
24430 begin
24431    Text_IO.Put ("Hello World");
24432    Text_IO.New_Line;
24433    GNAT.OS_Lib.OS_Exit (0);
24434 end conftest;
24435 CF_EOF
24436 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24437    if ( ./conftest 1>&5 2>&1 ) ; then
24438       cf_cv_prog_gnat_correct=yes
24439    else
24440       cf_cv_prog_gnat_correct=no
24441    fi
24442 else
24443    cf_cv_prog_gnat_correct=no
24444 fi
24445 rm -rf conftest* *~conftest*
24446
24447                         echo "$as_me:24447: result: $cf_cv_prog_gnat_correct" >&5
24448 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24449                 fi
24450         else
24451                 cf_cv_prog_gnat_correct=no
24452         fi
24453 fi
24454
24455                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24456
24457         ADAFLAGS="$ADAFLAGS -gnatpn"
24458
24459         echo "$as_me:24459: checking optimization options for ADAFLAGS" >&5
24460 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24461         case "$CFLAGS" in
24462         (*-g*)
24463
24464         ADAFLAGS="$ADAFLAGS -g"
24465
24466                 ;;
24467         esac
24468         case "$CFLAGS" in
24469         (*-O*)
24470                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24471
24472         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24473
24474                 ;;
24475         esac
24476         echo "$as_me:24476: result: $ADAFLAGS" >&5
24477 echo "${ECHO_T}$ADAFLAGS" >&6
24478
24479 echo "$as_me:24479: checking if GNATPREP supports -T option" >&5
24480 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24481 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24482   echo $ECHO_N "(cached) $ECHO_C" >&6
24483 else
24484
24485 cf_cv_gnatprep_opt_t=no
24486 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24487
24488 fi
24489 echo "$as_me:24489: result: $cf_cv_gnatprep_opt_t" >&5
24490 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24491 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24492
24493 echo "$as_me:24493: checking if GNAT supports generics" >&5
24494 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24495 case $cf_cv_gnat_version in
24496 (3.[1-9]*|[4-9].*)
24497         cf_gnat_generics=yes
24498         ;;
24499 (*)
24500         cf_gnat_generics=no
24501         ;;
24502 esac
24503 echo "$as_me:24503: result: $cf_gnat_generics" >&5
24504 echo "${ECHO_T}$cf_gnat_generics" >&6
24505
24506 if test "$cf_gnat_generics" = yes
24507 then
24508         cf_compile_generics=generics
24509         cf_generic_objects="\${GENOBJS}"
24510 else
24511         cf_compile_generics=
24512         cf_generic_objects=
24513 fi
24514
24515 echo "$as_me:24515: checking if GNAT supports SIGINT" >&5
24516 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24517 if test "${cf_cv_gnat_sigint+set}" = set; then
24518   echo $ECHO_N "(cached) $ECHO_C" >&6
24519 else
24520
24521 rm -rf conftest* *~conftest*
24522 cat >>conftest.ads <<CF_EOF
24523 with Ada.Interrupts.Names;
24524
24525 package ConfTest is
24526
24527    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24528    pragma Unreserve_All_Interrupts;
24529    pragma Warnings (On);
24530
24531    protected Process is
24532       procedure Stop;
24533       function Continue return Boolean;
24534       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24535    private
24536       Done : Boolean := False;
24537    end Process;
24538
24539 end ConfTest;
24540 CF_EOF
24541 cat >>conftest.adb <<CF_EOF
24542 package body ConfTest is
24543    protected body Process is
24544       procedure Stop is
24545       begin
24546          Done := True;
24547       end Stop;
24548       function Continue return Boolean is
24549       begin
24550          return not Done;
24551       end Continue;
24552    end Process;
24553 end ConfTest;
24554 CF_EOF
24555 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24556       cf_cv_gnat_sigint=yes
24557 else
24558    cf_cv_gnat_sigint=no
24559 fi
24560 rm -rf conftest* *~conftest*
24561
24562 fi
24563 echo "$as_me:24563: result: $cf_cv_gnat_sigint" >&5
24564 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24565
24566 if test $cf_cv_gnat_sigint = yes ; then
24567         USE_GNAT_SIGINT=""
24568 else
24569         USE_GNAT_SIGINT="#"
24570 fi
24571
24572 cf_gnat_libraries=no
24573 cf_gnat_projects=no
24574
24575 if test "$enable_gnat_projects" != no ; then
24576 echo "$as_me:24576: checking if GNAT supports project files" >&5
24577 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24578 case $cf_cv_gnat_version in
24579 (3.[0-9]*)
24580         ;;
24581 (*)
24582         case $cf_cv_system_name in
24583         (cygwin*|msys*)
24584                 ;;
24585         (*)
24586                 rm -rf conftest* *~conftest*
24587                 if mkdir conftest.src conftest.bin conftest.lib
24588                 then
24589                         cd conftest.src
24590                         rm -rf conftest* *~conftest*
24591                         cat >>library.gpr <<CF_EOF
24592 project Library is
24593   Kind := External ("LIB_KIND");
24594   for Library_Name use "ConfTest";
24595   for Object_Dir use ".";
24596   for Library_ALI_Dir use External("LIBRARY_DIR");
24597   for Library_Version use External ("SONAME");
24598   for Library_Kind use Kind;
24599   for Library_Dir use External("BUILD_DIR");
24600   Source_Dir := External ("SOURCE_DIR");
24601   for Source_Dirs use (Source_Dir);
24602 end Library;
24603 CF_EOF
24604                         cat >>confpackage.ads <<CF_EOF
24605 package ConfPackage is
24606    procedure conftest;
24607 end ConfPackage;
24608 CF_EOF
24609                         cat >>confpackage.adb <<CF_EOF
24610 with Text_IO;
24611 package body ConfPackage is
24612    procedure conftest is
24613    begin
24614       Text_IO.Put ("Hello World");
24615       Text_IO.New_Line;
24616    end conftest;
24617 end ConfPackage;
24618 CF_EOF
24619                         if ( $cf_ada_make $ADAFLAGS \
24620                                         -Plibrary.gpr \
24621                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24622                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24623                                         -XSOURCE_DIR=`pwd` \
24624                                         -XSONAME=libConfTest.so.1 \
24625                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24626                                 cf_gnat_projects=yes
24627                         fi
24628                         cd ..
24629                 fi
24630                 if test -f conftest.lib/confpackage.ali
24631                 then
24632                         cf_gnat_libraries=yes
24633                 fi
24634                 rm -rf conftest* *~conftest*
24635                 ;;
24636         esac
24637         ;;
24638 esac
24639 echo "$as_me:24639: result: $cf_gnat_projects" >&5
24640 echo "${ECHO_T}$cf_gnat_projects" >&6
24641 fi # enable_gnat_projects
24642
24643 if test $cf_gnat_projects = yes
24644 then
24645         echo "$as_me:24645: checking if GNAT supports libraries" >&5
24646 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24647         echo "$as_me:24647: result: $cf_gnat_libraries" >&5
24648 echo "${ECHO_T}$cf_gnat_libraries" >&6
24649 fi
24650
24651 if test "$cf_gnat_projects" = yes
24652 then
24653         USE_OLD_MAKERULES="#"
24654         USE_GNAT_PROJECTS=""
24655 else
24656         USE_OLD_MAKERULES=""
24657         USE_GNAT_PROJECTS="#"
24658 fi
24659
24660 if test "$cf_gnat_libraries" = yes
24661 then
24662         USE_GNAT_LIBRARIES=""
24663 else
24664         USE_GNAT_LIBRARIES="#"
24665 fi
24666
24667 echo "$as_me:24667: checking for ada-compiler" >&5
24668 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24669
24670 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24671 if test "${with_ada_compiler+set}" = set; then
24672   withval="$with_ada_compiler"
24673   cf_ada_compiler=$withval
24674 else
24675   cf_ada_compiler=gnatmake
24676 fi;
24677
24678 echo "$as_me:24678: result: $cf_ada_compiler" >&5
24679 echo "${ECHO_T}$cf_ada_compiler" >&6
24680
24681                         cf_ada_package=terminal_interface
24682
24683 echo "$as_me:24683: checking for ada-include" >&5
24684 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24685
24686 # Check whether --with-ada-include or --without-ada-include was given.
24687 if test "${with_ada_include+set}" = set; then
24688   withval="$with_ada_include"
24689
24690 else
24691   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24692 fi; if test -n "$prefix/share/ada/adainclude" ; then
24693
24694 if test "x$prefix" != xNONE; then
24695         cf_path_syntax="$prefix"
24696 else
24697         cf_path_syntax="$ac_default_prefix"
24698 fi
24699
24700 case ".$withval" in
24701 (.\$\(*\)*|.\'*\'*)
24702         ;;
24703 (..|./*|.\\*)
24704         ;;
24705 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24706         ;;
24707 (.\${*prefix}*|.\${*dir}*)
24708         eval withval="$withval"
24709         case ".$withval" in
24710         (.NONE/*)
24711                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24712                 ;;
24713         esac
24714         ;;
24715 (.no|.NONE/*)
24716         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24717         ;;
24718 (*)
24719         { { echo "$as_me:24719: error: expected a pathname, not \"$withval\"" >&5
24720 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24721    { (exit 1); exit 1; }; }
24722         ;;
24723 esac
24724
24725 fi
24726 eval ADA_INCLUDE="$withval"
24727
24728 echo "$as_me:24728: result: $ADA_INCLUDE" >&5
24729 echo "${ECHO_T}$ADA_INCLUDE" >&6
24730
24731 echo "$as_me:24731: checking for ada-objects" >&5
24732 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24733
24734 # Check whether --with-ada-objects or --without-ada-objects was given.
24735 if test "${with_ada_objects+set}" = set; then
24736   withval="$with_ada_objects"
24737
24738 else
24739   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24740 fi; if test -n "$prefix/lib/ada/adalib" ; then
24741
24742 if test "x$prefix" != xNONE; then
24743         cf_path_syntax="$prefix"
24744 else
24745         cf_path_syntax="$ac_default_prefix"
24746 fi
24747
24748 case ".$withval" in
24749 (.\$\(*\)*|.\'*\'*)
24750         ;;
24751 (..|./*|.\\*)
24752         ;;
24753 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24754         ;;
24755 (.\${*prefix}*|.\${*dir}*)
24756         eval withval="$withval"
24757         case ".$withval" in
24758         (.NONE/*)
24759                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24760                 ;;
24761         esac
24762         ;;
24763 (.no|.NONE/*)
24764         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24765         ;;
24766 (*)
24767         { { echo "$as_me:24767: error: expected a pathname, not \"$withval\"" >&5
24768 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24769    { (exit 1); exit 1; }; }
24770         ;;
24771 esac
24772
24773 fi
24774 eval ADA_OBJECTS="$withval"
24775
24776 echo "$as_me:24776: result: $ADA_OBJECTS" >&5
24777 echo "${ECHO_T}$ADA_OBJECTS" >&6
24778
24779 echo "$as_me:24779: checking if an Ada95 shared-library should be built" >&5
24780 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24781
24782 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24783 if test "${with_ada_sharedlib+set}" = set; then
24784   withval="$with_ada_sharedlib"
24785   with_ada_sharedlib=$withval
24786 else
24787   with_ada_sharedlib=no
24788 fi;
24789 echo "$as_me:24789: result: $with_ada_sharedlib" >&5
24790 echo "${ECHO_T}$with_ada_sharedlib" >&6
24791
24792 if test "x$with_ada_sharedlib" != xno
24793 then
24794         if test "x$cf_gnat_projects" != xyes
24795         then
24796                 { echo "$as_me:24796: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24797 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24798                 with_ada_sharedlib=no
24799         fi
24800 fi
24801
24802 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24803 MAKE_ADA_SHAREDLIB="#"
24804
24805 if test "x$with_ada_sharedlib" != xno
24806 then
24807         MAKE_ADA_SHAREDLIB=
24808         if test "x$with_ada_sharedlib" != xyes
24809         then
24810                 ADA_SHAREDLIB="$with_ada_sharedlib"
24811         fi
24812 fi
24813
24814                         # allow the Ada binding to be renamed
24815
24816 echo "$as_me:24816: checking for ada-libname" >&5
24817 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24818
24819 # Check whether --with-ada-libname or --without-ada-libname was given.
24820 if test "${with_ada_libname+set}" = set; then
24821   withval="$with_ada_libname"
24822   ADA_LIBNAME=$withval
24823 else
24824   ADA_LIBNAME=AdaCurses
24825 fi;
24826 case "x$ADA_LIBNAME" in
24827 (x|xyes|xno)
24828         ADA_LIBNAME=AdaCurses
24829         ;;
24830 esac
24831
24832 echo "$as_me:24832: result: $ADA_LIBNAME" >&5
24833 echo "${ECHO_T}$ADA_LIBNAME" >&6
24834
24835                 fi
24836         fi
24837 else
24838         cf_with_ada=no
24839 fi
24840
24841 # do this "late" to avoid conflict with header-checks
24842 if test "x$with_widec" = xyes ; then
24843         echo "$as_me:24843: checking for wchar_t" >&5
24844 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24845 if test "${ac_cv_type_wchar_t+set}" = set; then
24846   echo $ECHO_N "(cached) $ECHO_C" >&6
24847 else
24848   cat >conftest.$ac_ext <<_ACEOF
24849 #line 24849 "configure"
24850 #include "confdefs.h"
24851 $ac_includes_default
24852 int
24853 main (void)
24854 {
24855 if ((wchar_t *) 0)
24856   return 0;
24857 if (sizeof (wchar_t))
24858   return 0;
24859   ;
24860   return 0;
24861 }
24862 _ACEOF
24863 rm -f conftest.$ac_objext
24864 if { (eval echo "$as_me:24864: \"$ac_compile\"") >&5
24865   (eval $ac_compile) 2>&5
24866   ac_status=$?
24867   echo "$as_me:24867: \$? = $ac_status" >&5
24868   (exit $ac_status); } &&
24869          { ac_try='test -s conftest.$ac_objext'
24870   { (eval echo "$as_me:24870: \"$ac_try\"") >&5
24871   (eval $ac_try) 2>&5
24872   ac_status=$?
24873   echo "$as_me:24873: \$? = $ac_status" >&5
24874   (exit $ac_status); }; }; then
24875   ac_cv_type_wchar_t=yes
24876 else
24877   echo "$as_me: failed program was:" >&5
24878 cat conftest.$ac_ext >&5
24879 ac_cv_type_wchar_t=no
24880 fi
24881 rm -f conftest.$ac_objext conftest.$ac_ext
24882 fi
24883 echo "$as_me:24883: result: $ac_cv_type_wchar_t" >&5
24884 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24885
24886 echo "$as_me:24886: checking size of wchar_t" >&5
24887 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24888 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24889   echo $ECHO_N "(cached) $ECHO_C" >&6
24890 else
24891   if test "$ac_cv_type_wchar_t" = yes; then
24892   if test "$cross_compiling" = yes; then
24893   # Depending upon the size, compute the lo and hi bounds.
24894 cat >conftest.$ac_ext <<_ACEOF
24895 #line 24895 "configure"
24896 #include "confdefs.h"
24897 $ac_includes_default
24898 int
24899 main (void)
24900 {
24901 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24902   ;
24903   return 0;
24904 }
24905 _ACEOF
24906 rm -f conftest.$ac_objext
24907 if { (eval echo "$as_me:24907: \"$ac_compile\"") >&5
24908   (eval $ac_compile) 2>&5
24909   ac_status=$?
24910   echo "$as_me:24910: \$? = $ac_status" >&5
24911   (exit $ac_status); } &&
24912          { ac_try='test -s conftest.$ac_objext'
24913   { (eval echo "$as_me:24913: \"$ac_try\"") >&5
24914   (eval $ac_try) 2>&5
24915   ac_status=$?
24916   echo "$as_me:24916: \$? = $ac_status" >&5
24917   (exit $ac_status); }; }; then
24918   ac_lo=0 ac_mid=0
24919   while :; do
24920     cat >conftest.$ac_ext <<_ACEOF
24921 #line 24921 "configure"
24922 #include "confdefs.h"
24923 $ac_includes_default
24924 int
24925 main (void)
24926 {
24927 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24928   ;
24929   return 0;
24930 }
24931 _ACEOF
24932 rm -f conftest.$ac_objext
24933 if { (eval echo "$as_me:24933: \"$ac_compile\"") >&5
24934   (eval $ac_compile) 2>&5
24935   ac_status=$?
24936   echo "$as_me:24936: \$? = $ac_status" >&5
24937   (exit $ac_status); } &&
24938          { ac_try='test -s conftest.$ac_objext'
24939   { (eval echo "$as_me:24939: \"$ac_try\"") >&5
24940   (eval $ac_try) 2>&5
24941   ac_status=$?
24942   echo "$as_me:24942: \$? = $ac_status" >&5
24943   (exit $ac_status); }; }; then
24944   ac_hi=$ac_mid; break
24945 else
24946   echo "$as_me: failed program was:" >&5
24947 cat conftest.$ac_ext >&5
24948 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24949 fi
24950 rm -f conftest.$ac_objext conftest.$ac_ext
24951   done
24952 else
24953   echo "$as_me: failed program was:" >&5
24954 cat conftest.$ac_ext >&5
24955 ac_hi=-1 ac_mid=-1
24956   while :; do
24957     cat >conftest.$ac_ext <<_ACEOF
24958 #line 24958 "configure"
24959 #include "confdefs.h"
24960 $ac_includes_default
24961 int
24962 main (void)
24963 {
24964 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24965   ;
24966   return 0;
24967 }
24968 _ACEOF
24969 rm -f conftest.$ac_objext
24970 if { (eval echo "$as_me:24970: \"$ac_compile\"") >&5
24971   (eval $ac_compile) 2>&5
24972   ac_status=$?
24973   echo "$as_me:24973: \$? = $ac_status" >&5
24974   (exit $ac_status); } &&
24975          { ac_try='test -s conftest.$ac_objext'
24976   { (eval echo "$as_me:24976: \"$ac_try\"") >&5
24977   (eval $ac_try) 2>&5
24978   ac_status=$?
24979   echo "$as_me:24979: \$? = $ac_status" >&5
24980   (exit $ac_status); }; }; then
24981   ac_lo=$ac_mid; break
24982 else
24983   echo "$as_me: failed program was:" >&5
24984 cat conftest.$ac_ext >&5
24985 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24986 fi
24987 rm -f conftest.$ac_objext conftest.$ac_ext
24988   done
24989 fi
24990 rm -f conftest.$ac_objext conftest.$ac_ext
24991 # Binary search between lo and hi bounds.
24992 while test "x$ac_lo" != "x$ac_hi"; do
24993   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24994   cat >conftest.$ac_ext <<_ACEOF
24995 #line 24995 "configure"
24996 #include "confdefs.h"
24997 $ac_includes_default
24998 int
24999 main (void)
25000 {
25001 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25002   ;
25003   return 0;
25004 }
25005 _ACEOF
25006 rm -f conftest.$ac_objext
25007 if { (eval echo "$as_me:25007: \"$ac_compile\"") >&5
25008   (eval $ac_compile) 2>&5
25009   ac_status=$?
25010   echo "$as_me:25010: \$? = $ac_status" >&5
25011   (exit $ac_status); } &&
25012          { ac_try='test -s conftest.$ac_objext'
25013   { (eval echo "$as_me:25013: \"$ac_try\"") >&5
25014   (eval $ac_try) 2>&5
25015   ac_status=$?
25016   echo "$as_me:25016: \$? = $ac_status" >&5
25017   (exit $ac_status); }; }; then
25018   ac_hi=$ac_mid
25019 else
25020   echo "$as_me: failed program was:" >&5
25021 cat conftest.$ac_ext >&5
25022 ac_lo=`expr $ac_mid + 1`
25023 fi
25024 rm -f conftest.$ac_objext conftest.$ac_ext
25025 done
25026 ac_cv_sizeof_wchar_t=$ac_lo
25027 else
25028   if test "$cross_compiling" = yes; then
25029   { { echo "$as_me:25029: error: cannot run test program while cross compiling" >&5
25030 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25031    { (exit 1); exit 1; }; }
25032 else
25033   cat >conftest.$ac_ext <<_ACEOF
25034 #line 25034 "configure"
25035 #include "confdefs.h"
25036 $ac_includes_default
25037 int
25038 main (void)
25039 {
25040 FILE *f = fopen ("conftest.val", "w");
25041 if (!f)
25042   $ac_main_return (1);
25043 fprintf (f, "%d", (sizeof (wchar_t)));
25044 fclose (f);
25045   ;
25046   return 0;
25047 }
25048 _ACEOF
25049 rm -f conftest$ac_exeext
25050 if { (eval echo "$as_me:25050: \"$ac_link\"") >&5
25051   (eval $ac_link) 2>&5
25052   ac_status=$?
25053   echo "$as_me:25053: \$? = $ac_status" >&5
25054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25055   { (eval echo "$as_me:25055: \"$ac_try\"") >&5
25056   (eval $ac_try) 2>&5
25057   ac_status=$?
25058   echo "$as_me:25058: \$? = $ac_status" >&5
25059   (exit $ac_status); }; }; then
25060   ac_cv_sizeof_wchar_t=`cat conftest.val`
25061 else
25062   echo "$as_me: program exited with status $ac_status" >&5
25063 echo "$as_me: failed program was:" >&5
25064 cat conftest.$ac_ext >&5
25065 fi
25066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25067 fi
25068 fi
25069 rm -f conftest.val
25070 else
25071   ac_cv_sizeof_wchar_t=0
25072 fi
25073 fi
25074 echo "$as_me:25074: result: $ac_cv_sizeof_wchar_t" >&5
25075 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25076 cat >>confdefs.h <<EOF
25077 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25078 EOF
25079
25080         # cross-compiling to mingw can run into the problem that attempting to
25081         # link with the regex library fails, causing the test to not set this to
25082         # a number.  "recent" autoconf does not address this problem either -TD
25083         if test -z "$ac_cv_sizeof_wchar_t"
25084         then
25085                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25086
25087 echo "${as_me:-configure}:25087: testing test failed (assume 2) ..." 1>&5
25088
25089                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25090                 mv confdefs.tmp confdefs.h
25091                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25092         fi
25093 fi
25094
25095 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25096 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25097 ###
25098 ### ticlib modules may be a separate library, otherwise contained in termlib.
25099 ### termlib modules may be a separate library, otherwise contained in ncurses.
25100 ###
25101 ### The of "+" or " " between the tokens controls the way the script
25102 ### chooses to split module lists into libraries.
25103 ###
25104 ### (see CF_LIB_RULES).
25105 echo "$as_me:25105: checking for library subsets" >&5
25106 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25107 LIB_SUBSETS=
25108
25109 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25110         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25111         if test "$with_ticlib" != no ; then
25112                 LIB_SUBSETS="${LIB_SUBSETS} "
25113         else
25114                 LIB_SUBSETS="${LIB_SUBSETS}+"
25115         fi
25116 fi
25117
25118 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25119 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25120
25121 if test "$with_termlib" != no ; then
25122         LIB_SUBSETS="${LIB_SUBSETS} "
25123 else
25124         LIB_SUBSETS="${LIB_SUBSETS}+"
25125 fi
25126
25127 LIB_SUBSETS="${LIB_SUBSETS}base"
25128
25129 # Most term-driver calls are to tinfo, but some like init_pair are to the
25130 # base library (so it resides in base).
25131 if test "$with_term_driver" != no ; then
25132         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25133         case $cf_cv_system_name in
25134         (*mingw32*|*mingw64*)
25135                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25136                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25137                 ;;
25138         (*)
25139                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25140                 ;;
25141         esac
25142 fi
25143
25144 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25145 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25146
25147 echo "$as_me:25147: result: $LIB_SUBSETS" >&5
25148 echo "${ECHO_T}$LIB_SUBSETS" >&6
25149
25150 ### Construct the list of include-directories to be generated
25151
25152 if test "$srcdir" != "."; then
25153         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25154 fi
25155 CPPFLAGS="-I../include $CPPFLAGS"
25156 if test "$srcdir" != "."; then
25157         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25158 fi
25159 CPPFLAGS="-I. $CPPFLAGS"
25160
25161 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25162 if test "$srcdir" != "."; then
25163         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25164 fi
25165 if test "$GCC" != yes; then
25166         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25167 elif test "$includedir" != "/usr/include"; then
25168         if test "$includedir" = '${prefix}/include' ; then
25169                 if test x$prefix != x/usr ; then
25170                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25171                 fi
25172         else
25173                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25174         fi
25175 fi
25176
25177 ### Build up pieces for makefile rules
25178 echo "$as_me:25178: checking default library suffix" >&5
25179 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25180
25181         case $DFT_LWR_MODEL in
25182         (libtool) DFT_ARG_SUFFIX=''   ;;
25183         (normal)  DFT_ARG_SUFFIX=''   ;;
25184         (debug)   DFT_ARG_SUFFIX='_g' ;;
25185         (profile) DFT_ARG_SUFFIX='_p' ;;
25186         (shared)  DFT_ARG_SUFFIX=''   ;;
25187         esac
25188         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25189 echo "$as_me:25189: result: $DFT_ARG_SUFFIX" >&5
25190 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25191
25192 echo "$as_me:25192: checking default library-dependency suffix" >&5
25193 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25194
25195         case X$DFT_LWR_MODEL in
25196         (Xlibtool)
25197                 DFT_LIB_SUFFIX='.la'
25198                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25199                 ;;
25200         (Xdebug)
25201                 DFT_LIB_SUFFIX='_g.a'
25202                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25203                 ;;
25204         (Xprofile)
25205                 DFT_LIB_SUFFIX='_p.a'
25206                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25207                 ;;
25208         (Xshared)
25209                 case $cf_cv_system_name in
25210                 (aix[5-7]*)
25211                         DFT_LIB_SUFFIX='.so'
25212                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25213                         ;;
25214                 (cygwin*|msys*|mingw*)
25215                         DFT_LIB_SUFFIX='.dll'
25216                         DFT_DEP_SUFFIX='.dll.a'
25217                         ;;
25218                 (darwin*)
25219                         DFT_LIB_SUFFIX='.dylib'
25220                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25221                         ;;
25222                 (hpux*)
25223                         case $target in
25224                         (ia64*)
25225                                 DFT_LIB_SUFFIX='.so'
25226                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25227                                 ;;
25228                         (*)
25229                                 DFT_LIB_SUFFIX='.sl'
25230                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25231                                 ;;
25232                         esac
25233                         ;;
25234                 (*)
25235                         DFT_LIB_SUFFIX='.so'
25236                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25237                         ;;
25238                 esac
25239                 ;;
25240         (*)
25241                 DFT_LIB_SUFFIX='.a'
25242                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25243                 ;;
25244         esac
25245         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25246         then
25247                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25248                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25249         fi
25250 echo "$as_me:25250: result: $DFT_DEP_SUFFIX" >&5
25251 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25252
25253 echo "$as_me:25253: checking default object directory" >&5
25254 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25255
25256         case $DFT_LWR_MODEL in
25257         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25258         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25259         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25260         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25261         (shared)
25262                 case $cf_cv_system_name in
25263                 (cygwin|msys)
25264                         DFT_OBJ_SUBDIR='objects' ;;
25265                 (*)
25266                         DFT_OBJ_SUBDIR='obj_s' ;;
25267                 esac
25268         esac
25269 echo "$as_me:25269: result: $DFT_OBJ_SUBDIR" >&5
25270 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25271
25272 if test "x$cf_with_cxx" = xyes ; then
25273 echo "$as_me:25273: checking c++ library-dependency suffix" >&5
25274 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25275 if test "$with_libtool" != "no"; then
25276         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25277         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25278 elif test "$with_shared_cxx" != "no"; then
25279         # also for g++ users...
25280         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25281 else
25282         # we normally make a static library because C/C++ library rules differ
25283
25284         case Xnormal in
25285         (Xlibtool)
25286                 CXX_LIB_SUFFIX='.la'
25287                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25288                 ;;
25289         (Xdebug)
25290                 CXX_LIB_SUFFIX='_g.a'
25291                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25292                 ;;
25293         (Xprofile)
25294                 CXX_LIB_SUFFIX='_p.a'
25295                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25296                 ;;
25297         (Xshared)
25298                 case $cf_cv_system_name in
25299                 (aix[5-7]*)
25300                         CXX_LIB_SUFFIX='.so'
25301                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25302                         ;;
25303                 (cygwin*|msys*|mingw*)
25304                         CXX_LIB_SUFFIX='.dll'
25305                         CXX_DEP_SUFFIX='.dll.a'
25306                         ;;
25307                 (darwin*)
25308                         CXX_LIB_SUFFIX='.dylib'
25309                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25310                         ;;
25311                 (hpux*)
25312                         case $target in
25313                         (ia64*)
25314                                 CXX_LIB_SUFFIX='.so'
25315                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25316                                 ;;
25317                         (*)
25318                                 CXX_LIB_SUFFIX='.sl'
25319                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25320                                 ;;
25321                         esac
25322                         ;;
25323                 (*)
25324                         CXX_LIB_SUFFIX='.so'
25325                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25326                         ;;
25327                 esac
25328                 ;;
25329         (*)
25330                 CXX_LIB_SUFFIX='.a'
25331                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25332                 ;;
25333         esac
25334         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25335         then
25336                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25337                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25338         fi
25339
25340 fi
25341 echo "$as_me:25341: result: $CXX_LIB_SUFFIX" >&5
25342 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25343
25344 fi
25345
25346 # do not want -ldl in build except as needed for -lncurses dependency
25347 if test "x$with_dlsym" = xyes ; then
25348 if test $DFT_LWR_MODEL = shared || \
25349    test $DFT_LWR_MODEL = libtool ; then
25350
25351 # remove dl library from $LIBS
25352 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25353
25354 fi
25355 fi
25356 ### Set up low-level terminfo dependencies for makefiles.
25357
25358 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25359 # do not need libdl
25360 TICS_LIST=
25361 if test "x$with_dlsym" = xyes ; then
25362
25363 # remove dl library from $SHLIB_LIST
25364 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25365
25366 fi
25367
25368 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25369 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25370 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25371 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25372 then
25373         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25374 fi
25375
25376 if test "$with_ticlib" != no ; then
25377
25378         if test "x$with_ticlib" != xyes ; then
25379                 TICS_NAME=$with_ticlib
25380                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25381                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25382                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25383                 TICS_LIB_SUFFIX="${with_ticlib}"
25384         else
25385                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25386                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25387                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25388                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25389         fi
25390         TICS_LDFLAGS="-L${LIB_DIR}"
25391         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25392 else
25393         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25394         TICS_LDFLAGS="-L${LIB_DIR}"
25395         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25396 fi
25397
25398 if test "$with_termlib" != no ; then
25399
25400         if test "x$with_termlib" != xyes ; then
25401                 TINFO_NAME=$with_termlib
25402                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25403                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25404                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25405                 TINFO_LIB_SUFFIX="${with_termlib}"
25406         else
25407                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25408                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25409                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25410                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25411         fi
25412
25413         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25414         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25415         if test "$DFT_LWR_MODEL" = "libtool"; then
25416                 TEST_ARGS="${TEST_DEPS}"
25417                 TEST_ARG2="${TEST_DEP2}"
25418                 TINFO_LDFLAGS="-L${LIB_DIR}"
25419                 TINFO_LIBS="$TEST_ARGS"
25420                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25421                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25422         else
25423                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25424                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25425                 if test "x$with_term_driver" != xno ; then
25426                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25427                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25428                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25429                 else
25430                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25431                         TINFO_LIBS="$TEST_ARGS"
25432                 fi
25433                 TINFO_LDFLAGS="-L${LIB_DIR}"
25434                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25435         fi
25436 else
25437         # the next lines are needed for linking libtic over libncurses
25438         TINFO_NAME=${LIB_NAME}
25439         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25440         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25441         if test "x$with_tic_depends" = xyes ; then
25442                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25443         else
25444                 TICS_LIST="$SHLIB_LIST"
25445         fi
25446
25447         TINFO_LDFLAGS="-L${LIB_DIR}"
25448         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25449 fi
25450
25451 if test "$DFT_LWR_MODEL" = shared ; then
25452         case $cf_cv_system_name in
25453         (cygwin*|msys*)
25454                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25455                 TINFO_SUFFIX=.dll
25456                 ;;
25457         esac
25458 fi
25459
25460 if test "x$with_dlsym" = xyes ; then
25461
25462 # remove dl library from $TICS_LIST
25463 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25464
25465 fi
25466
25467 if test "$DFT_LWR_MODEL" = "libtool"; then
25468         OBJEXT=lo
25469 fi
25470
25471 # needed for Ada95
25472 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25473
25474 case $DFT_LWR_MODEL in
25475 (normal|debug|profile)
25476
25477 if test "$GCC" = yes ; then
25478         case $cf_cv_system_name in
25479         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25480                 LDFLAGS_STATIC=
25481                 LDFLAGS_SHARED=
25482                 ;;
25483         (*)     # normally, except when broken
25484                 LDFLAGS_STATIC=-static
25485                 LDFLAGS_SHARED=-dynamic
25486                 ;;
25487         esac
25488 else
25489         case $cf_cv_system_name in
25490         (aix[4-7]*)     # from ld manpage
25491                 LDFLAGS_STATIC=-bstatic
25492                 LDFLAGS_SHARED=-bdynamic
25493                 ;;
25494         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25495                 # We could also use just "archive" and "shared".
25496                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25497                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25498                 ;;
25499         (irix*)         # from ld manpage IRIX64
25500                 LDFLAGS_STATIC=-Bstatic
25501                 LDFLAGS_SHARED=-Bdynamic
25502                 ;;
25503         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25504                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25505                 LDFLAGS_STATIC=-noso
25506                 LDFLAGS_SHARED=-so_archive
25507                 ;;
25508         (solaris2*)
25509                 LDFLAGS_STATIC=-Bstatic
25510                 LDFLAGS_SHARED=-Bdynamic
25511                 ;;
25512         esac
25513 fi
25514
25515 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25516 then
25517         echo "$as_me:25517: checking if linker supports switching between static/dynamic" >&5
25518 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25519
25520         rm -f libconftest.a
25521         cat >conftest.$ac_ext <<EOF
25522 #line 25522 "configure"
25523 #include <stdio.h>
25524 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25525 EOF
25526         if { (eval echo "$as_me:25526: \"$ac_compile\"") >&5
25527   (eval $ac_compile) 2>&5
25528   ac_status=$?
25529   echo "$as_me:25529: \$? = $ac_status" >&5
25530   (exit $ac_status); } ; then
25531                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25532                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25533         fi
25534         rm -f conftest.*
25535
25536         cf_save_LIBS="$LIBS"
25537
25538         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25539         cat >conftest.$ac_ext <<_ACEOF
25540 #line 25540 "configure"
25541 #include "confdefs.h"
25542
25543 #line 25543 "configure"
25544 #include <stdio.h>
25545 int cf_ldflags_static(FILE *fp);
25546
25547 int
25548 main (void)
25549 {
25550
25551         return cf_ldflags_static(stdin);
25552
25553   ;
25554   return 0;
25555 }
25556 _ACEOF
25557 rm -f conftest.$ac_objext conftest$ac_exeext
25558 if { (eval echo "$as_me:25558: \"$ac_link\"") >&5
25559   (eval $ac_link) 2>&5
25560   ac_status=$?
25561   echo "$as_me:25561: \$? = $ac_status" >&5
25562   (exit $ac_status); } &&
25563          { ac_try='test -s conftest$ac_exeext'
25564   { (eval echo "$as_me:25564: \"$ac_try\"") >&5
25565   (eval $ac_try) 2>&5
25566   ac_status=$?
25567   echo "$as_me:25567: \$? = $ac_status" >&5
25568   (exit $ac_status); }; }; then
25569
25570         # some linkers simply ignore the -dynamic
25571         case x`file conftest$ac_exeext 2>/dev/null` in
25572         (*static*)
25573                 cf_ldflags_static=no
25574                 ;;
25575         (*)
25576                 cf_ldflags_static=yes
25577                 ;;
25578         esac
25579
25580 else
25581   echo "$as_me: failed program was:" >&5
25582 cat conftest.$ac_ext >&5
25583 cf_ldflags_static=no
25584 fi
25585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25586
25587         rm -f libconftest.*
25588         LIBS="$cf_save_LIBS"
25589
25590         echo "$as_me:25590: result: $cf_ldflags_static" >&5
25591 echo "${ECHO_T}$cf_ldflags_static" >&6
25592
25593         if test $cf_ldflags_static != yes
25594         then
25595                 LDFLAGS_STATIC=
25596                 LDFLAGS_SHARED=
25597         fi
25598 else
25599         LDFLAGS_STATIC=
25600         LDFLAGS_SHARED=
25601 fi
25602
25603         ;;
25604 esac
25605
25606 echo "$as_me:25606: checking where we will install curses.h" >&5
25607 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25608
25609 includesubdir=
25610 if test "$with_overwrite" = no && \
25611  ( test "x$includedir" = 'x${prefix}/include' || \
25612    test "x$includedir" = "x${prefix}/include" )
25613 then
25614         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25615 fi
25616 echo "$as_me:25616: result: ${includedir}${includesubdir}" >&5
25617 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25618
25619 ### Resolve a conflict between normal and wide-curses by forcing applications
25620 ### that will need libutf8 to add it to their configure script.
25621 if test "$with_overwrite" != no ; then
25622 if test "$NCURSES_LIBUTF8" = 1 ; then
25623         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25624         { echo "$as_me:25624: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25625 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25626 fi
25627 fi
25628 WITH_OVERWRITE=$with_overwrite
25629
25630 # used to separate tack out of the tree
25631 NCURSES_TREE=
25632
25633 ### predefined stuff for the test programs
25634
25635 cat >>confdefs.h <<\EOF
25636 #define HAVE_SLK_COLOR 1
25637 EOF
25638
25639 # pkgsrc uses these
25640
25641 echo "$as_me:25641: checking for desired basename for form library" >&5
25642 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
25643
25644 # Check whether --with-form-libname or --without-form-libname was given.
25645 if test "${with_form_libname+set}" = set; then
25646   withval="$with_form_libname"
25647   with_lib_basename=$withval
25648 else
25649   with_lib_basename=form
25650 fi;
25651 FORM_NAME="$with_lib_basename"
25652
25653 case "x$FORM_NAME" in
25654 (x|xno|xnone|xyes)
25655         FORM_NAME=form
25656         ;;
25657 (*)
25658         ;;
25659 esac
25660
25661 echo "$as_me:25661: result: $FORM_NAME" >&5
25662 echo "${ECHO_T}$FORM_NAME" >&6
25663
25664 echo "$as_me:25664: checking for desired basename for menu library" >&5
25665 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
25666
25667 # Check whether --with-menu-libname or --without-menu-libname was given.
25668 if test "${with_menu_libname+set}" = set; then
25669   withval="$with_menu_libname"
25670   with_lib_basename=$withval
25671 else
25672   with_lib_basename=menu
25673 fi;
25674 MENU_NAME="$with_lib_basename"
25675
25676 case "x$MENU_NAME" in
25677 (x|xno|xnone|xyes)
25678         MENU_NAME=menu
25679         ;;
25680 (*)
25681         ;;
25682 esac
25683
25684 echo "$as_me:25684: result: $MENU_NAME" >&5
25685 echo "${ECHO_T}$MENU_NAME" >&6
25686
25687 echo "$as_me:25687: checking for desired basename for panel library" >&5
25688 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
25689
25690 # Check whether --with-panel-libname or --without-panel-libname was given.
25691 if test "${with_panel_libname+set}" = set; then
25692   withval="$with_panel_libname"
25693   with_lib_basename=$withval
25694 else
25695   with_lib_basename=panel
25696 fi;
25697 PANEL_NAME="$with_lib_basename"
25698
25699 case "x$PANEL_NAME" in
25700 (x|xno|xnone|xyes)
25701         PANEL_NAME=panel
25702         ;;
25703 (*)
25704         ;;
25705 esac
25706
25707 echo "$as_me:25707: result: $PANEL_NAME" >&5
25708 echo "${ECHO_T}$PANEL_NAME" >&6
25709
25710 echo "$as_me:25710: checking for desired basename for cxx library" >&5
25711 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
25712
25713 # Check whether --with-cxx-libname or --without-cxx-libname was given.
25714 if test "${with_cxx_libname+set}" = set; then
25715   withval="$with_cxx_libname"
25716   with_lib_basename=$withval
25717 else
25718   with_lib_basename=ncurses++
25719 fi;
25720 CXX_NAME="$with_lib_basename"
25721
25722 case "x$CXX_NAME" in
25723 (x|xno|xnone|xyes)
25724         CXX_NAME=ncurses++
25725         ;;
25726 (*)
25727         ;;
25728 esac
25729
25730 echo "$as_me:25730: result: $CXX_NAME" >&5
25731 echo "${ECHO_T}$CXX_NAME" >&6
25732
25733 ### Construct the list of subdirectories for which we'll customize makefiles
25734 ### with the appropriate compile-rules.
25735
25736 echo "$as_me:25736: checking for src modules" >&5
25737 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25738
25739 # dependencies and linker-arguments for test-programs
25740 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25741 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25742 if test "$DFT_LWR_MODEL" = "libtool"; then
25743         TEST_ARGS="${TEST_DEPS}"
25744         TEST_ARG2="${TEST_DEP2}"
25745 else
25746         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25747         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25748 fi
25749
25750 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25751 cf_cv_src_modules=
25752 for cf_dir in $modules_to_build
25753 do
25754         if test -f $srcdir/$cf_dir/modules; then
25755
25756                 # We may/may not have tack in the distribution, though the
25757                 # makefile is.
25758                 if test $cf_dir = tack ; then
25759                         if test "x$cf_with_tack" != "xyes"; then
25760                                 continue
25761                         fi
25762                 fi
25763
25764                 if test -z "$cf_cv_src_modules"; then
25765                         cf_cv_src_modules=$cf_dir
25766                 else
25767                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25768                 fi
25769
25770                 # Make the ncurses_cfg.h file record the library interface files as
25771                 # well.  These are header files that are the same name as their
25772                 # directory.  Ncurses is the only library that does not follow
25773                 # that pattern.
25774                 if test $cf_dir = tack ; then
25775                         continue
25776                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25777
25778 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25779
25780                         cat >>confdefs.h <<EOF
25781 #define HAVE_${cf_have_include}_H 1
25782 EOF
25783
25784                         cat >>confdefs.h <<EOF
25785 #define HAVE_LIB${cf_have_include} 1
25786 EOF
25787
25788 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25789
25790 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
25791
25792                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
25793                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
25794                         if test "$DFT_LWR_MODEL" = "libtool"; then
25795                                 TEST_ARGS="${TEST_DEPS}"
25796                                 TEST_ARG2="${TEST_DEP2}"
25797                         else
25798                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
25799                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
25800                         fi
25801                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25802                 fi
25803         fi
25804 done
25805 echo "$as_me:25805: result: $cf_cv_src_modules" >&5
25806 echo "${ECHO_T}$cf_cv_src_modules" >&6
25807
25808 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25809 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25810
25811 SRC_SUBDIRS=
25812 if test "x$cf_with_manpages" != xno ; then
25813         SRC_SUBDIRS="$SRC_SUBDIRS man"
25814 fi
25815 SRC_SUBDIRS="$SRC_SUBDIRS include"
25816 for cf_dir in $cf_cv_src_modules
25817 do
25818         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25819 done
25820 if test "x$cf_with_tests" != "xno" ; then
25821         SRC_SUBDIRS="$SRC_SUBDIRS test"
25822 fi
25823 # always make this, to install the ncurses-config script
25824 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25825 if test "$cf_with_cxx_binding" != no; then
25826         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25827         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25828 fi
25829
25830 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25831 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25832
25833 ADA_SUBDIRS=
25834 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25835         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25836         ADA_SUBDIRS="gen src"
25837         if test "x$cf_with_tests" != "xno" ; then
25838                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25839         fi
25840 fi
25841
25842 SUB_MAKEFILES=
25843 for cf_dir in $SRC_SUBDIRS
25844 do
25845         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25846 done
25847
25848 if test -n "$ADA_SUBDIRS"; then
25849         for cf_dir in $ADA_SUBDIRS
25850         do
25851                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25852         done
25853
25854 fi
25855
25856 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25857    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25858    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25859    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25860 fi
25861
25862 DIRS_TO_MAKE="lib"
25863 for cf_item in $cf_list_models
25864 do
25865
25866         case $cf_item in
25867         (libtool) cf_subdir='obj_lo'  ;;
25868         (normal)  cf_subdir='objects' ;;
25869         (debug)   cf_subdir='obj_g' ;;
25870         (profile) cf_subdir='obj_p' ;;
25871         (shared)
25872                 case $cf_cv_system_name in
25873                 (cygwin|msys)
25874                         cf_subdir='objects' ;;
25875                 (*)
25876                         cf_subdir='obj_s' ;;
25877                 esac
25878         esac
25879
25880         for cf_item2 in $DIRS_TO_MAKE
25881         do
25882                 test $cf_item2 = $cf_subdir && break
25883         done
25884         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25885 done
25886 for cf_dir in $DIRS_TO_MAKE
25887 do
25888         test ! -d $cf_dir && mkdir $cf_dir
25889 done
25890
25891 # symbols that differ when compiling Ada95 by itself.
25892 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25893
25894 # values to use as strings
25895
25896 cat >>confdefs.h <<EOF
25897 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25898 EOF
25899
25900 cat >>confdefs.h <<EOF
25901 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25902 EOF
25903
25904 ### Now that we're done running tests, add the compiler-warnings, if any
25905
25906 cf_fix_cppflags=no
25907 cf_new_cflags=
25908 cf_new_cppflags=
25909 cf_new_extra_cppflags=
25910
25911 for cf_add_cflags in $EXTRA_CFLAGS
25912 do
25913 case $cf_fix_cppflags in
25914 (no)
25915         case $cf_add_cflags in
25916         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25917                 case $cf_add_cflags in
25918                 (-D*)
25919                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25920
25921                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25922                                 && test -z "${cf_tst_cflags}" \
25923                                 && cf_fix_cppflags=yes
25924
25925                         if test $cf_fix_cppflags = yes ; then
25926
25927         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25928         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25929
25930                                 continue
25931                         elif test "${cf_tst_cflags}" = "\"'" ; then
25932
25933         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25934         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25935
25936                                 continue
25937                         fi
25938                         ;;
25939                 esac
25940                 case "$CPPFLAGS" in
25941                 (*$cf_add_cflags)
25942                         ;;
25943                 (*)
25944                         case $cf_add_cflags in
25945                         (-D*)
25946                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25947
25948 CPPFLAGS=`echo "$CPPFLAGS" | \
25949         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25950                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25951
25952                                 ;;
25953                         esac
25954
25955         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25956         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25957
25958                         ;;
25959                 esac
25960                 ;;
25961         (*)
25962
25963         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25964         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25965
25966                 ;;
25967         esac
25968         ;;
25969 (yes)
25970
25971         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25972         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25973
25974         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25975
25976         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25977                 && test -z "${cf_tst_cflags}" \
25978                 && cf_fix_cppflags=no
25979         ;;
25980 esac
25981 done
25982
25983 if test -n "$cf_new_cflags" ; then
25984
25985         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25986         CFLAGS="${CFLAGS}$cf_new_cflags"
25987
25988 fi
25989
25990 if test -n "$cf_new_cppflags" ; then
25991
25992         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25993         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25994
25995 fi
25996
25997 if test -n "$cf_new_extra_cppflags" ; then
25998
25999         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26000         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26001
26002 fi
26003
26004 ### Define substitutions for header files to avoid name-pollution
26005
26006 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26007         HAVE_TCGETATTR=1
26008 else
26009         HAVE_TCGETATTR=0
26010 fi
26011
26012 if test "x$ac_cv_header_stdint_h" = xyes ; then
26013         HAVE_STDINT_H=1
26014 else
26015         HAVE_STDINT_H=0
26016 fi
26017
26018 if test "x$ac_cv_header_termio_h" = xyes ; then
26019         HAVE_TERMIO_H=1
26020 else
26021         HAVE_TERMIO_H=0
26022 fi
26023
26024 if test "x$ac_cv_header_termios_h" = xyes ; then
26025         HAVE_TERMIOS_H=1
26026 else
26027         HAVE_TERMIOS_H=0
26028 fi
26029
26030 ################################################################################
26031 test "x$use_database" = xyes && \
26032 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26033
26034 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26035 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26036
26037 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26038 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26039 fi
26040
26041 if test "x$cf_with_tests" != xno ; then
26042         MAKE_TESTS=
26043 else
26044         MAKE_TESTS="#"
26045 fi
26046
26047 ADAHTML_DIR=../../doc/html/ada
26048
26049 # workaround for OS/2 (20151017)
26050 case $cf_cv_system_name in
26051 (os2*)
26052         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26053         ;;
26054 (*)
26055         LIBTOOL_OPTS_CXX=
26056         ;;
26057 esac
26058
26059 # workaround for g++ versus Solaris (20131116)
26060 case $cf_cv_system_name in
26061 (solaris2*)
26062         case "x$CPPFLAGS" in
26063         (*-D_XOPEN_SOURCE_EXTENDED*)
26064                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26065
26066 echo "${as_me:-configure}:26066: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26067
26068                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26069                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26070                 ;;
26071         esac
26072         ;;
26073 esac
26074
26075 # Help to automatically enable the extended curses features when using either
26076 # the *-config or the ".pc" files by adding defines.
26077 echo "$as_me:26077: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26078 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26079 PKG_CFLAGS=
26080 for cf_loop1 in $CPPFLAGS_after_XOPEN
26081 do
26082         cf_found=no
26083         for cf_loop2 in $CPPFLAGS_before_XOPEN
26084         do
26085                 if test "x$cf_loop1" = "x$cf_loop2"
26086                 then
26087                         cf_found=yes
26088                         break
26089                 fi
26090         done
26091         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26092 done
26093 echo "$as_me:26093: result: $PKG_CFLAGS" >&5
26094 echo "${ECHO_T}$PKG_CFLAGS" >&6
26095
26096 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26097 case "x$NCURSES_OSPEED" in
26098 (*short*)
26099         cf_compatible=1
26100         ;;
26101 (*)
26102         cf_compatible=0
26103         ;;
26104 esac
26105
26106 cat >>confdefs.h <<EOF
26107 #define NCURSES_OSPEED_COMPAT $cf_compatible
26108 EOF
26109
26110 case "x$cf_cv_typeof_chtype" in
26111 (xshort|xint|xlong)
26112         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26113         ;;
26114 esac
26115
26116 case "x$cf_cv_typeof_mmask_t" in
26117 (xshort|xint|xlong)
26118         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26119         ;;
26120 esac
26121
26122 # substitute into misc/Makefile to suppress
26123 # (un)install.data from the
26124 # (un)install rules.
26125 if test "x$cf_with_db_install" = "xno"; then
26126         MISC_INSTALL_DATA=
26127         MISC_UNINSTALL_DATA=
26128 else
26129         MISC_INSTALL_DATA=install.data
26130         MISC_UNINSTALL_DATA=uninstall.data
26131 fi
26132
26133 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26134         MAKE_DATABASE="#"
26135 else
26136         MAKE_DATABASE="$MAKE_TERMINFO"
26137 fi
26138
26139 if test -n "$PACKAGE"
26140 then
26141         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26142         export PACKAGE
26143         echo "package: $PACKAGE"
26144 fi
26145
26146 UNALTERED_SYMS=
26147 cf_filter_syms=no
26148
26149 if test -n "$RESULTING_SYMS"
26150 then
26151         cf_filter_syms=$cf_dft_filter_syms
26152         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26153
26154 echo "${as_me:-configure}:26154: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26155
26156 fi
26157
26158 if test "x$WILDCARD_SYMS" = xno
26159 then
26160         cf_filter_syms=yes
26161 fi
26162
26163 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26164
26165 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26166 if test $cf_filter_syms = yes
26167 then
26168         RESULTING_SYMS=resulting.map
26169 fi
26170
26171 if test "x$cross_compiling" = xyes ; then
26172         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26173         CHECK_BUILD="#"
26174 else
26175         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26176         CHECK_BUILD=
26177 fi
26178
26179 # This is used for the *-config script and *.pc data files.
26180
26181 echo "$as_me:26181: checking for linker search path" >&5
26182 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26183 if test "${cf_cv_ld_searchpath+set}" = set; then
26184   echo $ECHO_N "(cached) $ECHO_C" >&6
26185 else
26186
26187 if test "$cross_compiling" != yes ; then
26188
26189 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26190 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26191
26192 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26193 # update the cache, which makes it run faster.
26194 test -z "$cf_pathlist" && \
26195         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26196
26197 test -z "$cf_pathlist" &&
26198         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26199
26200 # This works with OpenBSD 6.5, which lists only filenames
26201 test -z "$cf_pathlist" &&
26202         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26203
26204 if test -z "$cf_pathlist"
26205 then
26206         # dyld default path with MacOS
26207         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26208         then
26209                 # do this to bypass check
26210                 cf_cv_ld_searchpath='$HOME/lib'
26211                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26212         fi
26213 fi
26214
26215 if test -z "$cf_pathlist"
26216 then
26217         # Solaris is hardcoded
26218         if test -d /opt/SUNWspro/lib
26219         then
26220                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26221         elif test -d /usr/ccs/lib
26222         then
26223                 cf_pathlist="/usr/ccs/lib /usr/lib"
26224         fi
26225 fi
26226
26227 fi
26228
26229 # If nothing else, assume it is conventional
26230 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26231
26232 # Finally, check that this is only directories
26233 for cf_path in $0 $cf_pathlist
26234 do
26235         if test -d "$cf_path"; then
26236                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26237                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26238         fi
26239 done
26240
26241 # Ensure that it is nonempty
26242 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26243
26244 fi
26245 echo "$as_me:26245: result: $cf_cv_ld_searchpath" >&5
26246 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26247
26248 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26249
26250 cat >>confdefs.h <<\EOF
26251 #define HAVE_CURSES_DATA_BOOLNAMES 1
26252 EOF
26253
26254 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
26255 ac_config_commands="$ac_config_commands default"
26256 cat >confcache <<\_ACEOF
26257 # This file is a shell script that caches the results of configure
26258 # tests run on this system so they can be shared between configure
26259 # scripts and configure runs, see configure's option --config-cache.
26260 # It is not useful on other systems.  If it contains results you don't
26261 # want to keep, you may remove or edit it.
26262 #
26263 # config.status only pays attention to the cache file if you give it
26264 # the --recheck option to rerun configure.
26265 #
26266 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26267 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26268 # following values.
26269
26270 _ACEOF
26271
26272 # The following way of writing the cache mishandles newlines in values,
26273 # but we know of no workaround that is simple, portable, and efficient.
26274 # So, don't put newlines in cache variables' values.
26275 # Ultrix sh set writes to stderr and can't be redirected directly,
26276 # and sets the high bit in the cache file unless we assign to the vars.
26277 {
26278   (set) 2>&1 |
26279     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26280     *ac_space=\ *)
26281       # `set' does not quote correctly, so add quotes (double-quote
26282       # substitution turns \\\\ into \\, and sed turns \\ into \).
26283       sed -n \
26284         "s/'/'\\\\''/g;
26285           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26286       ;;
26287     *)
26288       # `set' quotes correctly as required by POSIX, so do not add quotes.
26289       sed -n \
26290         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26291       ;;
26292     esac;
26293 } |
26294   sed '
26295      t clear
26296      : clear
26297      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26298      t end
26299      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26300      : end' >>confcache
26301 if cmp -s $cache_file confcache; then :; else
26302   if test -w $cache_file; then
26303     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26304     cat confcache >$cache_file
26305   else
26306     echo "not updating unwritable cache $cache_file"
26307   fi
26308 fi
26309 rm -f confcache
26310
26311 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26312 # Let make expand exec_prefix.
26313 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26314
26315 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26316 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26317 # trailing colons and then remove the whole line if VPATH becomes empty
26318 # (actually we leave an empty line to preserve line numbers).
26319 if test "x$srcdir" = x.; then
26320   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26321 s/:*\$(srcdir):*/:/;
26322 s/:*\${srcdir}:*/:/;
26323 s/:*@srcdir@:*/:/;
26324 s/^\([^=]*=[    ]*\):*/\1/;
26325 s/:*$//;
26326 s/^[^=]*=[      ]*$//;
26327 }'
26328 fi
26329
26330 DEFS=-DHAVE_CONFIG_H
26331
26332 : ${CONFIG_STATUS=./config.status}
26333 ac_clean_files_save=$ac_clean_files
26334 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26335 { echo "$as_me:26335: creating $CONFIG_STATUS" >&5
26336 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26337 cat >$CONFIG_STATUS <<_ACEOF
26338 #! $SHELL
26339 # Generated automatically by configure.
26340 # Run this file to recreate the current configuration.
26341 # Compiler output produced by configure, useful for debugging
26342 # configure, is in config.log if it exists.
26343
26344 debug=false
26345 SHELL=\${CONFIG_SHELL-$SHELL}
26346 ac_cs_invocation="\$0 \$@"
26347
26348 _ACEOF
26349
26350 cat >>$CONFIG_STATUS <<\_ACEOF
26351 # Be Bourne compatible
26352 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26353   emulate sh
26354   NULLCMD=:
26355 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26356   set -o posix
26357 fi
26358
26359 # Name of the executable.
26360 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26361
26362 if expr a : '\(a\)' >/dev/null 2>&1; then
26363   as_expr=expr
26364 else
26365   as_expr=false
26366 fi
26367
26368 rm -f conf$$ conf$$.exe conf$$.file
26369 echo >conf$$.file
26370 if ln -s conf$$.file conf$$ 2>/dev/null; then
26371   # We could just check for DJGPP; but this test a) works b) is more generic
26372   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26373   if test -f conf$$.exe; then
26374     # Don't use ln at all; we don't have any links
26375     as_ln_s='cp -p'
26376   else
26377     as_ln_s='ln -s'
26378   fi
26379 elif ln conf$$.file conf$$ 2>/dev/null; then
26380   as_ln_s=ln
26381 else
26382   as_ln_s='cp -p'
26383 fi
26384 rm -f conf$$ conf$$.exe conf$$.file
26385
26386 as_executable_p="test -f"
26387
26388 # Support unset when possible.
26389 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26390   as_unset=unset
26391 else
26392   as_unset=false
26393 fi
26394
26395 # NLS nuisances.
26396 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26397 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26398 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26399 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26400 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26401 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26402 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26403 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26404
26405 # IFS
26406 # We need space, tab and new line, in precisely that order.
26407 as_nl='
26408 '
26409 IFS="   $as_nl"
26410
26411 # CDPATH.
26412 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26413
26414 exec 6>&1
26415
26416 _ACEOF
26417
26418 # Files that config.status was made for.
26419 if test -n "$ac_config_files"; then
26420   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26421 fi
26422
26423 if test -n "$ac_config_headers"; then
26424   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26425 fi
26426
26427 if test -n "$ac_config_links"; then
26428   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26429 fi
26430
26431 if test -n "$ac_config_commands"; then
26432   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26433 fi
26434
26435 cat >>$CONFIG_STATUS <<\EOF
26436
26437 ac_cs_usage="\
26438 \`$as_me' instantiates files from templates according to the
26439 current configuration.
26440
26441 Usage: $0 [OPTIONS] [FILE]...
26442
26443   -h, --help       print this help, then exit
26444   -V, --version    print version number, then exit
26445   -d, --debug      don't remove temporary files
26446       --recheck    update $as_me by reconfiguring in the same conditions
26447   --file=FILE[:TEMPLATE]
26448                    instantiate the configuration file FILE
26449   --header=FILE[:TEMPLATE]
26450                    instantiate the configuration header FILE
26451
26452 Configuration files:
26453 $config_files
26454
26455 Configuration headers:
26456 $config_headers
26457
26458 Configuration commands:
26459 $config_commands
26460
26461 Report bugs to <dickey@invisible-island.net>."
26462 EOF
26463
26464 cat >>$CONFIG_STATUS <<EOF
26465 ac_cs_version="\\
26466 config.status
26467 configured by $0, generated by GNU Autoconf 2.52.20200111,
26468   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26469
26470 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26471 Free Software Foundation, Inc.
26472 This config.status script is free software; the Free Software Foundation
26473 gives unlimited permission to copy, distribute and modify it."
26474 srcdir=$srcdir
26475 INSTALL="$INSTALL"
26476 EOF
26477
26478 cat >>$CONFIG_STATUS <<\EOF
26479 # If no file are specified by the user, then we need to provide default
26480 # value.  By we need to know if files were specified by the user.
26481 ac_need_defaults=:
26482 while test $# != 0
26483 do
26484   case $1 in
26485   --*=*)
26486     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26487     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26488     shift
26489     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26490     shift
26491     ;;
26492   -*);;
26493   *) # This is not an option, so the user has probably given explicit
26494      # arguments.
26495      ac_need_defaults=false;;
26496   esac
26497
26498   case $1 in
26499   # Handling of the options.
26500 EOF
26501 cat >>$CONFIG_STATUS <<EOF
26502   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26503     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26504     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26505 EOF
26506 cat >>$CONFIG_STATUS <<\EOF
26507   --version | --vers* | -V )
26508     echo "$ac_cs_version"; exit 0 ;;
26509   --he | --h)
26510     # Conflict between --help and --header
26511     { { echo "$as_me:26511: error: ambiguous option: $1
26512 Try \`$0 --help' for more information." >&5
26513 echo "$as_me: error: ambiguous option: $1
26514 Try \`$0 --help' for more information." >&2;}
26515    { (exit 1); exit 1; }; };;
26516   --help | --hel | -h )
26517     echo "$ac_cs_usage"; exit 0 ;;
26518   --debug | --d* | -d )
26519     debug=: ;;
26520   --file | --fil | --fi | --f )
26521     shift
26522     CONFIG_FILES="$CONFIG_FILES $1"
26523     ac_need_defaults=false;;
26524   --header | --heade | --head | --hea )
26525     shift
26526     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26527     ac_need_defaults=false;;
26528
26529   # This is an error.
26530   -*) { { echo "$as_me:26530: error: unrecognized option: $1
26531 Try \`$0 --help' for more information." >&5
26532 echo "$as_me: error: unrecognized option: $1
26533 Try \`$0 --help' for more information." >&2;}
26534    { (exit 1); exit 1; }; } ;;
26535
26536   *) ac_config_targets="$ac_config_targets $1" ;;
26537
26538   esac
26539   shift
26540 done
26541
26542 exec 5>>config.log
26543 cat >&5 << _ACEOF
26544
26545 ## ----------------------- ##
26546 ## Running config.status.  ##
26547 ## ----------------------- ##
26548
26549 This file was extended by $as_me 2.52.20200111, executed with
26550   CONFIG_FILES    = $CONFIG_FILES
26551   CONFIG_HEADERS  = $CONFIG_HEADERS
26552   CONFIG_LINKS    = $CONFIG_LINKS
26553   CONFIG_COMMANDS = $CONFIG_COMMANDS
26554   > $ac_cs_invocation
26555 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26556
26557 _ACEOF
26558 EOF
26559
26560 cat >>$CONFIG_STATUS <<EOF
26561 #
26562 # INIT-COMMANDS section.
26563 #
26564
26565 ### Special initialization commands, used to pass information from the
26566 ### configuration-run into config.status
26567
26568 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26569 AWK="$AWK"
26570 CXX_NAME="$CXX_NAME"
26571 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26572 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26573 ECHO_LD="$ECHO_LD"
26574 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26575 FORM_NAME="$FORM_NAME"
26576 LDCONFIG="$LDCONFIG"
26577 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26578 LIB_NAME="$LIB_NAME"
26579 LIB_PREFIX="$LIB_PREFIX"
26580 LIB_SUBSETS="$LIB_SUBSETS"
26581 LIB_SUFFIX="$LIB_SUFFIX"
26582 LIB_TRACING="$LIB_TRACING"
26583 LN_S="$LN_S"
26584 MAKE_TERMINFO="$MAKE_TERMINFO"
26585 MENU_NAME="$MENU_NAME"
26586 NCURSES_MAJOR="$NCURSES_MAJOR"
26587 NCURSES_MINOR="$NCURSES_MINOR"
26588 NCURSES_OSPEED="$NCURSES_OSPEED"
26589 NCURSES_PATCH="$NCURSES_PATCH"
26590 PANEL_NAME="$PANEL_NAME"
26591 SRC_SUBDIRS="$SRC_SUBDIRS"
26592 TERMINFO="$TERMINFO"
26593 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26594 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26595 TICS_NAME="$TICS_NAME"
26596 TICS_SUFFIX="$TICS_SUFFIX"
26597 TIC_PATH="$TIC_PATH"
26598 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26599 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26600 TINFO_NAME="$TINFO_NAME"
26601 TINFO_SUFFIX="$TINFO_SUFFIX"
26602 UNALTERED_SYMS="$UNALTERED_SYMS"
26603 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26604 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26605 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26606 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26607 WILDCARD_SYMS="$WILDCARD_SYMS"
26608 WITH_CURSES_H="$with_curses_h"
26609 WITH_ECHO="${enable_echo:=yes}"
26610 WITH_OVERWRITE="$with_overwrite"
26611 cf_LIST_MODELS="$cf_list_models"
26612 cf_cv_abi_version="$cf_cv_abi_version"
26613 cf_cv_do_relink="$cf_cv_do_relink"
26614 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26615 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26616 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26617 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26618 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26619 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26620 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26621 cf_cv_rel_version="$cf_cv_rel_version"
26622 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26623 cf_cv_shared_soname='$cf_cv_shared_soname'
26624 cf_cv_shlib_version="$cf_cv_shlib_version"
26625 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26626 cf_cv_system_name="$cf_cv_system_name"
26627 cf_cv_term_driver="$with_term_driver"
26628 cf_with_ada="$cf_with_ada"
26629 cf_with_cxx_binding="$cf_with_cxx_binding"
26630 cf_with_db_install="$cf_with_db_install"
26631 cf_with_manpages="$cf_with_manpages"
26632 cf_with_tests="$cf_with_tests"
26633 host="$host"
26634 target="$target"
26635 with_shared_cxx="$with_shared_cxx"
26636
26637 EOF
26638
26639 cat >>$CONFIG_STATUS <<\EOF
26640 for ac_config_target in $ac_config_targets
26641 do
26642   case "$ac_config_target" in
26643   # Handling of arguments.
26644   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26645   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26646   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26647   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26648   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26649   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26650   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26651   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26652   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26653   *) { { echo "$as_me:26653: error: invalid argument: $ac_config_target" >&5
26654 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26655    { (exit 1); exit 1; }; };;
26656   esac
26657 done
26658
26659 # If the user did not use the arguments to specify the items to instantiate,
26660 # then the envvar interface is used.  Set only those that are not.
26661 # We use the long form for the default assignment because of an extremely
26662 # bizarre bug on SunOS 4.1.3.
26663 if $ac_need_defaults; then
26664   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26665   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26666   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26667 fi
26668
26669 # Create a temporary directory, and hook for its removal unless debugging.
26670 $debug ||
26671 {
26672   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26673   trap '{ (exit 1); exit 1; }' 1 2 13 15
26674 }
26675
26676 # Create a (secure) tmp directory for tmp files.
26677 : ${TMPDIR=/tmp}
26678 {
26679   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26680   test -n "$tmp" && test -d "$tmp"
26681 }  ||
26682 {
26683   tmp=$TMPDIR/cs$$-$RANDOM
26684   (umask 077 && mkdir $tmp)
26685 } ||
26686 {
26687    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26688    { (exit 1); exit 1; }
26689 }
26690
26691 EOF
26692
26693 cat >>$CONFIG_STATUS <<EOF
26694
26695 #
26696 # CONFIG_FILES section.
26697 #
26698
26699 # No need to generate the scripts if there are no CONFIG_FILES.
26700 # This happens for instance when ./config.status config.h
26701 if test -n "\$CONFIG_FILES"; then
26702   # Protect against being on the right side of a sed subst in config.status.
26703   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26704    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26705 s,@SHELL@,$SHELL,;t t
26706 s,@exec_prefix@,$exec_prefix,;t t
26707 s,@prefix@,$prefix,;t t
26708 s,@program_transform_name@,$program_transform_name,;t t
26709 s,@bindir@,$bindir,;t t
26710 s,@sbindir@,$sbindir,;t t
26711 s,@libexecdir@,$libexecdir,;t t
26712 s,@datarootdir@,$datarootdir,;t t
26713 s,@datadir@,$datadir,;t t
26714 s,@sysconfdir@,$sysconfdir,;t t
26715 s,@sharedstatedir@,$sharedstatedir,;t t
26716 s,@localstatedir@,$localstatedir,;t t
26717 s,@runstatedir@,$runstatedir,;t t
26718 s,@libdir@,$libdir,;t t
26719 s,@includedir@,$includedir,;t t
26720 s,@oldincludedir@,$oldincludedir,;t t
26721 s,@infodir@,$infodir,;t t
26722 s,@mandir@,$mandir,;t t
26723 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26724 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26725 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26726 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26727 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26728 s,@build_alias@,$build_alias,;t t
26729 s,@host_alias@,$host_alias,;t t
26730 s,@target_alias@,$target_alias,;t t
26731 s,@ECHO_C@,$ECHO_C,;t t
26732 s,@ECHO_N@,$ECHO_N,;t t
26733 s,@ECHO_T@,$ECHO_T,;t t
26734 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26735 s,@DEFS@,$DEFS,;t t
26736 s,@LIBS@,$LIBS,;t t
26737 s,@top_builddir@,$top_builddir,;t t
26738 s,@EGREP@,$EGREP,;t t
26739 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26740 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26741 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26742 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26743 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26744 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26745 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26746 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26747 s,@VERSION@,$VERSION,;t t
26748 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26749 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26750 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26751 s,@PACKAGE@,$PACKAGE,;t t
26752 s,@build@,$build,;t t
26753 s,@build_cpu@,$build_cpu,;t t
26754 s,@build_vendor@,$build_vendor,;t t
26755 s,@build_os@,$build_os,;t t
26756 s,@host@,$host,;t t
26757 s,@host_cpu@,$host_cpu,;t t
26758 s,@host_vendor@,$host_vendor,;t t
26759 s,@host_os@,$host_os,;t t
26760 s,@target@,$target,;t t
26761 s,@target_cpu@,$target_cpu,;t t
26762 s,@target_vendor@,$target_vendor,;t t
26763 s,@target_os@,$target_os,;t t
26764 s,@CC@,$CC,;t t
26765 s,@CFLAGS@,$CFLAGS,;t t
26766 s,@LDFLAGS@,$LDFLAGS,;t t
26767 s,@CPPFLAGS@,$CPPFLAGS,;t t
26768 s,@ac_ct_CC@,$ac_ct_CC,;t t
26769 s,@EXEEXT@,$EXEEXT,;t t
26770 s,@OBJEXT@,$OBJEXT,;t t
26771 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26772 s,@CPP@,$CPP,;t t
26773 s,@LDCONFIG@,$LDCONFIG,;t t
26774 s,@CXX@,$CXX,;t t
26775 s,@CXXFLAGS@,$CXXFLAGS,;t t
26776 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26777 s,@AWK@,$AWK,;t t
26778 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26779 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26780 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26781 s,@LINT@,$LINT,;t t
26782 s,@LINT_OPTS@,$LINT_OPTS,;t t
26783 s,@LN_S@,$LN_S,;t t
26784 s,@cf_config_suffix@,$cf_config_suffix,;t t
26785 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26786 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26787 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26788 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26789 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26790 s,@SET_MAKE@,$SET_MAKE,;t t
26791 s,@CTAGS@,$CTAGS,;t t
26792 s,@ETAGS@,$ETAGS,;t t
26793 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26794 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26795 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26796 s,@RANLIB@,$RANLIB,;t t
26797 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26798 s,@LD@,$LD,;t t
26799 s,@ac_ct_LD@,$ac_ct_LD,;t t
26800 s,@AR@,$AR,;t t
26801 s,@ac_ct_AR@,$ac_ct_AR,;t t
26802 s,@NM@,$NM,;t t
26803 s,@ac_ct_NM@,$ac_ct_NM,;t t
26804 s,@ARFLAGS@,$ARFLAGS,;t t
26805 s,@DESTDIR@,$DESTDIR,;t t
26806 s,@BUILD_CC@,$BUILD_CC,;t t
26807 s,@BUILD_CPP@,$BUILD_CPP,;t t
26808 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26809 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26810 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26811 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26812 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26813 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26814 s,@cf_list_models@,$cf_list_models,;t t
26815 s,@ABI_VERSION@,$ABI_VERSION,;t t
26816 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26817 s,@LIBTOOL@,$LIBTOOL,;t t
26818 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26819 s,@LT_UNDEF@,$LT_UNDEF,;t t
26820 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26821 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26822 s,@LIB_CREATE@,$LIB_CREATE,;t t
26823 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26824 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26825 s,@LIB_PREP@,$LIB_PREP,;t t
26826 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26827 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26828 s,@LIB_LINK@,$LIB_LINK,;t t
26829 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26830 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26831 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26832 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26833 s,@TICS_NAME@,$TICS_NAME,;t t
26834 s,@TINFO_NAME@,$TINFO_NAME,;t t
26835 s,@LIB_NAME@,$LIB_NAME,;t t
26836 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26837 s,@CC_G_OPT@,$CC_G_OPT,;t t
26838 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26839 s,@LD_MODEL@,$LD_MODEL,;t t
26840 s,@shlibdir@,$shlibdir,;t t
26841 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26842 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26843 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26844 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26845 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26846 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26847 s,@LINK_PROGS@,$LINK_PROGS,;t t
26848 s,@LINK_TESTS@,$LINK_TESTS,;t t
26849 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26850 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26851 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26852 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26853 s,@RPATH_LIST@,$RPATH_LIST,;t t
26854 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26855 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26856 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26857 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26858 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26859 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26860 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26861 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26862 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26863 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26864 s,@TIC@,$TIC,;t t
26865 s,@INFOCMP@,$INFOCMP,;t t
26866 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26867 s,@XTERM_KBS@,$XTERM_KBS,;t t
26868 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26869 s,@TERMINFO@,$TERMINFO,;t t
26870 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26871 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26872 s,@TERMPATH@,$TERMPATH,;t t
26873 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26874 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26875 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26876 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26877 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26878 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26879 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26880 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26881 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26882 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26883 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26884 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26885 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26886 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26887 s,@RGB_PATH@,$RGB_PATH,;t t
26888 s,@no_x11_rgb@,$no_x11_rgb,;t t
26889 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26890 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26891 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26892 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26893 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26894 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26895 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26896 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26897 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26898 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26899 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26900 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26901 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26902 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26903 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26904 s,@PTHREAD@,$PTHREAD,;t t
26905 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26906 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26907 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26908 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26909 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26910 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26911 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26912 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26913 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26914 s,@ECHO_LT@,$ECHO_LT,;t t
26915 s,@ECHO_LD@,$ECHO_LD,;t t
26916 s,@RULE_CC@,$RULE_CC,;t t
26917 s,@SHOW_CC@,$SHOW_CC,;t t
26918 s,@ECHO_CC@,$ECHO_CC,;t t
26919 s,@ECHO_LINK@,$ECHO_LINK,;t t
26920 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26921 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26922 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26923 s,@ADAFLAGS@,$ADAFLAGS,;t t
26924 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26925 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26926 s,@ADA_TRACE@,$ADA_TRACE,;t t
26927 s,@MATH_LIB@,$MATH_LIB,;t t
26928 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26929 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26930 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26931 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26932 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26933 s,@TEST_LIBS@,$TEST_LIBS,;t t
26934 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26935 s,@CXXCPP@,$CXXCPP,;t t
26936 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26937 s,@CXX_AR@,$CXX_AR,;t t
26938 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26939 s,@CXXLIBS@,$CXXLIBS,;t t
26940 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26941 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26942 s,@M4_exists@,$M4_exists,;t t
26943 s,@cf_ada_make@,$cf_ada_make,;t t
26944 s,@cf_ada_config@,$cf_ada_config,;t t
26945 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26946 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26947 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26948 s,@cf_compile_generics@,$cf_compile_generics,;t t
26949 s,@cf_generic_objects@,$cf_generic_objects,;t t
26950 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26951 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26952 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26953 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26954 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26955 s,@cf_ada_package@,$cf_ada_package,;t t
26956 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26957 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26958 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26959 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26960 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26961 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26962 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26963 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26964 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26965 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26966 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26967 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26968 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26969 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26970 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26971 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26972 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26973 s,@TICS_LIBS@,$TICS_LIBS,;t t
26974 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26975 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26976 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26977 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26978 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26979 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26980 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26981 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26982 s,@includesubdir@,$includesubdir,;t t
26983 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26984 s,@TICS_LIST@,$TICS_LIST,;t t
26985 s,@TINFO_LIST@,$TINFO_LIST,;t t
26986 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26987 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26988 s,@FORM_NAME@,$FORM_NAME,;t t
26989 s,@MENU_NAME@,$MENU_NAME,;t t
26990 s,@PANEL_NAME@,$PANEL_NAME,;t t
26991 s,@CXX_NAME@,$CXX_NAME,;t t
26992 s,@TEST_ARGS@,$TEST_ARGS,;t t
26993 s,@TEST_DEPS@,$TEST_DEPS,;t t
26994 s,@TEST_ARG2@,$TEST_ARG2,;t t
26995 s,@TEST_DEP2@,$TEST_DEP2,;t t
26996 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26997 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26998 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26999 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27000 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27001 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27002 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27003 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27004 s,@cross_compiling@,$cross_compiling,;t t
27005 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27006 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27007 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27008 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27009 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27010 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27011 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27012 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27013 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27014 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27015 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27016 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27017 CEOF
27018
27019 EOF
27020
27021   cat >>$CONFIG_STATUS <<\EOF
27022   # Split the substitutions into bite-sized pieces for seds with
27023   # small command number limits, like on Digital OSF/1 and HP-UX.
27024   ac_max_sed_lines=48
27025   ac_sed_frag=1 # Number of current file.
27026   ac_beg=1 # First line for current file.
27027   ac_end=$ac_max_sed_lines # Line after last line for current file.
27028   ac_more_lines=:
27029   ac_sed_cmds=
27030   while $ac_more_lines; do
27031     if test $ac_beg -gt 1; then
27032       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27033     else
27034       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27035     fi
27036     if test ! -s $tmp/subs.frag; then
27037       ac_more_lines=false
27038     else
27039       # The purpose of the label and of the branching condition is to
27040       # speed up the sed processing (if there are no `@' at all, there
27041       # is no need to browse any of the substitutions).
27042       # These are the two extra sed commands mentioned above.
27043       (echo ':t
27044   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27045       # It is possible to make a multiline substitution using escaped newlines.
27046       # Ensure that we do not split the substitution between script fragments.
27047       ac_BEG=$ac_end
27048       ac_END=`expr $ac_end + $ac_max_sed_lines`
27049       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27050       if test -s $tmp/subs.next; then
27051         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27052         if test ! -s $tmp/subs.edit; then
27053           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27054           if test ! -s $tmp/subs.edit; then
27055             if test $ac_beg -gt 1; then
27056               ac_end=`expr $ac_end - 1`
27057               continue
27058             fi
27059           fi
27060         fi
27061       fi
27062
27063       if test -z "$ac_sed_cmds"; then
27064         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27065       else
27066         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27067       fi
27068       ac_sed_frag=`expr $ac_sed_frag + 1`
27069       ac_beg=$ac_end
27070       ac_end=`expr $ac_end + $ac_max_sed_lines`
27071     fi
27072   done
27073   if test -z "$ac_sed_cmds"; then
27074     ac_sed_cmds=cat
27075   fi
27076 fi # test -n "$CONFIG_FILES"
27077
27078 EOF
27079 cat >>$CONFIG_STATUS <<\EOF
27080 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27081   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27082   case $ac_file in
27083   - | *:- | *:-:* ) # input from stdin
27084         cat >$tmp/stdin
27085         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27086         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27087   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27088         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27089   * )   ac_file_in=$ac_file.in ;;
27090   esac
27091
27092   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27093   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27094          X"$ac_file" : 'X\(//\)[^/]' \| \
27095          X"$ac_file" : 'X\(//\)$' \| \
27096          X"$ac_file" : 'X\(/\)' \| \
27097          .     : '\(.\)' 2>/dev/null ||
27098 echo X"$ac_file" |
27099     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27100           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27101           /^X\(\/\/\)$/{ s//\1/; q; }
27102           /^X\(\/\).*/{ s//\1/; q; }
27103           s/.*/./; q'`
27104   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27105     { case "$ac_dir" in
27106   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27107   *)                      as_incr_dir=.;;
27108 esac
27109 as_dummy="$ac_dir"
27110 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27111   case $as_mkdir_dir in
27112     # Skip DOS drivespec
27113     ?:) as_incr_dir=$as_mkdir_dir ;;
27114     *)
27115       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27116       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27117     ;;
27118   esac
27119 done; }
27120
27121     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27122     # A "../" for each directory in $ac_dir_suffix.
27123     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27124   else
27125     ac_dir_suffix= ac_dots=
27126   fi
27127
27128   case $srcdir in
27129   .)  ac_srcdir=.
27130       if test -z "$ac_dots"; then
27131          ac_top_srcdir=.
27132       else
27133          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27134       fi ;;
27135   [\\/]* | ?:[\\/]* )
27136       ac_srcdir=$srcdir$ac_dir_suffix;
27137       ac_top_srcdir=$srcdir ;;
27138   *) # Relative path.
27139     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27140     ac_top_srcdir=$ac_dots$srcdir ;;
27141   esac
27142
27143   case $INSTALL in
27144   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27145   *) ac_INSTALL=$ac_dots$INSTALL ;;
27146   esac
27147
27148   if test x"$ac_file" != x-; then
27149     { echo "$as_me:27149: creating $ac_file" >&5
27150 echo "$as_me: creating $ac_file" >&6;}
27151     rm -f "$ac_file"
27152   fi
27153   # Let's still pretend it is `configure' which instantiates (i.e., don't
27154   # use $as_me), people would be surprised to read:
27155   #    /* config.h.  Generated automatically by config.status.  */
27156   configure_input="Generated automatically from `echo $ac_file_in |
27157                                                  sed 's,.*/,,'` by configure."
27158
27159   # First look for the input files in the build tree, otherwise in the
27160   # src tree.
27161   ac_file_inputs=`IFS=:
27162     for f in $ac_file_in; do
27163       case $f in
27164       -) echo $tmp/stdin ;;
27165       [\\/$]*)
27166          # Absolute (can't be DOS-style, as IFS=:)
27167          test -f "$f" || { { echo "$as_me:27167: error: cannot find input file: $f" >&5
27168 echo "$as_me: error: cannot find input file: $f" >&2;}
27169    { (exit 1); exit 1; }; }
27170          echo $f;;
27171       *) # Relative
27172          if test -f "$f"; then
27173            # Build tree
27174            echo $f
27175          elif test -f "$srcdir/$f"; then
27176            # Source tree
27177            echo $srcdir/$f
27178          else
27179            # /dev/null tree
27180            { { echo "$as_me:27180: error: cannot find input file: $f" >&5
27181 echo "$as_me: error: cannot find input file: $f" >&2;}
27182    { (exit 1); exit 1; }; }
27183          fi;;
27184       esac
27185     done` || { (exit 1); exit 1; }
27186 EOF
27187 cat >>$CONFIG_STATUS <<\EOF
27188   ac_warn_datarootdir=no
27189   if test x"$ac_file" != x-; then
27190     for ac_item in $ac_file_inputs
27191     do
27192       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27193       if test -n "$ac_seen"; then
27194         ac_used=`grep '@datarootdir@' $ac_item`
27195         if test -z "$ac_used"; then
27196           { echo "$as_me:27196: WARNING: datarootdir was used implicitly but not set:
27197 $ac_seen" >&5
27198 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27199 $ac_seen" >&2;}
27200           ac_warn_datarootdir=yes
27201         fi
27202       fi
27203       ac_seen=`grep '${datarootdir}' $ac_item`
27204       if test -n "$ac_seen"; then
27205         { echo "$as_me:27205: WARNING: datarootdir was used explicitly but not set:
27206 $ac_seen" >&5
27207 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27208 $ac_seen" >&2;}
27209         ac_warn_datarootdir=yes
27210       fi
27211     done
27212   fi
27213
27214 if test "x$ac_warn_datarootdir" = xyes; then
27215   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27216 fi
27217
27218 EOF
27219 cat >>$CONFIG_STATUS <<EOF
27220   sed "$ac_vpsub
27221 $extrasub
27222 EOF
27223 cat >>$CONFIG_STATUS <<\EOF
27224 :t
27225 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27226 s,@configure_input@,$configure_input,;t t
27227 s,@srcdir@,$ac_srcdir,;t t
27228 s,@top_srcdir@,$ac_top_srcdir,;t t
27229 s,@INSTALL@,$ac_INSTALL,;t t
27230 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27231   rm -f $tmp/stdin
27232   if test x"$ac_file" != x-; then
27233     cp $tmp/out $ac_file
27234
27235     for ac_name in prefix exec_prefix datarootdir
27236     do
27237         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27238         if test -n "$ac_seen"; then
27239             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27240             if test -z "$ac_init"; then
27241               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27242               { echo "$as_me:27242: WARNING: Variable $ac_name is used but was not set:
27243 $ac_seen" >&5
27244 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27245 $ac_seen" >&2;}
27246             fi
27247         fi
27248     done
27249     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27250     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27251     if test -s $tmp/out; then
27252       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27253       { echo "$as_me:27253: WARNING: Some variables may not be substituted:
27254 $ac_seen" >&5
27255 echo "$as_me: WARNING: Some variables may not be substituted:
27256 $ac_seen" >&2;}
27257     fi
27258   else
27259     cat $tmp/out
27260   fi
27261   rm -f $tmp/out
27262
27263 done
27264 EOF
27265 cat >>$CONFIG_STATUS <<\EOF
27266
27267 #
27268 # CONFIG_HEADER section.
27269 #
27270
27271 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27272 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27273 #
27274 # ac_d sets the value in "#define NAME VALUE" lines.
27275 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27276 ac_dB='[        ].*$,\1#\2'
27277 ac_dC=' '
27278 ac_dD=',;t'
27279 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27280 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27281 ac_iB='\([      ]\),\1#\2define\3'
27282 ac_iC=' '
27283 ac_iD='\4,;t'
27284 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27285 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27286 ac_uB='$,\1#\2define\3'
27287 ac_uC=' '
27288 ac_uD=',;t'
27289
27290 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27291   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27292   case $ac_file in
27293   - | *:- | *:-:* ) # input from stdin
27294         cat >$tmp/stdin
27295         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27296         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27297   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27298         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27299   * )   ac_file_in=$ac_file.in ;;
27300   esac
27301
27302   test x"$ac_file" != x- && { echo "$as_me:27302: creating $ac_file" >&5
27303 echo "$as_me: creating $ac_file" >&6;}
27304
27305   # First look for the input files in the build tree, otherwise in the
27306   # src tree.
27307   ac_file_inputs=`IFS=:
27308     for f in $ac_file_in; do
27309       case $f in
27310       -) echo $tmp/stdin ;;
27311       [\\/$]*)
27312          # Absolute (can't be DOS-style, as IFS=:)
27313          test -f "$f" || { { echo "$as_me:27313: error: cannot find input file: $f" >&5
27314 echo "$as_me: error: cannot find input file: $f" >&2;}
27315    { (exit 1); exit 1; }; }
27316          echo $f;;
27317       *) # Relative
27318          if test -f "$f"; then
27319            # Build tree
27320            echo $f
27321          elif test -f "$srcdir/$f"; then
27322            # Source tree
27323            echo $srcdir/$f
27324          else
27325            # /dev/null tree
27326            { { echo "$as_me:27326: error: cannot find input file: $f" >&5
27327 echo "$as_me: error: cannot find input file: $f" >&2;}
27328    { (exit 1); exit 1; }; }
27329          fi;;
27330       esac
27331     done` || { (exit 1); exit 1; }
27332   # Remove the trailing spaces.
27333   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27334
27335 EOF
27336
27337 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27338 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27339 # be either 'cat' or 'sort'.
27340 cat confdefs.h | uniq >conftest.vals
27341
27342 # Break up conftest.vals because some shells have a limit on
27343 # the size of here documents, and old seds have small limits too.
27344
27345 rm -f conftest.tail
27346 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27347 while grep . conftest.vals >/dev/null
27348 do
27349   # Write chunks of a limited-size here document to conftest.frag.
27350   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27351   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27352   echo 'CEOF' >> $CONFIG_STATUS
27353   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27354   rm -f conftest.vals
27355   mv conftest.tail conftest.vals
27356 done
27357 rm -f conftest.vals
27358
27359 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27360 # marker @DEFS@.
27361 echo '  cat >> conftest.edit <<CEOF
27362 /@DEFS@/r conftest.frag
27363 /@DEFS@/d
27364 CEOF
27365 sed -f conftest.edit $tmp/in > $tmp/out
27366 rm -f $tmp/in
27367 mv $tmp/out $tmp/in
27368 rm -f conftest.edit conftest.frag
27369 ' >> $CONFIG_STATUS
27370
27371 cat >>$CONFIG_STATUS <<\EOF
27372   # Let's still pretend it is `configure' which instantiates (i.e., don't
27373   # use $as_me), people would be surprised to read:
27374   #    /* config.h.  Generated automatically by config.status.  */
27375   if test x"$ac_file" = x-; then
27376     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27377   else
27378     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27379   fi
27380   cat $tmp/in >>$tmp/config.h
27381   rm -f $tmp/in
27382   if test x"$ac_file" != x-; then
27383     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27384       { echo "$as_me:27384: $ac_file is unchanged" >&5
27385 echo "$as_me: $ac_file is unchanged" >&6;}
27386     else
27387       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27388          X"$ac_file" : 'X\(//\)[^/]' \| \
27389          X"$ac_file" : 'X\(//\)$' \| \
27390          X"$ac_file" : 'X\(/\)' \| \
27391          .     : '\(.\)' 2>/dev/null ||
27392 echo X"$ac_file" |
27393     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27394           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27395           /^X\(\/\/\)$/{ s//\1/; q; }
27396           /^X\(\/\).*/{ s//\1/; q; }
27397           s/.*/./; q'`
27398       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27399         { case "$ac_dir" in
27400   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27401   *)                      as_incr_dir=.;;
27402 esac
27403 as_dummy="$ac_dir"
27404 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27405   case $as_mkdir_dir in
27406     # Skip DOS drivespec
27407     ?:) as_incr_dir=$as_mkdir_dir ;;
27408     *)
27409       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27410       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27411     ;;
27412   esac
27413 done; }
27414
27415       fi
27416       rm -f $ac_file
27417       mv $tmp/config.h $ac_file
27418     fi
27419   else
27420     cat $tmp/config.h
27421     rm -f $tmp/config.h
27422   fi
27423 done
27424 EOF
27425 cat >>$CONFIG_STATUS <<\EOF
27426 #
27427 # CONFIG_COMMANDS section.
27428 #
27429 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27430   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27431   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27432
27433   case $ac_dest in
27434     default )
27435 if test "x$cf_with_tests" != xno ; then
27436
27437 for cf_dir in test
27438 do
27439         if test ! -d $srcdir/$cf_dir; then
27440                 continue
27441         elif test -f $srcdir/$cf_dir/programs; then
27442                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27443         fi
27444 done
27445
27446 fi
27447
27448 cf_prefix=$LIB_PREFIX
27449
27450 case $cf_cv_shlib_version in
27451 (cygdll|msysdll|mingw)
27452         TINFO_NAME=$TINFO_ARG_SUFFIX
27453         TINFO_SUFFIX=.dll
27454         ;;
27455 esac
27456
27457 if test -n "$TINFO_SUFFIX" ; then
27458         case $TINFO_SUFFIX in
27459         (tw*)
27460                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27461                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27462                 ;;
27463         (t*)
27464                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27465                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27466                 ;;
27467         (w*)
27468                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27469                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27470                 ;;
27471         esac
27472 fi
27473
27474 for cf_dir in $SRC_SUBDIRS
27475 do
27476         if test ! -d $srcdir/$cf_dir ; then
27477                 continue
27478         elif test -f $srcdir/$cf_dir/modules; then
27479
27480                 SHARED_LIB=
27481                 Libs_To_Make=
27482                 cf_awk_program=
27483                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27484                 then
27485                         cf_awk_program="$cf_awk_program\
27486 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27487 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27488 "
27489                 fi
27490
27491                 if test "x$WILDCARD_SYMS" = xno
27492                 then
27493                         cf_awk_program="$cf_awk_program\
27494 /[      ]_\\*;/ { skip=1; next; }\
27495 "
27496                 fi
27497
27498                 if test "x$cf_awk_program" != "x"
27499                 then
27500                         cat >>$cf_dir/Makefile <<CF_EOF
27501
27502 # Generated by CF_LIB_RULES
27503 resulting.map: $UNALTERED_SYMS
27504         $AWK 'BEGIN { skip = 1; last=""; } \
27505 $cf_awk_program \
27506 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27507  skip = 0; last = \$\$0; } \
27508 END { print last; }' < $UNALTERED_SYMS >\$@
27509
27510 distclean::
27511         rm -f resulting.map
27512 CF_EOF
27513                 fi
27514
27515                 for cf_item in $cf_LIST_MODELS
27516                 do
27517
27518         case X$cf_item in
27519         (Xlibtool)
27520                 cf_suffix='.la'
27521                 cf_depsuf=$cf_suffix
27522                 ;;
27523         (Xdebug)
27524                 cf_suffix='_g.a'
27525                 cf_depsuf=$cf_suffix
27526                 ;;
27527         (Xprofile)
27528                 cf_suffix='_p.a'
27529                 cf_depsuf=$cf_suffix
27530                 ;;
27531         (Xshared)
27532                 case $cf_cv_system_name in
27533                 (aix[5-7]*)
27534                         cf_suffix='.so'
27535                         cf_depsuf=$cf_suffix
27536                         ;;
27537                 (cygwin*|msys*|mingw*)
27538                         cf_suffix='.dll'
27539                         cf_depsuf='.dll.a'
27540                         ;;
27541                 (darwin*)
27542                         cf_suffix='.dylib'
27543                         cf_depsuf=$cf_suffix
27544                         ;;
27545                 (hpux*)
27546                         case $target in
27547                         (ia64*)
27548                                 cf_suffix='.so'
27549                                 cf_depsuf=$cf_suffix
27550                                 ;;
27551                         (*)
27552                                 cf_suffix='.sl'
27553                                 cf_depsuf=$cf_suffix
27554                                 ;;
27555                         esac
27556                         ;;
27557                 (*)
27558                         cf_suffix='.so'
27559                         cf_depsuf=$cf_suffix
27560                         ;;
27561                 esac
27562                 ;;
27563         (*)
27564                 cf_suffix='.a'
27565                 cf_depsuf=$cf_suffix
27566                 ;;
27567         esac
27568         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27569         then
27570                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27571                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27572         fi
27573
27574                         if test "$cf_dir" = "c++"
27575                         then
27576
27577 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27578
27579 eval cf_libname=\$${cf_map_lib_basename}_NAME
27580
27581                         else
27582
27583 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27584
27585 eval cf_libname=\$${cf_map_lib_basename}_NAME
27586
27587                         fi
27588                         test -z "$cf_libname" && cf_libname="$cf_dir"
27589                         if test $cf_item = shared ; then
27590                                 if test -n "${LIB_SUFFIX}"
27591                                 then
27592                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27593                                 else
27594                                         cf_shared_suffix="$cf_suffix"
27595                                 fi
27596                                 if test "$cf_cv_do_symlinks" = yes ; then
27597                                         cf_version_name=
27598
27599                                         case "$cf_cv_shlib_version" in
27600                                         (rel)
27601                                                 cf_version_name=REL_VERSION
27602                                                 ;;
27603                                         (abi)
27604                                                 cf_version_name=ABI_VERSION
27605                                                 ;;
27606                                         esac
27607
27608                                         if test -n "$cf_version_name"
27609                                         then
27610                                                 case "$cf_cv_system_name" in
27611                                                 (darwin*)
27612                                                         # "w", etc?
27613                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27614                                                         ;;
27615                                                 (*)
27616                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27617                                                         ;;
27618                                                 esac
27619                                         fi
27620                                         if test -n "${USE_LIB_SUFFIX}"
27621                                         then
27622                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27623                                         else
27624                                                 cf_shared_suffix="$cf_suffix"
27625                                         fi
27626                                 fi
27627                                 # cygwin needs import library, and has unique naming convention
27628                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27629                                 # use 'cyg' prefix for shared lib.
27630                                 case $cf_cv_shlib_version in
27631                                 (cygdll)
27632                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27633                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27634                                         ;;
27635                                 (msysdll)
27636                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27637                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27638                                         ;;
27639                                 (mingw)
27640                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27641                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27642                                         ;;
27643                                 (*)
27644                                         cf_add_lib=
27645                                         ;;
27646                                 esac
27647                                 if test -n "$cf_add_lib"
27648                                 then
27649                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27650                                         continue
27651                                 fi
27652                         fi
27653                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27654                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27655                 done
27656
27657                 if test $cf_dir = ncurses ; then
27658                         cf_subsets="$LIB_SUBSETS"
27659                         cf_r_parts="$cf_subsets"
27660                         cf_liblist="$Libs_To_Make"
27661
27662                         while test -n "$cf_r_parts"
27663                         do
27664                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27665                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27666                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27667                                         cf_add_lib=
27668                                         case $cf_l_parts in
27669                                         (*termlib*)
27670                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27671                                                 ;;
27672                                         (*ticlib*)
27673                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27674                                                 ;;
27675                                         (*)
27676                                                 break
27677                                                 ;;
27678                                         esac
27679                                         if test -n "$cf_add_lib"; then
27680                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27681                                         fi
27682                                 else
27683                                         break
27684                                 fi
27685                         done
27686                 else
27687                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27688                 fi
27689
27690                 if test $cf_dir = c++; then
27691                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27692                                 cf_list=
27693                                 for cf_item in $Libs_To_Make
27694                                 do
27695                                         case $cf_item in
27696                                         (*.a)
27697                                                 ;;
27698                                         (*)
27699                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27700                                                 ;;
27701                                         esac
27702                                         for cf_test in $cf_list
27703                                         do
27704                                                 if test "$cf_test" = "$cf_item"
27705                                                 then
27706                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27707                                                         cf_item=
27708                                                         break
27709                                                 fi
27710                                         done
27711                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27712                                 done
27713                                 Libs_To_Make="$cf_list"
27714                         fi
27715                 fi
27716
27717                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27718                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27719                         $cf_dir/Makefile >$cf_dir/Makefile.out
27720                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27721
27722                 $AWK -f $srcdir/mk-0th.awk \
27723                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27724                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27725
27726                 for cf_subset in $cf_subsets
27727                 do
27728                         cf_subdirs=
27729                         for cf_item in $cf_LIST_MODELS
27730                         do
27731
27732                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27733
27734 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27735
27736                         CXX_MODEL=$cf_ITEM
27737                         if test "$CXX_MODEL" = SHARED; then
27738                                 case $cf_cv_shlib_version in
27739                                 (cygdll|msysdll|mingw)
27740                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27741
27742 echo "${as_me:-configure}:27742: testing overriding CXX_MODEL to SHARED ..." 1>&5
27743
27744                                         with_shared_cxx=yes
27745                                         ;;
27746                                 (*)
27747                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27748                                         ;;
27749                                 esac
27750                         fi
27751
27752         case X$cf_item in
27753         (Xlibtool)
27754                 cf_suffix='.la'
27755                 cf_depsuf=$cf_suffix
27756                 ;;
27757         (Xdebug)
27758                 cf_suffix='_g.a'
27759                 cf_depsuf=$cf_suffix
27760                 ;;
27761         (Xprofile)
27762                 cf_suffix='_p.a'
27763                 cf_depsuf=$cf_suffix
27764                 ;;
27765         (Xshared)
27766                 case $cf_cv_system_name in
27767                 (aix[5-7]*)
27768                         cf_suffix='.so'
27769                         cf_depsuf=$cf_suffix
27770                         ;;
27771                 (cygwin*|msys*|mingw*)
27772                         cf_suffix='.dll'
27773                         cf_depsuf='.dll.a'
27774                         ;;
27775                 (darwin*)
27776                         cf_suffix='.dylib'
27777                         cf_depsuf=$cf_suffix
27778                         ;;
27779                 (hpux*)
27780                         case $target in
27781                         (ia64*)
27782                                 cf_suffix='.so'
27783                                 cf_depsuf=$cf_suffix
27784                                 ;;
27785                         (*)
27786                                 cf_suffix='.sl'
27787                                 cf_depsuf=$cf_suffix
27788                                 ;;
27789                         esac
27790                         ;;
27791                 (*)
27792                         cf_suffix='.so'
27793                         cf_depsuf=$cf_suffix
27794                         ;;
27795                 esac
27796                 ;;
27797         (*)
27798                 cf_suffix='.a'
27799                 cf_depsuf=$cf_suffix
27800                 ;;
27801         esac
27802         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27803         then
27804                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27805                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27806         fi
27807
27808         case $cf_item in
27809         (libtool) cf_subdir='obj_lo'  ;;
27810         (normal)  cf_subdir='objects' ;;
27811         (debug)   cf_subdir='obj_g' ;;
27812         (profile) cf_subdir='obj_p' ;;
27813         (shared)
27814                 case $cf_cv_system_name in
27815                 (cygwin|msys)
27816                         cf_subdir='objects' ;;
27817                 (*)
27818                         cf_subdir='obj_s' ;;
27819                 esac
27820         esac
27821
27822                         # Test for case where we build libtinfo with a different name.
27823                         cf_libname=$cf_dir
27824                         if test $cf_dir = ncurses ; then
27825                                 case $cf_subset in
27826                                 (*base*)
27827                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27828                                         ;;
27829                                 (*termlib*)
27830                                         cf_libname=$TINFO_LIB_SUFFIX
27831                                         ;;
27832                                 (ticlib*)
27833                                         cf_libname=$TICS_LIB_SUFFIX
27834                                         ;;
27835                                 esac
27836                         elif test $cf_dir = c++ ; then
27837
27838 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27839
27840 eval cf_libname=\$${cf_map_lib_basename}_NAME
27841
27842                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27843                         else
27844
27845 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27846
27847 eval cf_libname=\$${cf_map_lib_basename}_NAME
27848
27849                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27850                         fi
27851                         if test -n "${USE_ARG_SUFFIX}" ; then
27852                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27853                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27854                         fi
27855
27856                         # These dependencies really are for development, not
27857                         # builds, but they are useful in porting, too.
27858                         cf_depend="../include/ncurses_cfg.h"
27859                         if test "$srcdir" = "."; then
27860                                 cf_reldir="."
27861                         else
27862                                 cf_reldir="\${srcdir}"
27863                         fi
27864
27865                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27866                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27867                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27868                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27869                         fi
27870
27871                         cf_dir_suffix=
27872                         old_cf_suffix="$cf_suffix"
27873                         if test "$cf_cv_shlib_version_infix" = yes ; then
27874                         if test -n "$USE_LIB_SUFFIX" ; then
27875                                 case $USE_LIB_SUFFIX in
27876                                 (tw*)
27877                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27878                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27879                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27880                                         ;;
27881                                 (t*)
27882                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27883                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27884                                         cf_dir_suffix=t$EXTRA_SUFFIX
27885                                         ;;
27886                                 (w*)
27887                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27888                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27889                                         cf_dir_suffix=w$EXTRA_SUFFIX
27890                                         ;;
27891                                 (*)
27892                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27893                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27894                                         cf_dir_suffix=$EXTRA_SUFFIX
27895                                         ;;
27896                                 esac
27897                         fi
27898                         fi
27899
27900                         $AWK -f $srcdir/mk-1st.awk \
27901                                 name=${cf_libname}${cf_dir_suffix} \
27902                                 traces=$LIB_TRACING \
27903                                 MODEL=$cf_ITEM \
27904                                 CXX_MODEL=$CXX_MODEL \
27905                                 model=$cf_subdir \
27906                                 prefix=$cf_prefix \
27907                                 suffix=$cf_suffix \
27908                                 subset=$cf_subset \
27909                                 driver=$cf_cv_term_driver \
27910                                 SymLink="$LN_S" \
27911                                 TermlibRoot=$TINFO_NAME \
27912                                 TermlibSuffix=$TINFO_SUFFIX \
27913                                 ShlibVer=$cf_cv_shlib_version \
27914                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27915                                 ReLink=${cf_cv_do_relink:-no} \
27916                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27917                                 DoLinks=$cf_cv_do_symlinks \
27918                                 rmSoLocs=$cf_cv_rm_so_locs \
27919                                 ldconfig="$LDCONFIG" \
27920                                 overwrite=$WITH_OVERWRITE \
27921                                 depend="$cf_depend" \
27922                                 host="$host" \
27923                                 libtool_version="$LIBTOOL_VERSION" \
27924                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27925
27926                         cf_suffix="$old_cf_suffix"
27927
27928                         for cf_subdir2 in $cf_subdirs lib
27929                         do
27930                                 test $cf_subdir = $cf_subdir2 && break
27931                         done
27932                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27933                         $AWK -f $srcdir/mk-2nd.awk \
27934                                 name=$cf_dir \
27935                                 traces=$LIB_TRACING \
27936                                 MODEL=$cf_ITEM \
27937                                 model=$cf_subdir \
27938                                 subset=$cf_subset \
27939                                 srcdir=$srcdir \
27940                                 echo=$WITH_ECHO \
27941                                 crenames=$cf_cv_prog_CC_c_o \
27942                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27943                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27944                         cf_subdirs="$cf_subdirs $cf_subdir"
27945                         done
27946                 done
27947         fi
27948
27949         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27950 done
27951
27952 for cf_dir in $SRC_SUBDIRS
27953 do
27954         if test ! -d $srcdir/$cf_dir ; then
27955                 continue
27956         fi
27957
27958         if test -f $cf_dir/Makefile ; then
27959                 case "$cf_dir" in
27960                 (Ada95)
27961                         echo 'libs \' >> Makefile
27962                         echo 'install.libs \' >> Makefile
27963                         echo 'uninstall.libs ::' >> Makefile
27964                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27965                         ;;
27966                 esac
27967         fi
27968
27969         if test -f $srcdir/$cf_dir/modules; then
27970                 echo >> Makefile
27971                 if test -f $srcdir/$cf_dir/headers; then
27972 cat >> Makefile <<CF_EOF
27973 install.includes \\
27974 uninstall.includes \\
27975 CF_EOF
27976                 fi
27977 if test "$cf_dir" != "c++" ; then
27978 echo 'lint \' >> Makefile
27979 fi
27980 cat >> Makefile <<CF_EOF
27981 libs \\
27982 lintlib \\
27983 install.libs \\
27984 uninstall.libs \\
27985 install.$cf_dir \\
27986 uninstall.$cf_dir ::
27987         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27988 CF_EOF
27989         elif test -f $srcdir/$cf_dir/headers; then
27990 cat >> Makefile <<CF_EOF
27991
27992 libs \\
27993 install.libs \\
27994 uninstall.libs \\
27995 install.includes \\
27996 uninstall.includes ::
27997         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27998 CF_EOF
27999 fi
28000 done
28001
28002 if test "x$cf_with_db_install" = xyes; then
28003 cat >> Makefile <<CF_EOF
28004
28005 install.libs uninstall.libs \\
28006 install.data uninstall.data ::
28007 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28008 CF_EOF
28009 else
28010 cat >> Makefile <<CF_EOF
28011
28012 install.libs uninstall.libs ::
28013         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28014 CF_EOF
28015 fi
28016
28017 if test "x$cf_with_manpages" = xyes; then
28018 cat >> Makefile <<CF_EOF
28019
28020 install.man \\
28021 uninstall.man ::
28022         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28023 CF_EOF
28024 fi
28025
28026 cat >> Makefile <<CF_EOF
28027
28028 distclean ::
28029         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28030         rm -f headers.sh headers.sed mk_shared_lib.sh
28031         rm -f edit_man.* man_alias.*
28032         rm -rf \${DIRS_TO_MAKE}
28033 CF_EOF
28034
28035 # Special case: tack's manpage lives in its own directory.
28036 if test "x$cf_with_manpages" = xyes; then
28037 if test "x$cf_with_tack" = "xyes"; then
28038 cat >> Makefile <<CF_EOF
28039
28040 install.man \\
28041 uninstall.man ::
28042         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28043 CF_EOF
28044 fi
28045 fi
28046
28047 rm -f headers.sed headers.sh
28048
28049 echo creating headers.sh
28050 cat >headers.sh <<CF_EOF
28051 #! $SHELL
28052 # This shell script is generated by the 'configure' script.  It is invoked in a
28053 # subdirectory of the build tree.  It generates a sed-script in the parent
28054 # directory that is used to adjust includes for header files that reside in a
28055 # subdirectory of /usr/include, etc.
28056 PRG=""
28057 while test \$# != 3
28058 do
28059 PRG="\$PRG \$1"; shift
28060 done
28061 DST=\$1
28062 REF=\$2
28063 SRC=\$3
28064 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28065 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28066 echo installing \$SRC in \$DST
28067 CF_EOF
28068
28069 if test $WITH_CURSES_H = yes; then
28070         cat >>headers.sh <<CF_EOF
28071 case \$DST in
28072 (/*/include/*)
28073         END=\`basename \$DST\`
28074         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28075         do
28076                 NAME=\`basename \$i\`
28077                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28078         done
28079         ;;
28080 (*)
28081         echo "" >> \$TMPSED
28082         ;;
28083 esac
28084 CF_EOF
28085
28086 else
28087         cat >>headers.sh <<CF_EOF
28088 case \$DST in
28089 (/*/include/*)
28090         END=\`basename \$DST\`
28091         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28092         do
28093                 NAME=\`basename \$i\`
28094                 if test "\$NAME" = "curses.h"
28095                 then
28096                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28097                         NAME=ncurses.h
28098                 fi
28099                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28100         done
28101         ;;
28102 (*)
28103         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28104         ;;
28105 esac
28106 CF_EOF
28107 fi
28108 cat >>headers.sh <<CF_EOF
28109 rm -f \$TMPSRC
28110 sed -f \$TMPSED \$SRC > \$TMPSRC
28111 NAME=\`basename \$SRC\`
28112 CF_EOF
28113 if test $WITH_CURSES_H != yes; then
28114         cat >>headers.sh <<CF_EOF
28115 test "\$NAME" = "curses.h" && NAME=ncurses.h
28116 CF_EOF
28117 fi
28118 cat >>headers.sh <<CF_EOF
28119 # Just in case someone gzip'd manpages, remove the conflicting copy.
28120 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28121
28122 eval \$PRG \$TMPSRC \$DST/\$NAME
28123 rm -f \$TMPSRC \$TMPSED
28124 CF_EOF
28125
28126 chmod 0755 headers.sh
28127
28128 for cf_dir in $SRC_SUBDIRS
28129 do
28130         if test ! -d $srcdir/$cf_dir ; then
28131                 continue
28132         fi
28133
28134         if test -f $srcdir/$cf_dir/headers; then
28135                 $AWK -f $srcdir/mk-hdr.awk \
28136                         subset="$LIB_SUBSETS" \
28137                         compat="$WITH_CURSES_H" \
28138                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28139         fi
28140
28141         if test -f $srcdir/$cf_dir/modules; then
28142                 if test "$cf_dir" != "c++" ; then
28143                         cat >>$cf_dir/Makefile <<"CF_EOF"
28144 depend : ${AUTO_SRC}
28145         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28146
28147 # DO NOT DELETE THIS LINE -- make depend depends on it.
28148 CF_EOF
28149                 fi
28150         fi
28151 done
28152
28153 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28154 if test -z "$USE_OLD_MAKERULES" ; then
28155         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28156 fi
28157 fi
28158  ;;
28159   esac
28160 done
28161 EOF
28162
28163 cat >>$CONFIG_STATUS <<\EOF
28164
28165 { (exit 0); exit 0; }
28166 EOF
28167 chmod +x $CONFIG_STATUS
28168 ac_clean_files=$ac_clean_files_save
28169
28170 # configure is writing to config.log, and then calls config.status.
28171 # config.status does its own redirection, appending to config.log.
28172 # Unfortunately, on DOS this fails, as config.log is still kept open
28173 # by configure, so config.status won't be able to write to it; its
28174 # output is simply discarded.  So we exec the FD to /dev/null,
28175 # effectively closing config.log, so it can be properly (re)opened and
28176 # appended to by config.status.  When coming back to configure, we
28177 # need to make the FD available again.
28178 if test "$no_create" != yes; then
28179   ac_cs_success=:
28180   exec 5>/dev/null
28181   $SHELL $CONFIG_STATUS || ac_cs_success=false
28182   exec 5>>config.log
28183   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28184   # would make configure fail if this is the last instruction.
28185   $ac_cs_success || { (exit 1); exit 1; }
28186 fi
28187 ${MAKE:-make} preinstall