]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
cbd1fa453214e4f0eb3f75249d3654a1d7deecb6
[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; (void)x
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; (void)x
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; (void)x
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); (void)cs
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                 (void)z;
13009
13010   ;
13011   return 0;
13012 }
13013 _ACEOF
13014 rm -f conftest.$ac_objext
13015 if { (eval echo "$as_me:13015: \"$ac_compile\"") >&5
13016   (eval $ac_compile) 2>&5
13017   ac_status=$?
13018   echo "$as_me:13018: \$? = $ac_status" >&5
13019   (exit $ac_status); } &&
13020          { ac_try='test -s conftest.$ac_objext'
13021   { (eval echo "$as_me:13021: \"$ac_try\"") >&5
13022   (eval $ac_try) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit $ac_status); }; }; then
13026   cf_cv_struct_dirent64=yes
13027 else
13028   echo "$as_me: failed program was:" >&5
13029 cat conftest.$ac_ext >&5
13030 cf_cv_struct_dirent64=no
13031 fi
13032 rm -f conftest.$ac_objext conftest.$ac_ext
13033
13034 fi
13035 echo "$as_me:13035: result: $cf_cv_struct_dirent64" >&5
13036 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13037         test "$cf_cv_struct_dirent64" = yes &&
13038 cat >>confdefs.h <<\EOF
13039 #define HAVE_STRUCT_DIRENT64 1
13040 EOF
13041
13042         fi
13043
13044 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13045 echo "$as_me:13045: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13046 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13047
13048 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13049 if test "${enable_tparm_varargs+set}" = set; then
13050   enableval="$enable_tparm_varargs"
13051   with_tparm_varargs=$enableval
13052 else
13053   with_tparm_varargs=yes
13054 fi;
13055 echo "$as_me:13055: result: $with_tparm_varargs" >&5
13056 echo "${ECHO_T}$with_tparm_varargs" >&6
13057 NCURSES_TPARM_VARARGS=0
13058 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13059
13060 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13061 if test "$with_ticlib" != no ; then
13062 echo "$as_me:13062: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13063 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13064
13065 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13066 if test "${enable_tic_depends+set}" = set; then
13067   enableval="$enable_tic_depends"
13068   with_tic_depends=$enableval
13069 else
13070   with_tic_depends=yes
13071 fi;
13072 echo "$as_me:13072: result: $with_tic_depends" >&5
13073 echo "${ECHO_T}$with_tic_depends" >&6
13074 else
13075         with_tic_depends=no
13076 fi
13077
13078 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13079 echo "$as_me:13079: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13080 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13081
13082 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13083 if test "${enable_wattr_macros+set}" = set; then
13084   enableval="$enable_wattr_macros"
13085   with_wattr_macros=$enableval
13086 else
13087   with_wattr_macros=yes
13088 fi;
13089 if [ "x$with_wattr_macros" != xyes ]; then
13090         NCURSES_WATTR_MACROS=0
13091         echo "$as_me:13091: result: yes" >&5
13092 echo "${ECHO_T}yes" >&6
13093 else
13094         NCURSES_WATTR_MACROS=1
13095         echo "$as_me:13095: result: no" >&5
13096 echo "${ECHO_T}no" >&6
13097 fi
13098
13099 echo "$as_me:13099: checking for X11 rgb file" >&5
13100 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13101
13102 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13103 if test "${with_x11_rgb+set}" = set; then
13104   withval="$with_x11_rgb"
13105   RGB_PATH=$withval
13106 else
13107   RGB_PATH=auto
13108 fi;
13109
13110 if test "x$RGB_PATH" = xauto
13111 then
13112         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13113         for cf_path in \
13114                 /opt/local/share/X11/rgb.txt \
13115                 /opt/X11/share/X11/rgb.txt \
13116                 /usr/share/X11/rgb.txt \
13117                 /usr/X11/share/X11/rgb.txt \
13118                 /usr/X11/lib/X11/rgb.txt \
13119                 /usr/lib/X11/rgb.txt \
13120                 /etc/X11/rgb.txt \
13121                 /usr/pkg/lib/X11/rgb.txt \
13122                 /usr/X11R7/lib/X11/rgb.txt \
13123                 /usr/X11R6/lib/X11/rgb.txt \
13124                 /usr/X11R5/lib/X11/rgb.txt \
13125                 /usr/X11R4/lib/X11/rgb.txt \
13126                 /usr/local/lib/X11/rgb.txt \
13127                 /usr/local/share/X11/rgb.txt \
13128                 /usr/lib64/X11/rgb.txt
13129         do
13130                 if test -f "$cf_path" ; then
13131                         RGB_PATH="$cf_path"
13132                         break
13133                 fi
13134         done
13135 else
13136         cf_path=$RGB_PATH
13137
13138 if test "x$prefix" != xNONE; then
13139         cf_path_syntax="$prefix"
13140 else
13141         cf_path_syntax="$ac_default_prefix"
13142 fi
13143
13144 case ".$cf_path" in
13145 (.\$\(*\)*|.\'*\'*)
13146         ;;
13147 (..|./*|.\\*)
13148         ;;
13149 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13150         ;;
13151 (.\${*prefix}*|.\${*dir}*)
13152         eval cf_path="$cf_path"
13153         case ".$cf_path" in
13154         (.NONE/*)
13155                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13156                 ;;
13157         esac
13158         ;;
13159 (.no|.NONE/*)
13160         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13161         ;;
13162 (*)
13163         { { echo "$as_me:13163: error: expected a pathname, not \"$cf_path\"" >&5
13164 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13165    { (exit 1); exit 1; }; }
13166         ;;
13167 esac
13168
13169 fi
13170
13171 echo "$as_me:13171: result: $RGB_PATH" >&5
13172 echo "${ECHO_T}$RGB_PATH" >&6
13173
13174 cat >>confdefs.h <<EOF
13175 #define RGB_PATH "$cf_path"
13176 EOF
13177
13178 no_x11_rgb=
13179 if test "$RGB_PATH" = no
13180 then
13181         no_x11_rgb="#"
13182 fi
13183
13184 ###   use option --with-bool to override bool's type
13185 echo "$as_me:13185: checking for type of bool" >&5
13186 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13187
13188 # Check whether --with-bool or --without-bool was given.
13189 if test "${with_bool+set}" = set; then
13190   withval="$with_bool"
13191   NCURSES_BOOL="$withval"
13192 else
13193   NCURSES_BOOL=auto
13194 fi;
13195 echo "$as_me:13195: result: $NCURSES_BOOL" >&5
13196 echo "${ECHO_T}$NCURSES_BOOL" >&6
13197
13198 echo "$as_me:13198: checking for alternate terminal capabilities file" >&5
13199 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13200
13201 # Check whether --with-caps or --without-caps was given.
13202 if test "${with_caps+set}" = set; then
13203   withval="$with_caps"
13204   TERMINFO_CAPS=Caps.$withval
13205 else
13206   TERMINFO_CAPS=Caps
13207 fi;
13208 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13209 echo "$as_me:13209: result: $TERMINFO_CAPS" >&5
13210 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13211
13212 ###   use option --with-chtype to override chtype's type
13213 echo "$as_me:13213: checking for type of chtype" >&5
13214 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13215
13216 # Check whether --with-chtype or --without-chtype was given.
13217 if test "${with_chtype+set}" = set; then
13218   withval="$with_chtype"
13219   NCURSES_CHTYPE="$withval"
13220 else
13221   NCURSES_CHTYPE=$cf_dft_chtype
13222 fi;
13223 echo "$as_me:13223: result: $NCURSES_CHTYPE" >&5
13224 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13225
13226 ###   use option --with-ospeed to override ospeed's type
13227 echo "$as_me:13227: checking for type of ospeed" >&5
13228 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13229
13230 # Check whether --with-ospeed or --without-ospeed was given.
13231 if test "${with_ospeed+set}" = set; then
13232   withval="$with_ospeed"
13233   NCURSES_OSPEED="$withval"
13234 else
13235   NCURSES_OSPEED=short
13236 fi;
13237 echo "$as_me:13237: result: $NCURSES_OSPEED" >&5
13238 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13239
13240 ###   use option --with-mmask-t to override mmask_t's type
13241 echo "$as_me:13241: checking for type of mmask_t" >&5
13242 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13243
13244 # Check whether --with-mmask-t or --without-mmask-t was given.
13245 if test "${with_mmask_t+set}" = set; then
13246   withval="$with_mmask_t"
13247   NCURSES_MMASK_T="$withval"
13248 else
13249   NCURSES_MMASK_T=$cf_dft_mmask_t
13250 fi;
13251 echo "$as_me:13251: result: $NCURSES_MMASK_T" >&5
13252 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13253
13254 ###   use option --with-ccharw-max to override CCHARW_MAX size
13255 echo "$as_me:13255: checking for size CCHARW_MAX" >&5
13256 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13257
13258 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13259 if test "${with_ccharw_max+set}" = set; then
13260   withval="$with_ccharw_max"
13261   NCURSES_CCHARW_MAX="$withval"
13262 else
13263   NCURSES_CCHARW_MAX=5
13264 fi;
13265 echo "$as_me:13265: result: $NCURSES_CCHARW_MAX" >&5
13266 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13267
13268 echo "$as_me:13268: checking for ANSI C header files" >&5
13269 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13270 if test "${ac_cv_header_stdc+set}" = set; then
13271   echo $ECHO_N "(cached) $ECHO_C" >&6
13272 else
13273   cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276 #include <stdlib.h>
13277 #include <stdarg.h>
13278 #include <string.h>
13279 #include <float.h>
13280
13281 _ACEOF
13282 if { (eval echo "$as_me:13282: \"$ac_cpp conftest.$ac_ext\"") >&5
13283   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13284   ac_status=$?
13285   egrep -v '^ *\+' conftest.er1 >conftest.err
13286   rm -f conftest.er1
13287   cat conftest.err >&5
13288   echo "$as_me:13288: \$? = $ac_status" >&5
13289   (exit $ac_status); } >/dev/null; then
13290   if test -s conftest.err; then
13291     ac_cpp_err=$ac_c_preproc_warn_flag
13292   else
13293     ac_cpp_err=
13294   fi
13295 else
13296   ac_cpp_err=yes
13297 fi
13298 if test -z "$ac_cpp_err"; then
13299   ac_cv_header_stdc=yes
13300 else
13301   echo "$as_me: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   ac_cv_header_stdc=no
13304 fi
13305 rm -f conftest.err conftest.$ac_ext
13306
13307 if test $ac_cv_header_stdc = yes; then
13308   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13309   cat >conftest.$ac_ext <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312 #include <string.h>
13313
13314 _ACEOF
13315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13316   egrep "memchr" >/dev/null 2>&1; then
13317   :
13318 else
13319   ac_cv_header_stdc=no
13320 fi
13321 rm -rf conftest*
13322
13323 fi
13324
13325 if test $ac_cv_header_stdc = yes; then
13326   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13327   cat >conftest.$ac_ext <<_ACEOF
13328 #line 13328 "configure"
13329 #include "confdefs.h"
13330 #include <stdlib.h>
13331
13332 _ACEOF
13333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13334   egrep "free" >/dev/null 2>&1; then
13335   :
13336 else
13337   ac_cv_header_stdc=no
13338 fi
13339 rm -rf conftest*
13340
13341 fi
13342
13343 if test $ac_cv_header_stdc = yes; then
13344   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13345   if test "$cross_compiling" = yes; then
13346   :
13347 else
13348   cat >conftest.$ac_ext <<_ACEOF
13349 #line 13349 "configure"
13350 #include "confdefs.h"
13351 #include <ctype.h>
13352 #if ((' ' & 0x0FF) == 0x020)
13353 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13354 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13355 #else
13356 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13357                      || ('j' <= (c) && (c) <= 'r') \
13358                      || ('s' <= (c) && (c) <= 'z'))
13359 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13360 #endif
13361
13362 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13363 int
13364 main (void)
13365 {
13366   int i;
13367   for (i = 0; i < 256; i++)
13368     if (XOR (islower (i), ISLOWER (i))
13369         || toupper (i) != TOUPPER (i))
13370       $ac_main_return(2);
13371   $ac_main_return (0);
13372 }
13373 _ACEOF
13374 rm -f conftest$ac_exeext
13375 if { (eval echo "$as_me:13375: \"$ac_link\"") >&5
13376   (eval $ac_link) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13380   { (eval echo "$as_me:13380: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit $ac_status); }; }; then
13385   :
13386 else
13387   echo "$as_me: program exited with status $ac_status" >&5
13388 echo "$as_me: failed program was:" >&5
13389 cat conftest.$ac_ext >&5
13390 ac_cv_header_stdc=no
13391 fi
13392 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13393 fi
13394 fi
13395 fi
13396 echo "$as_me:13396: result: $ac_cv_header_stdc" >&5
13397 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13398 if test $ac_cv_header_stdc = yes; then
13399
13400 cat >>confdefs.h <<\EOF
13401 #define STDC_HEADERS 1
13402 EOF
13403
13404 fi
13405
13406 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13407
13408 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13409                   inttypes.h stdint.h unistd.h
13410 do
13411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13412 echo "$as_me:13412: checking for $ac_header" >&5
13413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13415   echo $ECHO_N "(cached) $ECHO_C" >&6
13416 else
13417   cat >conftest.$ac_ext <<_ACEOF
13418 #line 13418 "configure"
13419 #include "confdefs.h"
13420 $ac_includes_default
13421 #include <$ac_header>
13422 _ACEOF
13423 rm -f conftest.$ac_objext
13424 if { (eval echo "$as_me:13424: \"$ac_compile\"") >&5
13425   (eval $ac_compile) 2>&5
13426   ac_status=$?
13427   echo "$as_me:13427: \$? = $ac_status" >&5
13428   (exit $ac_status); } &&
13429          { ac_try='test -s conftest.$ac_objext'
13430   { (eval echo "$as_me:13430: \"$ac_try\"") >&5
13431   (eval $ac_try) 2>&5
13432   ac_status=$?
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit $ac_status); }; }; then
13435   eval "$as_ac_Header=yes"
13436 else
13437   echo "$as_me: failed program was:" >&5
13438 cat conftest.$ac_ext >&5
13439 eval "$as_ac_Header=no"
13440 fi
13441 rm -f conftest.$ac_objext conftest.$ac_ext
13442 fi
13443 echo "$as_me:13443: result: `eval echo '${'$as_ac_Header'}'`" >&5
13444 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13446   cat >>confdefs.h <<EOF
13447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13448 EOF
13449
13450 fi
13451 done
13452
13453 echo "$as_me:13453: checking for signed char" >&5
13454 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13455 if test "${ac_cv_type_signed_char+set}" = set; then
13456   echo $ECHO_N "(cached) $ECHO_C" >&6
13457 else
13458   cat >conftest.$ac_ext <<_ACEOF
13459 #line 13459 "configure"
13460 #include "confdefs.h"
13461 $ac_includes_default
13462 int
13463 main (void)
13464 {
13465 if ((signed char *) 0)
13466   return 0;
13467 if (sizeof (signed char))
13468   return 0;
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473 rm -f conftest.$ac_objext
13474 if { (eval echo "$as_me:13474: \"$ac_compile\"") >&5
13475   (eval $ac_compile) 2>&5
13476   ac_status=$?
13477   echo "$as_me:13477: \$? = $ac_status" >&5
13478   (exit $ac_status); } &&
13479          { ac_try='test -s conftest.$ac_objext'
13480   { (eval echo "$as_me:13480: \"$ac_try\"") >&5
13481   (eval $ac_try) 2>&5
13482   ac_status=$?
13483   echo "$as_me:13483: \$? = $ac_status" >&5
13484   (exit $ac_status); }; }; then
13485   ac_cv_type_signed_char=yes
13486 else
13487   echo "$as_me: failed program was:" >&5
13488 cat conftest.$ac_ext >&5
13489 ac_cv_type_signed_char=no
13490 fi
13491 rm -f conftest.$ac_objext conftest.$ac_ext
13492 fi
13493 echo "$as_me:13493: result: $ac_cv_type_signed_char" >&5
13494 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13495
13496 echo "$as_me:13496: checking size of signed char" >&5
13497 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13498 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13499   echo $ECHO_N "(cached) $ECHO_C" >&6
13500 else
13501   if test "$ac_cv_type_signed_char" = yes; then
13502   if test "$cross_compiling" = yes; then
13503   # Depending upon the size, compute the lo and hi bounds.
13504 cat >conftest.$ac_ext <<_ACEOF
13505 #line 13505 "configure"
13506 #include "confdefs.h"
13507 $ac_includes_default
13508 int
13509 main (void)
13510 {
13511 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13512   ;
13513   return 0;
13514 }
13515 _ACEOF
13516 rm -f conftest.$ac_objext
13517 if { (eval echo "$as_me:13517: \"$ac_compile\"") >&5
13518   (eval $ac_compile) 2>&5
13519   ac_status=$?
13520   echo "$as_me:13520: \$? = $ac_status" >&5
13521   (exit $ac_status); } &&
13522          { ac_try='test -s conftest.$ac_objext'
13523   { (eval echo "$as_me:13523: \"$ac_try\"") >&5
13524   (eval $ac_try) 2>&5
13525   ac_status=$?
13526   echo "$as_me:13526: \$? = $ac_status" >&5
13527   (exit $ac_status); }; }; then
13528   ac_lo=0 ac_mid=0
13529   while :; do
13530     cat >conftest.$ac_ext <<_ACEOF
13531 #line 13531 "configure"
13532 #include "confdefs.h"
13533 $ac_includes_default
13534 int
13535 main (void)
13536 {
13537 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13538   ;
13539   return 0;
13540 }
13541 _ACEOF
13542 rm -f conftest.$ac_objext
13543 if { (eval echo "$as_me:13543: \"$ac_compile\"") >&5
13544   (eval $ac_compile) 2>&5
13545   ac_status=$?
13546   echo "$as_me:13546: \$? = $ac_status" >&5
13547   (exit $ac_status); } &&
13548          { ac_try='test -s conftest.$ac_objext'
13549   { (eval echo "$as_me:13549: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:13552: \$? = $ac_status" >&5
13553   (exit $ac_status); }; }; then
13554   ac_hi=$ac_mid; break
13555 else
13556   echo "$as_me: failed program was:" >&5
13557 cat conftest.$ac_ext >&5
13558 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13559 fi
13560 rm -f conftest.$ac_objext conftest.$ac_ext
13561   done
13562 else
13563   echo "$as_me: failed program was:" >&5
13564 cat conftest.$ac_ext >&5
13565 ac_hi=-1 ac_mid=-1
13566   while :; do
13567     cat >conftest.$ac_ext <<_ACEOF
13568 #line 13568 "configure"
13569 #include "confdefs.h"
13570 $ac_includes_default
13571 int
13572 main (void)
13573 {
13574 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13575   ;
13576   return 0;
13577 }
13578 _ACEOF
13579 rm -f conftest.$ac_objext
13580 if { (eval echo "$as_me:13580: \"$ac_compile\"") >&5
13581   (eval $ac_compile) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); } &&
13585          { ac_try='test -s conftest.$ac_objext'
13586   { (eval echo "$as_me:13586: \"$ac_try\"") >&5
13587   (eval $ac_try) 2>&5
13588   ac_status=$?
13589   echo "$as_me:13589: \$? = $ac_status" >&5
13590   (exit $ac_status); }; }; then
13591   ac_lo=$ac_mid; break
13592 else
13593   echo "$as_me: failed program was:" >&5
13594 cat conftest.$ac_ext >&5
13595 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13596 fi
13597 rm -f conftest.$ac_objext conftest.$ac_ext
13598   done
13599 fi
13600 rm -f conftest.$ac_objext conftest.$ac_ext
13601 # Binary search between lo and hi bounds.
13602 while test "x$ac_lo" != "x$ac_hi"; do
13603   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13604   cat >conftest.$ac_ext <<_ACEOF
13605 #line 13605 "configure"
13606 #include "confdefs.h"
13607 $ac_includes_default
13608 int
13609 main (void)
13610 {
13611 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13612   ;
13613   return 0;
13614 }
13615 _ACEOF
13616 rm -f conftest.$ac_objext
13617 if { (eval echo "$as_me:13617: \"$ac_compile\"") >&5
13618   (eval $ac_compile) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); } &&
13622          { ac_try='test -s conftest.$ac_objext'
13623   { (eval echo "$as_me:13623: \"$ac_try\"") >&5
13624   (eval $ac_try) 2>&5
13625   ac_status=$?
13626   echo "$as_me:13626: \$? = $ac_status" >&5
13627   (exit $ac_status); }; }; then
13628   ac_hi=$ac_mid
13629 else
13630   echo "$as_me: failed program was:" >&5
13631 cat conftest.$ac_ext >&5
13632 ac_lo=`expr $ac_mid + 1`
13633 fi
13634 rm -f conftest.$ac_objext conftest.$ac_ext
13635 done
13636 ac_cv_sizeof_signed_char=$ac_lo
13637 else
13638   if test "$cross_compiling" = yes; then
13639   { { echo "$as_me:13639: error: cannot run test program while cross compiling" >&5
13640 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13641    { (exit 1); exit 1; }; }
13642 else
13643   cat >conftest.$ac_ext <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646 $ac_includes_default
13647 int
13648 main (void)
13649 {
13650 FILE *f = fopen ("conftest.val", "w");
13651 if (!f)
13652   $ac_main_return (1);
13653 fprintf (f, "%d", (sizeof (signed char)));
13654 fclose (f);
13655   ;
13656   return 0;
13657 }
13658 _ACEOF
13659 rm -f conftest$ac_exeext
13660 if { (eval echo "$as_me:13660: \"$ac_link\"") >&5
13661   (eval $ac_link) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13665   { (eval echo "$as_me:13665: \"$ac_try\"") >&5
13666   (eval $ac_try) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); }; }; then
13670   ac_cv_sizeof_signed_char=`cat conftest.val`
13671 else
13672   echo "$as_me: program exited with status $ac_status" >&5
13673 echo "$as_me: failed program was:" >&5
13674 cat conftest.$ac_ext >&5
13675 fi
13676 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13677 fi
13678 fi
13679 rm -f conftest.val
13680 else
13681   ac_cv_sizeof_signed_char=0
13682 fi
13683 fi
13684 echo "$as_me:13684: result: $ac_cv_sizeof_signed_char" >&5
13685 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13686 cat >>confdefs.h <<EOF
13687 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13688 EOF
13689
13690 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13691         NCURSES_SBOOL="signed char"
13692 else
13693         NCURSES_SBOOL="char"
13694 fi
13695 echo "$as_me:13695: checking if you want to use signed Boolean array in term.h" >&5
13696 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13697
13698 # Check whether --enable-signed-char or --disable-signed-char was given.
13699 if test "${enable_signed_char+set}" = set; then
13700   enableval="$enable_signed_char"
13701   with_signed_char=$enableval
13702 else
13703   with_signed_char=no
13704 fi;
13705 echo "$as_me:13705: result: $with_signed_char" >&5
13706 echo "${ECHO_T}$with_signed_char" >&6
13707 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13708
13709 ###   use option --with-tparm-arg to override tparm's argument type
13710 echo "$as_me:13710: checking for type of tparm args" >&5
13711 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13712
13713 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13714 if test "${with_tparm_arg+set}" = set; then
13715   withval="$with_tparm_arg"
13716   NCURSES_TPARM_ARG="$withval"
13717 else
13718   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13719 fi;
13720 echo "$as_me:13720: result: $NCURSES_TPARM_ARG" >&5
13721 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13722
13723 ### Enable compiling-in rcs id's
13724 echo "$as_me:13724: checking if RCS identifiers should be compiled-in" >&5
13725 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13726
13727 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13728 if test "${with_rcs_ids+set}" = set; then
13729   withval="$with_rcs_ids"
13730   with_rcs_ids=$withval
13731 else
13732   with_rcs_ids=no
13733 fi;
13734 echo "$as_me:13734: result: $with_rcs_ids" >&5
13735 echo "${ECHO_T}$with_rcs_ids" >&6
13736 test "x$with_rcs_ids" = xyes &&
13737 cat >>confdefs.h <<\EOF
13738 #define USE_RCS_IDS 1
13739 EOF
13740
13741 ###############################################################################
13742
13743 echo "$as_me:13743: checking format of man-pages" >&5
13744 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13745
13746 # Check whether --with-manpage-format or --without-manpage-format was given.
13747 if test "${with_manpage_format+set}" = set; then
13748   withval="$with_manpage_format"
13749   MANPAGE_FORMAT=$withval
13750 else
13751   MANPAGE_FORMAT=unknown
13752 fi;
13753
13754 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13755 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13756
13757 cf_unknown=
13758
13759 case $MANPAGE_FORMAT in
13760 (unknown)
13761         if test -z "$MANPATH" ; then
13762                 MANPATH="/usr/man:/usr/share/man"
13763         fi
13764
13765         # look for the 'date' man-page (it's most likely to be installed!)
13766         MANPAGE_FORMAT=
13767         cf_preform=no
13768         cf_catonly=yes
13769         cf_example=date
13770
13771         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13772         for cf_dir in $MANPATH; do
13773                 test -z "$cf_dir" && cf_dir=/usr/man
13774                 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
13775                 do
13776                         cf_test=`echo $cf_name | sed -e 's/*//'`
13777                         if test "x$cf_test" = "x$cf_name" ; then
13778
13779                                 case "$cf_name" in
13780                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13781                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13782                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13783                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13784                                 esac
13785
13786                                 case "$cf_name" in
13787                                 ($cf_dir/man*)
13788                                         cf_catonly=no
13789                                         ;;
13790                                 ($cf_dir/cat*)
13791                                         cf_preform=yes
13792                                         ;;
13793                                 esac
13794                                 break
13795                         fi
13796
13797                         # if we found a match in either man* or cat*, stop looking
13798                         if test -n "$MANPAGE_FORMAT" ; then
13799                                 cf_found=no
13800                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13801                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13802                                 case "$cf_name" in
13803                                 ($cf_dir/cat*)
13804                                         cf_found=yes
13805                                         ;;
13806                                 esac
13807                                 test $cf_found=yes && break
13808                         fi
13809                 done
13810                 # only check the first directory in $MANPATH where we find manpages
13811                 if test -n "$MANPAGE_FORMAT" ; then
13812                         break
13813                 fi
13814         done
13815         # if we did not find the example, just assume it is normal
13816         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13817         IFS="$ac_save_ifs"
13818         ;;
13819 (*)
13820         for cf_option in $MANPAGE_FORMAT; do
13821         case $cf_option in
13822         (gzip|compress|BSDI|normal|formatted|catonly)
13823                 ;;
13824         (*)
13825                 cf_unknown="$cf_unknown $cf_option"
13826                 ;;
13827         esac
13828         done
13829         ;;
13830 esac
13831
13832 echo "$as_me:13832: result: $MANPAGE_FORMAT" >&5
13833 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13834 if test -n "$cf_unknown" ; then
13835         { echo "$as_me:13835: WARNING: Unexpected manpage-format $cf_unknown" >&5
13836 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13837 fi
13838
13839 echo "$as_me:13839: checking for manpage renaming" >&5
13840 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13841
13842 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13843 if test "${with_manpage_renames+set}" = set; then
13844   withval="$with_manpage_renames"
13845   MANPAGE_RENAMES=$withval
13846 else
13847   MANPAGE_RENAMES=yes
13848 fi;
13849
13850 case ".$MANPAGE_RENAMES" in
13851 (.no)
13852         ;;
13853 (.|.yes)
13854         # Debian 'man' program?
13855         if test -f /etc/debian_version ; then
13856                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13857         else
13858                 MANPAGE_RENAMES=no
13859         fi
13860         ;;
13861 esac
13862
13863 if test "$MANPAGE_RENAMES" != no ; then
13864         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13865                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13866         elif test ! -f $MANPAGE_RENAMES ; then
13867                 { { echo "$as_me:13867: error: not a filename: $MANPAGE_RENAMES" >&5
13868 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13869    { (exit 1); exit 1; }; }
13870         fi
13871
13872         test ! -d man && mkdir man
13873
13874         # Construct a sed-script to perform renaming within man-pages
13875         if test -n "$MANPAGE_RENAMES" ; then
13876                 test ! -d man && mkdir man
13877                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13878         fi
13879 fi
13880
13881 echo "$as_me:13881: result: $MANPAGE_RENAMES" >&5
13882 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13883
13884 echo "$as_me:13884: checking if manpage aliases will be installed" >&5
13885 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13886
13887 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13888 if test "${with_manpage_aliases+set}" = set; then
13889   withval="$with_manpage_aliases"
13890   MANPAGE_ALIASES=$withval
13891 else
13892   MANPAGE_ALIASES=yes
13893 fi;
13894
13895 echo "$as_me:13895: result: $MANPAGE_ALIASES" >&5
13896 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13897
13898 case "x$LN_S" in
13899 (xln*)
13900         cf_use_symlinks=yes
13901         ;;
13902 (*)
13903         cf_use_symlinks=no
13904         ;;
13905 esac
13906
13907 MANPAGE_SYMLINKS=no
13908 if test "$MANPAGE_ALIASES" = yes ; then
13909 echo "$as_me:13909: checking if manpage symlinks should be used" >&5
13910 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13911
13912 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13913 if test "${with_manpage_symlinks+set}" = set; then
13914   withval="$with_manpage_symlinks"
13915   MANPAGE_SYMLINKS=$withval
13916 else
13917   MANPAGE_SYMLINKS=$cf_use_symlinks
13918 fi;
13919
13920 if test "$$cf_use_symlinks" = no; then
13921 if test "$MANPAGE_SYMLINKS" = yes ; then
13922         { echo "$as_me:13922: WARNING: cannot make symlinks" >&5
13923 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13924         MANPAGE_SYMLINKS=no
13925 fi
13926 fi
13927
13928 echo "$as_me:13928: result: $MANPAGE_SYMLINKS" >&5
13929 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13930 fi
13931
13932 echo "$as_me:13932: checking for manpage tbl" >&5
13933 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13934
13935 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13936 if test "${with_manpage_tbl+set}" = set; then
13937   withval="$with_manpage_tbl"
13938   MANPAGE_TBL=$withval
13939 else
13940   MANPAGE_TBL=no
13941 fi;
13942
13943 echo "$as_me:13943: result: $MANPAGE_TBL" >&5
13944 echo "${ECHO_T}$MANPAGE_TBL" >&6
13945
13946 if test "$prefix" = "NONE" ; then
13947         cf_prefix="$ac_default_prefix"
13948 else
13949         cf_prefix="$prefix"
13950 fi
13951
13952 case "$MANPAGE_FORMAT" in
13953 (*catonly*)
13954         cf_format=yes
13955         cf_inboth=no
13956         ;;
13957 (*formatted*)
13958         cf_format=yes
13959         cf_inboth=yes
13960         ;;
13961 (*)
13962         cf_format=no
13963         cf_inboth=no
13964         ;;
13965 esac
13966
13967 test ! -d man && mkdir man
13968
13969 cf_so_strip=
13970 cf_compress=
13971 case "$MANPAGE_FORMAT" in
13972 (*compress*)
13973         cf_so_strip="Z"
13974         cf_compress=compress
13975         ;;
13976 (*gzip*)
13977         cf_so_strip="gz"
13978         cf_compress=gzip
13979         ;;
13980 esac
13981
13982 cf_edit_man=./edit_man.sh
13983 cf_man_alias=`pwd`/man_alias.sed
13984
13985 cat >$cf_edit_man <<CF_EOF
13986 #! $SHELL
13987 # this script is generated by the configure-script CF_MAN_PAGES macro.
13988
13989 prefix="$cf_prefix"
13990 datarootdir="$datarootdir"
13991 datadir="$datadir"
13992
13993 NCURSES_MAJOR="$NCURSES_MAJOR"
13994 NCURSES_MINOR="$NCURSES_MINOR"
13995 NCURSES_PATCH="$NCURSES_PATCH"
13996
13997 NCURSES_OSPEED="$NCURSES_OSPEED"
13998 TERMINFO="$TERMINFO"
13999
14000 INSTALL="$INSTALL"
14001 INSTALL_DATA="$INSTALL_DATA"
14002
14003 transform="$program_transform_name"
14004
14005 TMP=\${TMPDIR:=/tmp}/man\$\$
14006 trap "rm -f \$TMP" 0 1 2 3 15
14007
14008 form=\$1
14009 shift || exit 1
14010
14011 verb=\$1
14012 shift || exit 1
14013
14014 mandir=\$1
14015 shift || exit 1
14016
14017 srcdir=\$1
14018 top_srcdir=\$srcdir/..
14019 shift || exit 1
14020
14021 if test "\$form" = normal ; then
14022         if test "$cf_format" = yes ; then
14023         if test "$cf_inboth" = no ; then
14024                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14025                 exit $?
14026         fi
14027         fi
14028         cf_subdir=\$mandir/man
14029         cf_tables=$MANPAGE_TBL
14030 else
14031         cf_subdir=\$mandir/cat
14032         cf_tables=yes
14033 fi
14034
14035 # process the list of source-files
14036 for i in \$* ; do
14037 case \$i in
14038 (*.orig|*.rej) ;;
14039 (*.[0-9]*)
14040         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14041         if test \$verb = installing ; then
14042         if test ! -d \$cf_subdir\${section} ; then
14043                 mkdir -p \$cf_subdir\$section
14044         fi
14045         fi
14046
14047         # replace variables in man page
14048         if test ! -f $cf_man_alias ; then
14049 cat >>$cf_man_alias <<-CF_EOF2
14050                 s,@DATADIR@,\$datadir,g
14051                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14052                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14053                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14054                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14055                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14056                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14057 CF_EOF
14058
14059         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14060         do
14061                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14062                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14063 cat >>$cf_edit_man <<-CF_EOF
14064                 s,@$cf_NAME@,$cf_name,g
14065 CF_EOF
14066         done
14067
14068 cat >>$cf_edit_man <<CF_EOF
14069 CF_EOF2
14070                 echo "...made $cf_man_alias"
14071         fi
14072
14073         aliases=
14074         cf_source=\`basename \$i\`
14075         inalias=\$cf_source
14076         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14077         if test ! -f \$inalias ; then
14078                 echo .. skipped \$cf_source
14079                 continue
14080         fi
14081 CF_EOF
14082
14083 if test "$MANPAGE_ALIASES" != no ; then
14084 cat >>$cf_edit_man <<CF_EOF
14085         nCurses=ignore.3x
14086         test $with_curses_h = yes && nCurses=ncurses.3x
14087         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14088 CF_EOF
14089 fi
14090
14091 if test "$MANPAGE_RENAMES" = no ; then
14092 cat >>$cf_edit_man <<CF_EOF
14093         # perform program transformations for section 1 man pages
14094         if test \$section = 1 ; then
14095                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14096         else
14097                 cf_target=\$cf_subdir\${section}/\$cf_source
14098         fi
14099 CF_EOF
14100 else
14101 cat >>$cf_edit_man <<CF_EOF
14102         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14103         if test -z "\$cf_target" ; then
14104                 echo '? missing rename for '\$cf_source
14105                 cf_target="\$cf_source"
14106         fi
14107         cf_target="\$cf_subdir\${section}/\${cf_target}"
14108
14109 CF_EOF
14110 fi
14111
14112 cat >>$cf_edit_man <<CF_EOF
14113         sed     -f $cf_man_alias \\
14114 CF_EOF
14115
14116 if test -f $MANPAGE_RENAMES ; then
14117 cat >>$cf_edit_man <<CF_EOF
14118                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14119 CF_EOF
14120 else
14121 cat >>$cf_edit_man <<CF_EOF
14122                 < \$i >\$TMP
14123 CF_EOF
14124 fi
14125
14126 cat >>$cf_edit_man <<CF_EOF
14127 if test \$cf_tables = yes ; then
14128         tbl \$TMP >\$TMP.out
14129         mv \$TMP.out \$TMP
14130 fi
14131 CF_EOF
14132
14133 if test $with_overwrite != yes ; then
14134 cat >>$cf_edit_man <<CF_EOF
14135         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14136         mv \$TMP.out \$TMP
14137 CF_EOF
14138 fi
14139
14140 if test $with_curses_h != yes ; then
14141 cat >>$cf_edit_man <<CF_EOF
14142         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14143         mv \$TMP.out \$TMP
14144 CF_EOF
14145 fi
14146
14147 cat >>$cf_edit_man <<CF_EOF
14148         if test \$form = format ; then
14149                 nroff -man \$TMP >\$TMP.out
14150                 mv \$TMP.out \$TMP
14151         fi
14152 CF_EOF
14153
14154 if test -n "$cf_compress" ; then
14155 cat >>$cf_edit_man <<CF_EOF
14156         if test \$verb = installing ; then
14157         if ( $cf_compress -f \$TMP )
14158         then
14159                 mv \$TMP.$cf_so_strip \$TMP
14160         fi
14161         fi
14162         cf_target="\$cf_target.$cf_so_strip"
14163 CF_EOF
14164 fi
14165
14166 case "$MANPAGE_FORMAT" in
14167 (*BSDI*)
14168 cat >>$cf_edit_man <<CF_EOF
14169         if test \$form = format ; then
14170                 # BSDI installs only .0 suffixes in the cat directories
14171                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14172         fi
14173 CF_EOF
14174   ;;
14175 esac
14176
14177 cat >>$cf_edit_man <<CF_EOF
14178         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14179         if test \$verb = installing ; then
14180                 echo \$verb \$cf_target
14181                 \$INSTALL_DATA \$TMP \$cf_target
14182                 test -d \$cf_subdir\${section} &&
14183                 test -n "\$aliases" && (
14184                         cd \$cf_subdir\${section} && (
14185                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14186                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14187                                 cf_target=\`basename \$cf_target\`
14188                                 for cf_alias in \$aliases
14189                                 do
14190                                         if test \$section = 1 ; then
14191                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14192                                         fi
14193
14194                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14195                                                 if test -f \$cf_alias\${suffix} ; then
14196                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14197                                                         then
14198                                                                 continue
14199                                                         fi
14200                                                 fi
14201                                                 echo .. \$verb alias \$cf_alias\${suffix}
14202 CF_EOF
14203 case "x$LN_S" in
14204 (*-f)
14205 cat >>$cf_edit_man <<CF_EOF
14206                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14207 CF_EOF
14208         ;;
14209 (*)
14210 cat >>$cf_edit_man <<CF_EOF
14211                                                 rm -f \$cf_alias\${suffix}
14212                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14213 CF_EOF
14214         ;;
14215 esac
14216 cat >>$cf_edit_man <<CF_EOF
14217                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14218                                                 echo ".so \$cf_source" >\$TMP
14219 CF_EOF
14220 if test -n "$cf_compress" ; then
14221 cat >>$cf_edit_man <<CF_EOF
14222                                                 if test -n "$cf_so_strip" ; then
14223                                                         $cf_compress -f \$TMP
14224                                                         mv \$TMP.$cf_so_strip \$TMP
14225                                                 fi
14226 CF_EOF
14227 fi
14228 cat >>$cf_edit_man <<CF_EOF
14229                                                 echo .. \$verb alias \$cf_alias\${suffix}
14230                                                 rm -f \$cf_alias\${suffix}
14231                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14232                                         fi
14233                                 done
14234                         )
14235                 )
14236         elif test \$verb = removing ; then
14237                 test -f \$cf_target && (
14238                         echo \$verb \$cf_target
14239                         rm -f \$cf_target
14240                 )
14241                 test -d \$cf_subdir\${section} &&
14242                 test -n "\$aliases" && (
14243                         cd \$cf_subdir\${section} && (
14244                                 for cf_alias in \$aliases
14245                                 do
14246                                         if test \$section = 1 ; then
14247                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14248                                         fi
14249
14250                                         echo .. \$verb alias \$cf_alias\${suffix}
14251                                         rm -f \$cf_alias\${suffix}
14252                                 done
14253                         )
14254                 )
14255         else
14256 #               echo ".hy 0"
14257                 cat \$TMP
14258         fi
14259         ;;
14260 esac
14261 done
14262
14263 if test $cf_inboth = yes ; then
14264 if test \$form != format ; then
14265         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14266 fi
14267 fi
14268
14269 exit 0
14270 CF_EOF
14271 chmod 755 $cf_edit_man
14272
14273 ###############################################################################
14274
14275 ### Note that some functions (such as const) are normally disabled anyway.
14276 echo "$as_me:14276: checking if you want to build with function extensions" >&5
14277 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14278
14279 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14280 if test "${enable_ext_funcs+set}" = set; then
14281   enableval="$enable_ext_funcs"
14282   with_ext_funcs=$enableval
14283 else
14284   with_ext_funcs=yes
14285 fi;
14286 echo "$as_me:14286: result: $with_ext_funcs" >&5
14287 echo "${ECHO_T}$with_ext_funcs" >&6
14288 if test "x$with_ext_funcs" = xyes ; then
14289         NCURSES_EXT_FUNCS=1
14290
14291 cat >>confdefs.h <<\EOF
14292 #define NCURSES_EXT_FUNCS 1
14293 EOF
14294
14295 cat >>confdefs.h <<\EOF
14296 #define HAVE_ASSUME_DEFAULT_COLORS 1
14297 EOF
14298
14299 cat >>confdefs.h <<\EOF
14300 #define HAVE_CURSES_VERSION 1
14301 EOF
14302
14303 cat >>confdefs.h <<\EOF
14304 #define HAVE_HAS_KEY 1
14305 EOF
14306
14307 cat >>confdefs.h <<\EOF
14308 #define HAVE_RESIZETERM 1
14309 EOF
14310
14311 cat >>confdefs.h <<\EOF
14312 #define HAVE_RESIZE_TERM 1
14313 EOF
14314
14315 cat >>confdefs.h <<\EOF
14316 #define HAVE_TERM_ENTRY_H 1
14317 EOF
14318
14319 cat >>confdefs.h <<\EOF
14320 #define HAVE_USE_DEFAULT_COLORS 1
14321 EOF
14322
14323 cat >>confdefs.h <<\EOF
14324 #define HAVE_USE_EXTENDED_NAMES 1
14325 EOF
14326
14327 cat >>confdefs.h <<\EOF
14328 #define HAVE_USE_SCREEN 1
14329 EOF
14330
14331 cat >>confdefs.h <<\EOF
14332 #define HAVE_USE_WINDOW 1
14333 EOF
14334
14335 cat >>confdefs.h <<\EOF
14336 #define HAVE_WRESIZE 1
14337 EOF
14338
14339         GENERATED_EXT_FUNCS=generated
14340         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14341 else
14342         NCURSES_EXT_FUNCS=0
14343         GENERATED_EXT_FUNCS=
14344 fi
14345
14346 echo "$as_me:14346: checking if you want to build with SCREEN extensions" >&5
14347 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14348
14349 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14350 if test "${enable_sp_funcs+set}" = set; then
14351   enableval="$enable_sp_funcs"
14352   with_sp_funcs=$enableval
14353 else
14354   with_sp_funcs=$cf_dft_ext_spfuncs
14355 fi;
14356 echo "$as_me:14356: result: $with_sp_funcs" >&5
14357 echo "${ECHO_T}$with_sp_funcs" >&6
14358 if test "x$with_sp_funcs" = xyes ; then
14359         NCURSES_SP_FUNCS=1
14360
14361 cat >>confdefs.h <<\EOF
14362 #define NCURSES_SP_FUNCS 1
14363 EOF
14364
14365 cat >>confdefs.h <<\EOF
14366 #define HAVE_TPUTS_SP 1
14367 EOF
14368
14369         GENERATED_SP_FUNCS=generated
14370 else
14371         NCURSES_SP_FUNCS=0
14372         GENERATED_SP_FUNCS=
14373 fi
14374
14375 echo "$as_me:14375: checking if you want to build with terminal-driver" >&5
14376 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14377
14378 # Check whether --enable-term-driver or --disable-term-driver was given.
14379 if test "${enable_term_driver+set}" = set; then
14380   enableval="$enable_term_driver"
14381   with_term_driver=$enableval
14382 else
14383   with_term_driver=no
14384 fi;
14385 echo "$as_me:14385: result: $with_term_driver" >&5
14386 echo "${ECHO_T}$with_term_driver" >&6
14387 if test "x$with_term_driver" = xyes ; then
14388
14389 cat >>confdefs.h <<\EOF
14390 #define USE_TERM_DRIVER 1
14391 EOF
14392
14393         if test "x$with_termlib" != xno ; then
14394                 { { echo "$as_me:14394: error: The term-driver option conflicts with the termlib option" >&5
14395 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14396    { (exit 1); exit 1; }; }
14397         fi
14398         if test "x$with_sp_funcs" != xyes ; then
14399                 { { echo "$as_me:14399: error: The term-driver option relies upon sp-funcs" >&5
14400 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14401    { (exit 1); exit 1; }; }
14402         fi
14403 fi
14404
14405 ###   use option --enable-const to turn on use of const beyond that in XSI.
14406 echo "$as_me:14406: checking for extended use of const keyword" >&5
14407 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14408
14409 # Check whether --enable-const or --disable-const was given.
14410 if test "${enable_const+set}" = set; then
14411   enableval="$enable_const"
14412   with_ext_const=$enableval
14413 else
14414   with_ext_const=$cf_dft_ext_const
14415 fi;
14416 echo "$as_me:14416: result: $with_ext_const" >&5
14417 echo "${ECHO_T}$with_ext_const" >&6
14418 NCURSES_CONST='/*nothing*/'
14419 if test "x$with_ext_const" = xyes ; then
14420         NCURSES_CONST=const
14421 fi
14422
14423 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14424 echo "$as_me:14424: checking if you want to use extended colors" >&5
14425 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14426
14427 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14428 if test "${enable_ext_colors+set}" = set; then
14429   enableval="$enable_ext_colors"
14430   with_ext_colors=$enableval
14431 else
14432   with_ext_colors=$cf_dft_ext_colors
14433 fi;
14434 echo "$as_me:14434: result: $with_ext_colors" >&5
14435 echo "${ECHO_T}$with_ext_colors" >&6
14436 NCURSES_EXT_COLORS=0
14437 if test "x$with_ext_colors" = xyes ; then
14438         if test "x$with_widec" != xyes ; then
14439                 { echo "$as_me:14439: WARNING: This option applies only to wide-character library" >&5
14440 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14441         else
14442                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14443
14444 if test "${with_abi_version+set}" != set; then
14445         case $cf_cv_rel_version in
14446         (5.*)
14447                 cf_cv_rel_version=6.0
14448                 cf_cv_abi_version=6
14449                 { echo "$as_me:14449: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14450 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14451                 ;;
14452         esac
14453 fi
14454
14455                 NCURSES_EXT_COLORS=1
14456
14457 cat >>confdefs.h <<\EOF
14458 #define NCURSES_EXT_COLORS 1
14459 EOF
14460
14461 cat >>confdefs.h <<\EOF
14462 #define HAVE_ALLOC_PAIR 1
14463 EOF
14464
14465 cat >>confdefs.h <<\EOF
14466 #define HAVE_INIT_EXTENDED_COLOR 1
14467 EOF
14468
14469 cat >>confdefs.h <<\EOF
14470 #define HAVE_RESET_COLOR_PAIRS 1
14471 EOF
14472
14473         fi
14474 fi
14475
14476 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14477 echo "$as_me:14477: checking if you want to use extended mouse encoding" >&5
14478 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14479
14480 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14481 if test "${enable_ext_mouse+set}" = set; then
14482   enableval="$enable_ext_mouse"
14483   with_ext_mouse=$enableval
14484 else
14485   with_ext_mouse=$cf_dft_ext_mouse
14486 fi;
14487 echo "$as_me:14487: result: $with_ext_mouse" >&5
14488 echo "${ECHO_T}$with_ext_mouse" >&6
14489 NCURSES_MOUSE_VERSION=1
14490 if test "x$with_ext_mouse" = xyes ; then
14491         NCURSES_MOUSE_VERSION=2
14492
14493 if test "${with_abi_version+set}" != set; then
14494         case $cf_cv_rel_version in
14495         (5.*)
14496                 cf_cv_rel_version=6.0
14497                 cf_cv_abi_version=6
14498                 { echo "$as_me:14498: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14499 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14500                 ;;
14501         esac
14502 fi
14503
14504 fi
14505
14506 ###   use option --enable-ext-putwin to turn on extended screendumps
14507 echo "$as_me:14507: checking if you want to use extended putwin/screendump" >&5
14508 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14509
14510 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14511 if test "${enable_ext_putwin+set}" = set; then
14512   enableval="$enable_ext_putwin"
14513   with_ext_putwin=$enableval
14514 else
14515   with_ext_putwin=$cf_dft_ext_putwin
14516 fi;
14517 echo "$as_me:14517: result: $with_ext_putwin" >&5
14518 echo "${ECHO_T}$with_ext_putwin" >&6
14519 if test "x$with_ext_putwin" = xyes ; then
14520
14521 cat >>confdefs.h <<\EOF
14522 #define NCURSES_EXT_PUTWIN 1
14523 EOF
14524
14525 fi
14526
14527 echo "$as_me:14527: checking if you want \$NCURSES_NO_PADDING code" >&5
14528 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14529
14530 # Check whether --enable-no-padding or --disable-no-padding was given.
14531 if test "${enable_no_padding+set}" = set; then
14532   enableval="$enable_no_padding"
14533   with_no_padding=$enableval
14534 else
14535   with_no_padding=$with_ext_funcs
14536 fi;
14537 echo "$as_me:14537: result: $with_no_padding" >&5
14538 echo "${ECHO_T}$with_no_padding" >&6
14539 test "x$with_no_padding" = xyes &&
14540 cat >>confdefs.h <<\EOF
14541 #define NCURSES_NO_PADDING 1
14542 EOF
14543
14544 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14545 echo "$as_me:14545: checking if you want SIGWINCH handler" >&5
14546 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14547
14548 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14549 if test "${enable_sigwinch+set}" = set; then
14550   enableval="$enable_sigwinch"
14551   with_sigwinch=$enableval
14552 else
14553   with_sigwinch=$with_ext_funcs
14554 fi;
14555 echo "$as_me:14555: result: $with_sigwinch" >&5
14556 echo "${ECHO_T}$with_sigwinch" >&6
14557 test "x$with_sigwinch" = xyes &&
14558 cat >>confdefs.h <<\EOF
14559 #define USE_SIGWINCH 1
14560 EOF
14561
14562 ###   use option --enable-tcap-names to allow user to define new capabilities
14563 echo "$as_me:14563: checking if you want user-definable terminal capabilities like termcap" >&5
14564 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14565
14566 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14567 if test "${enable_tcap_names+set}" = set; then
14568   enableval="$enable_tcap_names"
14569   with_tcap_names=$enableval
14570 else
14571   with_tcap_names=$with_ext_funcs
14572 fi;
14573 echo "$as_me:14573: result: $with_tcap_names" >&5
14574 echo "${ECHO_T}$with_tcap_names" >&6
14575 NCURSES_XNAMES=0
14576 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14577
14578 ##############################################################################
14579
14580 echo "$as_me:14580: checking if you want to link with the pthread library" >&5
14581 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14582
14583 # Check whether --with-pthread or --without-pthread was given.
14584 if test "${with_pthread+set}" = set; then
14585   withval="$with_pthread"
14586   with_pthread=$withval
14587 else
14588   with_pthread=no
14589 fi;
14590 echo "$as_me:14590: result: $with_pthread" >&5
14591 echo "${ECHO_T}$with_pthread" >&6
14592
14593 if test "$with_pthread" != no ; then
14594         echo "$as_me:14594: checking for pthread.h" >&5
14595 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14596 if test "${ac_cv_header_pthread_h+set}" = set; then
14597   echo $ECHO_N "(cached) $ECHO_C" >&6
14598 else
14599   cat >conftest.$ac_ext <<_ACEOF
14600 #line 14600 "configure"
14601 #include "confdefs.h"
14602 #include <pthread.h>
14603 _ACEOF
14604 if { (eval echo "$as_me:14604: \"$ac_cpp conftest.$ac_ext\"") >&5
14605   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14606   ac_status=$?
14607   egrep -v '^ *\+' conftest.er1 >conftest.err
14608   rm -f conftest.er1
14609   cat conftest.err >&5
14610   echo "$as_me:14610: \$? = $ac_status" >&5
14611   (exit $ac_status); } >/dev/null; then
14612   if test -s conftest.err; then
14613     ac_cpp_err=$ac_c_preproc_warn_flag
14614   else
14615     ac_cpp_err=
14616   fi
14617 else
14618   ac_cpp_err=yes
14619 fi
14620 if test -z "$ac_cpp_err"; then
14621   ac_cv_header_pthread_h=yes
14622 else
14623   echo "$as_me: failed program was:" >&5
14624   cat conftest.$ac_ext >&5
14625   ac_cv_header_pthread_h=no
14626 fi
14627 rm -f conftest.err conftest.$ac_ext
14628 fi
14629 echo "$as_me:14629: result: $ac_cv_header_pthread_h" >&5
14630 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14631 if test $ac_cv_header_pthread_h = yes; then
14632
14633 cat >>confdefs.h <<\EOF
14634 #define HAVE_PTHREADS_H 1
14635 EOF
14636
14637         for cf_lib_pthread in pthread c_r
14638         do
14639             echo "$as_me:14639: checking if we can link with the $cf_lib_pthread library" >&5
14640 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14641             cf_save_LIBS="$LIBS"
14642
14643 cf_add_libs="$LIBS"
14644 # reverse order
14645 cf_add_0lib=
14646 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14647 # filter duplicates
14648 for cf_add_1lib in $cf_add_0lib; do
14649         for cf_add_2lib in $cf_add_libs; do
14650                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14651                         cf_add_1lib=
14652                         break
14653                 fi
14654         done
14655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14656 done
14657 LIBS="$cf_add_libs"
14658
14659             cat >conftest.$ac_ext <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662
14663 #include <pthread.h>
14664
14665 int
14666 main (void)
14667 {
14668
14669                 int rc = pthread_create(0,0,0,0);
14670                 int r2 = pthread_mutexattr_settype(0, 0);
14671
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f conftest.$ac_objext conftest$ac_exeext
14677 if { (eval echo "$as_me:14677: \"$ac_link\"") >&5
14678   (eval $ac_link) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); } &&
14682          { ac_try='test -s conftest$ac_exeext'
14683   { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit $ac_status); }; }; then
14688   with_pthread=yes
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat conftest.$ac_ext >&5
14692 with_pthread=no
14693 fi
14694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14695             LIBS="$cf_save_LIBS"
14696             echo "$as_me:14696: result: $with_pthread" >&5
14697 echo "${ECHO_T}$with_pthread" >&6
14698             test "$with_pthread" = yes && break
14699         done
14700
14701         if test "$with_pthread" = yes ; then
14702
14703 cf_add_libs="$LIBS"
14704 # reverse order
14705 cf_add_0lib=
14706 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14707 # filter duplicates
14708 for cf_add_1lib in $cf_add_0lib; do
14709         for cf_add_2lib in $cf_add_libs; do
14710                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14711                         cf_add_1lib=
14712                         break
14713                 fi
14714         done
14715         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14716 done
14717 LIBS="$cf_add_libs"
14718
14719 cat >>confdefs.h <<\EOF
14720 #define HAVE_LIBPTHREADS 1
14721 EOF
14722
14723         else
14724             { { echo "$as_me:14724: error: Cannot link with pthread library" >&5
14725 echo "$as_me: error: Cannot link with pthread library" >&2;}
14726    { (exit 1); exit 1; }; }
14727         fi
14728
14729 fi
14730
14731 fi
14732
14733 if test "x$with_pthread" != xno; then
14734         echo "$as_me:14734: checking for pthread_kill" >&5
14735 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14736 if test "${ac_cv_func_pthread_kill+set}" = set; then
14737   echo $ECHO_N "(cached) $ECHO_C" >&6
14738 else
14739   cat >conftest.$ac_ext <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742 #define pthread_kill autoconf_temporary
14743 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14744 #undef pthread_kill
14745
14746 #ifdef __cplusplus
14747 extern "C"
14748 #endif
14749
14750 /* We use char because int might match the return type of a gcc2
14751    builtin and then its argument prototype would still apply.  */
14752 char pthread_kill (void);
14753
14754 int
14755 main (void)
14756 {
14757
14758 /* The GNU C library defines stubs for functions which it implements
14759     to always fail with ENOSYS.  Some functions are actually named
14760     something starting with __ and the normal name is an alias.  */
14761 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14762 #error found stub for pthread_kill
14763 #endif
14764
14765         return pthread_kill ();
14766   ;
14767   return 0;
14768 }
14769 _ACEOF
14770 rm -f conftest.$ac_objext conftest$ac_exeext
14771 if { (eval echo "$as_me:14771: \"$ac_link\"") >&5
14772   (eval $ac_link) 2>&5
14773   ac_status=$?
14774   echo "$as_me:14774: \$? = $ac_status" >&5
14775   (exit $ac_status); } &&
14776          { ac_try='test -s conftest$ac_exeext'
14777   { (eval echo "$as_me:14777: \"$ac_try\"") >&5
14778   (eval $ac_try) 2>&5
14779   ac_status=$?
14780   echo "$as_me:14780: \$? = $ac_status" >&5
14781   (exit $ac_status); }; }; then
14782   ac_cv_func_pthread_kill=yes
14783 else
14784   echo "$as_me: failed program was:" >&5
14785 cat conftest.$ac_ext >&5
14786 ac_cv_func_pthread_kill=no
14787 fi
14788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14789 fi
14790 echo "$as_me:14790: result: $ac_cv_func_pthread_kill" >&5
14791 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14792 if test $ac_cv_func_pthread_kill = yes; then
14793
14794                 echo "$as_me:14794: checking if you want to allow EINTR in wgetch with pthreads" >&5
14795 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14796
14797 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14798 if test "${enable_pthreads_eintr+set}" = set; then
14799   enableval="$enable_pthreads_eintr"
14800   use_pthreads_eintr=$enableval
14801 else
14802   use_pthreads_eintr=no
14803 fi;
14804                 echo "$as_me:14804: result: $use_pthreads_eintr" >&5
14805 echo "${ECHO_T}$use_pthreads_eintr" >&6
14806                 if test "x$use_pthreads_eintr" = xyes ; then
14807
14808 cat >>confdefs.h <<\EOF
14809 #define USE_PTHREADS_EINTR 1
14810 EOF
14811
14812                 fi
14813 fi
14814
14815         echo "$as_me:14815: checking if you want to use weak-symbols for pthreads" >&5
14816 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14817
14818 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14819 if test "${enable_weak_symbols+set}" = set; then
14820   enableval="$enable_weak_symbols"
14821   use_weak_symbols=$enableval
14822 else
14823   use_weak_symbols=no
14824 fi;
14825         echo "$as_me:14825: result: $use_weak_symbols" >&5
14826 echo "${ECHO_T}$use_weak_symbols" >&6
14827         if test "x$use_weak_symbols" = xyes ; then
14828
14829 echo "$as_me:14829: checking if $CC supports weak symbols" >&5
14830 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14831 if test "${cf_cv_weak_symbols+set}" = set; then
14832   echo $ECHO_N "(cached) $ECHO_C" >&6
14833 else
14834
14835 cat >conftest.$ac_ext <<_ACEOF
14836 #line 14836 "configure"
14837 #include "confdefs.h"
14838
14839 #include <stdio.h>
14840 int
14841 main (void)
14842 {
14843
14844 #if defined(__GNUC__)
14845 #  if defined __USE_ISOC99
14846 #    define _cat_pragma(exp)    _Pragma(#exp)
14847 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14848 #  else
14849 #    define _weak_pragma(exp)
14850 #  endif
14851 #  define _declare(name)        __extension__ extern __typeof__(name) name
14852 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14853 #endif
14854
14855 weak_symbol(fopen);
14856
14857   ;
14858   return 0;
14859 }
14860 _ACEOF
14861 rm -f conftest.$ac_objext
14862 if { (eval echo "$as_me:14862: \"$ac_compile\"") >&5
14863   (eval $ac_compile) 2>&5
14864   ac_status=$?
14865   echo "$as_me:14865: \$? = $ac_status" >&5
14866   (exit $ac_status); } &&
14867          { ac_try='test -s conftest.$ac_objext'
14868   { (eval echo "$as_me:14868: \"$ac_try\"") >&5
14869   (eval $ac_try) 2>&5
14870   ac_status=$?
14871   echo "$as_me:14871: \$? = $ac_status" >&5
14872   (exit $ac_status); }; }; then
14873   cf_cv_weak_symbols=yes
14874 else
14875   echo "$as_me: failed program was:" >&5
14876 cat conftest.$ac_ext >&5
14877 cf_cv_weak_symbols=no
14878 fi
14879 rm -f conftest.$ac_objext conftest.$ac_ext
14880
14881 fi
14882 echo "$as_me:14882: result: $cf_cv_weak_symbols" >&5
14883 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14884
14885         else
14886                 cf_cv_weak_symbols=no
14887         fi
14888
14889         if test "x$cf_cv_weak_symbols" = xyes ; then
14890
14891 cat >>confdefs.h <<\EOF
14892 #define USE_WEAK_SYMBOLS 1
14893 EOF
14894
14895         fi
14896 fi
14897
14898 PTHREAD=
14899 if test "x$with_pthread" = "xyes" ; then
14900
14901 cat >>confdefs.h <<\EOF
14902 #define USE_PTHREADS 1
14903 EOF
14904
14905         enable_reentrant=yes
14906         if test "x$cf_cv_weak_symbols" = xyes ; then
14907                 PTHREAD=-lpthread
14908
14909 cf_add_libs="$PRIVATE_LIBS"
14910 # reverse order
14911 cf_add_0lib=
14912 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14913 # filter duplicates
14914 for cf_add_1lib in $cf_add_0lib; do
14915         for cf_add_2lib in $cf_add_libs; do
14916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14917                         cf_add_1lib=
14918                         break
14919                 fi
14920         done
14921         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14922 done
14923 PRIVATE_LIBS="$cf_add_libs"
14924
14925         fi
14926 fi
14927
14928 # Reentrant code has to be opaque; there's little advantage to making ncurses
14929 # opaque outside of that, so there is no --enable-opaque option.  We can use
14930 # this option without --with-pthreads, but this will be always set for
14931 # pthreads.
14932 echo "$as_me:14932: checking if you want reentrant code" >&5
14933 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14934
14935 # Check whether --enable-reentrant or --disable-reentrant was given.
14936 if test "${enable_reentrant+set}" = set; then
14937   enableval="$enable_reentrant"
14938   with_reentrant=$enableval
14939 else
14940   with_reentrant=no
14941 fi;
14942 echo "$as_me:14942: result: $with_reentrant" >&5
14943 echo "${ECHO_T}$with_reentrant" >&6
14944 if test "x$with_reentrant" = xyes ; then
14945         cf_cv_enable_reentrant=1
14946         cf_cv_enable_opaque="NCURSES_INTERNALS"
14947         NCURSES_SIZE_T=int
14948         if test "x$cf_cv_weak_symbols" = xyes ; then
14949
14950 # remove pthread library from $LIBS
14951 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14952
14953 cf_add_libs="$TEST_LIBS"
14954 # reverse order
14955 cf_add_0lib=
14956 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14957 # filter duplicates
14958 for cf_add_1lib in $cf_add_0lib; do
14959         for cf_add_2lib in $cf_add_libs; do
14960                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14961                         cf_add_1lib=
14962                         break
14963                 fi
14964         done
14965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14966 done
14967 TEST_LIBS="$cf_add_libs"
14968
14969 cf_add_libs="$TEST_LIBS2"
14970 # reverse order
14971 cf_add_0lib=
14972 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14973 # filter duplicates
14974 for cf_add_1lib in $cf_add_0lib; do
14975         for cf_add_2lib in $cf_add_libs; do
14976                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14977                         cf_add_1lib=
14978                         break
14979                 fi
14980         done
14981         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14982 done
14983 TEST_LIBS2="$cf_add_libs"
14984
14985 cf_add_libs="$PRIVATE_LIBS"
14986 # reverse order
14987 cf_add_0lib=
14988 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14989 # filter duplicates
14990 for cf_add_1lib in $cf_add_0lib; do
14991         for cf_add_2lib in $cf_add_libs; do
14992                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14993                         cf_add_1lib=
14994                         break
14995                 fi
14996         done
14997         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14998 done
14999 PRIVATE_LIBS="$cf_add_libs"
15000
15001         else
15002                 # when not using weak symbols but with_reentrant,
15003                 # add 't' to the library suffix on all platforms
15004                 # except cygwin, where we only do that if ALSO
15005                 # compiling with full thread support.
15006                 case "$host" in
15007                 (*cygwin* | *msys*)
15008                         if test "$with_pthread" = "yes" ; then
15009                                 if test "x$disable_lib_suffixes" = "xno" ; then
15010                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15011                                 fi
15012                         fi ;;
15013                 (*)
15014                         if test "x$disable_lib_suffixes" = "xno" ; then
15015                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15016                         fi
15017                         ;;
15018                 esac
15019         fi
15020
15021 cat >>confdefs.h <<\EOF
15022 #define USE_REENTRANT 1
15023 EOF
15024
15025 if test "${with_abi_version+set}" != set; then
15026         case $cf_cv_rel_version in
15027         (5.*)
15028                 cf_cv_rel_version=6.0
15029                 cf_cv_abi_version=6
15030                 { echo "$as_me:15030: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15031 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15032                 ;;
15033         esac
15034 fi
15035
15036 else
15037         cf_cv_enable_reentrant=0
15038         cf_cv_enable_opaque="NCURSES_OPAQUE"
15039         NCURSES_SIZE_T=short
15040 fi
15041
15042 echo "$as_me:15042: checking if you want opaque curses-library structures" >&5
15043 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15044
15045 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15046 if test "${enable_opaque_curses+set}" = set; then
15047   enableval="$enable_opaque_curses"
15048   test "$enableval" != yes && enableval=no
15049         if test "$enableval" != "no" ; then
15050     enable_opaque_curses=yes
15051         else
15052
15053          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15054          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15055
15056         fi
15057 else
15058   enableval=no
15059
15060          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15061          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15062
15063 fi;
15064 echo "$as_me:15064: result: $enable_opaque_curses" >&5
15065 echo "${ECHO_T}$enable_opaque_curses" >&6
15066
15067 test "$cf_cv_enable_reentrant" = 1 && \
15068 test "$enable_opaque_curses" = no && \
15069 { { echo "$as_me:15069: error: reentrant configuration requires opaque library" >&5
15070 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15071    { (exit 1); exit 1; }; }
15072
15073 echo "$as_me:15073: checking if you want opaque form-library structures" >&5
15074 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15075
15076 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15077 if test "${enable_opaque_form+set}" = set; then
15078   enableval="$enable_opaque_form"
15079   enable_opaque_form=yes
15080 else
15081   enable_opaque_form=no
15082 fi;
15083 echo "$as_me:15083: result: $enable_opaque_form" >&5
15084 echo "${ECHO_T}$enable_opaque_form" >&6
15085
15086 echo "$as_me:15086: checking if you want opaque menu-library structures" >&5
15087 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15088
15089 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15090 if test "${enable_opaque_menu+set}" = set; then
15091   enableval="$enable_opaque_menu"
15092   enable_opaque_menu=yes
15093 else
15094   enable_opaque_menu=no
15095 fi;
15096 echo "$as_me:15096: result: $enable_opaque_menu" >&5
15097 echo "${ECHO_T}$enable_opaque_menu" >&6
15098
15099 echo "$as_me:15099: checking if you want opaque panel-library structures" >&5
15100 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15101
15102 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15103 if test "${enable_opaque_panel+set}" = set; then
15104   enableval="$enable_opaque_panel"
15105   enable_opaque_panel=yes
15106 else
15107   enable_opaque_panel=no
15108 fi;
15109 echo "$as_me:15109: result: $enable_opaque_panel" >&5
15110 echo "${ECHO_T}$enable_opaque_panel" >&6
15111
15112 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15113 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15114 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15115 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15116
15117 ### Allow using a different wrap-prefix
15118 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15119         echo "$as_me:15119: checking for prefix used to wrap public variables" >&5
15120 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15121
15122 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15123 if test "${with_wrap_prefix+set}" = set; then
15124   withval="$with_wrap_prefix"
15125   NCURSES_WRAP_PREFIX=$withval
15126 else
15127   NCURSES_WRAP_PREFIX=_nc_
15128 fi;
15129         echo "$as_me:15129: result: $NCURSES_WRAP_PREFIX" >&5
15130 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15131 else
15132         NCURSES_WRAP_PREFIX=_nc_
15133 fi
15134
15135 cat >>confdefs.h <<EOF
15136 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15137 EOF
15138
15139 ###############################################################################
15140 # These options are relatively safe to experiment with.
15141
15142 echo "$as_me:15142: checking if you want all development code" >&5
15143 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15144
15145 # Check whether --with-develop or --without-develop was given.
15146 if test "${with_develop+set}" = set; then
15147   withval="$with_develop"
15148   with_develop=$withval
15149 else
15150   with_develop=no
15151 fi;
15152 echo "$as_me:15152: result: $with_develop" >&5
15153 echo "${ECHO_T}$with_develop" >&6
15154
15155 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15156 echo "$as_me:15156: checking if you want hard-tabs code" >&5
15157 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15158
15159 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15160 if test "${enable_hard_tabs+set}" = set; then
15161   enableval="$enable_hard_tabs"
15162
15163 else
15164   enable_hard_tabs=$with_develop
15165 fi;
15166 echo "$as_me:15166: result: $enable_hard_tabs" >&5
15167 echo "${ECHO_T}$enable_hard_tabs" >&6
15168 test "x$enable_hard_tabs" = xyes &&
15169 cat >>confdefs.h <<\EOF
15170 #define USE_HARD_TABS 1
15171 EOF
15172
15173 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15174 echo "$as_me:15174: checking if you want limited support for xmc" >&5
15175 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15176
15177 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15178 if test "${enable_xmc_glitch+set}" = set; then
15179   enableval="$enable_xmc_glitch"
15180
15181 else
15182   enable_xmc_glitch=$with_develop
15183 fi;
15184 echo "$as_me:15184: result: $enable_xmc_glitch" >&5
15185 echo "${ECHO_T}$enable_xmc_glitch" >&6
15186 test "x$enable_xmc_glitch" = xyes &&
15187 cat >>confdefs.h <<\EOF
15188 #define USE_XMC_SUPPORT 1
15189 EOF
15190
15191 ###############################################################################
15192 # These are just experimental, probably should not be in a package:
15193
15194 echo "$as_me:15194: checking if you do not want to assume colors are white-on-black" >&5
15195 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15196
15197 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15198 if test "${enable_assumed_color+set}" = set; then
15199   enableval="$enable_assumed_color"
15200   with_assumed_color=$enableval
15201 else
15202   with_assumed_color=yes
15203 fi;
15204 echo "$as_me:15204: result: $with_assumed_color" >&5
15205 echo "${ECHO_T}$with_assumed_color" >&6
15206 test "x$with_assumed_color" = xyes &&
15207 cat >>confdefs.h <<\EOF
15208 #define USE_ASSUMED_COLOR 1
15209 EOF
15210
15211 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15212 echo "$as_me:15212: checking if you want hashmap scrolling-optimization code" >&5
15213 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15214
15215 # Check whether --enable-hashmap or --disable-hashmap was given.
15216 if test "${enable_hashmap+set}" = set; then
15217   enableval="$enable_hashmap"
15218   with_hashmap=$enableval
15219 else
15220   with_hashmap=yes
15221 fi;
15222 echo "$as_me:15222: result: $with_hashmap" >&5
15223 echo "${ECHO_T}$with_hashmap" >&6
15224 test "x$with_hashmap" = xyes &&
15225 cat >>confdefs.h <<\EOF
15226 #define USE_HASHMAP 1
15227 EOF
15228
15229 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15230 echo "$as_me:15230: checking if you want colorfgbg code" >&5
15231 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15232
15233 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15234 if test "${enable_colorfgbg+set}" = set; then
15235   enableval="$enable_colorfgbg"
15236   with_colorfgbg=$enableval
15237 else
15238   with_colorfgbg=no
15239 fi;
15240 echo "$as_me:15240: result: $with_colorfgbg" >&5
15241 echo "${ECHO_T}$with_colorfgbg" >&6
15242 test "x$with_colorfgbg" = xyes &&
15243 cat >>confdefs.h <<\EOF
15244 #define USE_COLORFGBG 1
15245 EOF
15246
15247 ###   use option --enable-interop to turn on use of bindings used for interop
15248 echo "$as_me:15248: checking if you want interop bindings" >&5
15249 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15250
15251 # Check whether --enable-interop or --disable-interop was given.
15252 if test "${enable_interop+set}" = set; then
15253   enableval="$enable_interop"
15254   with_exp_interop=$enableval
15255 else
15256   with_exp_interop=$cf_dft_interop
15257 fi;
15258 echo "$as_me:15258: result: $with_exp_interop" >&5
15259 echo "${ECHO_T}$with_exp_interop" >&6
15260
15261 NCURSES_INTEROP_FUNCS=0
15262 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15263
15264 echo "$as_me:15264: checking if you want experimental safe-sprintf code" >&5
15265 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15266
15267 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15268 if test "${enable_safe_sprintf+set}" = set; then
15269   enableval="$enable_safe_sprintf"
15270   with_safe_sprintf=$enableval
15271 else
15272   with_safe_sprintf=no
15273 fi;
15274 echo "$as_me:15274: result: $with_safe_sprintf" >&5
15275 echo "${ECHO_T}$with_safe_sprintf" >&6
15276
15277 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15278 # when hashmap is used scroll hints are useless
15279 if test "$with_hashmap" = no ; then
15280 echo "$as_me:15280: checking if you want to experiment without scrolling-hints code" >&5
15281 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15282
15283 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15284 if test "${enable_scroll_hints+set}" = set; then
15285   enableval="$enable_scroll_hints"
15286   with_scroll_hints=$enableval
15287 else
15288   with_scroll_hints=yes
15289 fi;
15290 echo "$as_me:15290: result: $with_scroll_hints" >&5
15291 echo "${ECHO_T}$with_scroll_hints" >&6
15292 test "x$with_scroll_hints" = xyes &&
15293 cat >>confdefs.h <<\EOF
15294 #define USE_SCROLL_HINTS 1
15295 EOF
15296
15297 fi
15298
15299 echo "$as_me:15299: checking if you want wgetch-events code" >&5
15300 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15301
15302 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15303 if test "${enable_wgetch_events+set}" = set; then
15304   enableval="$enable_wgetch_events"
15305   with_wgetch_events=$enableval
15306 else
15307   with_wgetch_events=no
15308 fi;
15309 echo "$as_me:15309: result: $with_wgetch_events" >&5
15310 echo "${ECHO_T}$with_wgetch_events" >&6
15311 test "x$with_wgetch_events" = xyes &&
15312 cat >>confdefs.h <<\EOF
15313 #define NCURSES_WGETCH_EVENTS 1
15314 EOF
15315
15316 ###############################################################################
15317
15318 ###     use option --disable-echo to suppress full display compiling commands
15319
15320 echo "$as_me:15320: checking if you want to see long compiling messages" >&5
15321 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15322
15323 # Check whether --enable-echo or --disable-echo was given.
15324 if test "${enable_echo+set}" = set; then
15325   enableval="$enable_echo"
15326   test "$enableval" != no && enableval=yes
15327         if test "$enableval" != "yes" ; then
15328
15329         ECHO_LT='--silent'
15330         ECHO_LD='@echo linking $@;'
15331         RULE_CC='@echo compiling $<'
15332         SHOW_CC='@echo compiling $@'
15333         ECHO_CC='@'
15334
15335         else
15336
15337         ECHO_LT=''
15338         ECHO_LD=''
15339         RULE_CC=''
15340         SHOW_CC=''
15341         ECHO_CC=''
15342
15343         fi
15344 else
15345   enableval=yes
15346
15347         ECHO_LT=''
15348         ECHO_LD=''
15349         RULE_CC=''
15350         SHOW_CC=''
15351         ECHO_CC=''
15352
15353 fi;
15354 echo "$as_me:15354: result: $enableval" >&5
15355 echo "${ECHO_T}$enableval" >&6
15356
15357 if test "x$enable_echo" = xyes; then
15358         ECHO_LINK=
15359 else
15360         ECHO_LINK='@ echo linking $@ ... ;'
15361         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15362         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15363 fi
15364
15365 # --disable-stripping is used for debugging
15366
15367 echo "$as_me:15367: checking if you want to install stripped executables" >&5
15368 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15369
15370 # Check whether --enable-stripping or --disable-stripping was given.
15371 if test "${enable_stripping+set}" = set; then
15372   enableval="$enable_stripping"
15373   test "$enableval" != no && enableval=yes
15374         if test "$enableval" != "yes" ; then
15375     with_stripping=no
15376         else
15377                 with_stripping=yes
15378         fi
15379 else
15380   enableval=yes
15381         with_stripping=yes
15382
15383 fi;
15384 echo "$as_me:15384: result: $with_stripping" >&5
15385 echo "${ECHO_T}$with_stripping" >&6
15386
15387 if test "$with_stripping" = yes
15388 then
15389         INSTALL_OPT_S="-s"
15390 else
15391         INSTALL_OPT_S=
15392 fi
15393
15394 : ${INSTALL:=install}
15395 echo "$as_me:15395: checking if install accepts -p option" >&5
15396 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15397 if test "${cf_cv_install_p+set}" = set; then
15398   echo $ECHO_N "(cached) $ECHO_C" >&6
15399 else
15400
15401         rm -rf conftest*
15402         date >conftest.in
15403         mkdir conftest.out
15404         sleep 3
15405         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15406         then
15407                 if test -f conftest.out/conftest.in
15408                 then
15409                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15410                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15411                         if test -s conftest.err
15412                         then
15413                                 cf_cv_install_p=no
15414                         else
15415                                 cf_cv_install_p=yes
15416                         fi
15417                 else
15418                         cf_cv_install_p=no
15419                 fi
15420         else
15421                 cf_cv_install_p=no
15422         fi
15423         rm -rf conftest*
15424
15425 fi
15426 echo "$as_me:15426: result: $cf_cv_install_p" >&5
15427 echo "${ECHO_T}$cf_cv_install_p" >&6
15428
15429 echo "$as_me:15429: checking if install needs to be told about ownership" >&5
15430 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15431 case `$ac_config_guess` in
15432 (*minix)
15433         with_install_o=yes
15434         ;;
15435 (*)
15436         with_install_o=no
15437         ;;
15438 esac
15439
15440 echo "$as_me:15440: result: $with_install_o" >&5
15441 echo "${ECHO_T}$with_install_o" >&6
15442 if test "x$with_install_o" = xyes
15443 then
15444         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'`
15445 else
15446         INSTALL_OPT_O=
15447 fi
15448
15449 # If we're avoiding relinking of shared libraries during install, that is to
15450 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15451 # the install program has "-p" (for preserving timestamps).
15452 cf_cv_do_reranlib=yes
15453 if test "x$cf_cv_install_p" = xyes
15454 then
15455         if test "x$cf_cv_do_relink" != xyes
15456         then
15457                 cf_cv_do_reranlib=no
15458                 INSTALL_OPT_P="-p"
15459                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15460         fi
15461 fi
15462
15463 ###     use option --enable-warnings to turn on all gcc warnings
15464 echo "$as_me:15464: checking if you want to see compiler warnings" >&5
15465 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15466
15467 # Check whether --enable-warnings or --disable-warnings was given.
15468 if test "${enable_warnings+set}" = set; then
15469   enableval="$enable_warnings"
15470   with_warnings=$enableval
15471 fi;
15472 echo "$as_me:15472: result: $with_warnings" >&5
15473 echo "${ECHO_T}$with_warnings" >&6
15474
15475 if test "x$with_warnings" = "xyes"; then
15476
15477         ADAFLAGS="$ADAFLAGS -gnatg"
15478
15479 if test "x$have_x" = xyes; then
15480
15481 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15482 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15483 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15484 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15485 for cf_X_CFLAGS in $X_CFLAGS
15486 do
15487         case "x$cf_X_CFLAGS" in
15488         x-[IUD]*)
15489                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15490                 ;;
15491         *)
15492                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15493                 ;;
15494         esac
15495 done
15496
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 #include <stdlib.h>
15502 #include <X11/Intrinsic.h>
15503
15504 int
15505 main (void)
15506 {
15507 String foo = malloc(1); (void)foo
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 rm -f conftest.$ac_objext
15513 if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514   (eval $ac_compile) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -s conftest.$ac_objext'
15519   { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524
15525 echo "$as_me:15525: checking for X11/Xt const-feature" >&5
15526 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15527 if test "${cf_cv_const_x_string+set}" = set; then
15528   echo $ECHO_N "(cached) $ECHO_C" >&6
15529 else
15530
15531         cat >conftest.$ac_ext <<_ACEOF
15532 #line 15532 "configure"
15533 #include "confdefs.h"
15534
15535 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15536 #undef  XTSTRINGDEFINES /* X11R5 and later */
15537 #include <stdlib.h>
15538 #include <X11/Intrinsic.h>
15539
15540 int
15541 main (void)
15542 {
15543 String foo = malloc(1); *foo = 0
15544   ;
15545   return 0;
15546 }
15547 _ACEOF
15548 rm -f conftest.$ac_objext
15549 if { (eval echo "$as_me:15549: \"$ac_compile\"") >&5
15550   (eval $ac_compile) 2>&5
15551   ac_status=$?
15552   echo "$as_me:15552: \$? = $ac_status" >&5
15553   (exit $ac_status); } &&
15554          { ac_try='test -s conftest.$ac_objext'
15555   { (eval echo "$as_me:15555: \"$ac_try\"") >&5
15556   (eval $ac_try) 2>&5
15557   ac_status=$?
15558   echo "$as_me:15558: \$? = $ac_status" >&5
15559   (exit $ac_status); }; }; then
15560
15561                         cf_cv_const_x_string=no
15562
15563 else
15564   echo "$as_me: failed program was:" >&5
15565 cat conftest.$ac_ext >&5
15566
15567                         cf_cv_const_x_string=yes
15568
15569 fi
15570 rm -f conftest.$ac_objext conftest.$ac_ext
15571
15572 fi
15573 echo "$as_me:15573: result: $cf_cv_const_x_string" >&5
15574 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15575
15576 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15577 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15578 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15579
15580 case $cf_cv_const_x_string in
15581 (no)
15582
15583         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15584         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15585
15586         ;;
15587 (*)
15588
15589         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15590         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15591
15592         ;;
15593 esac
15594
15595 else
15596   echo "$as_me: failed program was:" >&5
15597 cat conftest.$ac_ext >&5
15598 fi
15599 rm -f conftest.$ac_objext conftest.$ac_ext
15600  fi
15601 cat > conftest.$ac_ext <<EOF
15602 #line 15602 "${as_me:-configure}"
15603 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15604 EOF
15605 if test "$INTEL_COMPILER" = yes
15606 then
15607 # The "-wdXXX" options suppress warnings:
15608 # remark #1419: external declaration in primary source file
15609 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15610 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15611 # remark #193: zero used for undefined preprocessing identifier
15612 # remark #593: variable "curs_sb_left_arrow" was set but never used
15613 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15614 # remark #869: parameter "tw" was never referenced
15615 # remark #981: operands are evaluated in unspecified order
15616 # warning #279: controlling expression is constant
15617
15618         { echo "$as_me:15618: checking for $CC warning options..." >&5
15619 echo "$as_me: checking for $CC warning options..." >&6;}
15620         cf_save_CFLAGS="$CFLAGS"
15621         EXTRA_CFLAGS="-Wall"
15622         for cf_opt in \
15623                 wd1419 \
15624                 wd1683 \
15625                 wd1684 \
15626                 wd193 \
15627                 wd593 \
15628                 wd279 \
15629                 wd810 \
15630                 wd869 \
15631                 wd981
15632         do
15633                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15634                 if { (eval echo "$as_me:15634: \"$ac_compile\"") >&5
15635   (eval $ac_compile) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); }; then
15639                         test -n "$verbose" && echo "$as_me:15639: result: ... -$cf_opt" >&5
15640 echo "${ECHO_T}... -$cf_opt" >&6
15641                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15642                 fi
15643         done
15644         CFLAGS="$cf_save_CFLAGS"
15645 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15646 then
15647         { echo "$as_me:15647: checking for $CC warning options..." >&5
15648 echo "$as_me: checking for $CC warning options..." >&6;}
15649         cf_save_CFLAGS="$CFLAGS"
15650         EXTRA_CFLAGS=
15651         cf_warn_CONST=""
15652         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15653         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15654         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15655         for cf_opt in W Wall \
15656                 Wbad-function-cast \
15657                 Wcast-align \
15658                 Wcast-qual \
15659                 Wdeclaration-after-statement \
15660                 Wextra \
15661                 Winline \
15662                 Wmissing-declarations \
15663                 Wmissing-prototypes \
15664                 Wnested-externs \
15665                 Wpointer-arith \
15666                 Wshadow \
15667                 Wstrict-prototypes \
15668                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15669         do
15670                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15671                 if { (eval echo "$as_me:15671: \"$ac_compile\"") >&5
15672   (eval $ac_compile) 2>&5
15673   ac_status=$?
15674   echo "$as_me:15674: \$? = $ac_status" >&5
15675   (exit $ac_status); }; then
15676                         test -n "$verbose" && echo "$as_me:15676: result: ... -$cf_opt" >&5
15677 echo "${ECHO_T}... -$cf_opt" >&6
15678                         case $cf_opt in
15679                         (Winline)
15680                                 case $GCC_VERSION in
15681                                 ([34].*)
15682                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15683
15684 echo "${as_me:-configure}:15684: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15685
15686                                         continue;;
15687                                 esac
15688                                 ;;
15689                         (Wpointer-arith)
15690                                 case $GCC_VERSION in
15691                                 ([12].*)
15692                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15693
15694 echo "${as_me:-configure}:15694: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15695
15696                                         continue;;
15697                                 esac
15698                                 ;;
15699                         esac
15700                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15701                 fi
15702         done
15703         CFLAGS="$cf_save_CFLAGS"
15704 fi
15705 rm -rf conftest*
15706
15707         if test "x$cf_with_cxx" = xyes ; then
15708
15709 INTEL_CPLUSPLUS=no
15710
15711 if test "$GCC" = yes ; then
15712         case $host_os in
15713         (linux*|gnu*)
15714                 echo "$as_me:15714: checking if this is really Intel C++ compiler" >&5
15715 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15716                 cf_save_CFLAGS="$CXXFLAGS"
15717                 CXXFLAGS="$CXXFLAGS -no-gcc"
15718                 cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15721
15722 int
15723 main (void)
15724 {
15725
15726 #ifdef __INTEL_COMPILER
15727 #else
15728 make an error
15729 #endif
15730
15731   ;
15732   return 0;
15733 }
15734 _ACEOF
15735 rm -f conftest.$ac_objext
15736 if { (eval echo "$as_me:15736: \"$ac_compile\"") >&5
15737   (eval $ac_compile) 2>&5
15738   ac_status=$?
15739   echo "$as_me:15739: \$? = $ac_status" >&5
15740   (exit $ac_status); } &&
15741          { ac_try='test -s conftest.$ac_objext'
15742   { (eval echo "$as_me:15742: \"$ac_try\"") >&5
15743   (eval $ac_try) 2>&5
15744   ac_status=$?
15745   echo "$as_me:15745: \$? = $ac_status" >&5
15746   (exit $ac_status); }; }; then
15747   INTEL_CPLUSPLUS=yes
15748 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15749
15750 else
15751   echo "$as_me: failed program was:" >&5
15752 cat conftest.$ac_ext >&5
15753 fi
15754 rm -f conftest.$ac_objext conftest.$ac_ext
15755                 CXXFLAGS="$cf_save_CFLAGS"
15756                 echo "$as_me:15756: result: $INTEL_CPLUSPLUS" >&5
15757 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15758                 ;;
15759         esac
15760 fi
15761
15762 CLANG_CPLUSPLUS=no
15763
15764 if test "$GCC" = yes ; then
15765         echo "$as_me:15765: checking if this is really Clang C++ compiler" >&5
15766 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15767         cf_save_CFLAGS="$CXXFLAGS"
15768         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15769         cat >conftest.$ac_ext <<_ACEOF
15770 #line 15770 "configure"
15771 #include "confdefs.h"
15772
15773 int
15774 main (void)
15775 {
15776
15777 #ifdef __clang__
15778 #else
15779 make an error
15780 #endif
15781
15782   ;
15783   return 0;
15784 }
15785 _ACEOF
15786 rm -f conftest.$ac_objext
15787 if { (eval echo "$as_me:15787: \"$ac_compile\"") >&5
15788   (eval $ac_compile) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); } &&
15792          { ac_try='test -s conftest.$ac_objext'
15793   { (eval echo "$as_me:15793: \"$ac_try\"") >&5
15794   (eval $ac_try) 2>&5
15795   ac_status=$?
15796   echo "$as_me:15796: \$? = $ac_status" >&5
15797   (exit $ac_status); }; }; then
15798   CLANG_CPLUSPLUS=yes
15799 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15800
15801 else
15802   echo "$as_me: failed program was:" >&5
15803 cat conftest.$ac_ext >&5
15804 fi
15805 rm -f conftest.$ac_objext conftest.$ac_ext
15806         CXXFLAGS="$cf_save_CFLAGS"
15807         echo "$as_me:15807: result: $CLANG_CPLUSPLUS" >&5
15808 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15809 fi
15810
15811 ac_ext=cc
15812 ac_cpp='$CXXCPP $CPPFLAGS'
15813 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15814 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15815 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15816 ac_main_return=return
15817
15818 cat > conftest.$ac_ext <<EOF
15819 #line 15819 "configure"
15820 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15821 EOF
15822
15823 if test "$INTEL_CPLUSPLUS" = yes
15824 then
15825 # The "-wdXXX" options suppress warnings:
15826 # remark #1419: external declaration in primary source file
15827 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15828 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15829 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15830 # remark #193: zero used for undefined preprocessing identifier
15831 # remark #593: variable "curs_sb_left_arrow" was set but never used
15832 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15833 # remark #869: parameter "tw" was never referenced
15834 # remark #981: operands are evaluated in unspecified order
15835 # warning #269: invalid format string conversion
15836
15837         { echo "$as_me:15837: checking for $CC warning options..." >&5
15838 echo "$as_me: checking for $CC warning options..." >&6;}
15839         cf_save_CXXFLAGS="$CXXFLAGS"
15840         EXTRA_CXXFLAGS="-Wall"
15841         for cf_opt in \
15842                 wd1419 \
15843                 wd1682 \
15844                 wd1683 \
15845                 wd1684 \
15846                 wd193 \
15847                 wd279 \
15848                 wd593 \
15849                 wd810 \
15850                 wd869 \
15851                 wd981
15852         do
15853                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15854                 if { (eval echo "$as_me:15854: \"$ac_compile\"") >&5
15855   (eval $ac_compile) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); }; then
15859                         test -n "$verbose" && echo "$as_me:15859: result: ... -$cf_opt" >&5
15860 echo "${ECHO_T}... -$cf_opt" >&6
15861                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15862                 fi
15863         done
15864         CXXFLAGS="$cf_save_CXXFLAGS"
15865
15866 elif test "$GXX" = yes
15867 then
15868         { echo "$as_me:15868: checking for $CXX warning options..." >&5
15869 echo "$as_me: checking for $CXX warning options..." >&6;}
15870         cf_save_CXXFLAGS="$CXXFLAGS"
15871         EXTRA_CXXFLAGS="-W -Wall"
15872         cf_gxx_extra_warnings=""
15873         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15874         case "$GCC_VERSION" in
15875         ([1-2].*)
15876                 ;;
15877         (*)
15878                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15879                 ;;
15880         esac
15881         for cf_opt in \
15882                 Wabi \
15883                 fabi-version=0 \
15884                 Wextra \
15885                 Wignored-qualifiers \
15886                 Wlogical-op \
15887                 Woverloaded-virtual \
15888                 Wsign-promo \
15889                 Wsynth \
15890                 Wold-style-cast \
15891                 Wcast-align \
15892                 Wcast-qual \
15893                 Wpointer-arith \
15894                 Wshadow \
15895                 Wundef $cf_gxx_extra_warnings Wno-unused
15896         do
15897                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15898                 if { (eval echo "$as_me:15898: \"$ac_compile\"") >&5
15899   (eval $ac_compile) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); }; then
15903                         test -n "$verbose" && echo "$as_me:15903: result: ... -$cf_opt" >&5
15904 echo "${ECHO_T}... -$cf_opt" >&6
15905                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15906                 else
15907                         test -n "$verbose" && echo "$as_me:15907: result: ... no -$cf_opt" >&5
15908 echo "${ECHO_T}... no -$cf_opt" >&6
15909                 fi
15910         done
15911         CXXFLAGS="$cf_save_CXXFLAGS"
15912 fi
15913
15914 rm -rf conftest*
15915 ac_ext=c
15916 ac_cpp='$CPP $CPPFLAGS'
15917 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15918 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15919 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15920 ac_main_return=return
15921
15922         fi
15923 fi
15924
15925 if test "$GCC" = yes
15926 then
15927 cat > conftest.i <<EOF
15928 #ifndef GCC_PRINTF
15929 #define GCC_PRINTF 0
15930 #endif
15931 #ifndef GCC_SCANF
15932 #define GCC_SCANF 0
15933 #endif
15934 #ifndef GCC_NORETURN
15935 #define GCC_NORETURN /* nothing */
15936 #endif
15937 #ifndef GCC_UNUSED
15938 #define GCC_UNUSED /* nothing */
15939 #endif
15940 EOF
15941 if test "$GCC" = yes
15942 then
15943         { echo "$as_me:15943: checking for $CC __attribute__ directives..." >&5
15944 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15945 cat > conftest.$ac_ext <<EOF
15946 #line 15946 "${as_me:-configure}"
15947 #include "confdefs.h"
15948 #include "conftest.h"
15949 #include "conftest.i"
15950 #if     GCC_PRINTF
15951 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15952 #else
15953 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15954 #endif
15955 #if     GCC_SCANF
15956 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15957 #else
15958 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15959 #endif
15960 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15961 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15962 extern void foo(void) GCC_NORETURN;
15963 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15964 EOF
15965         cf_printf_attribute=no
15966         cf_scanf_attribute=no
15967         for cf_attribute in scanf printf unused noreturn
15968         do
15969
15970 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15971
15972                 cf_directive="__attribute__(($cf_attribute))"
15973                 echo "checking for $CC $cf_directive" 1>&5
15974
15975                 case $cf_attribute in
15976                 (printf)
15977                         cf_printf_attribute=yes
15978                         cat >conftest.h <<EOF
15979 #define GCC_$cf_ATTRIBUTE 1
15980 EOF
15981                         ;;
15982                 (scanf)
15983                         cf_scanf_attribute=yes
15984                         cat >conftest.h <<EOF
15985 #define GCC_$cf_ATTRIBUTE 1
15986 EOF
15987                         ;;
15988                 (*)
15989                         cat >conftest.h <<EOF
15990 #define GCC_$cf_ATTRIBUTE $cf_directive
15991 EOF
15992                         ;;
15993                 esac
15994
15995                 if { (eval echo "$as_me:15995: \"$ac_compile\"") >&5
15996   (eval $ac_compile) 2>&5
15997   ac_status=$?
15998   echo "$as_me:15998: \$? = $ac_status" >&5
15999   (exit $ac_status); }; then
16000                         test -n "$verbose" && echo "$as_me:16000: result: ... $cf_attribute" >&5
16001 echo "${ECHO_T}... $cf_attribute" >&6
16002                         cat conftest.h >>confdefs.h
16003                         case $cf_attribute in
16004                         (noreturn)
16005
16006 cat >>confdefs.h <<EOF
16007 #define GCC_NORETURN $cf_directive
16008 EOF
16009
16010                                 ;;
16011                         (printf)
16012                                 cf_value='/* nothing */'
16013                                 if test "$cf_printf_attribute" != no ; then
16014                                         cf_value='__attribute__((format(printf,fmt,var)))'
16015
16016 cat >>confdefs.h <<\EOF
16017 #define GCC_PRINTF 1
16018 EOF
16019
16020                                 fi
16021
16022 cat >>confdefs.h <<EOF
16023 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16024 EOF
16025
16026                                 ;;
16027                         (scanf)
16028                                 cf_value='/* nothing */'
16029                                 if test "$cf_scanf_attribute" != no ; then
16030                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16031
16032 cat >>confdefs.h <<\EOF
16033 #define GCC_SCANF 1
16034 EOF
16035
16036                                 fi
16037
16038 cat >>confdefs.h <<EOF
16039 #define GCC_SCANFLIKE(fmt,var) $cf_value
16040 EOF
16041
16042                                 ;;
16043                         (unused)
16044
16045 cat >>confdefs.h <<EOF
16046 #define GCC_UNUSED $cf_directive
16047 EOF
16048
16049                                 ;;
16050                         esac
16051                 fi
16052         done
16053 else
16054         fgrep define conftest.i >>confdefs.h
16055 fi
16056 rm -rf conftest*
16057 fi
16058
16059 echo "$as_me:16059: checking if you want to work around bogus compiler/loader warnings" >&5
16060 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16061
16062 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16063 if test "${enable_string_hacks+set}" = set; then
16064   enableval="$enable_string_hacks"
16065   with_string_hacks=$enableval
16066 else
16067   with_string_hacks=no
16068 fi;
16069 echo "$as_me:16069: result: $with_string_hacks" >&5
16070 echo "${ECHO_T}$with_string_hacks" >&6
16071
16072 if test "x$with_string_hacks" = "xyes"; then
16073
16074 cat >>confdefs.h <<\EOF
16075 #define USE_STRING_HACKS 1
16076 EOF
16077
16078         { echo "$as_me:16078: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16079 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16080         echo "$as_me:16080: checking for strlcat" >&5
16081 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16082 if test "${ac_cv_func_strlcat+set}" = set; then
16083   echo $ECHO_N "(cached) $ECHO_C" >&6
16084 else
16085   cat >conftest.$ac_ext <<_ACEOF
16086 #line 16086 "configure"
16087 #include "confdefs.h"
16088 #define strlcat autoconf_temporary
16089 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16090 #undef strlcat
16091
16092 #ifdef __cplusplus
16093 extern "C"
16094 #endif
16095
16096 /* We use char because int might match the return type of a gcc2
16097    builtin and then its argument prototype would still apply.  */
16098 char strlcat (void);
16099
16100 int
16101 main (void)
16102 {
16103
16104 /* The GNU C library defines stubs for functions which it implements
16105     to always fail with ENOSYS.  Some functions are actually named
16106     something starting with __ and the normal name is an alias.  */
16107 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16108 #error found stub for strlcat
16109 #endif
16110
16111         return strlcat ();
16112   ;
16113   return 0;
16114 }
16115 _ACEOF
16116 rm -f conftest.$ac_objext conftest$ac_exeext
16117 if { (eval echo "$as_me:16117: \"$ac_link\"") >&5
16118   (eval $ac_link) 2>&5
16119   ac_status=$?
16120   echo "$as_me:16120: \$? = $ac_status" >&5
16121   (exit $ac_status); } &&
16122          { ac_try='test -s conftest$ac_exeext'
16123   { (eval echo "$as_me:16123: \"$ac_try\"") >&5
16124   (eval $ac_try) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); }; }; then
16128   ac_cv_func_strlcat=yes
16129 else
16130   echo "$as_me: failed program was:" >&5
16131 cat conftest.$ac_ext >&5
16132 ac_cv_func_strlcat=no
16133 fi
16134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16135 fi
16136 echo "$as_me:16136: result: $ac_cv_func_strlcat" >&5
16137 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16138 if test $ac_cv_func_strlcat = yes; then
16139
16140 cat >>confdefs.h <<\EOF
16141 #define HAVE_STRLCAT 1
16142 EOF
16143
16144 else
16145
16146                 echo "$as_me:16146: checking for strlcat in -lbsd" >&5
16147 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16148 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16149   echo $ECHO_N "(cached) $ECHO_C" >&6
16150 else
16151   ac_check_lib_save_LIBS=$LIBS
16152 LIBS="-lbsd  $LIBS"
16153 cat >conftest.$ac_ext <<_ACEOF
16154 #line 16154 "configure"
16155 #include "confdefs.h"
16156
16157 /* Override any gcc2 internal prototype to avoid an error.  */
16158 #ifdef __cplusplus
16159 extern "C"
16160 #endif
16161 /* We use char because int might match the return type of a gcc2
16162    builtin and then its argument prototype would still apply.  */
16163 char strlcat ();
16164 int
16165 main (void)
16166 {
16167 strlcat ();
16168   ;
16169   return 0;
16170 }
16171 _ACEOF
16172 rm -f conftest.$ac_objext conftest$ac_exeext
16173 if { (eval echo "$as_me:16173: \"$ac_link\"") >&5
16174   (eval $ac_link) 2>&5
16175   ac_status=$?
16176   echo "$as_me:16176: \$? = $ac_status" >&5
16177   (exit $ac_status); } &&
16178          { ac_try='test -s conftest$ac_exeext'
16179   { (eval echo "$as_me:16179: \"$ac_try\"") >&5
16180   (eval $ac_try) 2>&5
16181   ac_status=$?
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit $ac_status); }; }; then
16184   ac_cv_lib_bsd_strlcat=yes
16185 else
16186   echo "$as_me: failed program was:" >&5
16187 cat conftest.$ac_ext >&5
16188 ac_cv_lib_bsd_strlcat=no
16189 fi
16190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16191 LIBS=$ac_check_lib_save_LIBS
16192 fi
16193 echo "$as_me:16193: result: $ac_cv_lib_bsd_strlcat" >&5
16194 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16195 if test $ac_cv_lib_bsd_strlcat = yes; then
16196
16197 cf_add_libs="$LIBS"
16198 # reverse order
16199 cf_add_0lib=
16200 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16201 # filter duplicates
16202 for cf_add_1lib in $cf_add_0lib; do
16203         for cf_add_2lib in $cf_add_libs; do
16204                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16205                         cf_add_1lib=
16206                         break
16207                 fi
16208         done
16209         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16210 done
16211 LIBS="$cf_add_libs"
16212
16213 for ac_header in bsd/string.h
16214 do
16215 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16216 echo "$as_me:16216: checking for $ac_header" >&5
16217 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16218 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16219   echo $ECHO_N "(cached) $ECHO_C" >&6
16220 else
16221   cat >conftest.$ac_ext <<_ACEOF
16222 #line 16222 "configure"
16223 #include "confdefs.h"
16224 #include <$ac_header>
16225 _ACEOF
16226 if { (eval echo "$as_me:16226: \"$ac_cpp conftest.$ac_ext\"") >&5
16227   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16228   ac_status=$?
16229   egrep -v '^ *\+' conftest.er1 >conftest.err
16230   rm -f conftest.er1
16231   cat conftest.err >&5
16232   echo "$as_me:16232: \$? = $ac_status" >&5
16233   (exit $ac_status); } >/dev/null; then
16234   if test -s conftest.err; then
16235     ac_cpp_err=$ac_c_preproc_warn_flag
16236   else
16237     ac_cpp_err=
16238   fi
16239 else
16240   ac_cpp_err=yes
16241 fi
16242 if test -z "$ac_cpp_err"; then
16243   eval "$as_ac_Header=yes"
16244 else
16245   echo "$as_me: failed program was:" >&5
16246   cat conftest.$ac_ext >&5
16247   eval "$as_ac_Header=no"
16248 fi
16249 rm -f conftest.err conftest.$ac_ext
16250 fi
16251 echo "$as_me:16251: result: `eval echo '${'$as_ac_Header'}'`" >&5
16252 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16253 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16254   cat >>confdefs.h <<EOF
16255 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16256 EOF
16257
16258 fi
16259 done
16260
16261 cat >>confdefs.h <<\EOF
16262 #define HAVE_STRLCAT 1
16263 EOF
16264
16265 fi
16266
16267 fi
16268
16269 for ac_func in strlcpy snprintf
16270 do
16271 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16272 echo "$as_me:16272: checking for $ac_func" >&5
16273 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16274 if eval "test \"\${$as_ac_var+set}\" = set"; then
16275   echo $ECHO_N "(cached) $ECHO_C" >&6
16276 else
16277   cat >conftest.$ac_ext <<_ACEOF
16278 #line 16278 "configure"
16279 #include "confdefs.h"
16280 #define $ac_func autoconf_temporary
16281 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16282 #undef $ac_func
16283
16284 #ifdef __cplusplus
16285 extern "C"
16286 #endif
16287
16288 /* We use char because int might match the return type of a gcc2
16289    builtin and then its argument prototype would still apply.  */
16290 char $ac_func (void);
16291
16292 int
16293 main (void)
16294 {
16295
16296 /* The GNU C library defines stubs for functions which it implements
16297     to always fail with ENOSYS.  Some functions are actually named
16298     something starting with __ and the normal name is an alias.  */
16299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16300 #error found stub for $ac_func
16301 #endif
16302
16303         return $ac_func ();
16304   ;
16305   return 0;
16306 }
16307 _ACEOF
16308 rm -f conftest.$ac_objext conftest$ac_exeext
16309 if { (eval echo "$as_me:16309: \"$ac_link\"") >&5
16310   (eval $ac_link) 2>&5
16311   ac_status=$?
16312   echo "$as_me:16312: \$? = $ac_status" >&5
16313   (exit $ac_status); } &&
16314          { ac_try='test -s conftest$ac_exeext'
16315   { (eval echo "$as_me:16315: \"$ac_try\"") >&5
16316   (eval $ac_try) 2>&5
16317   ac_status=$?
16318   echo "$as_me:16318: \$? = $ac_status" >&5
16319   (exit $ac_status); }; }; then
16320   eval "$as_ac_var=yes"
16321 else
16322   echo "$as_me: failed program was:" >&5
16323 cat conftest.$ac_ext >&5
16324 eval "$as_ac_var=no"
16325 fi
16326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16327 fi
16328 echo "$as_me:16328: result: `eval echo '${'$as_ac_var'}'`" >&5
16329 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16330 if test `eval echo '${'$as_ac_var'}'` = yes; then
16331   cat >>confdefs.h <<EOF
16332 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16333 EOF
16334
16335 fi
16336 done
16337
16338 fi
16339
16340 ###     use option --enable-assertions to turn on generation of assertion code
16341 echo "$as_me:16341: checking if you want to enable runtime assertions" >&5
16342 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16343
16344 # Check whether --enable-assertions or --disable-assertions was given.
16345 if test "${enable_assertions+set}" = set; then
16346   enableval="$enable_assertions"
16347   with_assertions=$enableval
16348 else
16349   with_assertions=no
16350 fi;
16351 echo "$as_me:16351: result: $with_assertions" >&5
16352 echo "${ECHO_T}$with_assertions" >&6
16353 if test -n "$GCC"
16354 then
16355         if test "$with_assertions" = no
16356         then
16357                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16358         else
16359
16360         ADAFLAGS="$ADAFLAGS -gnata"
16361
16362         fi
16363 fi
16364
16365 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16366
16367 echo "$as_me:16367: checking if you want to use dmalloc for testing" >&5
16368 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16369
16370 # Check whether --with-dmalloc or --without-dmalloc was given.
16371 if test "${with_dmalloc+set}" = set; then
16372   withval="$with_dmalloc"
16373
16374 cat >>confdefs.h <<EOF
16375 #define USE_DMALLOC 1
16376 EOF
16377
16378         : ${with_cflags:=-g}
16379         : ${with_no_leaks:=yes}
16380          with_dmalloc=yes
16381 else
16382   with_dmalloc=
16383 fi;
16384 echo "$as_me:16384: result: ${with_dmalloc:-no}" >&5
16385 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16386
16387 case .$with_cflags in
16388 (.*-g*)
16389         case .$CFLAGS in
16390         (.*-g*)
16391                 ;;
16392         (*)
16393
16394 cf_fix_cppflags=no
16395 cf_new_cflags=
16396 cf_new_cppflags=
16397 cf_new_extra_cppflags=
16398
16399 for cf_add_cflags in -g
16400 do
16401 case $cf_fix_cppflags in
16402 (no)
16403         case $cf_add_cflags in
16404         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16405                 case $cf_add_cflags in
16406                 (-D*)
16407                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16408
16409                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16410                                 && test -z "${cf_tst_cflags}" \
16411                                 && cf_fix_cppflags=yes
16412
16413                         if test $cf_fix_cppflags = yes ; then
16414
16415         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16416         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16417
16418                                 continue
16419                         elif test "${cf_tst_cflags}" = "\"'" ; then
16420
16421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16423
16424                                 continue
16425                         fi
16426                         ;;
16427                 esac
16428                 case "$CPPFLAGS" in
16429                 (*$cf_add_cflags)
16430                         ;;
16431                 (*)
16432                         case $cf_add_cflags in
16433                         (-D*)
16434                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16435
16436 CPPFLAGS=`echo "$CPPFLAGS" | \
16437         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16438                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16439
16440                                 ;;
16441                         esac
16442
16443         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16444         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16445
16446                         ;;
16447                 esac
16448                 ;;
16449         (*)
16450
16451         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16452         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16453
16454                 ;;
16455         esac
16456         ;;
16457 (yes)
16458
16459         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16460         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16461
16462         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16463
16464         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16465                 && test -z "${cf_tst_cflags}" \
16466                 && cf_fix_cppflags=no
16467         ;;
16468 esac
16469 done
16470
16471 if test -n "$cf_new_cflags" ; then
16472
16473         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16474         CFLAGS="${CFLAGS}$cf_new_cflags"
16475
16476 fi
16477
16478 if test -n "$cf_new_cppflags" ; then
16479
16480         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16481         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16482
16483 fi
16484
16485 if test -n "$cf_new_extra_cppflags" ; then
16486
16487         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16488         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16489
16490 fi
16491
16492                 ;;
16493         esac
16494         ;;
16495 esac
16496
16497 if test "$with_dmalloc" = yes ; then
16498         echo "$as_me:16498: checking for dmalloc.h" >&5
16499 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16500 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16501   echo $ECHO_N "(cached) $ECHO_C" >&6
16502 else
16503   cat >conftest.$ac_ext <<_ACEOF
16504 #line 16504 "configure"
16505 #include "confdefs.h"
16506 #include <dmalloc.h>
16507 _ACEOF
16508 if { (eval echo "$as_me:16508: \"$ac_cpp conftest.$ac_ext\"") >&5
16509   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16510   ac_status=$?
16511   egrep -v '^ *\+' conftest.er1 >conftest.err
16512   rm -f conftest.er1
16513   cat conftest.err >&5
16514   echo "$as_me:16514: \$? = $ac_status" >&5
16515   (exit $ac_status); } >/dev/null; then
16516   if test -s conftest.err; then
16517     ac_cpp_err=$ac_c_preproc_warn_flag
16518   else
16519     ac_cpp_err=
16520   fi
16521 else
16522   ac_cpp_err=yes
16523 fi
16524 if test -z "$ac_cpp_err"; then
16525   ac_cv_header_dmalloc_h=yes
16526 else
16527   echo "$as_me: failed program was:" >&5
16528   cat conftest.$ac_ext >&5
16529   ac_cv_header_dmalloc_h=no
16530 fi
16531 rm -f conftest.err conftest.$ac_ext
16532 fi
16533 echo "$as_me:16533: result: $ac_cv_header_dmalloc_h" >&5
16534 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16535 if test $ac_cv_header_dmalloc_h = yes; then
16536
16537 echo "$as_me:16537: checking for dmalloc_debug in -ldmalloc" >&5
16538 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16539 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16540   echo $ECHO_N "(cached) $ECHO_C" >&6
16541 else
16542   ac_check_lib_save_LIBS=$LIBS
16543 LIBS="-ldmalloc  $LIBS"
16544 cat >conftest.$ac_ext <<_ACEOF
16545 #line 16545 "configure"
16546 #include "confdefs.h"
16547
16548 /* Override any gcc2 internal prototype to avoid an error.  */
16549 #ifdef __cplusplus
16550 extern "C"
16551 #endif
16552 /* We use char because int might match the return type of a gcc2
16553    builtin and then its argument prototype would still apply.  */
16554 char dmalloc_debug ();
16555 int
16556 main (void)
16557 {
16558 dmalloc_debug ();
16559   ;
16560   return 0;
16561 }
16562 _ACEOF
16563 rm -f conftest.$ac_objext conftest$ac_exeext
16564 if { (eval echo "$as_me:16564: \"$ac_link\"") >&5
16565   (eval $ac_link) 2>&5
16566   ac_status=$?
16567   echo "$as_me:16567: \$? = $ac_status" >&5
16568   (exit $ac_status); } &&
16569          { ac_try='test -s conftest$ac_exeext'
16570   { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); }; }; then
16575   ac_cv_lib_dmalloc_dmalloc_debug=yes
16576 else
16577   echo "$as_me: failed program was:" >&5
16578 cat conftest.$ac_ext >&5
16579 ac_cv_lib_dmalloc_dmalloc_debug=no
16580 fi
16581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16582 LIBS=$ac_check_lib_save_LIBS
16583 fi
16584 echo "$as_me:16584: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16585 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16586 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16587   cat >>confdefs.h <<EOF
16588 #define HAVE_LIBDMALLOC 1
16589 EOF
16590
16591   LIBS="-ldmalloc $LIBS"
16592
16593 fi
16594
16595 fi
16596
16597 fi
16598
16599 echo "$as_me:16599: checking if you want to use dbmalloc for testing" >&5
16600 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16601
16602 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16603 if test "${with_dbmalloc+set}" = set; then
16604   withval="$with_dbmalloc"
16605
16606 cat >>confdefs.h <<EOF
16607 #define USE_DBMALLOC 1
16608 EOF
16609
16610         : ${with_cflags:=-g}
16611         : ${with_no_leaks:=yes}
16612          with_dbmalloc=yes
16613 else
16614   with_dbmalloc=
16615 fi;
16616 echo "$as_me:16616: result: ${with_dbmalloc:-no}" >&5
16617 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16618
16619 case .$with_cflags in
16620 (.*-g*)
16621         case .$CFLAGS in
16622         (.*-g*)
16623                 ;;
16624         (*)
16625
16626 cf_fix_cppflags=no
16627 cf_new_cflags=
16628 cf_new_cppflags=
16629 cf_new_extra_cppflags=
16630
16631 for cf_add_cflags in -g
16632 do
16633 case $cf_fix_cppflags in
16634 (no)
16635         case $cf_add_cflags in
16636         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16637                 case $cf_add_cflags in
16638                 (-D*)
16639                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16640
16641                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16642                                 && test -z "${cf_tst_cflags}" \
16643                                 && cf_fix_cppflags=yes
16644
16645                         if test $cf_fix_cppflags = yes ; then
16646
16647         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16648         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16649
16650                                 continue
16651                         elif test "${cf_tst_cflags}" = "\"'" ; then
16652
16653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16655
16656                                 continue
16657                         fi
16658                         ;;
16659                 esac
16660                 case "$CPPFLAGS" in
16661                 (*$cf_add_cflags)
16662                         ;;
16663                 (*)
16664                         case $cf_add_cflags in
16665                         (-D*)
16666                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16667
16668 CPPFLAGS=`echo "$CPPFLAGS" | \
16669         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16670                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16671
16672                                 ;;
16673                         esac
16674
16675         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16676         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16677
16678                         ;;
16679                 esac
16680                 ;;
16681         (*)
16682
16683         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16684         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16685
16686                 ;;
16687         esac
16688         ;;
16689 (yes)
16690
16691         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16692         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16693
16694         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16695
16696         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16697                 && test -z "${cf_tst_cflags}" \
16698                 && cf_fix_cppflags=no
16699         ;;
16700 esac
16701 done
16702
16703 if test -n "$cf_new_cflags" ; then
16704
16705         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16706         CFLAGS="${CFLAGS}$cf_new_cflags"
16707
16708 fi
16709
16710 if test -n "$cf_new_cppflags" ; then
16711
16712         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16713         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16714
16715 fi
16716
16717 if test -n "$cf_new_extra_cppflags" ; then
16718
16719         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16720         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16721
16722 fi
16723
16724                 ;;
16725         esac
16726         ;;
16727 esac
16728
16729 if test "$with_dbmalloc" = yes ; then
16730         echo "$as_me:16730: checking for dbmalloc.h" >&5
16731 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16732 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16733   echo $ECHO_N "(cached) $ECHO_C" >&6
16734 else
16735   cat >conftest.$ac_ext <<_ACEOF
16736 #line 16736 "configure"
16737 #include "confdefs.h"
16738 #include <dbmalloc.h>
16739 _ACEOF
16740 if { (eval echo "$as_me:16740: \"$ac_cpp conftest.$ac_ext\"") >&5
16741   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16742   ac_status=$?
16743   egrep -v '^ *\+' conftest.er1 >conftest.err
16744   rm -f conftest.er1
16745   cat conftest.err >&5
16746   echo "$as_me:16746: \$? = $ac_status" >&5
16747   (exit $ac_status); } >/dev/null; then
16748   if test -s conftest.err; then
16749     ac_cpp_err=$ac_c_preproc_warn_flag
16750   else
16751     ac_cpp_err=
16752   fi
16753 else
16754   ac_cpp_err=yes
16755 fi
16756 if test -z "$ac_cpp_err"; then
16757   ac_cv_header_dbmalloc_h=yes
16758 else
16759   echo "$as_me: failed program was:" >&5
16760   cat conftest.$ac_ext >&5
16761   ac_cv_header_dbmalloc_h=no
16762 fi
16763 rm -f conftest.err conftest.$ac_ext
16764 fi
16765 echo "$as_me:16765: result: $ac_cv_header_dbmalloc_h" >&5
16766 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16767 if test $ac_cv_header_dbmalloc_h = yes; then
16768
16769 echo "$as_me:16769: checking for debug_malloc in -ldbmalloc" >&5
16770 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16771 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16772   echo $ECHO_N "(cached) $ECHO_C" >&6
16773 else
16774   ac_check_lib_save_LIBS=$LIBS
16775 LIBS="-ldbmalloc  $LIBS"
16776 cat >conftest.$ac_ext <<_ACEOF
16777 #line 16777 "configure"
16778 #include "confdefs.h"
16779
16780 /* Override any gcc2 internal prototype to avoid an error.  */
16781 #ifdef __cplusplus
16782 extern "C"
16783 #endif
16784 /* We use char because int might match the return type of a gcc2
16785    builtin and then its argument prototype would still apply.  */
16786 char debug_malloc ();
16787 int
16788 main (void)
16789 {
16790 debug_malloc ();
16791   ;
16792   return 0;
16793 }
16794 _ACEOF
16795 rm -f conftest.$ac_objext conftest$ac_exeext
16796 if { (eval echo "$as_me:16796: \"$ac_link\"") >&5
16797   (eval $ac_link) 2>&5
16798   ac_status=$?
16799   echo "$as_me:16799: \$? = $ac_status" >&5
16800   (exit $ac_status); } &&
16801          { ac_try='test -s conftest$ac_exeext'
16802   { (eval echo "$as_me:16802: \"$ac_try\"") >&5
16803   (eval $ac_try) 2>&5
16804   ac_status=$?
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); }; }; then
16807   ac_cv_lib_dbmalloc_debug_malloc=yes
16808 else
16809   echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16811 ac_cv_lib_dbmalloc_debug_malloc=no
16812 fi
16813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16814 LIBS=$ac_check_lib_save_LIBS
16815 fi
16816 echo "$as_me:16816: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16817 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16818 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16819   cat >>confdefs.h <<EOF
16820 #define HAVE_LIBDBMALLOC 1
16821 EOF
16822
16823   LIBS="-ldbmalloc $LIBS"
16824
16825 fi
16826
16827 fi
16828
16829 fi
16830
16831 echo "$as_me:16831: checking if you want to use valgrind for testing" >&5
16832 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16833
16834 # Check whether --with-valgrind or --without-valgrind was given.
16835 if test "${with_valgrind+set}" = set; then
16836   withval="$with_valgrind"
16837
16838 cat >>confdefs.h <<EOF
16839 #define USE_VALGRIND 1
16840 EOF
16841
16842         : ${with_cflags:=-g}
16843         : ${with_no_leaks:=yes}
16844          with_valgrind=yes
16845 else
16846   with_valgrind=
16847 fi;
16848 echo "$as_me:16848: result: ${with_valgrind:-no}" >&5
16849 echo "${ECHO_T}${with_valgrind:-no}" >&6
16850
16851 case .$with_cflags in
16852 (.*-g*)
16853         case .$CFLAGS in
16854         (.*-g*)
16855                 ;;
16856         (*)
16857
16858 cf_fix_cppflags=no
16859 cf_new_cflags=
16860 cf_new_cppflags=
16861 cf_new_extra_cppflags=
16862
16863 for cf_add_cflags in -g
16864 do
16865 case $cf_fix_cppflags in
16866 (no)
16867         case $cf_add_cflags in
16868         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16869                 case $cf_add_cflags in
16870                 (-D*)
16871                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16872
16873                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16874                                 && test -z "${cf_tst_cflags}" \
16875                                 && cf_fix_cppflags=yes
16876
16877                         if test $cf_fix_cppflags = yes ; then
16878
16879         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16880         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16881
16882                                 continue
16883                         elif test "${cf_tst_cflags}" = "\"'" ; then
16884
16885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16887
16888                                 continue
16889                         fi
16890                         ;;
16891                 esac
16892                 case "$CPPFLAGS" in
16893                 (*$cf_add_cflags)
16894                         ;;
16895                 (*)
16896                         case $cf_add_cflags in
16897                         (-D*)
16898                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16899
16900 CPPFLAGS=`echo "$CPPFLAGS" | \
16901         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16902                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16903
16904                                 ;;
16905                         esac
16906
16907         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16908         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16909
16910                         ;;
16911                 esac
16912                 ;;
16913         (*)
16914
16915         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16916         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16917
16918                 ;;
16919         esac
16920         ;;
16921 (yes)
16922
16923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16925
16926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16927
16928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16929                 && test -z "${cf_tst_cflags}" \
16930                 && cf_fix_cppflags=no
16931         ;;
16932 esac
16933 done
16934
16935 if test -n "$cf_new_cflags" ; then
16936
16937         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16938         CFLAGS="${CFLAGS}$cf_new_cflags"
16939
16940 fi
16941
16942 if test -n "$cf_new_cppflags" ; then
16943
16944         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16945         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16946
16947 fi
16948
16949 if test -n "$cf_new_extra_cppflags" ; then
16950
16951         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16952         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16953
16954 fi
16955
16956                 ;;
16957         esac
16958         ;;
16959 esac
16960
16961 echo "$as_me:16961: checking if you want to perform memory-leak testing" >&5
16962 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16963
16964 # Check whether --enable-leaks or --disable-leaks was given.
16965 if test "${enable_leaks+set}" = set; then
16966   enableval="$enable_leaks"
16967   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16968 else
16969   : ${with_no_leaks:=no}
16970 fi;
16971 echo "$as_me:16971: result: $with_no_leaks" >&5
16972 echo "${ECHO_T}$with_no_leaks" >&6
16973
16974 if test "$with_no_leaks" = yes ; then
16975
16976 cat >>confdefs.h <<\EOF
16977 #define NO_LEAKS 1
16978 EOF
16979
16980 cat >>confdefs.h <<\EOF
16981 #define YY_NO_LEAKS 1
16982 EOF
16983
16984 fi
16985
16986 cat >>confdefs.h <<\EOF
16987 #define HAVE_NC_ALLOC_H 1
16988 EOF
16989
16990 ###     use option --enable-expanded to generate certain macros as functions
16991
16992 # Check whether --enable-expanded or --disable-expanded was given.
16993 if test "${enable_expanded+set}" = set; then
16994   enableval="$enable_expanded"
16995   test "x$enableval" = xyes &&
16996 cat >>confdefs.h <<\EOF
16997 #define NCURSES_EXPANDED 1
16998 EOF
16999
17000 fi;
17001
17002 ###     use option --disable-macros to suppress macros in favor of functions
17003
17004 # Check whether --enable-macros or --disable-macros was given.
17005 if test "${enable_macros+set}" = set; then
17006   enableval="$enable_macros"
17007   test "$enableval" = no &&
17008 cat >>confdefs.h <<\EOF
17009 #define NCURSES_NOMACROS 1
17010 EOF
17011
17012 fi;
17013
17014 # Normally we only add trace() to the debug-library.  Allow this to be
17015 # extended to all models of the ncurses library:
17016 cf_all_traces=no
17017 case "$CFLAGS $CPPFLAGS" in
17018 (*-DTRACE*)
17019         cf_all_traces=yes
17020         ;;
17021 esac
17022
17023 echo "$as_me:17023: checking whether to add trace feature to all models" >&5
17024 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17025
17026 # Check whether --with-trace or --without-trace was given.
17027 if test "${with_trace+set}" = set; then
17028   withval="$with_trace"
17029   cf_with_trace=$withval
17030 else
17031   cf_with_trace=$cf_all_traces
17032 fi;
17033 echo "$as_me:17033: result: $cf_with_trace" >&5
17034 echo "${ECHO_T}$cf_with_trace" >&6
17035
17036 if test "x$cf_with_trace" = xyes ; then
17037         LIB_TRACING=all
17038         ADA_TRACE=TRUE
17039
17040 cf_fix_cppflags=no
17041 cf_new_cflags=
17042 cf_new_cppflags=
17043 cf_new_extra_cppflags=
17044
17045 for cf_add_cflags in -DTRACE
17046 do
17047 case $cf_fix_cppflags in
17048 (no)
17049         case $cf_add_cflags in
17050         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17051                 case $cf_add_cflags in
17052                 (-D*)
17053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17054
17055                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17056                                 && test -z "${cf_tst_cflags}" \
17057                                 && cf_fix_cppflags=yes
17058
17059                         if test $cf_fix_cppflags = yes ; then
17060
17061         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17062         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17063
17064                                 continue
17065                         elif test "${cf_tst_cflags}" = "\"'" ; then
17066
17067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17069
17070                                 continue
17071                         fi
17072                         ;;
17073                 esac
17074                 case "$CPPFLAGS" in
17075                 (*$cf_add_cflags)
17076                         ;;
17077                 (*)
17078                         case $cf_add_cflags in
17079                         (-D*)
17080                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17081
17082 CPPFLAGS=`echo "$CPPFLAGS" | \
17083         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17084                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17085
17086                                 ;;
17087                         esac
17088
17089         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17090         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17091
17092                         ;;
17093                 esac
17094                 ;;
17095         (*)
17096
17097         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17098         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17099
17100                 ;;
17101         esac
17102         ;;
17103 (yes)
17104
17105         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17106         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17107
17108         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17109
17110         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17111                 && test -z "${cf_tst_cflags}" \
17112                 && cf_fix_cppflags=no
17113         ;;
17114 esac
17115 done
17116
17117 if test -n "$cf_new_cflags" ; then
17118
17119         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17120         CFLAGS="${CFLAGS}$cf_new_cflags"
17121
17122 fi
17123
17124 if test -n "$cf_new_cppflags" ; then
17125
17126         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17127         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17128
17129 fi
17130
17131 if test -n "$cf_new_extra_cppflags" ; then
17132
17133         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17134         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17135
17136 fi
17137
17138 cat >>confdefs.h <<\EOF
17139 #define HAVE__TRACEF 1
17140 EOF
17141
17142 else
17143         LIB_TRACING=DEBUG
17144         ADA_TRACE=FALSE
17145 fi
17146
17147 echo "$as_me:17147: checking if we want to use GNAT projects" >&5
17148 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17149
17150 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17151 if test "${enable_gnat_projects+set}" = set; then
17152   enableval="$enable_gnat_projects"
17153   test "$enableval" != no && enableval=yes
17154         if test "$enableval" != "yes" ; then
17155     enable_gnat_projects=no
17156         else
17157                 enable_gnat_projects=yes
17158         fi
17159 else
17160   enableval=yes
17161         enable_gnat_projects=yes
17162
17163 fi;
17164 echo "$as_me:17164: result: $enable_gnat_projects" >&5
17165 echo "${ECHO_T}$enable_gnat_projects" >&6
17166
17167 ###     Checks for libraries.
17168 case $cf_cv_system_name in
17169 (*mingw32*|*mingw64*)
17170         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17171         # Note: WINVER may be a problem with Windows 10
17172         ;;
17173 (*)
17174 echo "$as_me:17174: checking for gettimeofday" >&5
17175 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17176 if test "${ac_cv_func_gettimeofday+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179   cat >conftest.$ac_ext <<_ACEOF
17180 #line 17180 "configure"
17181 #include "confdefs.h"
17182 #define gettimeofday autoconf_temporary
17183 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17184 #undef gettimeofday
17185
17186 #ifdef __cplusplus
17187 extern "C"
17188 #endif
17189
17190 /* We use char because int might match the return type of a gcc2
17191    builtin and then its argument prototype would still apply.  */
17192 char gettimeofday (void);
17193
17194 int
17195 main (void)
17196 {
17197
17198 /* The GNU C library defines stubs for functions which it implements
17199     to always fail with ENOSYS.  Some functions are actually named
17200     something starting with __ and the normal name is an alias.  */
17201 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17202 #error found stub for gettimeofday
17203 #endif
17204
17205         return gettimeofday ();
17206   ;
17207   return 0;
17208 }
17209 _ACEOF
17210 rm -f conftest.$ac_objext conftest$ac_exeext
17211 if { (eval echo "$as_me:17211: \"$ac_link\"") >&5
17212   (eval $ac_link) 2>&5
17213   ac_status=$?
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit $ac_status); } &&
17216          { ac_try='test -s conftest$ac_exeext'
17217   { (eval echo "$as_me:17217: \"$ac_try\"") >&5
17218   (eval $ac_try) 2>&5
17219   ac_status=$?
17220   echo "$as_me:17220: \$? = $ac_status" >&5
17221   (exit $ac_status); }; }; then
17222   ac_cv_func_gettimeofday=yes
17223 else
17224   echo "$as_me: failed program was:" >&5
17225 cat conftest.$ac_ext >&5
17226 ac_cv_func_gettimeofday=no
17227 fi
17228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17229 fi
17230 echo "$as_me:17230: result: $ac_cv_func_gettimeofday" >&5
17231 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17232 if test $ac_cv_func_gettimeofday = yes; then
17233
17234 cat >>confdefs.h <<\EOF
17235 #define HAVE_GETTIMEOFDAY 1
17236 EOF
17237
17238 else
17239
17240 echo "$as_me:17240: checking for gettimeofday in -lbsd" >&5
17241 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17242 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 else
17245   ac_check_lib_save_LIBS=$LIBS
17246 LIBS="-lbsd  $LIBS"
17247 cat >conftest.$ac_ext <<_ACEOF
17248 #line 17248 "configure"
17249 #include "confdefs.h"
17250
17251 /* Override any gcc2 internal prototype to avoid an error.  */
17252 #ifdef __cplusplus
17253 extern "C"
17254 #endif
17255 /* We use char because int might match the return type of a gcc2
17256    builtin and then its argument prototype would still apply.  */
17257 char gettimeofday ();
17258 int
17259 main (void)
17260 {
17261 gettimeofday ();
17262   ;
17263   return 0;
17264 }
17265 _ACEOF
17266 rm -f conftest.$ac_objext conftest$ac_exeext
17267 if { (eval echo "$as_me:17267: \"$ac_link\"") >&5
17268   (eval $ac_link) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); } &&
17272          { ac_try='test -s conftest$ac_exeext'
17273   { (eval echo "$as_me:17273: \"$ac_try\"") >&5
17274   (eval $ac_try) 2>&5
17275   ac_status=$?
17276   echo "$as_me:17276: \$? = $ac_status" >&5
17277   (exit $ac_status); }; }; then
17278   ac_cv_lib_bsd_gettimeofday=yes
17279 else
17280   echo "$as_me: failed program was:" >&5
17281 cat conftest.$ac_ext >&5
17282 ac_cv_lib_bsd_gettimeofday=no
17283 fi
17284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17285 LIBS=$ac_check_lib_save_LIBS
17286 fi
17287 echo "$as_me:17287: result: $ac_cv_lib_bsd_gettimeofday" >&5
17288 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17289 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17290
17291 cat >>confdefs.h <<\EOF
17292 #define HAVE_GETTIMEOFDAY 1
17293 EOF
17294
17295 cf_add_libs="$LIBS"
17296 # reverse order
17297 cf_add_0lib=
17298 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17299 # filter duplicates
17300 for cf_add_1lib in $cf_add_0lib; do
17301         for cf_add_2lib in $cf_add_libs; do
17302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17303                         cf_add_1lib=
17304                         break
17305                 fi
17306         done
17307         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17308 done
17309 LIBS="$cf_add_libs"
17310
17311 fi
17312
17313 fi
17314         ;;
17315 esac
17316
17317 echo "$as_me:17317: checking if -lm needed for math functions" >&5
17318 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17319 if test "${cf_cv_need_libm+set}" = set; then
17320   echo $ECHO_N "(cached) $ECHO_C" >&6
17321 else
17322
17323         cat >conftest.$ac_ext <<_ACEOF
17324 #line 17324 "configure"
17325 #include "confdefs.h"
17326
17327         #include <stdio.h>
17328         #include <stdlib.h>
17329         #include <math.h>
17330
17331 int
17332 main (void)
17333 {
17334 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17335   ;
17336   return 0;
17337 }
17338 _ACEOF
17339 rm -f conftest.$ac_objext conftest$ac_exeext
17340 if { (eval echo "$as_me:17340: \"$ac_link\"") >&5
17341   (eval $ac_link) 2>&5
17342   ac_status=$?
17343   echo "$as_me:17343: \$? = $ac_status" >&5
17344   (exit $ac_status); } &&
17345          { ac_try='test -s conftest$ac_exeext'
17346   { (eval echo "$as_me:17346: \"$ac_try\"") >&5
17347   (eval $ac_try) 2>&5
17348   ac_status=$?
17349   echo "$as_me:17349: \$? = $ac_status" >&5
17350   (exit $ac_status); }; }; then
17351   cf_cv_need_libm=no
17352 else
17353   echo "$as_me: failed program was:" >&5
17354 cat conftest.$ac_ext >&5
17355 cf_cv_need_libm=yes
17356 fi
17357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17358 fi
17359 echo "$as_me:17359: result: $cf_cv_need_libm" >&5
17360 echo "${ECHO_T}$cf_cv_need_libm" >&6
17361 if test "$cf_cv_need_libm" = yes
17362 then
17363 MATH_LIB=-lm
17364 fi
17365
17366 ###     Checks for header files.
17367 echo "$as_me:17367: checking for ANSI C header files" >&5
17368 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17369 if test "${ac_cv_header_stdc+set}" = set; then
17370   echo $ECHO_N "(cached) $ECHO_C" >&6
17371 else
17372   cat >conftest.$ac_ext <<_ACEOF
17373 #line 17373 "configure"
17374 #include "confdefs.h"
17375 #include <stdlib.h>
17376 #include <stdarg.h>
17377 #include <string.h>
17378 #include <float.h>
17379
17380 _ACEOF
17381 if { (eval echo "$as_me:17381: \"$ac_cpp conftest.$ac_ext\"") >&5
17382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17383   ac_status=$?
17384   egrep -v '^ *\+' conftest.er1 >conftest.err
17385   rm -f conftest.er1
17386   cat conftest.err >&5
17387   echo "$as_me:17387: \$? = $ac_status" >&5
17388   (exit $ac_status); } >/dev/null; then
17389   if test -s conftest.err; then
17390     ac_cpp_err=$ac_c_preproc_warn_flag
17391   else
17392     ac_cpp_err=
17393   fi
17394 else
17395   ac_cpp_err=yes
17396 fi
17397 if test -z "$ac_cpp_err"; then
17398   ac_cv_header_stdc=yes
17399 else
17400   echo "$as_me: failed program was:" >&5
17401   cat conftest.$ac_ext >&5
17402   ac_cv_header_stdc=no
17403 fi
17404 rm -f conftest.err conftest.$ac_ext
17405
17406 if test $ac_cv_header_stdc = yes; then
17407   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17408   cat >conftest.$ac_ext <<_ACEOF
17409 #line 17409 "configure"
17410 #include "confdefs.h"
17411 #include <string.h>
17412
17413 _ACEOF
17414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17415   egrep "memchr" >/dev/null 2>&1; then
17416   :
17417 else
17418   ac_cv_header_stdc=no
17419 fi
17420 rm -rf conftest*
17421
17422 fi
17423
17424 if test $ac_cv_header_stdc = yes; then
17425   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17426   cat >conftest.$ac_ext <<_ACEOF
17427 #line 17427 "configure"
17428 #include "confdefs.h"
17429 #include <stdlib.h>
17430
17431 _ACEOF
17432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17433   egrep "free" >/dev/null 2>&1; then
17434   :
17435 else
17436   ac_cv_header_stdc=no
17437 fi
17438 rm -rf conftest*
17439
17440 fi
17441
17442 if test $ac_cv_header_stdc = yes; then
17443   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17444   if test "$cross_compiling" = yes; then
17445   :
17446 else
17447   cat >conftest.$ac_ext <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450 #include <ctype.h>
17451 #if ((' ' & 0x0FF) == 0x020)
17452 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17453 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17454 #else
17455 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17456                      || ('j' <= (c) && (c) <= 'r') \
17457                      || ('s' <= (c) && (c) <= 'z'))
17458 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17459 #endif
17460
17461 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17462 int
17463 main (void)
17464 {
17465   int i;
17466   for (i = 0; i < 256; i++)
17467     if (XOR (islower (i), ISLOWER (i))
17468         || toupper (i) != TOUPPER (i))
17469       $ac_main_return(2);
17470   $ac_main_return (0);
17471 }
17472 _ACEOF
17473 rm -f conftest$ac_exeext
17474 if { (eval echo "$as_me:17474: \"$ac_link\"") >&5
17475   (eval $ac_link) 2>&5
17476   ac_status=$?
17477   echo "$as_me:17477: \$? = $ac_status" >&5
17478   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17479   { (eval echo "$as_me:17479: \"$ac_try\"") >&5
17480   (eval $ac_try) 2>&5
17481   ac_status=$?
17482   echo "$as_me:17482: \$? = $ac_status" >&5
17483   (exit $ac_status); }; }; then
17484   :
17485 else
17486   echo "$as_me: program exited with status $ac_status" >&5
17487 echo "$as_me: failed program was:" >&5
17488 cat conftest.$ac_ext >&5
17489 ac_cv_header_stdc=no
17490 fi
17491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17492 fi
17493 fi
17494 fi
17495 echo "$as_me:17495: result: $ac_cv_header_stdc" >&5
17496 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17497 if test $ac_cv_header_stdc = yes; then
17498
17499 cat >>confdefs.h <<\EOF
17500 #define STDC_HEADERS 1
17501 EOF
17502
17503 fi
17504
17505 ac_header_dirent=no
17506 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17507   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17508 echo "$as_me:17508: checking for $ac_hdr that defines DIR" >&5
17509 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17510 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17511   echo $ECHO_N "(cached) $ECHO_C" >&6
17512 else
17513   cat >conftest.$ac_ext <<_ACEOF
17514 #line 17514 "configure"
17515 #include "confdefs.h"
17516 #include <sys/types.h>
17517 #include <$ac_hdr>
17518
17519 int
17520 main (void)
17521 {
17522 if ((DIR *) 0)
17523 return 0;
17524   ;
17525   return 0;
17526 }
17527 _ACEOF
17528 rm -f conftest.$ac_objext
17529 if { (eval echo "$as_me:17529: \"$ac_compile\"") >&5
17530   (eval $ac_compile) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit $ac_status); } &&
17534          { ac_try='test -s conftest.$ac_objext'
17535   { (eval echo "$as_me:17535: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit $ac_status); }; }; then
17540   eval "$as_ac_Header=yes"
17541 else
17542   echo "$as_me: failed program was:" >&5
17543 cat conftest.$ac_ext >&5
17544 eval "$as_ac_Header=no"
17545 fi
17546 rm -f conftest.$ac_objext conftest.$ac_ext
17547 fi
17548 echo "$as_me:17548: result: `eval echo '${'$as_ac_Header'}'`" >&5
17549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17550 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17551   cat >>confdefs.h <<EOF
17552 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17553 EOF
17554
17555 ac_header_dirent=$ac_hdr; break
17556 fi
17557
17558 done
17559 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17560 if test $ac_header_dirent = dirent.h; then
17561   echo "$as_me:17561: checking for opendir in -ldir" >&5
17562 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17563 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17564   echo $ECHO_N "(cached) $ECHO_C" >&6
17565 else
17566   ac_check_lib_save_LIBS=$LIBS
17567 LIBS="-ldir  $LIBS"
17568 cat >conftest.$ac_ext <<_ACEOF
17569 #line 17569 "configure"
17570 #include "confdefs.h"
17571
17572 /* Override any gcc2 internal prototype to avoid an error.  */
17573 #ifdef __cplusplus
17574 extern "C"
17575 #endif
17576 /* We use char because int might match the return type of a gcc2
17577    builtin and then its argument prototype would still apply.  */
17578 char opendir ();
17579 int
17580 main (void)
17581 {
17582 opendir ();
17583   ;
17584   return 0;
17585 }
17586 _ACEOF
17587 rm -f conftest.$ac_objext conftest$ac_exeext
17588 if { (eval echo "$as_me:17588: \"$ac_link\"") >&5
17589   (eval $ac_link) 2>&5
17590   ac_status=$?
17591   echo "$as_me:17591: \$? = $ac_status" >&5
17592   (exit $ac_status); } &&
17593          { ac_try='test -s conftest$ac_exeext'
17594   { (eval echo "$as_me:17594: \"$ac_try\"") >&5
17595   (eval $ac_try) 2>&5
17596   ac_status=$?
17597   echo "$as_me:17597: \$? = $ac_status" >&5
17598   (exit $ac_status); }; }; then
17599   ac_cv_lib_dir_opendir=yes
17600 else
17601   echo "$as_me: failed program was:" >&5
17602 cat conftest.$ac_ext >&5
17603 ac_cv_lib_dir_opendir=no
17604 fi
17605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17606 LIBS=$ac_check_lib_save_LIBS
17607 fi
17608 echo "$as_me:17608: result: $ac_cv_lib_dir_opendir" >&5
17609 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17610 if test $ac_cv_lib_dir_opendir = yes; then
17611   LIBS="$LIBS -ldir"
17612 fi
17613
17614 else
17615   echo "$as_me:17615: checking for opendir in -lx" >&5
17616 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17617 if test "${ac_cv_lib_x_opendir+set}" = set; then
17618   echo $ECHO_N "(cached) $ECHO_C" >&6
17619 else
17620   ac_check_lib_save_LIBS=$LIBS
17621 LIBS="-lx  $LIBS"
17622 cat >conftest.$ac_ext <<_ACEOF
17623 #line 17623 "configure"
17624 #include "confdefs.h"
17625
17626 /* Override any gcc2 internal prototype to avoid an error.  */
17627 #ifdef __cplusplus
17628 extern "C"
17629 #endif
17630 /* We use char because int might match the return type of a gcc2
17631    builtin and then its argument prototype would still apply.  */
17632 char opendir ();
17633 int
17634 main (void)
17635 {
17636 opendir ();
17637   ;
17638   return 0;
17639 }
17640 _ACEOF
17641 rm -f conftest.$ac_objext conftest$ac_exeext
17642 if { (eval echo "$as_me:17642: \"$ac_link\"") >&5
17643   (eval $ac_link) 2>&5
17644   ac_status=$?
17645   echo "$as_me:17645: \$? = $ac_status" >&5
17646   (exit $ac_status); } &&
17647          { ac_try='test -s conftest$ac_exeext'
17648   { (eval echo "$as_me:17648: \"$ac_try\"") >&5
17649   (eval $ac_try) 2>&5
17650   ac_status=$?
17651   echo "$as_me:17651: \$? = $ac_status" >&5
17652   (exit $ac_status); }; }; then
17653   ac_cv_lib_x_opendir=yes
17654 else
17655   echo "$as_me: failed program was:" >&5
17656 cat conftest.$ac_ext >&5
17657 ac_cv_lib_x_opendir=no
17658 fi
17659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17660 LIBS=$ac_check_lib_save_LIBS
17661 fi
17662 echo "$as_me:17662: result: $ac_cv_lib_x_opendir" >&5
17663 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17664 if test $ac_cv_lib_x_opendir = yes; then
17665   LIBS="$LIBS -lx"
17666 fi
17667
17668 fi
17669
17670 echo "$as_me:17670: checking whether time.h and sys/time.h may both be included" >&5
17671 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17672 if test "${ac_cv_header_time+set}" = set; then
17673   echo $ECHO_N "(cached) $ECHO_C" >&6
17674 else
17675   cat >conftest.$ac_ext <<_ACEOF
17676 #line 17676 "configure"
17677 #include "confdefs.h"
17678 #include <sys/types.h>
17679 #include <sys/time.h>
17680 #include <time.h>
17681
17682 int
17683 main (void)
17684 {
17685 if ((struct tm *) 0)
17686 return 0;
17687   ;
17688   return 0;
17689 }
17690 _ACEOF
17691 rm -f conftest.$ac_objext
17692 if { (eval echo "$as_me:17692: \"$ac_compile\"") >&5
17693   (eval $ac_compile) 2>&5
17694   ac_status=$?
17695   echo "$as_me:17695: \$? = $ac_status" >&5
17696   (exit $ac_status); } &&
17697          { ac_try='test -s conftest.$ac_objext'
17698   { (eval echo "$as_me:17698: \"$ac_try\"") >&5
17699   (eval $ac_try) 2>&5
17700   ac_status=$?
17701   echo "$as_me:17701: \$? = $ac_status" >&5
17702   (exit $ac_status); }; }; then
17703   ac_cv_header_time=yes
17704 else
17705   echo "$as_me: failed program was:" >&5
17706 cat conftest.$ac_ext >&5
17707 ac_cv_header_time=no
17708 fi
17709 rm -f conftest.$ac_objext conftest.$ac_ext
17710 fi
17711 echo "$as_me:17711: result: $ac_cv_header_time" >&5
17712 echo "${ECHO_T}$ac_cv_header_time" >&6
17713 if test $ac_cv_header_time = yes; then
17714
17715 cat >>confdefs.h <<\EOF
17716 #define TIME_WITH_SYS_TIME 1
17717 EOF
17718
17719 fi
17720
17721 cf_regex_func=no
17722
17723 cf_regex_libs="regex re"
17724 case $host_os in
17725 (mingw*)
17726         cf_regex_libs="gnurx $cf_regex_libs"
17727         ;;
17728 esac
17729
17730 echo "$as_me:17730: checking for regcomp" >&5
17731 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17732 if test "${ac_cv_func_regcomp+set}" = set; then
17733   echo $ECHO_N "(cached) $ECHO_C" >&6
17734 else
17735   cat >conftest.$ac_ext <<_ACEOF
17736 #line 17736 "configure"
17737 #include "confdefs.h"
17738 #define regcomp autoconf_temporary
17739 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17740 #undef regcomp
17741
17742 #ifdef __cplusplus
17743 extern "C"
17744 #endif
17745
17746 /* We use char because int might match the return type of a gcc2
17747    builtin and then its argument prototype would still apply.  */
17748 char regcomp (void);
17749
17750 int
17751 main (void)
17752 {
17753
17754 /* The GNU C library defines stubs for functions which it implements
17755     to always fail with ENOSYS.  Some functions are actually named
17756     something starting with __ and the normal name is an alias.  */
17757 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17758 #error found stub for regcomp
17759 #endif
17760
17761         return regcomp ();
17762   ;
17763   return 0;
17764 }
17765 _ACEOF
17766 rm -f conftest.$ac_objext conftest$ac_exeext
17767 if { (eval echo "$as_me:17767: \"$ac_link\"") >&5
17768   (eval $ac_link) 2>&5
17769   ac_status=$?
17770   echo "$as_me:17770: \$? = $ac_status" >&5
17771   (exit $ac_status); } &&
17772          { ac_try='test -s conftest$ac_exeext'
17773   { (eval echo "$as_me:17773: \"$ac_try\"") >&5
17774   (eval $ac_try) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit $ac_status); }; }; then
17778   ac_cv_func_regcomp=yes
17779 else
17780   echo "$as_me: failed program was:" >&5
17781 cat conftest.$ac_ext >&5
17782 ac_cv_func_regcomp=no
17783 fi
17784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17785 fi
17786 echo "$as_me:17786: result: $ac_cv_func_regcomp" >&5
17787 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17788 if test $ac_cv_func_regcomp = yes; then
17789   cf_regex_func=regcomp
17790 else
17791
17792         for cf_regex_lib in $cf_regex_libs
17793         do
17794                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17795 echo "$as_me:17795: checking for regcomp in -l$cf_regex_lib" >&5
17796 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17797 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17798   echo $ECHO_N "(cached) $ECHO_C" >&6
17799 else
17800   ac_check_lib_save_LIBS=$LIBS
17801 LIBS="-l$cf_regex_lib  $LIBS"
17802 cat >conftest.$ac_ext <<_ACEOF
17803 #line 17803 "configure"
17804 #include "confdefs.h"
17805
17806 /* Override any gcc2 internal prototype to avoid an error.  */
17807 #ifdef __cplusplus
17808 extern "C"
17809 #endif
17810 /* We use char because int might match the return type of a gcc2
17811    builtin and then its argument prototype would still apply.  */
17812 char regcomp ();
17813 int
17814 main (void)
17815 {
17816 regcomp ();
17817   ;
17818   return 0;
17819 }
17820 _ACEOF
17821 rm -f conftest.$ac_objext conftest$ac_exeext
17822 if { (eval echo "$as_me:17822: \"$ac_link\"") >&5
17823   (eval $ac_link) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit $ac_status); } &&
17827          { ac_try='test -s conftest$ac_exeext'
17828   { (eval echo "$as_me:17828: \"$ac_try\"") >&5
17829   (eval $ac_try) 2>&5
17830   ac_status=$?
17831   echo "$as_me:17831: \$? = $ac_status" >&5
17832   (exit $ac_status); }; }; then
17833   eval "$as_ac_Lib=yes"
17834 else
17835   echo "$as_me: failed program was:" >&5
17836 cat conftest.$ac_ext >&5
17837 eval "$as_ac_Lib=no"
17838 fi
17839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17840 LIBS=$ac_check_lib_save_LIBS
17841 fi
17842 echo "$as_me:17842: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17843 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17844 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17845
17846 cf_add_libs="$LIBS"
17847 # reverse order
17848 cf_add_0lib=
17849 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17850 # filter duplicates
17851 for cf_add_1lib in $cf_add_0lib; do
17852         for cf_add_2lib in $cf_add_libs; do
17853                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17854                         cf_add_1lib=
17855                         break
17856                 fi
17857         done
17858         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17859 done
17860 LIBS="$cf_add_libs"
17861
17862                                 cf_regex_func=regcomp
17863                                 break
17864 fi
17865
17866         done
17867
17868 fi
17869
17870 if test "$cf_regex_func" = no ; then
17871         echo "$as_me:17871: checking for compile" >&5
17872 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17873 if test "${ac_cv_func_compile+set}" = set; then
17874   echo $ECHO_N "(cached) $ECHO_C" >&6
17875 else
17876   cat >conftest.$ac_ext <<_ACEOF
17877 #line 17877 "configure"
17878 #include "confdefs.h"
17879 #define compile autoconf_temporary
17880 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17881 #undef compile
17882
17883 #ifdef __cplusplus
17884 extern "C"
17885 #endif
17886
17887 /* We use char because int might match the return type of a gcc2
17888    builtin and then its argument prototype would still apply.  */
17889 char compile (void);
17890
17891 int
17892 main (void)
17893 {
17894
17895 /* The GNU C library defines stubs for functions which it implements
17896     to always fail with ENOSYS.  Some functions are actually named
17897     something starting with __ and the normal name is an alias.  */
17898 #if defined (__stub_compile) || defined (__stub___compile)
17899 #error found stub for compile
17900 #endif
17901
17902         return compile ();
17903   ;
17904   return 0;
17905 }
17906 _ACEOF
17907 rm -f conftest.$ac_objext conftest$ac_exeext
17908 if { (eval echo "$as_me:17908: \"$ac_link\"") >&5
17909   (eval $ac_link) 2>&5
17910   ac_status=$?
17911   echo "$as_me:17911: \$? = $ac_status" >&5
17912   (exit $ac_status); } &&
17913          { ac_try='test -s conftest$ac_exeext'
17914   { (eval echo "$as_me:17914: \"$ac_try\"") >&5
17915   (eval $ac_try) 2>&5
17916   ac_status=$?
17917   echo "$as_me:17917: \$? = $ac_status" >&5
17918   (exit $ac_status); }; }; then
17919   ac_cv_func_compile=yes
17920 else
17921   echo "$as_me: failed program was:" >&5
17922 cat conftest.$ac_ext >&5
17923 ac_cv_func_compile=no
17924 fi
17925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17926 fi
17927 echo "$as_me:17927: result: $ac_cv_func_compile" >&5
17928 echo "${ECHO_T}$ac_cv_func_compile" >&6
17929 if test $ac_cv_func_compile = yes; then
17930   cf_regex_func=compile
17931 else
17932
17933                 echo "$as_me:17933: checking for compile in -lgen" >&5
17934 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17935 if test "${ac_cv_lib_gen_compile+set}" = set; then
17936   echo $ECHO_N "(cached) $ECHO_C" >&6
17937 else
17938   ac_check_lib_save_LIBS=$LIBS
17939 LIBS="-lgen  $LIBS"
17940 cat >conftest.$ac_ext <<_ACEOF
17941 #line 17941 "configure"
17942 #include "confdefs.h"
17943
17944 /* Override any gcc2 internal prototype to avoid an error.  */
17945 #ifdef __cplusplus
17946 extern "C"
17947 #endif
17948 /* We use char because int might match the return type of a gcc2
17949    builtin and then its argument prototype would still apply.  */
17950 char compile ();
17951 int
17952 main (void)
17953 {
17954 compile ();
17955   ;
17956   return 0;
17957 }
17958 _ACEOF
17959 rm -f conftest.$ac_objext conftest$ac_exeext
17960 if { (eval echo "$as_me:17960: \"$ac_link\"") >&5
17961   (eval $ac_link) 2>&5
17962   ac_status=$?
17963   echo "$as_me:17963: \$? = $ac_status" >&5
17964   (exit $ac_status); } &&
17965          { ac_try='test -s conftest$ac_exeext'
17966   { (eval echo "$as_me:17966: \"$ac_try\"") >&5
17967   (eval $ac_try) 2>&5
17968   ac_status=$?
17969   echo "$as_me:17969: \$? = $ac_status" >&5
17970   (exit $ac_status); }; }; then
17971   ac_cv_lib_gen_compile=yes
17972 else
17973   echo "$as_me: failed program was:" >&5
17974 cat conftest.$ac_ext >&5
17975 ac_cv_lib_gen_compile=no
17976 fi
17977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17978 LIBS=$ac_check_lib_save_LIBS
17979 fi
17980 echo "$as_me:17980: result: $ac_cv_lib_gen_compile" >&5
17981 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17982 if test $ac_cv_lib_gen_compile = yes; then
17983
17984 cf_add_libs="$LIBS"
17985 # reverse order
17986 cf_add_0lib=
17987 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17988 # filter duplicates
17989 for cf_add_1lib in $cf_add_0lib; do
17990         for cf_add_2lib in $cf_add_libs; do
17991                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17992                         cf_add_1lib=
17993                         break
17994                 fi
17995         done
17996         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17997 done
17998 LIBS="$cf_add_libs"
17999
18000                                 cf_regex_func=compile
18001 fi
18002
18003 fi
18004
18005 fi
18006
18007 if test "$cf_regex_func" = no ; then
18008         { echo "$as_me:18008: WARNING: cannot find regular expression library" >&5
18009 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18010 fi
18011
18012 echo "$as_me:18012: checking for regular-expression headers" >&5
18013 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18014 if test "${cf_cv_regex_hdrs+set}" = set; then
18015   echo $ECHO_N "(cached) $ECHO_C" >&6
18016 else
18017
18018 cf_cv_regex_hdrs=no
18019 case $cf_regex_func in
18020 (compile)
18021         for cf_regex_hdr in regexp.h regexpr.h
18022         do
18023                 cat >conftest.$ac_ext <<_ACEOF
18024 #line 18024 "configure"
18025 #include "confdefs.h"
18026 #include <$cf_regex_hdr>
18027 int
18028 main (void)
18029 {
18030
18031                         char *p = compile("", "", "", 0);
18032                         int x = step("", "");
18033                         (void)p;
18034                         (void)x;
18035
18036   ;
18037   return 0;
18038 }
18039 _ACEOF
18040 rm -f conftest.$ac_objext conftest$ac_exeext
18041 if { (eval echo "$as_me:18041: \"$ac_link\"") >&5
18042   (eval $ac_link) 2>&5
18043   ac_status=$?
18044   echo "$as_me:18044: \$? = $ac_status" >&5
18045   (exit $ac_status); } &&
18046          { ac_try='test -s conftest$ac_exeext'
18047   { (eval echo "$as_me:18047: \"$ac_try\"") >&5
18048   (eval $ac_try) 2>&5
18049   ac_status=$?
18050   echo "$as_me:18050: \$? = $ac_status" >&5
18051   (exit $ac_status); }; }; then
18052
18053                         cf_cv_regex_hdrs=$cf_regex_hdr
18054                         break
18055
18056 else
18057   echo "$as_me: failed program was:" >&5
18058 cat conftest.$ac_ext >&5
18059 fi
18060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18061         done
18062         ;;
18063 (*)
18064         for cf_regex_hdr in regex.h
18065         do
18066                 cat >conftest.$ac_ext <<_ACEOF
18067 #line 18067 "configure"
18068 #include "confdefs.h"
18069 #include <sys/types.h>
18070 #include <$cf_regex_hdr>
18071 int
18072 main (void)
18073 {
18074
18075                         regex_t *p = 0;
18076                         int x = regcomp(p, "", 0);
18077                         int y = regexec(p, "", 0, 0, 0);
18078                         (void)x;
18079                         (void)y;
18080                         regfree(p);
18081
18082   ;
18083   return 0;
18084 }
18085 _ACEOF
18086 rm -f conftest.$ac_objext conftest$ac_exeext
18087 if { (eval echo "$as_me:18087: \"$ac_link\"") >&5
18088   (eval $ac_link) 2>&5
18089   ac_status=$?
18090   echo "$as_me:18090: \$? = $ac_status" >&5
18091   (exit $ac_status); } &&
18092          { ac_try='test -s conftest$ac_exeext'
18093   { (eval echo "$as_me:18093: \"$ac_try\"") >&5
18094   (eval $ac_try) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit $ac_status); }; }; then
18098
18099                         cf_cv_regex_hdrs=$cf_regex_hdr
18100                         break
18101
18102 else
18103   echo "$as_me: failed program was:" >&5
18104 cat conftest.$ac_ext >&5
18105 fi
18106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18107         done
18108         ;;
18109 esac
18110
18111 fi
18112 echo "$as_me:18112: result: $cf_cv_regex_hdrs" >&5
18113 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18114
18115 case $cf_cv_regex_hdrs in
18116         (no)            { echo "$as_me:18116: WARNING: no regular expression header found" >&5
18117 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18118         (regex.h)
18119 cat >>confdefs.h <<\EOF
18120 #define HAVE_REGEX_H_FUNCS 1
18121 EOF
18122  ;;
18123         (regexp.h)
18124 cat >>confdefs.h <<\EOF
18125 #define HAVE_REGEXP_H_FUNCS 1
18126 EOF
18127  ;;
18128         (regexpr.h)
18129 cat >>confdefs.h <<\EOF
18130 #define HAVE_REGEXPR_H_FUNCS 1
18131 EOF
18132  ;;
18133 esac
18134
18135 for ac_header in \
18136 fcntl.h \
18137 getopt.h \
18138 limits.h \
18139 locale.h \
18140 math.h \
18141 poll.h \
18142 sys/bsdtypes.h \
18143 sys/ioctl.h \
18144 sys/param.h \
18145 sys/poll.h \
18146 sys/select.h \
18147 sys/time.h \
18148 sys/times.h \
18149 ttyent.h \
18150 unistd.h \
18151 wctype.h \
18152
18153 do
18154 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18155 echo "$as_me:18155: checking for $ac_header" >&5
18156 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18157 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18158   echo $ECHO_N "(cached) $ECHO_C" >&6
18159 else
18160   cat >conftest.$ac_ext <<_ACEOF
18161 #line 18161 "configure"
18162 #include "confdefs.h"
18163 #include <$ac_header>
18164 _ACEOF
18165 if { (eval echo "$as_me:18165: \"$ac_cpp conftest.$ac_ext\"") >&5
18166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18167   ac_status=$?
18168   egrep -v '^ *\+' conftest.er1 >conftest.err
18169   rm -f conftest.er1
18170   cat conftest.err >&5
18171   echo "$as_me:18171: \$? = $ac_status" >&5
18172   (exit $ac_status); } >/dev/null; then
18173   if test -s conftest.err; then
18174     ac_cpp_err=$ac_c_preproc_warn_flag
18175   else
18176     ac_cpp_err=
18177   fi
18178 else
18179   ac_cpp_err=yes
18180 fi
18181 if test -z "$ac_cpp_err"; then
18182   eval "$as_ac_Header=yes"
18183 else
18184   echo "$as_me: failed program was:" >&5
18185   cat conftest.$ac_ext >&5
18186   eval "$as_ac_Header=no"
18187 fi
18188 rm -f conftest.err conftest.$ac_ext
18189 fi
18190 echo "$as_me:18190: result: `eval echo '${'$as_ac_Header'}'`" >&5
18191 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18192 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18193   cat >>confdefs.h <<EOF
18194 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18195 EOF
18196
18197 fi
18198 done
18199
18200 for ac_header in unistd.h getopt.h
18201 do
18202 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18203 echo "$as_me:18203: checking for $ac_header" >&5
18204 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18205 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18206   echo $ECHO_N "(cached) $ECHO_C" >&6
18207 else
18208   cat >conftest.$ac_ext <<_ACEOF
18209 #line 18209 "configure"
18210 #include "confdefs.h"
18211 #include <$ac_header>
18212 _ACEOF
18213 if { (eval echo "$as_me:18213: \"$ac_cpp conftest.$ac_ext\"") >&5
18214   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18215   ac_status=$?
18216   egrep -v '^ *\+' conftest.er1 >conftest.err
18217   rm -f conftest.er1
18218   cat conftest.err >&5
18219   echo "$as_me:18219: \$? = $ac_status" >&5
18220   (exit $ac_status); } >/dev/null; then
18221   if test -s conftest.err; then
18222     ac_cpp_err=$ac_c_preproc_warn_flag
18223   else
18224     ac_cpp_err=
18225   fi
18226 else
18227   ac_cpp_err=yes
18228 fi
18229 if test -z "$ac_cpp_err"; then
18230   eval "$as_ac_Header=yes"
18231 else
18232   echo "$as_me: failed program was:" >&5
18233   cat conftest.$ac_ext >&5
18234   eval "$as_ac_Header=no"
18235 fi
18236 rm -f conftest.err conftest.$ac_ext
18237 fi
18238 echo "$as_me:18238: result: `eval echo '${'$as_ac_Header'}'`" >&5
18239 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18241   cat >>confdefs.h <<EOF
18242 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18243 EOF
18244
18245 fi
18246 done
18247
18248 echo "$as_me:18248: checking for header declaring getopt variables" >&5
18249 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18250 if test "${cf_cv_getopt_header+set}" = set; then
18251   echo $ECHO_N "(cached) $ECHO_C" >&6
18252 else
18253
18254 cf_cv_getopt_header=none
18255 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18256 do
18257 cat >conftest.$ac_ext <<_ACEOF
18258 #line 18258 "configure"
18259 #include "confdefs.h"
18260
18261 #include <$cf_header>
18262 int
18263 main (void)
18264 {
18265 int x = optind; char *y = optarg
18266   ;
18267   return 0;
18268 }
18269 _ACEOF
18270 rm -f conftest.$ac_objext
18271 if { (eval echo "$as_me:18271: \"$ac_compile\"") >&5
18272   (eval $ac_compile) 2>&5
18273   ac_status=$?
18274   echo "$as_me:18274: \$? = $ac_status" >&5
18275   (exit $ac_status); } &&
18276          { ac_try='test -s conftest.$ac_objext'
18277   { (eval echo "$as_me:18277: \"$ac_try\"") >&5
18278   (eval $ac_try) 2>&5
18279   ac_status=$?
18280   echo "$as_me:18280: \$? = $ac_status" >&5
18281   (exit $ac_status); }; }; then
18282   cf_cv_getopt_header=$cf_header
18283  break
18284 else
18285   echo "$as_me: failed program was:" >&5
18286 cat conftest.$ac_ext >&5
18287 fi
18288 rm -f conftest.$ac_objext conftest.$ac_ext
18289 done
18290
18291 fi
18292 echo "$as_me:18292: result: $cf_cv_getopt_header" >&5
18293 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18294 if test $cf_cv_getopt_header != none ; then
18295
18296 cat >>confdefs.h <<\EOF
18297 #define HAVE_GETOPT_HEADER 1
18298 EOF
18299
18300 fi
18301 if test $cf_cv_getopt_header = getopt.h ; then
18302
18303 cat >>confdefs.h <<\EOF
18304 #define NEED_GETOPT_H 1
18305 EOF
18306
18307 fi
18308
18309 echo "$as_me:18309: checking if external environ is declared" >&5
18310 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18311 if test "${cf_cv_dcl_environ+set}" = set; then
18312   echo $ECHO_N "(cached) $ECHO_C" >&6
18313 else
18314
18315     cat >conftest.$ac_ext <<_ACEOF
18316 #line 18316 "configure"
18317 #include "confdefs.h"
18318
18319 #ifdef HAVE_STDLIB_H
18320 #include <stdlib.h>
18321 #endif
18322 #include <unistd.h>
18323 int
18324 main (void)
18325 {
18326 int x = (int) environ
18327   ;
18328   return 0;
18329 }
18330 _ACEOF
18331 rm -f conftest.$ac_objext
18332 if { (eval echo "$as_me:18332: \"$ac_compile\"") >&5
18333   (eval $ac_compile) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit $ac_status); } &&
18337          { ac_try='test -s conftest.$ac_objext'
18338   { (eval echo "$as_me:18338: \"$ac_try\"") >&5
18339   (eval $ac_try) 2>&5
18340   ac_status=$?
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); }; }; then
18343   cf_cv_dcl_environ=yes
18344 else
18345   echo "$as_me: failed program was:" >&5
18346 cat conftest.$ac_ext >&5
18347 cf_cv_dcl_environ=no
18348 fi
18349 rm -f conftest.$ac_objext conftest.$ac_ext
18350
18351 fi
18352 echo "$as_me:18352: result: $cf_cv_dcl_environ" >&5
18353 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18354
18355 if test "$cf_cv_dcl_environ" = no ; then
18356
18357 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18358
18359     cat >>confdefs.h <<EOF
18360 #define $cf_result 1
18361 EOF
18362
18363 fi
18364
18365 # It's possible (for near-UNIX clones) that the data doesn't exist
18366
18367 echo "$as_me:18367: checking if external environ exists" >&5
18368 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18369 if test "${cf_cv_have_environ+set}" = set; then
18370   echo $ECHO_N "(cached) $ECHO_C" >&6
18371 else
18372
18373         cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376
18377 #undef environ
18378 extern int environ;
18379
18380 int
18381 main (void)
18382 {
18383 environ = 2
18384   ;
18385   return 0;
18386 }
18387 _ACEOF
18388 rm -f conftest.$ac_objext conftest$ac_exeext
18389 if { (eval echo "$as_me:18389: \"$ac_link\"") >&5
18390   (eval $ac_link) 2>&5
18391   ac_status=$?
18392   echo "$as_me:18392: \$? = $ac_status" >&5
18393   (exit $ac_status); } &&
18394          { ac_try='test -s conftest$ac_exeext'
18395   { (eval echo "$as_me:18395: \"$ac_try\"") >&5
18396   (eval $ac_try) 2>&5
18397   ac_status=$?
18398   echo "$as_me:18398: \$? = $ac_status" >&5
18399   (exit $ac_status); }; }; then
18400   cf_cv_have_environ=yes
18401 else
18402   echo "$as_me: failed program was:" >&5
18403 cat conftest.$ac_ext >&5
18404 cf_cv_have_environ=no
18405 fi
18406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18407
18408 fi
18409 echo "$as_me:18409: result: $cf_cv_have_environ" >&5
18410 echo "${ECHO_T}$cf_cv_have_environ" >&6
18411
18412 if test "$cf_cv_have_environ" = yes ; then
18413
18414 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18415
18416         cat >>confdefs.h <<EOF
18417 #define $cf_result 1
18418 EOF
18419
18420 fi
18421
18422 echo "$as_me:18422: checking for getenv" >&5
18423 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18424 if test "${ac_cv_func_getenv+set}" = set; then
18425   echo $ECHO_N "(cached) $ECHO_C" >&6
18426 else
18427   cat >conftest.$ac_ext <<_ACEOF
18428 #line 18428 "configure"
18429 #include "confdefs.h"
18430 #define getenv autoconf_temporary
18431 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18432 #undef getenv
18433
18434 #ifdef __cplusplus
18435 extern "C"
18436 #endif
18437
18438 /* We use char because int might match the return type of a gcc2
18439    builtin and then its argument prototype would still apply.  */
18440 char getenv (void);
18441
18442 int
18443 main (void)
18444 {
18445
18446 /* The GNU C library defines stubs for functions which it implements
18447     to always fail with ENOSYS.  Some functions are actually named
18448     something starting with __ and the normal name is an alias.  */
18449 #if defined (__stub_getenv) || defined (__stub___getenv)
18450 #error found stub for getenv
18451 #endif
18452
18453         return getenv ();
18454   ;
18455   return 0;
18456 }
18457 _ACEOF
18458 rm -f conftest.$ac_objext conftest$ac_exeext
18459 if { (eval echo "$as_me:18459: \"$ac_link\"") >&5
18460   (eval $ac_link) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); } &&
18464          { ac_try='test -s conftest$ac_exeext'
18465   { (eval echo "$as_me:18465: \"$ac_try\"") >&5
18466   (eval $ac_try) 2>&5
18467   ac_status=$?
18468   echo "$as_me:18468: \$? = $ac_status" >&5
18469   (exit $ac_status); }; }; then
18470   ac_cv_func_getenv=yes
18471 else
18472   echo "$as_me: failed program was:" >&5
18473 cat conftest.$ac_ext >&5
18474 ac_cv_func_getenv=no
18475 fi
18476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18477 fi
18478 echo "$as_me:18478: result: $ac_cv_func_getenv" >&5
18479 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18480
18481 for ac_func in putenv setenv strdup
18482 do
18483 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18484 echo "$as_me:18484: checking for $ac_func" >&5
18485 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18486 if eval "test \"\${$as_ac_var+set}\" = set"; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492 #define $ac_func autoconf_temporary
18493 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18494 #undef $ac_func
18495
18496 #ifdef __cplusplus
18497 extern "C"
18498 #endif
18499
18500 /* We use char because int might match the return type of a gcc2
18501    builtin and then its argument prototype would still apply.  */
18502 char $ac_func (void);
18503
18504 int
18505 main (void)
18506 {
18507
18508 /* The GNU C library defines stubs for functions which it implements
18509     to always fail with ENOSYS.  Some functions are actually named
18510     something starting with __ and the normal name is an alias.  */
18511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18512 #error found stub for $ac_func
18513 #endif
18514
18515         return $ac_func ();
18516   ;
18517   return 0;
18518 }
18519 _ACEOF
18520 rm -f conftest.$ac_objext conftest$ac_exeext
18521 if { (eval echo "$as_me:18521: \"$ac_link\"") >&5
18522   (eval $ac_link) 2>&5
18523   ac_status=$?
18524   echo "$as_me:18524: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -s conftest$ac_exeext'
18527   { (eval echo "$as_me:18527: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:18530: \$? = $ac_status" >&5
18531   (exit $ac_status); }; }; then
18532   eval "$as_ac_var=yes"
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 cat conftest.$ac_ext >&5
18536 eval "$as_ac_var=no"
18537 fi
18538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18539 fi
18540 echo "$as_me:18540: result: `eval echo '${'$as_ac_var'}'`" >&5
18541 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18542 if test `eval echo '${'$as_ac_var'}'` = yes; then
18543   cat >>confdefs.h <<EOF
18544 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18545 EOF
18546
18547 fi
18548 done
18549
18550 echo "$as_me:18550: checking if getenv returns consistent values" >&5
18551 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18552 if test "${cf_cv_consistent_getenv+set}" = set; then
18553   echo $ECHO_N "(cached) $ECHO_C" >&6
18554 else
18555
18556 if test "$cross_compiling" = yes; then
18557   cf_cv_consistent_getenv=unknown
18558 else
18559   cat >conftest.$ac_ext <<_ACEOF
18560 #line 18560 "configure"
18561 #include "confdefs.h"
18562
18563 #include <stdlib.h>
18564 #include <unistd.h>
18565 #include <stdio.h>
18566 #include <string.h>
18567 #include <sys/types.h>
18568
18569 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18570 extern char **environ;  /* POSIX, but some systems are not... */
18571 #endif
18572
18573 #if defined(HAVE_STRDUP)
18574 #define str_alloc(s) strdup(s)
18575 #else
18576 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18577 #endif
18578
18579 static void set_value(const char *name, const char *value)
18580 {
18581 #if defined(HAVE_SETENV)
18582         setenv(name, value, 1);
18583 #elif defined(HAVE_PUTENV)
18584         char buffer[1024];
18585         sprintf(buffer, "%s=%s", name, value);
18586         putenv(str_alloc(buffer));
18587 #else
18588 #error neither putenv/setenv found
18589 #endif
18590 }
18591 int main(void)
18592 {
18593         int pass;
18594         size_t numenv, limit, j;
18595         char **mynames;
18596         char **myvalues;
18597         char **mypointer;
18598         char *equals;
18599         for (numenv = 0; environ[numenv]; ++numenv) ;
18600         limit = numenv + 10;
18601         mynames = (char **) calloc(limit + 1, sizeof(char *));
18602         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18603         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18604 #if defined(HAVE_ENVIRON)
18605         for (j = 0; environ[j]; ++j) {
18606                 mynames[j] = str_alloc(environ[j]);
18607                 equals = strchr(mynames[j], '=');
18608                 if (equals != 0) {
18609                         *equals++ = '\0';
18610                         myvalues[j] = str_alloc(equals);
18611                 } else {
18612                         myvalues[j] = str_alloc("");
18613                 }
18614         }
18615 #endif
18616         for (j = numenv; j < limit; ++j) {
18617                 char name[80];
18618                 char value[80];
18619                 size_t found;
18620                 size_t k = 0;
18621                 do {
18622                         size_t jk;
18623                         found = 0;
18624                         sprintf(name, "TERM%lu", (unsigned long) k);
18625                         for (jk = 0; jk < j; ++jk) {
18626                                 if (!strcmp(name, mynames[jk])) {
18627                                         found = 1;
18628                                         ++k;
18629                                         break;
18630                                 }
18631                         }
18632                 } while (found);
18633                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18634                 set_value(name, value);
18635                 mynames[j] = str_alloc(name);
18636                 myvalues[j] = str_alloc(value);
18637         }
18638         for (pass = 0; pass < 3; ++pass) {
18639                 for (j = 0; j < limit; ++j) {
18640                         char *value = getenv(mynames[j]);
18641                         if (pass) {
18642                                 if (value == 0) {
18643                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18644                                         ${cf_cv_main_return:-return}(1);
18645                                 } else if (value != mypointer[j]) {
18646                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18647                                         ${cf_cv_main_return:-return}(1);
18648                                 } else if (strcmp(value, myvalues[j])) {
18649                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18650                                         ${cf_cv_main_return:-return}(1);
18651                                 }
18652                         } else {
18653                                 size_t k;
18654                                 mypointer[j] = value;
18655                                 for (k = 0; k < j; ++k) {
18656                                         if (mypointer[j] == mypointer[k]) {
18657                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18658                                                 ${cf_cv_main_return:-return}(1);
18659                                         }
18660                                 }
18661                         }
18662                 }
18663         }
18664         ${cf_cv_main_return:-return}(0);
18665 }
18666
18667 _ACEOF
18668 rm -f conftest$ac_exeext
18669 if { (eval echo "$as_me:18669: \"$ac_link\"") >&5
18670   (eval $ac_link) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18674   { (eval echo "$as_me:18674: \"$ac_try\"") >&5
18675   (eval $ac_try) 2>&5
18676   ac_status=$?
18677   echo "$as_me:18677: \$? = $ac_status" >&5
18678   (exit $ac_status); }; }; then
18679   cf_cv_consistent_getenv=yes
18680 else
18681   echo "$as_me: program exited with status $ac_status" >&5
18682 echo "$as_me: failed program was:" >&5
18683 cat conftest.$ac_ext >&5
18684 cf_cv_consistent_getenv=no
18685 fi
18686 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18687 fi
18688
18689 fi
18690 echo "$as_me:18690: result: $cf_cv_consistent_getenv" >&5
18691 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18692
18693 if test "x$cf_cv_consistent_getenv" = xno
18694 then
18695
18696 cat >>confdefs.h <<\EOF
18697 #define HAVE_CONSISTENT_GETENV 1
18698 EOF
18699
18700 fi
18701
18702 if test "x$cf_cv_consistent_getenv" = xno && \
18703         test "x$cf_with_trace" = xyes
18704 then
18705         { echo "$as_me:18705: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18706 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18707 fi
18708
18709 # check for ISC (this may also define _POSIX_SOURCE)
18710 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18711 if test "x$ISC" = xyes ; then
18712
18713 echo "$as_me:18713: checking for main in -lcposix" >&5
18714 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18715 if test "${ac_cv_lib_cposix_main+set}" = set; then
18716   echo $ECHO_N "(cached) $ECHO_C" >&6
18717 else
18718   ac_check_lib_save_LIBS=$LIBS
18719 LIBS="-lcposix  $LIBS"
18720 cat >conftest.$ac_ext <<_ACEOF
18721 #line 18721 "configure"
18722 #include "confdefs.h"
18723
18724 int
18725 main (void)
18726 {
18727 main ();
18728   ;
18729   return 0;
18730 }
18731 _ACEOF
18732 rm -f conftest.$ac_objext conftest$ac_exeext
18733 if { (eval echo "$as_me:18733: \"$ac_link\"") >&5
18734   (eval $ac_link) 2>&5
18735   ac_status=$?
18736   echo "$as_me:18736: \$? = $ac_status" >&5
18737   (exit $ac_status); } &&
18738          { ac_try='test -s conftest$ac_exeext'
18739   { (eval echo "$as_me:18739: \"$ac_try\"") >&5
18740   (eval $ac_try) 2>&5
18741   ac_status=$?
18742   echo "$as_me:18742: \$? = $ac_status" >&5
18743   (exit $ac_status); }; }; then
18744   ac_cv_lib_cposix_main=yes
18745 else
18746   echo "$as_me: failed program was:" >&5
18747 cat conftest.$ac_ext >&5
18748 ac_cv_lib_cposix_main=no
18749 fi
18750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18751 LIBS=$ac_check_lib_save_LIBS
18752 fi
18753 echo "$as_me:18753: result: $ac_cv_lib_cposix_main" >&5
18754 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18755 if test $ac_cv_lib_cposix_main = yes; then
18756   cat >>confdefs.h <<EOF
18757 #define HAVE_LIBCPOSIX 1
18758 EOF
18759
18760   LIBS="-lcposix $LIBS"
18761
18762 fi
18763
18764         echo "$as_me:18764: checking for bzero in -linet" >&5
18765 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18766 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18767   echo $ECHO_N "(cached) $ECHO_C" >&6
18768 else
18769   ac_check_lib_save_LIBS=$LIBS
18770 LIBS="-linet  $LIBS"
18771 cat >conftest.$ac_ext <<_ACEOF
18772 #line 18772 "configure"
18773 #include "confdefs.h"
18774
18775 /* Override any gcc2 internal prototype to avoid an error.  */
18776 #ifdef __cplusplus
18777 extern "C"
18778 #endif
18779 /* We use char because int might match the return type of a gcc2
18780    builtin and then its argument prototype would still apply.  */
18781 char bzero ();
18782 int
18783 main (void)
18784 {
18785 bzero ();
18786   ;
18787   return 0;
18788 }
18789 _ACEOF
18790 rm -f conftest.$ac_objext conftest$ac_exeext
18791 if { (eval echo "$as_me:18791: \"$ac_link\"") >&5
18792   (eval $ac_link) 2>&5
18793   ac_status=$?
18794   echo "$as_me:18794: \$? = $ac_status" >&5
18795   (exit $ac_status); } &&
18796          { ac_try='test -s conftest$ac_exeext'
18797   { (eval echo "$as_me:18797: \"$ac_try\"") >&5
18798   (eval $ac_try) 2>&5
18799   ac_status=$?
18800   echo "$as_me:18800: \$? = $ac_status" >&5
18801   (exit $ac_status); }; }; then
18802   ac_cv_lib_inet_bzero=yes
18803 else
18804   echo "$as_me: failed program was:" >&5
18805 cat conftest.$ac_ext >&5
18806 ac_cv_lib_inet_bzero=no
18807 fi
18808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18809 LIBS=$ac_check_lib_save_LIBS
18810 fi
18811 echo "$as_me:18811: result: $ac_cv_lib_inet_bzero" >&5
18812 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18813 if test $ac_cv_lib_inet_bzero = yes; then
18814
18815 cf_add_libs="$LIBS"
18816 # reverse order
18817 cf_add_0lib=
18818 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18819 # filter duplicates
18820 for cf_add_1lib in $cf_add_0lib; do
18821         for cf_add_2lib in $cf_add_libs; do
18822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18823                         cf_add_1lib=
18824                         break
18825                 fi
18826         done
18827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18828 done
18829 LIBS="$cf_add_libs"
18830
18831 fi
18832 fi
18833
18834 echo "$as_me:18834: checking if sys/time.h works with sys/select.h" >&5
18835 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18836 if test "${cf_cv_sys_time_select+set}" = set; then
18837   echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839
18840 cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843
18844 #include <sys/types.h>
18845 #ifdef HAVE_SYS_TIME_H
18846 #include <sys/time.h>
18847 #endif
18848 #ifdef HAVE_SYS_SELECT_H
18849 #include <sys/select.h>
18850 #endif
18851
18852 int
18853 main (void)
18854 {
18855
18856   ;
18857   return 0;
18858 }
18859 _ACEOF
18860 rm -f conftest.$ac_objext
18861 if { (eval echo "$as_me:18861: \"$ac_compile\"") >&5
18862   (eval $ac_compile) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); } &&
18866          { ac_try='test -s conftest.$ac_objext'
18867   { (eval echo "$as_me:18867: \"$ac_try\"") >&5
18868   (eval $ac_try) 2>&5
18869   ac_status=$?
18870   echo "$as_me:18870: \$? = $ac_status" >&5
18871   (exit $ac_status); }; }; then
18872   cf_cv_sys_time_select=yes
18873 else
18874   echo "$as_me: failed program was:" >&5
18875 cat conftest.$ac_ext >&5
18876 cf_cv_sys_time_select=no
18877 fi
18878 rm -f conftest.$ac_objext conftest.$ac_ext
18879
18880 fi
18881
18882 echo "$as_me:18882: result: $cf_cv_sys_time_select" >&5
18883 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18884 test "$cf_cv_sys_time_select" = yes &&
18885 cat >>confdefs.h <<\EOF
18886 #define HAVE_SYS_TIME_SELECT 1
18887 EOF
18888
18889 ###     checks for compiler characteristics
18890 ac_ext=c
18891 ac_cpp='$CPP $CPPFLAGS'
18892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18895 ac_main_return=return
18896
18897 echo "$as_me:18897: checking for an ANSI C-conforming const" >&5
18898 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18899 if test "${ac_cv_c_const+set}" = set; then
18900   echo $ECHO_N "(cached) $ECHO_C" >&6
18901 else
18902   cat >conftest.$ac_ext <<_ACEOF
18903 #line 18903 "configure"
18904 #include "confdefs.h"
18905
18906 int
18907 main (void)
18908 {
18909 /* FIXME: Include the comments suggested by Paul. */
18910 #ifndef __cplusplus
18911   /* Ultrix mips cc rejects this.  */
18912   typedef int charset[2];
18913   const charset x;
18914   /* SunOS 4.1.1 cc rejects this.  */
18915   char const *const *ccp;
18916   char **p;
18917   /* NEC SVR4.0.2 mips cc rejects this.  */
18918   struct point {int x, y;};
18919   static struct point const zero = {0,0};
18920   /* AIX XL C 1.02.0.0 rejects this.
18921      It does not let you subtract one const X* pointer from another in
18922      an arm of an if-expression whose if-part is not a constant
18923      expression */
18924   const char *g = "string";
18925   ccp = &g + (g ? g-g : 0);
18926   /* HPUX 7.0 cc rejects these. */
18927   ++ccp;
18928   p = (char**) ccp;
18929   ccp = (char const *const *) p;
18930   { /* SCO 3.2v4 cc rejects this.  */
18931     char *t;
18932     char const *s = 0 ? (char *) 0 : (char const *) 0;
18933
18934     *t++ = 0;
18935   }
18936   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18937     int x[] = {25, 17};
18938     const int *foo = &x[0];
18939     ++foo;
18940   }
18941   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18942     typedef const int *iptr;
18943     iptr p = 0;
18944     ++p;
18945   }
18946   { /* AIX XL C 1.02.0.0 rejects this saying
18947        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18948     struct s { int j; const int *ap[3]; };
18949     struct s *b; b->j = 5;
18950   }
18951   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18952     const int foo = 10;
18953   }
18954 #endif
18955
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest.$ac_objext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972   ac_cv_c_const=yes
18973 else
18974   echo "$as_me: failed program was:" >&5
18975 cat conftest.$ac_ext >&5
18976 ac_cv_c_const=no
18977 fi
18978 rm -f conftest.$ac_objext conftest.$ac_ext
18979 fi
18980 echo "$as_me:18980: result: $ac_cv_c_const" >&5
18981 echo "${ECHO_T}$ac_cv_c_const" >&6
18982 if test $ac_cv_c_const = no; then
18983
18984 cat >>confdefs.h <<\EOF
18985 #define const
18986 EOF
18987
18988 fi
18989
18990 echo "$as_me:18990: checking for inline" >&5
18991 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18992 if test "${ac_cv_c_inline+set}" = set; then
18993   echo $ECHO_N "(cached) $ECHO_C" >&6
18994 else
18995   ac_cv_c_inline=no
18996 for ac_kw in inline __inline__ __inline; do
18997   cat >conftest.$ac_ext <<_ACEOF
18998 #line 18998 "configure"
18999 #include "confdefs.h"
19000 #ifndef __cplusplus
19001 static $ac_kw int static_foo () {return 0; }
19002 $ac_kw int foo () {return 0; }
19003 #endif
19004
19005 _ACEOF
19006 rm -f conftest.$ac_objext
19007 if { (eval echo "$as_me:19007: \"$ac_compile\"") >&5
19008   (eval $ac_compile) 2>&5
19009   ac_status=$?
19010   echo "$as_me:19010: \$? = $ac_status" >&5
19011   (exit $ac_status); } &&
19012          { ac_try='test -s conftest.$ac_objext'
19013   { (eval echo "$as_me:19013: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:19016: \$? = $ac_status" >&5
19017   (exit $ac_status); }; }; then
19018   ac_cv_c_inline=$ac_kw; break
19019 else
19020   echo "$as_me: failed program was:" >&5
19021 cat conftest.$ac_ext >&5
19022 fi
19023 rm -f conftest.$ac_objext conftest.$ac_ext
19024 done
19025
19026 fi
19027 echo "$as_me:19027: result: $ac_cv_c_inline" >&5
19028 echo "${ECHO_T}$ac_cv_c_inline" >&6
19029 case $ac_cv_c_inline in
19030   inline | yes) ;;
19031   no)
19032 cat >>confdefs.h <<\EOF
19033 #define inline
19034 EOF
19035  ;;
19036   *)  cat >>confdefs.h <<EOF
19037 #define inline $ac_cv_c_inline
19038 EOF
19039  ;;
19040 esac
19041
19042 NCURSES_INLINE=
19043 if test "$ac_cv_c_inline" != no ; then
19044         NCURSES_INLINE=inline
19045         if test "$INTEL_COMPILER" = yes
19046         then
19047                 :
19048         elif test "$CLANG_COMPILER" = yes
19049         then
19050                 :
19051         elif test "$GCC" = yes
19052         then
19053                 echo "$as_me:19053: checking if $CC supports options to tune inlining" >&5
19054 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19055 if test "${cf_cv_gcc_inline+set}" = set; then
19056   echo $ECHO_N "(cached) $ECHO_C" >&6
19057 else
19058
19059                 cf_save_CFLAGS=$CFLAGS
19060                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19061                 cat >conftest.$ac_ext <<_ACEOF
19062 #line 19062 "configure"
19063 #include "confdefs.h"
19064 inline int foo(void) { return 1; }
19065 int
19066 main (void)
19067 {
19068 ${cf_cv_main_return:-return} foo()
19069   ;
19070   return 0;
19071 }
19072 _ACEOF
19073 rm -f conftest.$ac_objext
19074 if { (eval echo "$as_me:19074: \"$ac_compile\"") >&5
19075   (eval $ac_compile) 2>&5
19076   ac_status=$?
19077   echo "$as_me:19077: \$? = $ac_status" >&5
19078   (exit $ac_status); } &&
19079          { ac_try='test -s conftest.$ac_objext'
19080   { (eval echo "$as_me:19080: \"$ac_try\"") >&5
19081   (eval $ac_try) 2>&5
19082   ac_status=$?
19083   echo "$as_me:19083: \$? = $ac_status" >&5
19084   (exit $ac_status); }; }; then
19085   cf_cv_gcc_inline=yes
19086 else
19087   echo "$as_me: failed program was:" >&5
19088 cat conftest.$ac_ext >&5
19089 cf_cv_gcc_inline=no
19090 fi
19091 rm -f conftest.$ac_objext conftest.$ac_ext
19092                 CFLAGS=$cf_save_CFLAGS
19093
19094 fi
19095 echo "$as_me:19095: result: $cf_cv_gcc_inline" >&5
19096 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19097                 if test "$cf_cv_gcc_inline" = yes ; then
19098
19099 cf_fix_cppflags=no
19100 cf_new_cflags=
19101 cf_new_cppflags=
19102 cf_new_extra_cppflags=
19103
19104 for cf_add_cflags in --param max-inline-insns-single=1200
19105 do
19106 case $cf_fix_cppflags in
19107 (no)
19108         case $cf_add_cflags in
19109         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19110                 case $cf_add_cflags in
19111                 (-D*)
19112                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19113
19114                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19115                                 && test -z "${cf_tst_cflags}" \
19116                                 && cf_fix_cppflags=yes
19117
19118                         if test $cf_fix_cppflags = yes ; then
19119
19120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19122
19123                                 continue
19124                         elif test "${cf_tst_cflags}" = "\"'" ; then
19125
19126         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19127         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19128
19129                                 continue
19130                         fi
19131                         ;;
19132                 esac
19133                 case "$CPPFLAGS" in
19134                 (*$cf_add_cflags)
19135                         ;;
19136                 (*)
19137                         case $cf_add_cflags in
19138                         (-D*)
19139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19140
19141 CPPFLAGS=`echo "$CPPFLAGS" | \
19142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19144
19145                                 ;;
19146                         esac
19147
19148         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19149         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19150
19151                         ;;
19152                 esac
19153                 ;;
19154         (*)
19155
19156         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19157         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19158
19159                 ;;
19160         esac
19161         ;;
19162 (yes)
19163
19164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19166
19167         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19168
19169         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19170                 && test -z "${cf_tst_cflags}" \
19171                 && cf_fix_cppflags=no
19172         ;;
19173 esac
19174 done
19175
19176 if test -n "$cf_new_cflags" ; then
19177
19178         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19179         CFLAGS="${CFLAGS}$cf_new_cflags"
19180
19181 fi
19182
19183 if test -n "$cf_new_cppflags" ; then
19184
19185         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19186         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19187
19188 fi
19189
19190 if test -n "$cf_new_extra_cppflags" ; then
19191
19192         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19193         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19194
19195 fi
19196
19197                 fi
19198         fi
19199 fi
19200
19201 echo "$as_me:19201: checking for signal global datatype" >&5
19202 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19203 if test "${cf_cv_sig_atomic_t+set}" = set; then
19204   echo $ECHO_N "(cached) $ECHO_C" >&6
19205 else
19206
19207         for cf_type in \
19208                 "volatile sig_atomic_t" \
19209                 "sig_atomic_t" \
19210                 "int"
19211         do
19212         cat >conftest.$ac_ext <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215
19216 #include <sys/types.h>
19217 #include <signal.h>
19218 #include <stdio.h>
19219
19220 extern $cf_type x;
19221 $cf_type x;
19222 static void handler(int sig)
19223 {
19224         (void)sig;
19225         x = 5;
19226 }
19227 int
19228 main (void)
19229 {
19230 signal(SIGINT, handler);
19231                  x = 1
19232   ;
19233   return 0;
19234 }
19235 _ACEOF
19236 rm -f conftest.$ac_objext
19237 if { (eval echo "$as_me:19237: \"$ac_compile\"") >&5
19238   (eval $ac_compile) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit $ac_status); } &&
19242          { ac_try='test -s conftest.$ac_objext'
19243   { (eval echo "$as_me:19243: \"$ac_try\"") >&5
19244   (eval $ac_try) 2>&5
19245   ac_status=$?
19246   echo "$as_me:19246: \$? = $ac_status" >&5
19247   (exit $ac_status); }; }; then
19248   cf_cv_sig_atomic_t=$cf_type
19249 else
19250   echo "$as_me: failed program was:" >&5
19251 cat conftest.$ac_ext >&5
19252 cf_cv_sig_atomic_t=no
19253 fi
19254 rm -f conftest.$ac_objext conftest.$ac_ext
19255                 test "$cf_cv_sig_atomic_t" != no && break
19256         done
19257
19258 fi
19259
19260 echo "$as_me:19260: result: $cf_cv_sig_atomic_t" >&5
19261 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19262 test "$cf_cv_sig_atomic_t" != no &&
19263 cat >>confdefs.h <<EOF
19264 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19265 EOF
19266
19267 if test $NCURSES_CHTYPE = auto ; then
19268
19269 echo "$as_me:19269: checking for type of chtype" >&5
19270 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19271 if test "${cf_cv_typeof_chtype+set}" = set; then
19272   echo $ECHO_N "(cached) $ECHO_C" >&6
19273 else
19274
19275                 if test "$cross_compiling" = yes; then
19276   cf_cv_typeof_chtype=long
19277 else
19278   cat >conftest.$ac_ext <<_ACEOF
19279 #line 19279 "configure"
19280 #include "confdefs.h"
19281
19282 #define WANT_BITS 31
19283 #include <stdio.h>
19284 int main(void)
19285 {
19286         FILE *fp = fopen("cf_test.out", "w");
19287         if (fp != 0) {
19288                 char *result = "long";
19289                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19290                         int n;
19291                         unsigned int x, y;
19292                         for (n = 0; n < WANT_BITS; n++) {
19293                                 x = (1 << n);
19294                                 y = (x >> n);
19295                                 if (y != 1 || x == 0) {
19296                                         x = 0;
19297                                         break;
19298                                 }
19299                         }
19300                         /*
19301                          * If x is nonzero, an int is big enough for the bits
19302                          * that we want.
19303                          */
19304                         result = (x != 0) ? "int" : "long";
19305                 }
19306                 fputs(result, fp);
19307                 fclose(fp);
19308         }
19309         ${cf_cv_main_return:-return}(0);
19310 }
19311
19312 _ACEOF
19313 rm -f conftest$ac_exeext
19314 if { (eval echo "$as_me:19314: \"$ac_link\"") >&5
19315   (eval $ac_link) 2>&5
19316   ac_status=$?
19317   echo "$as_me:19317: \$? = $ac_status" >&5
19318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19319   { (eval echo "$as_me:19319: \"$ac_try\"") >&5
19320   (eval $ac_try) 2>&5
19321   ac_status=$?
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit $ac_status); }; }; then
19324   cf_cv_typeof_chtype=`cat cf_test.out`
19325 else
19326   echo "$as_me: program exited with status $ac_status" >&5
19327 echo "$as_me: failed program was:" >&5
19328 cat conftest.$ac_ext >&5
19329 cf_cv_typeof_chtype=long
19330 fi
19331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19332 fi
19333                 rm -f cf_test.out
19334
19335 fi
19336
19337 echo "$as_me:19337: result: $cf_cv_typeof_chtype" >&5
19338 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19339
19340 cat >>confdefs.h <<EOF
19341 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19342 EOF
19343
19344 else
19345         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19346 fi
19347 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19348
19349 echo "$as_me:19349: checking if unsigned literals are legal" >&5
19350 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19351 if test "${cf_cv_unsigned_literals+set}" = set; then
19352   echo $ECHO_N "(cached) $ECHO_C" >&6
19353 else
19354
19355         cat >conftest.$ac_ext <<_ACEOF
19356 #line 19356 "configure"
19357 #include "confdefs.h"
19358
19359 int
19360 main (void)
19361 {
19362 long x = 1L + 1UL + 1U + 1
19363   ;
19364   return 0;
19365 }
19366 _ACEOF
19367 rm -f conftest.$ac_objext
19368 if { (eval echo "$as_me:19368: \"$ac_compile\"") >&5
19369   (eval $ac_compile) 2>&5
19370   ac_status=$?
19371   echo "$as_me:19371: \$? = $ac_status" >&5
19372   (exit $ac_status); } &&
19373          { ac_try='test -s conftest.$ac_objext'
19374   { (eval echo "$as_me:19374: \"$ac_try\"") >&5
19375   (eval $ac_try) 2>&5
19376   ac_status=$?
19377   echo "$as_me:19377: \$? = $ac_status" >&5
19378   (exit $ac_status); }; }; then
19379   cf_cv_unsigned_literals=yes
19380 else
19381   echo "$as_me: failed program was:" >&5
19382 cat conftest.$ac_ext >&5
19383 cf_cv_unsigned_literals=no
19384 fi
19385 rm -f conftest.$ac_objext conftest.$ac_ext
19386
19387 fi
19388
19389 echo "$as_me:19389: result: $cf_cv_unsigned_literals" >&5
19390 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19391
19392 cf_cv_1UL="1"
19393 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19394 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19395
19396 if test $NCURSES_MMASK_T = auto ; then
19397         cf_cv_typeof_mmask_t=long
19398 else
19399         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19400 fi
19401 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19402
19403 ###     Checks for external-data
19404
19405 echo "$as_me:19405: checking if external errno is declared" >&5
19406 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19407 if test "${cf_cv_dcl_errno+set}" = set; then
19408   echo $ECHO_N "(cached) $ECHO_C" >&6
19409 else
19410
19411         cat >conftest.$ac_ext <<_ACEOF
19412 #line 19412 "configure"
19413 #include "confdefs.h"
19414
19415 #ifdef HAVE_STDLIB_H
19416 #include <stdlib.h>
19417 #endif
19418 #include <stdio.h>
19419 #include <sys/types.h>
19420 #include <errno.h>
19421 int
19422 main (void)
19423 {
19424 int x = (int) errno; (void)x
19425   ;
19426   return 0;
19427 }
19428 _ACEOF
19429 rm -f conftest.$ac_objext
19430 if { (eval echo "$as_me:19430: \"$ac_compile\"") >&5
19431   (eval $ac_compile) 2>&5
19432   ac_status=$?
19433   echo "$as_me:19433: \$? = $ac_status" >&5
19434   (exit $ac_status); } &&
19435          { ac_try='test -s conftest.$ac_objext'
19436   { (eval echo "$as_me:19436: \"$ac_try\"") >&5
19437   (eval $ac_try) 2>&5
19438   ac_status=$?
19439   echo "$as_me:19439: \$? = $ac_status" >&5
19440   (exit $ac_status); }; }; then
19441   cf_cv_dcl_errno=yes
19442 else
19443   echo "$as_me: failed program was:" >&5
19444 cat conftest.$ac_ext >&5
19445 cf_cv_dcl_errno=no
19446 fi
19447 rm -f conftest.$ac_objext conftest.$ac_ext
19448
19449 fi
19450 echo "$as_me:19450: result: $cf_cv_dcl_errno" >&5
19451 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19452
19453 if test "$cf_cv_dcl_errno" = no ; then
19454
19455 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19456
19457         cat >>confdefs.h <<EOF
19458 #define $cf_result 1
19459 EOF
19460
19461 fi
19462
19463 # It's possible (for near-UNIX clones) that the data doesn't exist
19464
19465 echo "$as_me:19465: checking if external errno exists" >&5
19466 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19467 if test "${cf_cv_have_errno+set}" = set; then
19468   echo $ECHO_N "(cached) $ECHO_C" >&6
19469 else
19470
19471         cat >conftest.$ac_ext <<_ACEOF
19472 #line 19472 "configure"
19473 #include "confdefs.h"
19474
19475 #undef errno
19476 extern int errno;
19477
19478 int
19479 main (void)
19480 {
19481 errno = 2
19482   ;
19483   return 0;
19484 }
19485 _ACEOF
19486 rm -f conftest.$ac_objext conftest$ac_exeext
19487 if { (eval echo "$as_me:19487: \"$ac_link\"") >&5
19488   (eval $ac_link) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit $ac_status); } &&
19492          { ac_try='test -s conftest$ac_exeext'
19493   { (eval echo "$as_me:19493: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit $ac_status); }; }; then
19498   cf_cv_have_errno=yes
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 cat conftest.$ac_ext >&5
19502 cf_cv_have_errno=no
19503 fi
19504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19505
19506 fi
19507 echo "$as_me:19507: result: $cf_cv_have_errno" >&5
19508 echo "${ECHO_T}$cf_cv_have_errno" >&6
19509
19510 if test "$cf_cv_have_errno" = yes ; then
19511
19512 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19513
19514         cat >>confdefs.h <<EOF
19515 #define $cf_result 1
19516 EOF
19517
19518 fi
19519
19520 echo "$as_me:19520: checking if data-only library module links" >&5
19521 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19522 if test "${cf_cv_link_dataonly+set}" = set; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525
19526         rm -f conftest.a
19527         cat >conftest.$ac_ext <<EOF
19528 #line 19528 "configure"
19529 int     testdata[3] = { 123, 456, 789 };
19530 EOF
19531         if { (eval echo "$as_me:19531: \"$ac_compile\"") >&5
19532   (eval $ac_compile) 2>&5
19533   ac_status=$?
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); } ; then
19536                 mv conftest.o data.o && \
19537                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19538         fi
19539         rm -f conftest.$ac_ext data.o
19540         cat >conftest.$ac_ext <<EOF
19541 #line 19541 "configure"
19542 int     testfunc(void)
19543 {
19544 #if defined(NeXT)
19545         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19546 #else
19547         extern int testdata[3];
19548         return testdata[0] == 123
19549            &&  testdata[1] == 456
19550            &&  testdata[2] == 789;
19551 #endif
19552 }
19553 EOF
19554         if { (eval echo "$as_me:19554: \"$ac_compile\"") >&5
19555   (eval $ac_compile) 2>&5
19556   ac_status=$?
19557   echo "$as_me:19557: \$? = $ac_status" >&5
19558   (exit $ac_status); }; then
19559                 mv conftest.o func.o && \
19560                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19561         fi
19562         rm -f conftest.$ac_ext func.o
19563         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19564         cf_saveLIBS="$LIBS"
19565         LIBS="conftest.a $LIBS"
19566         if test "$cross_compiling" = yes; then
19567   cf_cv_link_dataonly=unknown
19568 else
19569   cat >conftest.$ac_ext <<_ACEOF
19570 #line 19570 "configure"
19571 #include "confdefs.h"
19572
19573         int main(void)
19574         {
19575                 extern int testfunc();
19576                 ${cf_cv_main_return:-return} (!testfunc());
19577         }
19578
19579 _ACEOF
19580 rm -f conftest$ac_exeext
19581 if { (eval echo "$as_me:19581: \"$ac_link\"") >&5
19582   (eval $ac_link) 2>&5
19583   ac_status=$?
19584   echo "$as_me:19584: \$? = $ac_status" >&5
19585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19586   { (eval echo "$as_me:19586: \"$ac_try\"") >&5
19587   (eval $ac_try) 2>&5
19588   ac_status=$?
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); }; }; then
19591   cf_cv_link_dataonly=yes
19592 else
19593   echo "$as_me: program exited with status $ac_status" >&5
19594 echo "$as_me: failed program was:" >&5
19595 cat conftest.$ac_ext >&5
19596 cf_cv_link_dataonly=no
19597 fi
19598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19599 fi
19600         LIBS="$cf_saveLIBS"
19601
19602 fi
19603
19604 echo "$as_me:19604: result: $cf_cv_link_dataonly" >&5
19605 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19606
19607 if test "$cf_cv_link_dataonly" = no ; then
19608
19609 cat >>confdefs.h <<\EOF
19610 #define BROKEN_LINKER 1
19611 EOF
19612
19613         BROKEN_LINKER=1
19614 fi
19615
19616 ###     Checks for library functions.
19617
19618 for ac_func in \
19619 getcwd \
19620 getegid \
19621 geteuid \
19622 getopt \
19623 getttynam \
19624 issetugid \
19625 localeconv \
19626 poll \
19627 putenv \
19628 remove \
19629 select \
19630 setbuf \
19631 setbuffer \
19632 setenv \
19633 setvbuf \
19634 sigaction \
19635 sigvec \
19636 strdup \
19637 strstr \
19638 sysconf \
19639 tcgetpgrp \
19640 times \
19641 tsearch \
19642 vsnprintf \
19643
19644 do
19645 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19646 echo "$as_me:19646: checking for $ac_func" >&5
19647 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19648 if eval "test \"\${$as_ac_var+set}\" = set"; then
19649   echo $ECHO_N "(cached) $ECHO_C" >&6
19650 else
19651   cat >conftest.$ac_ext <<_ACEOF
19652 #line 19652 "configure"
19653 #include "confdefs.h"
19654 #define $ac_func autoconf_temporary
19655 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19656 #undef $ac_func
19657
19658 #ifdef __cplusplus
19659 extern "C"
19660 #endif
19661
19662 /* We use char because int might match the return type of a gcc2
19663    builtin and then its argument prototype would still apply.  */
19664 char $ac_func (void);
19665
19666 int
19667 main (void)
19668 {
19669
19670 /* The GNU C library defines stubs for functions which it implements
19671     to always fail with ENOSYS.  Some functions are actually named
19672     something starting with __ and the normal name is an alias.  */
19673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19674 #error found stub for $ac_func
19675 #endif
19676
19677         return $ac_func ();
19678   ;
19679   return 0;
19680 }
19681 _ACEOF
19682 rm -f conftest.$ac_objext conftest$ac_exeext
19683 if { (eval echo "$as_me:19683: \"$ac_link\"") >&5
19684   (eval $ac_link) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit $ac_status); } &&
19688          { ac_try='test -s conftest$ac_exeext'
19689   { (eval echo "$as_me:19689: \"$ac_try\"") >&5
19690   (eval $ac_try) 2>&5
19691   ac_status=$?
19692   echo "$as_me:19692: \$? = $ac_status" >&5
19693   (exit $ac_status); }; }; then
19694   eval "$as_ac_var=yes"
19695 else
19696   echo "$as_me: failed program was:" >&5
19697 cat conftest.$ac_ext >&5
19698 eval "$as_ac_var=no"
19699 fi
19700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19701 fi
19702 echo "$as_me:19702: result: `eval echo '${'$as_ac_var'}'`" >&5
19703 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19704 if test `eval echo '${'$as_ac_var'}'` = yes; then
19705   cat >>confdefs.h <<EOF
19706 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19707 EOF
19708
19709 fi
19710 done
19711
19712 if test "x$ac_cv_func_getopt" = xno && \
19713    test "x$cf_with_progs$cf_with_tests" != xnono; then
19714         { { echo "$as_me:19714: error: getopt is required for building programs" >&5
19715 echo "$as_me: error: getopt is required for building programs" >&2;}
19716    { (exit 1); exit 1; }; }
19717 fi
19718
19719 if test "x$with_safe_sprintf" = xyes
19720 then
19721         if test "x$ac_cv_func_vsnprintf" = xyes
19722         then
19723                 { echo "$as_me:19723: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19724 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19725         else
19726
19727 cat >>confdefs.h <<\EOF
19728 #define USE_SAFE_SPRINTF 1
19729 EOF
19730
19731         fi
19732 fi
19733
19734 if test "x$with_getcap" = "xyes" ; then
19735
19736 echo "$as_me:19736: checking for terminal-capability database functions" >&5
19737 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19738 if test "${cf_cv_cgetent+set}" = set; then
19739   echo $ECHO_N "(cached) $ECHO_C" >&6
19740 else
19741
19742 cat >conftest.$ac_ext <<_ACEOF
19743 #line 19743 "configure"
19744 #include "confdefs.h"
19745
19746 #include <stdlib.h>
19747 int
19748 main (void)
19749 {
19750
19751         char temp[128];
19752         char *buf = temp;
19753         char *db_array = temp;
19754         cgetent(&buf, &db_array, "vt100");
19755         cgetcap(buf, "tc", '=');
19756         cgetmatch(buf, "tc");
19757
19758   ;
19759   return 0;
19760 }
19761 _ACEOF
19762 rm -f conftest.$ac_objext conftest$ac_exeext
19763 if { (eval echo "$as_me:19763: \"$ac_link\"") >&5
19764   (eval $ac_link) 2>&5
19765   ac_status=$?
19766   echo "$as_me:19766: \$? = $ac_status" >&5
19767   (exit $ac_status); } &&
19768          { ac_try='test -s conftest$ac_exeext'
19769   { (eval echo "$as_me:19769: \"$ac_try\"") >&5
19770   (eval $ac_try) 2>&5
19771   ac_status=$?
19772   echo "$as_me:19772: \$? = $ac_status" >&5
19773   (exit $ac_status); }; }; then
19774   cf_cv_cgetent=yes
19775 else
19776   echo "$as_me: failed program was:" >&5
19777 cat conftest.$ac_ext >&5
19778 cf_cv_cgetent=no
19779 fi
19780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19781
19782 fi
19783 echo "$as_me:19783: result: $cf_cv_cgetent" >&5
19784 echo "${ECHO_T}$cf_cv_cgetent" >&6
19785
19786 if test "$cf_cv_cgetent" = yes
19787 then
19788
19789 cat >>confdefs.h <<\EOF
19790 #define HAVE_BSD_CGETENT 1
19791 EOF
19792
19793 echo "$as_me:19793: checking if cgetent uses const parameter" >&5
19794 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19795 if test "${cf_cv_cgetent_const+set}" = set; then
19796   echo $ECHO_N "(cached) $ECHO_C" >&6
19797 else
19798
19799 cat >conftest.$ac_ext <<_ACEOF
19800 #line 19800 "configure"
19801 #include "confdefs.h"
19802
19803 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19804 #include <stdlib.h>
19805 int
19806 main (void)
19807 {
19808
19809         char temp[128];
19810         char *buf = temp;
19811 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19812         const char *db_array = temp;
19813         cgetent(&buf, &db_array, "vt100");
19814 #endif
19815         cgetcap(buf, "tc", '=');
19816         cgetmatch(buf, "tc");
19817
19818   ;
19819   return 0;
19820 }
19821 _ACEOF
19822 rm -f conftest.$ac_objext conftest$ac_exeext
19823 if { (eval echo "$as_me:19823: \"$ac_link\"") >&5
19824   (eval $ac_link) 2>&5
19825   ac_status=$?
19826   echo "$as_me:19826: \$? = $ac_status" >&5
19827   (exit $ac_status); } &&
19828          { ac_try='test -s conftest$ac_exeext'
19829   { (eval echo "$as_me:19829: \"$ac_try\"") >&5
19830   (eval $ac_try) 2>&5
19831   ac_status=$?
19832   echo "$as_me:19832: \$? = $ac_status" >&5
19833   (exit $ac_status); }; }; then
19834   cf_cv_cgetent_const=yes
19835 else
19836   echo "$as_me: failed program was:" >&5
19837 cat conftest.$ac_ext >&5
19838 cf_cv_cgetent_const=no
19839 fi
19840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19841
19842 fi
19843 echo "$as_me:19843: result: $cf_cv_cgetent_const" >&5
19844 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19845         if test "$cf_cv_cgetent_const" = yes
19846         then
19847
19848 cat >>confdefs.h <<EOF
19849 #define CGETENT_CONST const
19850 EOF
19851
19852         fi
19853 fi
19854
19855 fi
19856
19857 echo "$as_me:19857: checking for isascii" >&5
19858 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19859 if test "${cf_cv_have_isascii+set}" = set; then
19860   echo $ECHO_N "(cached) $ECHO_C" >&6
19861 else
19862
19863         cat >conftest.$ac_ext <<_ACEOF
19864 #line 19864 "configure"
19865 #include "confdefs.h"
19866 #include <ctype.h>
19867 int
19868 main (void)
19869 {
19870 int x = isascii(' ')
19871   ;
19872   return 0;
19873 }
19874 _ACEOF
19875 rm -f conftest.$ac_objext conftest$ac_exeext
19876 if { (eval echo "$as_me:19876: \"$ac_link\"") >&5
19877   (eval $ac_link) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit $ac_status); } &&
19881          { ac_try='test -s conftest$ac_exeext'
19882   { (eval echo "$as_me:19882: \"$ac_try\"") >&5
19883   (eval $ac_try) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit $ac_status); }; }; then
19887   cf_cv_have_isascii=yes
19888 else
19889   echo "$as_me: failed program was:" >&5
19890 cat conftest.$ac_ext >&5
19891 cf_cv_have_isascii=no
19892 fi
19893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19894
19895 fi
19896 echo "$as_me:19896: result: $cf_cv_have_isascii" >&5
19897 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19898 test "$cf_cv_have_isascii" = yes &&
19899 cat >>confdefs.h <<\EOF
19900 #define HAVE_ISASCII 1
19901 EOF
19902
19903 if test "$ac_cv_func_sigaction" = yes; then
19904 echo "$as_me:19904: checking whether sigaction needs _POSIX_SOURCE" >&5
19905 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19906 cat >conftest.$ac_ext <<_ACEOF
19907 #line 19907 "configure"
19908 #include "confdefs.h"
19909
19910 #include <sys/types.h>
19911 #include <signal.h>
19912 int
19913 main (void)
19914 {
19915 struct sigaction act
19916   ;
19917   return 0;
19918 }
19919 _ACEOF
19920 rm -f conftest.$ac_objext
19921 if { (eval echo "$as_me:19921: \"$ac_compile\"") >&5
19922   (eval $ac_compile) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); } &&
19926          { ac_try='test -s conftest.$ac_objext'
19927   { (eval echo "$as_me:19927: \"$ac_try\"") >&5
19928   (eval $ac_try) 2>&5
19929   ac_status=$?
19930   echo "$as_me:19930: \$? = $ac_status" >&5
19931   (exit $ac_status); }; }; then
19932   sigact_bad=no
19933 else
19934   echo "$as_me: failed program was:" >&5
19935 cat conftest.$ac_ext >&5
19936
19937 cat >conftest.$ac_ext <<_ACEOF
19938 #line 19938 "configure"
19939 #include "confdefs.h"
19940
19941 #define _POSIX_SOURCE
19942 #include <sys/types.h>
19943 #include <signal.h>
19944 int
19945 main (void)
19946 {
19947 struct sigaction act
19948   ;
19949   return 0;
19950 }
19951 _ACEOF
19952 rm -f conftest.$ac_objext
19953 if { (eval echo "$as_me:19953: \"$ac_compile\"") >&5
19954   (eval $ac_compile) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); } &&
19958          { ac_try='test -s conftest.$ac_objext'
19959   { (eval echo "$as_me:19959: \"$ac_try\"") >&5
19960   (eval $ac_try) 2>&5
19961   ac_status=$?
19962   echo "$as_me:19962: \$? = $ac_status" >&5
19963   (exit $ac_status); }; }; then
19964   sigact_bad=yes
19965
19966 cat >>confdefs.h <<\EOF
19967 #define _POSIX_SOURCE 1
19968 EOF
19969
19970 else
19971   echo "$as_me: failed program was:" >&5
19972 cat conftest.$ac_ext >&5
19973 sigact_bad=unknown
19974 fi
19975 rm -f conftest.$ac_objext conftest.$ac_ext
19976 fi
19977 rm -f conftest.$ac_objext conftest.$ac_ext
19978 echo "$as_me:19978: result: $sigact_bad" >&5
19979 echo "${ECHO_T}$sigact_bad" >&6
19980 fi
19981
19982 echo "$as_me:19982: checking if nanosleep really works" >&5
19983 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19984 if test "${cf_cv_func_nanosleep+set}" = set; then
19985   echo $ECHO_N "(cached) $ECHO_C" >&6
19986 else
19987
19988 if test "$cross_compiling" = yes; then
19989   cf_cv_func_nanosleep=unknown
19990 else
19991   cat >conftest.$ac_ext <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994
19995 #include <stdio.h>
19996 #include <errno.h>
19997 #include <time.h>
19998
19999 #ifdef HAVE_SYS_TIME_H
20000 #include <sys/time.h>
20001 #endif
20002
20003 int main(void) {
20004         struct timespec ts1, ts2;
20005         int code;
20006         ts1.tv_sec  = 0;
20007         ts1.tv_nsec = 750000000;
20008         ts2.tv_sec  = 0;
20009         ts2.tv_nsec = 0;
20010         errno = 0;
20011         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20012         ${cf_cv_main_return:-return}(code != 0);
20013 }
20014
20015 _ACEOF
20016 rm -f conftest$ac_exeext
20017 if { (eval echo "$as_me:20017: \"$ac_link\"") >&5
20018   (eval $ac_link) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20022   { (eval echo "$as_me:20022: \"$ac_try\"") >&5
20023   (eval $ac_try) 2>&5
20024   ac_status=$?
20025   echo "$as_me:20025: \$? = $ac_status" >&5
20026   (exit $ac_status); }; }; then
20027   cf_cv_func_nanosleep=yes
20028 else
20029   echo "$as_me: program exited with status $ac_status" >&5
20030 echo "$as_me: failed program was:" >&5
20031 cat conftest.$ac_ext >&5
20032 cf_cv_func_nanosleep=no
20033 fi
20034 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20035 fi
20036 fi
20037 echo "$as_me:20037: result: $cf_cv_func_nanosleep" >&5
20038 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20039
20040 test "$cf_cv_func_nanosleep" = "yes" &&
20041 cat >>confdefs.h <<\EOF
20042 #define HAVE_NANOSLEEP 1
20043 EOF
20044
20045 for ac_header in \
20046 termio.h \
20047 termios.h \
20048 unistd.h \
20049 sys/ioctl.h \
20050 sys/termio.h \
20051
20052 do
20053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20054 echo "$as_me:20054: checking for $ac_header" >&5
20055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20057   echo $ECHO_N "(cached) $ECHO_C" >&6
20058 else
20059   cat >conftest.$ac_ext <<_ACEOF
20060 #line 20060 "configure"
20061 #include "confdefs.h"
20062 #include <$ac_header>
20063 _ACEOF
20064 if { (eval echo "$as_me:20064: \"$ac_cpp conftest.$ac_ext\"") >&5
20065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20066   ac_status=$?
20067   egrep -v '^ *\+' conftest.er1 >conftest.err
20068   rm -f conftest.er1
20069   cat conftest.err >&5
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); } >/dev/null; then
20072   if test -s conftest.err; then
20073     ac_cpp_err=$ac_c_preproc_warn_flag
20074   else
20075     ac_cpp_err=
20076   fi
20077 else
20078   ac_cpp_err=yes
20079 fi
20080 if test -z "$ac_cpp_err"; then
20081   eval "$as_ac_Header=yes"
20082 else
20083   echo "$as_me: failed program was:" >&5
20084   cat conftest.$ac_ext >&5
20085   eval "$as_ac_Header=no"
20086 fi
20087 rm -f conftest.err conftest.$ac_ext
20088 fi
20089 echo "$as_me:20089: result: `eval echo '${'$as_ac_Header'}'`" >&5
20090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20092   cat >>confdefs.h <<EOF
20093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20094 EOF
20095
20096 fi
20097 done
20098
20099 if test "$ac_cv_header_termios_h" = yes ; then
20100         case "$CFLAGS $CPPFLAGS" in
20101         (*-D_POSIX_SOURCE*)
20102                 termios_bad=dunno ;;
20103         (*)     termios_bad=maybe ;;
20104         esac
20105         if test "$termios_bad" = maybe ; then
20106         echo "$as_me:20106: checking whether termios.h needs _POSIX_SOURCE" >&5
20107 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20108         cat >conftest.$ac_ext <<_ACEOF
20109 #line 20109 "configure"
20110 #include "confdefs.h"
20111 #include <termios.h>
20112 int
20113 main (void)
20114 {
20115 struct termios foo; int x = foo.c_iflag = 1; (void)x
20116   ;
20117   return 0;
20118 }
20119 _ACEOF
20120 rm -f conftest.$ac_objext
20121 if { (eval echo "$as_me:20121: \"$ac_compile\"") >&5
20122   (eval $ac_compile) 2>&5
20123   ac_status=$?
20124   echo "$as_me:20124: \$? = $ac_status" >&5
20125   (exit $ac_status); } &&
20126          { ac_try='test -s conftest.$ac_objext'
20127   { (eval echo "$as_me:20127: \"$ac_try\"") >&5
20128   (eval $ac_try) 2>&5
20129   ac_status=$?
20130   echo "$as_me:20130: \$? = $ac_status" >&5
20131   (exit $ac_status); }; }; then
20132   termios_bad=no
20133 else
20134   echo "$as_me: failed program was:" >&5
20135 cat conftest.$ac_ext >&5
20136
20137                 cat >conftest.$ac_ext <<_ACEOF
20138 #line 20138 "configure"
20139 #include "confdefs.h"
20140
20141 #define _POSIX_SOURCE
20142 #include <termios.h>
20143 int
20144 main (void)
20145 {
20146 struct termios foo; int x = foo.c_iflag = 2; (void)x
20147   ;
20148   return 0;
20149 }
20150 _ACEOF
20151 rm -f conftest.$ac_objext
20152 if { (eval echo "$as_me:20152: \"$ac_compile\"") >&5
20153   (eval $ac_compile) 2>&5
20154   ac_status=$?
20155   echo "$as_me:20155: \$? = $ac_status" >&5
20156   (exit $ac_status); } &&
20157          { ac_try='test -s conftest.$ac_objext'
20158   { (eval echo "$as_me:20158: \"$ac_try\"") >&5
20159   (eval $ac_try) 2>&5
20160   ac_status=$?
20161   echo "$as_me:20161: \$? = $ac_status" >&5
20162   (exit $ac_status); }; }; then
20163   termios_bad=unknown
20164 else
20165   echo "$as_me: failed program was:" >&5
20166 cat conftest.$ac_ext >&5
20167 termios_bad=yes
20168 cat >>confdefs.h <<\EOF
20169 #define _POSIX_SOURCE 1
20170 EOF
20171
20172 fi
20173 rm -f conftest.$ac_objext conftest.$ac_ext
20174
20175 fi
20176 rm -f conftest.$ac_objext conftest.$ac_ext
20177         echo "$as_me:20177: result: $termios_bad" >&5
20178 echo "${ECHO_T}$termios_bad" >&6
20179         fi
20180 fi
20181
20182 echo "$as_me:20182: checking for tcgetattr" >&5
20183 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20184 if test "${cf_cv_have_tcgetattr+set}" = set; then
20185   echo $ECHO_N "(cached) $ECHO_C" >&6
20186 else
20187
20188 cat >conftest.$ac_ext <<_ACEOF
20189 #line 20189 "configure"
20190 #include "confdefs.h"
20191
20192 #include <sys/types.h>
20193 #ifdef HAVE_UNISTD_H
20194 #include <unistd.h>
20195 #endif
20196 #ifdef HAVE_TERMIOS_H
20197 #include <termios.h>
20198 #define TTY struct termios
20199 #else
20200 #ifdef HAVE_TERMIO_H
20201 #include <termio.h>
20202 #define TTY struct termio
20203 #endif
20204 #endif
20205
20206 int
20207 main (void)
20208 {
20209
20210 TTY foo;
20211 tcgetattr(1, &foo);
20212   ;
20213   return 0;
20214 }
20215 _ACEOF
20216 rm -f conftest.$ac_objext conftest$ac_exeext
20217 if { (eval echo "$as_me:20217: \"$ac_link\"") >&5
20218   (eval $ac_link) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit $ac_status); } &&
20222          { ac_try='test -s conftest$ac_exeext'
20223   { (eval echo "$as_me:20223: \"$ac_try\"") >&5
20224   (eval $ac_try) 2>&5
20225   ac_status=$?
20226   echo "$as_me:20226: \$? = $ac_status" >&5
20227   (exit $ac_status); }; }; then
20228   cf_cv_have_tcgetattr=yes
20229 else
20230   echo "$as_me: failed program was:" >&5
20231 cat conftest.$ac_ext >&5
20232 cf_cv_have_tcgetattr=no
20233 fi
20234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20235 fi
20236 echo "$as_me:20236: result: $cf_cv_have_tcgetattr" >&5
20237 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20238 test "$cf_cv_have_tcgetattr" = yes &&
20239 cat >>confdefs.h <<\EOF
20240 #define HAVE_TCGETATTR 1
20241 EOF
20242
20243 echo "$as_me:20243: checking for vsscanf function or workaround" >&5
20244 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20245 if test "${cf_cv_func_vsscanf+set}" = set; then
20246   echo $ECHO_N "(cached) $ECHO_C" >&6
20247 else
20248
20249 cat >conftest.$ac_ext <<_ACEOF
20250 #line 20250 "configure"
20251 #include "confdefs.h"
20252
20253 #include <stdarg.h>
20254 #include <stdio.h>
20255 int
20256 main (void)
20257 {
20258
20259         va_list ap;
20260         vsscanf("from", "%d", ap)
20261   ;
20262   return 0;
20263 }
20264 _ACEOF
20265 rm -f conftest.$ac_objext conftest$ac_exeext
20266 if { (eval echo "$as_me:20266: \"$ac_link\"") >&5
20267   (eval $ac_link) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); } &&
20271          { ac_try='test -s conftest$ac_exeext'
20272   { (eval echo "$as_me:20272: \"$ac_try\"") >&5
20273   (eval $ac_try) 2>&5
20274   ac_status=$?
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit $ac_status); }; }; then
20277   cf_cv_func_vsscanf=vsscanf
20278 else
20279   echo "$as_me: failed program was:" >&5
20280 cat conftest.$ac_ext >&5
20281
20282 cat >conftest.$ac_ext <<_ACEOF
20283 #line 20283 "configure"
20284 #include "confdefs.h"
20285
20286 #include <stdarg.h>
20287 #include <stdio.h>
20288 int
20289 main (void)
20290 {
20291
20292         FILE strbuf;
20293         char *str = "from";
20294
20295         strbuf._flag = _IOREAD;
20296         strbuf._ptr = strbuf._base = (unsigned char *) str;
20297         strbuf._cnt = strlen(str);
20298         strbuf._file = _NFILE;
20299         return (vfscanf(&strbuf, "%d", ap))
20300   ;
20301   return 0;
20302 }
20303 _ACEOF
20304 rm -f conftest.$ac_objext conftest$ac_exeext
20305 if { (eval echo "$as_me:20305: \"$ac_link\"") >&5
20306   (eval $ac_link) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit $ac_status); } &&
20310          { ac_try='test -s conftest$ac_exeext'
20311   { (eval echo "$as_me:20311: \"$ac_try\"") >&5
20312   (eval $ac_try) 2>&5
20313   ac_status=$?
20314   echo "$as_me:20314: \$? = $ac_status" >&5
20315   (exit $ac_status); }; }; then
20316   cf_cv_func_vsscanf=vfscanf
20317 else
20318   echo "$as_me: failed program was:" >&5
20319 cat conftest.$ac_ext >&5
20320
20321 cat >conftest.$ac_ext <<_ACEOF
20322 #line 20322 "configure"
20323 #include "confdefs.h"
20324
20325 #include <stdarg.h>
20326 #include <stdio.h>
20327 int
20328 main (void)
20329 {
20330
20331         FILE strbuf;
20332         char *str = "from";
20333
20334         strbuf._flag = _IOREAD;
20335         strbuf._ptr = strbuf._base = (unsigned char *) str;
20336         strbuf._cnt = strlen(str);
20337         strbuf._file = _NFILE;
20338         return (_doscan(&strbuf, "%d", ap))
20339   ;
20340   return 0;
20341 }
20342 _ACEOF
20343 rm -f conftest.$ac_objext conftest$ac_exeext
20344 if { (eval echo "$as_me:20344: \"$ac_link\"") >&5
20345   (eval $ac_link) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); } &&
20349          { ac_try='test -s conftest$ac_exeext'
20350   { (eval echo "$as_me:20350: \"$ac_try\"") >&5
20351   (eval $ac_try) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit $ac_status); }; }; then
20355   cf_cv_func_vsscanf=_doscan
20356 else
20357   echo "$as_me: failed program was:" >&5
20358 cat conftest.$ac_ext >&5
20359
20360 cf_cv_func_vsscanf=no
20361 fi
20362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20363 fi
20364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20365 fi
20366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20367 fi
20368 echo "$as_me:20368: result: $cf_cv_func_vsscanf" >&5
20369 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20370
20371 case $cf_cv_func_vsscanf in
20372 (vsscanf)
20373 cat >>confdefs.h <<\EOF
20374 #define HAVE_VSSCANF 1
20375 EOF
20376 ;;
20377 (vfscanf)
20378 cat >>confdefs.h <<\EOF
20379 #define HAVE_VFSCANF 1
20380 EOF
20381 ;;
20382 (_doscan)
20383 cat >>confdefs.h <<\EOF
20384 #define HAVE__DOSCAN 1
20385 EOF
20386 ;;
20387 esac
20388
20389 for ac_header in \
20390 unistd.h \
20391
20392 do
20393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20394 echo "$as_me:20394: checking for $ac_header" >&5
20395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20397   echo $ECHO_N "(cached) $ECHO_C" >&6
20398 else
20399   cat >conftest.$ac_ext <<_ACEOF
20400 #line 20400 "configure"
20401 #include "confdefs.h"
20402 #include <$ac_header>
20403 _ACEOF
20404 if { (eval echo "$as_me:20404: \"$ac_cpp conftest.$ac_ext\"") >&5
20405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20406   ac_status=$?
20407   egrep -v '^ *\+' conftest.er1 >conftest.err
20408   rm -f conftest.er1
20409   cat conftest.err >&5
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit $ac_status); } >/dev/null; then
20412   if test -s conftest.err; then
20413     ac_cpp_err=$ac_c_preproc_warn_flag
20414   else
20415     ac_cpp_err=
20416   fi
20417 else
20418   ac_cpp_err=yes
20419 fi
20420 if test -z "$ac_cpp_err"; then
20421   eval "$as_ac_Header=yes"
20422 else
20423   echo "$as_me: failed program was:" >&5
20424   cat conftest.$ac_ext >&5
20425   eval "$as_ac_Header=no"
20426 fi
20427 rm -f conftest.err conftest.$ac_ext
20428 fi
20429 echo "$as_me:20429: result: `eval echo '${'$as_ac_Header'}'`" >&5
20430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20432   cat >>confdefs.h <<EOF
20433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20434 EOF
20435
20436 fi
20437 done
20438
20439 echo "$as_me:20439: checking for working mkstemp" >&5
20440 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20441 if test "${cf_cv_func_mkstemp+set}" = set; then
20442   echo $ECHO_N "(cached) $ECHO_C" >&6
20443 else
20444
20445 rm -rf conftest*
20446 if test "$cross_compiling" = yes; then
20447   cf_cv_func_mkstemp=maybe
20448 else
20449   cat >conftest.$ac_ext <<_ACEOF
20450 #line 20450 "configure"
20451 #include "confdefs.h"
20452
20453 #include <sys/types.h>
20454 #ifdef HAVE_UNISTD_H
20455 #include <unistd.h>
20456 #endif
20457 #include <stdlib.h>
20458 #include <stdio.h>
20459 #include <string.h>
20460 #include <sys/stat.h>
20461 int main(void)
20462 {
20463         char *tmpl = "conftestXXXXXX";
20464         char name[2][80];
20465         int n;
20466         int result = 0;
20467         int fd;
20468         struct stat sb;
20469
20470         umask(077);
20471         for (n = 0; n < 2; ++n) {
20472                 strcpy(name[n], tmpl);
20473                 if ((fd = mkstemp(name[n])) >= 0) {
20474                         if (!strcmp(name[n], tmpl)
20475                          || stat(name[n], &sb) != 0
20476                          || (sb.st_mode & S_IFMT) != S_IFREG
20477                          || (sb.st_mode & 077) != 0) {
20478                                 result = 1;
20479                         }
20480                         close(fd);
20481                 }
20482         }
20483         if (result == 0
20484          && !strcmp(name[0], name[1]))
20485                 result = 1;
20486         ${cf_cv_main_return:-return}(result);
20487 }
20488
20489 _ACEOF
20490 rm -f conftest$ac_exeext
20491 if { (eval echo "$as_me:20491: \"$ac_link\"") >&5
20492   (eval $ac_link) 2>&5
20493   ac_status=$?
20494   echo "$as_me:20494: \$? = $ac_status" >&5
20495   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20496   { (eval echo "$as_me:20496: \"$ac_try\"") >&5
20497   (eval $ac_try) 2>&5
20498   ac_status=$?
20499   echo "$as_me:20499: \$? = $ac_status" >&5
20500   (exit $ac_status); }; }; then
20501   cf_cv_func_mkstemp=yes
20502
20503 else
20504   echo "$as_me: program exited with status $ac_status" >&5
20505 echo "$as_me: failed program was:" >&5
20506 cat conftest.$ac_ext >&5
20507 cf_cv_func_mkstemp=no
20508
20509 fi
20510 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20511 fi
20512
20513 fi
20514 echo "$as_me:20514: result: $cf_cv_func_mkstemp" >&5
20515 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20516 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20517         echo "$as_me:20517: checking for mkstemp" >&5
20518 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20519 if test "${ac_cv_func_mkstemp+set}" = set; then
20520   echo $ECHO_N "(cached) $ECHO_C" >&6
20521 else
20522   cat >conftest.$ac_ext <<_ACEOF
20523 #line 20523 "configure"
20524 #include "confdefs.h"
20525 #define mkstemp autoconf_temporary
20526 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20527 #undef mkstemp
20528
20529 #ifdef __cplusplus
20530 extern "C"
20531 #endif
20532
20533 /* We use char because int might match the return type of a gcc2
20534    builtin and then its argument prototype would still apply.  */
20535 char mkstemp (void);
20536
20537 int
20538 main (void)
20539 {
20540
20541 /* The GNU C library defines stubs for functions which it implements
20542     to always fail with ENOSYS.  Some functions are actually named
20543     something starting with __ and the normal name is an alias.  */
20544 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20545 #error found stub for mkstemp
20546 #endif
20547
20548         return mkstemp ();
20549   ;
20550   return 0;
20551 }
20552 _ACEOF
20553 rm -f conftest.$ac_objext conftest$ac_exeext
20554 if { (eval echo "$as_me:20554: \"$ac_link\"") >&5
20555   (eval $ac_link) 2>&5
20556   ac_status=$?
20557   echo "$as_me:20557: \$? = $ac_status" >&5
20558   (exit $ac_status); } &&
20559          { ac_try='test -s conftest$ac_exeext'
20560   { (eval echo "$as_me:20560: \"$ac_try\"") >&5
20561   (eval $ac_try) 2>&5
20562   ac_status=$?
20563   echo "$as_me:20563: \$? = $ac_status" >&5
20564   (exit $ac_status); }; }; then
20565   ac_cv_func_mkstemp=yes
20566 else
20567   echo "$as_me: failed program was:" >&5
20568 cat conftest.$ac_ext >&5
20569 ac_cv_func_mkstemp=no
20570 fi
20571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20572 fi
20573 echo "$as_me:20573: result: $ac_cv_func_mkstemp" >&5
20574 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20575
20576 fi
20577 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20578
20579 cat >>confdefs.h <<\EOF
20580 #define HAVE_MKSTEMP 1
20581 EOF
20582
20583 fi
20584
20585 # setup for prototype of fallback for vsscanf()
20586
20587 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20588         HAVE_VSSCANF=1
20589 else
20590         HAVE_VSSCANF=0
20591 fi
20592
20593 if test "x$cross_compiling" = xyes ; then
20594         { echo "$as_me:20594: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20595 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20596 else
20597         echo "$as_me:20597: checking whether setvbuf arguments are reversed" >&5
20598 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20599 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20600   echo $ECHO_N "(cached) $ECHO_C" >&6
20601 else
20602   if test "$cross_compiling" = yes; then
20603   { { echo "$as_me:20603: error: cannot run test program while cross compiling" >&5
20604 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20605    { (exit 1); exit 1; }; }
20606 else
20607   cat >conftest.$ac_ext <<_ACEOF
20608 #line 20608 "configure"
20609 #include "confdefs.h"
20610 #include <stdio.h>
20611 /* If setvbuf has the reversed format, exit 0. */
20612 int
20613 main (void)
20614 {
20615   /* This call has the arguments reversed.
20616      A reversed system may check and see that the address of main
20617      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20618   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20619     $ac_main_return(1);
20620   putc('\r', stdout);
20621   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20622 }
20623 _ACEOF
20624 rm -f conftest$ac_exeext
20625 if { (eval echo "$as_me:20625: \"$ac_link\"") >&5
20626   (eval $ac_link) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit $ac_status); }; }; then
20635   ac_cv_func_setvbuf_reversed=yes
20636 else
20637   echo "$as_me: program exited with status $ac_status" >&5
20638 echo "$as_me: failed program was:" >&5
20639 cat conftest.$ac_ext >&5
20640 ac_cv_func_setvbuf_reversed=no
20641 fi
20642 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20643 fi
20644 rm -f core core.* *.core
20645 fi
20646 echo "$as_me:20646: result: $ac_cv_func_setvbuf_reversed" >&5
20647 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20648 if test $ac_cv_func_setvbuf_reversed = yes; then
20649
20650 cat >>confdefs.h <<\EOF
20651 #define SETVBUF_REVERSED 1
20652 EOF
20653
20654 fi
20655
20656 fi
20657 echo "$as_me:20657: checking for intptr_t" >&5
20658 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20659 if test "${ac_cv_type_intptr_t+set}" = set; then
20660   echo $ECHO_N "(cached) $ECHO_C" >&6
20661 else
20662   cat >conftest.$ac_ext <<_ACEOF
20663 #line 20663 "configure"
20664 #include "confdefs.h"
20665 $ac_includes_default
20666 int
20667 main (void)
20668 {
20669 if ((intptr_t *) 0)
20670   return 0;
20671 if (sizeof (intptr_t))
20672   return 0;
20673   ;
20674   return 0;
20675 }
20676 _ACEOF
20677 rm -f conftest.$ac_objext
20678 if { (eval echo "$as_me:20678: \"$ac_compile\"") >&5
20679   (eval $ac_compile) 2>&5
20680   ac_status=$?
20681   echo "$as_me:20681: \$? = $ac_status" >&5
20682   (exit $ac_status); } &&
20683          { ac_try='test -s conftest.$ac_objext'
20684   { (eval echo "$as_me:20684: \"$ac_try\"") >&5
20685   (eval $ac_try) 2>&5
20686   ac_status=$?
20687   echo "$as_me:20687: \$? = $ac_status" >&5
20688   (exit $ac_status); }; }; then
20689   ac_cv_type_intptr_t=yes
20690 else
20691   echo "$as_me: failed program was:" >&5
20692 cat conftest.$ac_ext >&5
20693 ac_cv_type_intptr_t=no
20694 fi
20695 rm -f conftest.$ac_objext conftest.$ac_ext
20696 fi
20697 echo "$as_me:20697: result: $ac_cv_type_intptr_t" >&5
20698 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20699 if test $ac_cv_type_intptr_t = yes; then
20700   :
20701 else
20702
20703 cat >>confdefs.h <<EOF
20704 #define intptr_t long
20705 EOF
20706
20707 fi
20708
20709 echo "$as_me:20709: checking for ssize_t" >&5
20710 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20711 if test "${ac_cv_type_ssize_t+set}" = set; then
20712   echo $ECHO_N "(cached) $ECHO_C" >&6
20713 else
20714   cat >conftest.$ac_ext <<_ACEOF
20715 #line 20715 "configure"
20716 #include "confdefs.h"
20717 $ac_includes_default
20718 int
20719 main (void)
20720 {
20721 if ((ssize_t *) 0)
20722   return 0;
20723 if (sizeof (ssize_t))
20724   return 0;
20725   ;
20726   return 0;
20727 }
20728 _ACEOF
20729 rm -f conftest.$ac_objext
20730 if { (eval echo "$as_me:20730: \"$ac_compile\"") >&5
20731   (eval $ac_compile) 2>&5
20732   ac_status=$?
20733   echo "$as_me:20733: \$? = $ac_status" >&5
20734   (exit $ac_status); } &&
20735          { ac_try='test -s conftest.$ac_objext'
20736   { (eval echo "$as_me:20736: \"$ac_try\"") >&5
20737   (eval $ac_try) 2>&5
20738   ac_status=$?
20739   echo "$as_me:20739: \$? = $ac_status" >&5
20740   (exit $ac_status); }; }; then
20741   ac_cv_type_ssize_t=yes
20742 else
20743   echo "$as_me: failed program was:" >&5
20744 cat conftest.$ac_ext >&5
20745 ac_cv_type_ssize_t=no
20746 fi
20747 rm -f conftest.$ac_objext conftest.$ac_ext
20748 fi
20749 echo "$as_me:20749: result: $ac_cv_type_ssize_t" >&5
20750 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20751 if test $ac_cv_type_ssize_t = yes; then
20752   :
20753 else
20754
20755 cat >>confdefs.h <<EOF
20756 #define ssize_t int
20757 EOF
20758
20759 fi
20760
20761 echo "$as_me:20761: checking for type sigaction_t" >&5
20762 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20763 if test "${cf_cv_type_sigaction+set}" = set; then
20764   echo $ECHO_N "(cached) $ECHO_C" >&6
20765 else
20766
20767         cat >conftest.$ac_ext <<_ACEOF
20768 #line 20768 "configure"
20769 #include "confdefs.h"
20770
20771 #include <signal.h>
20772 int
20773 main (void)
20774 {
20775 sigaction_t x
20776   ;
20777   return 0;
20778 }
20779 _ACEOF
20780 rm -f conftest.$ac_objext
20781 if { (eval echo "$as_me:20781: \"$ac_compile\"") >&5
20782   (eval $ac_compile) 2>&5
20783   ac_status=$?
20784   echo "$as_me:20784: \$? = $ac_status" >&5
20785   (exit $ac_status); } &&
20786          { ac_try='test -s conftest.$ac_objext'
20787   { (eval echo "$as_me:20787: \"$ac_try\"") >&5
20788   (eval $ac_try) 2>&5
20789   ac_status=$?
20790   echo "$as_me:20790: \$? = $ac_status" >&5
20791   (exit $ac_status); }; }; then
20792   cf_cv_type_sigaction=yes
20793 else
20794   echo "$as_me: failed program was:" >&5
20795 cat conftest.$ac_ext >&5
20796 cf_cv_type_sigaction=no
20797 fi
20798 rm -f conftest.$ac_objext conftest.$ac_ext
20799 fi
20800
20801 echo "$as_me:20801: result: $cf_cv_type_sigaction" >&5
20802 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20803 test "$cf_cv_type_sigaction" = yes &&
20804 cat >>confdefs.h <<\EOF
20805 #define HAVE_TYPE_SIGACTION 1
20806 EOF
20807
20808 echo "$as_me:20808: checking declaration of size-change" >&5
20809 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20810 if test "${cf_cv_sizechange+set}" = set; then
20811   echo $ECHO_N "(cached) $ECHO_C" >&6
20812 else
20813
20814         cf_cv_sizechange=unknown
20815         cf_save_CPPFLAGS="$CPPFLAGS"
20816
20817 for cf_opts in "" "NEED_PTEM_H"
20818 do
20819
20820         CPPFLAGS="$cf_save_CPPFLAGS"
20821         if test -n "$cf_opts"
20822         then
20823
20824         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20825         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20826
20827         fi
20828         cat >conftest.$ac_ext <<_ACEOF
20829 #line 20829 "configure"
20830 #include "confdefs.h"
20831 #include <sys/types.h>
20832 #ifdef HAVE_TERMIOS_H
20833 #include <termios.h>
20834 #else
20835 #ifdef HAVE_TERMIO_H
20836 #include <termio.h>
20837 #endif
20838 #endif
20839
20840 #ifdef NEED_PTEM_H
20841 /* This is a workaround for SCO:  they neglected to define struct winsize in
20842  * termios.h -- it's only in termio.h and ptem.h
20843  */
20844 #include <sys/stream.h>
20845 #include <sys/ptem.h>
20846 #endif
20847
20848 #ifdef HAVE_SYS_IOCTL_H
20849 #include <sys/ioctl.h>
20850 #endif
20851
20852 int
20853 main (void)
20854 {
20855
20856 #ifdef TIOCGSIZE
20857         struct ttysize win;     /* SunOS 3.0... */
20858         int y = win.ts_lines = 2;
20859         int x = win.ts_cols = 1;
20860         (void)y;
20861         (void)x;
20862 #else
20863 #ifdef TIOCGWINSZ
20864         struct winsize win;     /* everything else */
20865         int y = win.ws_row = 2;
20866         int x = win.ws_col = 1;
20867         (void)y;
20868         (void)x;
20869 #else
20870         no TIOCGSIZE or TIOCGWINSZ
20871 #endif /* TIOCGWINSZ */
20872 #endif /* TIOCGSIZE */
20873
20874   ;
20875   return 0;
20876 }
20877 _ACEOF
20878 rm -f conftest.$ac_objext
20879 if { (eval echo "$as_me:20879: \"$ac_compile\"") >&5
20880   (eval $ac_compile) 2>&5
20881   ac_status=$?
20882   echo "$as_me:20882: \$? = $ac_status" >&5
20883   (exit $ac_status); } &&
20884          { ac_try='test -s conftest.$ac_objext'
20885   { (eval echo "$as_me:20885: \"$ac_try\"") >&5
20886   (eval $ac_try) 2>&5
20887   ac_status=$?
20888   echo "$as_me:20888: \$? = $ac_status" >&5
20889   (exit $ac_status); }; }; then
20890   cf_cv_sizechange=yes
20891 else
20892   echo "$as_me: failed program was:" >&5
20893 cat conftest.$ac_ext >&5
20894 cf_cv_sizechange=no
20895 fi
20896 rm -f conftest.$ac_objext conftest.$ac_ext
20897
20898         CPPFLAGS="$cf_save_CPPFLAGS"
20899         if test "$cf_cv_sizechange" = yes ; then
20900                 echo "size-change succeeded ($cf_opts)" >&5
20901                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20902                 break
20903         fi
20904 done
20905
20906 fi
20907 echo "$as_me:20907: result: $cf_cv_sizechange" >&5
20908 echo "${ECHO_T}$cf_cv_sizechange" >&6
20909 if test "$cf_cv_sizechange" != no ; then
20910
20911 cat >>confdefs.h <<\EOF
20912 #define HAVE_SIZECHANGE 1
20913 EOF
20914
20915         case $cf_cv_sizechange in
20916         (NEED*)
20917                 cat >>confdefs.h <<EOF
20918 #define $cf_cv_sizechange  1
20919 EOF
20920
20921                 ;;
20922         esac
20923 fi
20924
20925 echo "$as_me:20925: checking for memmove" >&5
20926 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20927 if test "${ac_cv_func_memmove+set}" = set; then
20928   echo $ECHO_N "(cached) $ECHO_C" >&6
20929 else
20930   cat >conftest.$ac_ext <<_ACEOF
20931 #line 20931 "configure"
20932 #include "confdefs.h"
20933 #define memmove autoconf_temporary
20934 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20935 #undef memmove
20936
20937 #ifdef __cplusplus
20938 extern "C"
20939 #endif
20940
20941 /* We use char because int might match the return type of a gcc2
20942    builtin and then its argument prototype would still apply.  */
20943 char memmove (void);
20944
20945 int
20946 main (void)
20947 {
20948
20949 /* The GNU C library defines stubs for functions which it implements
20950     to always fail with ENOSYS.  Some functions are actually named
20951     something starting with __ and the normal name is an alias.  */
20952 #if defined (__stub_memmove) || defined (__stub___memmove)
20953 #error found stub for memmove
20954 #endif
20955
20956         return memmove ();
20957   ;
20958   return 0;
20959 }
20960 _ACEOF
20961 rm -f conftest.$ac_objext conftest$ac_exeext
20962 if { (eval echo "$as_me:20962: \"$ac_link\"") >&5
20963   (eval $ac_link) 2>&5
20964   ac_status=$?
20965   echo "$as_me:20965: \$? = $ac_status" >&5
20966   (exit $ac_status); } &&
20967          { ac_try='test -s conftest$ac_exeext'
20968   { (eval echo "$as_me:20968: \"$ac_try\"") >&5
20969   (eval $ac_try) 2>&5
20970   ac_status=$?
20971   echo "$as_me:20971: \$? = $ac_status" >&5
20972   (exit $ac_status); }; }; then
20973   ac_cv_func_memmove=yes
20974 else
20975   echo "$as_me: failed program was:" >&5
20976 cat conftest.$ac_ext >&5
20977 ac_cv_func_memmove=no
20978 fi
20979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20980 fi
20981 echo "$as_me:20981: result: $ac_cv_func_memmove" >&5
20982 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20983 if test $ac_cv_func_memmove = yes; then
20984   :
20985 else
20986
20987 echo "$as_me:20987: checking for bcopy" >&5
20988 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20989 if test "${ac_cv_func_bcopy+set}" = set; then
20990   echo $ECHO_N "(cached) $ECHO_C" >&6
20991 else
20992   cat >conftest.$ac_ext <<_ACEOF
20993 #line 20993 "configure"
20994 #include "confdefs.h"
20995 #define bcopy autoconf_temporary
20996 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20997 #undef bcopy
20998
20999 #ifdef __cplusplus
21000 extern "C"
21001 #endif
21002
21003 /* We use char because int might match the return type of a gcc2
21004    builtin and then its argument prototype would still apply.  */
21005 char bcopy (void);
21006
21007 int
21008 main (void)
21009 {
21010
21011 /* The GNU C library defines stubs for functions which it implements
21012     to always fail with ENOSYS.  Some functions are actually named
21013     something starting with __ and the normal name is an alias.  */
21014 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21015 #error found stub for bcopy
21016 #endif
21017
21018         return bcopy ();
21019   ;
21020   return 0;
21021 }
21022 _ACEOF
21023 rm -f conftest.$ac_objext conftest$ac_exeext
21024 if { (eval echo "$as_me:21024: \"$ac_link\"") >&5
21025   (eval $ac_link) 2>&5
21026   ac_status=$?
21027   echo "$as_me:21027: \$? = $ac_status" >&5
21028   (exit $ac_status); } &&
21029          { ac_try='test -s conftest$ac_exeext'
21030   { (eval echo "$as_me:21030: \"$ac_try\"") >&5
21031   (eval $ac_try) 2>&5
21032   ac_status=$?
21033   echo "$as_me:21033: \$? = $ac_status" >&5
21034   (exit $ac_status); }; }; then
21035   ac_cv_func_bcopy=yes
21036 else
21037   echo "$as_me: failed program was:" >&5
21038 cat conftest.$ac_ext >&5
21039 ac_cv_func_bcopy=no
21040 fi
21041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21042 fi
21043 echo "$as_me:21043: result: $ac_cv_func_bcopy" >&5
21044 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21045 if test $ac_cv_func_bcopy = yes; then
21046
21047         echo "$as_me:21047: checking if bcopy does overlapping moves" >&5
21048 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21049 if test "${cf_cv_good_bcopy+set}" = set; then
21050   echo $ECHO_N "(cached) $ECHO_C" >&6
21051 else
21052
21053                 if test "$cross_compiling" = yes; then
21054   cf_cv_good_bcopy=unknown
21055 else
21056   cat >conftest.$ac_ext <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059
21060 int main(void) {
21061         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21062         char temp[40];
21063         bcopy(data, temp, sizeof(data));
21064         bcopy(temp+10, temp, 15);
21065         bcopy(temp+5, temp+15, 10);
21066         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21067 }
21068
21069 _ACEOF
21070 rm -f conftest$ac_exeext
21071 if { (eval echo "$as_me:21071: \"$ac_link\"") >&5
21072   (eval $ac_link) 2>&5
21073   ac_status=$?
21074   echo "$as_me:21074: \$? = $ac_status" >&5
21075   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21076   { (eval echo "$as_me:21076: \"$ac_try\"") >&5
21077   (eval $ac_try) 2>&5
21078   ac_status=$?
21079   echo "$as_me:21079: \$? = $ac_status" >&5
21080   (exit $ac_status); }; }; then
21081   cf_cv_good_bcopy=yes
21082 else
21083   echo "$as_me: program exited with status $ac_status" >&5
21084 echo "$as_me: failed program was:" >&5
21085 cat conftest.$ac_ext >&5
21086 cf_cv_good_bcopy=no
21087 fi
21088 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21089 fi
21090
21091 fi
21092 echo "$as_me:21092: result: $cf_cv_good_bcopy" >&5
21093 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21094
21095 else
21096   cf_cv_good_bcopy=no
21097 fi
21098
21099         if test "$cf_cv_good_bcopy" = yes ; then
21100
21101 cat >>confdefs.h <<\EOF
21102 #define USE_OK_BCOPY 1
21103 EOF
21104
21105         else
21106
21107 cat >>confdefs.h <<\EOF
21108 #define USE_MY_MEMMOVE 1
21109 EOF
21110
21111         fi
21112
21113 fi
21114
21115 tty 2>&1 >/dev/null || {
21116 for ac_func in posix_openpt
21117 do
21118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21119 echo "$as_me:21119: checking for $ac_func" >&5
21120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21121 if eval "test \"\${$as_ac_var+set}\" = set"; then
21122   echo $ECHO_N "(cached) $ECHO_C" >&6
21123 else
21124   cat >conftest.$ac_ext <<_ACEOF
21125 #line 21125 "configure"
21126 #include "confdefs.h"
21127 #define $ac_func autoconf_temporary
21128 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21129 #undef $ac_func
21130
21131 #ifdef __cplusplus
21132 extern "C"
21133 #endif
21134
21135 /* We use char because int might match the return type of a gcc2
21136    builtin and then its argument prototype would still apply.  */
21137 char $ac_func (void);
21138
21139 int
21140 main (void)
21141 {
21142
21143 /* The GNU C library defines stubs for functions which it implements
21144     to always fail with ENOSYS.  Some functions are actually named
21145     something starting with __ and the normal name is an alias.  */
21146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21147 #error found stub for $ac_func
21148 #endif
21149
21150         return $ac_func ();
21151   ;
21152   return 0;
21153 }
21154 _ACEOF
21155 rm -f conftest.$ac_objext conftest$ac_exeext
21156 if { (eval echo "$as_me:21156: \"$ac_link\"") >&5
21157   (eval $ac_link) 2>&5
21158   ac_status=$?
21159   echo "$as_me:21159: \$? = $ac_status" >&5
21160   (exit $ac_status); } &&
21161          { ac_try='test -s conftest$ac_exeext'
21162   { (eval echo "$as_me:21162: \"$ac_try\"") >&5
21163   (eval $ac_try) 2>&5
21164   ac_status=$?
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit $ac_status); }; }; then
21167   eval "$as_ac_var=yes"
21168 else
21169   echo "$as_me: failed program was:" >&5
21170 cat conftest.$ac_ext >&5
21171 eval "$as_ac_var=no"
21172 fi
21173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21174 fi
21175 echo "$as_me:21175: result: `eval echo '${'$as_ac_var'}'`" >&5
21176 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21177 if test `eval echo '${'$as_ac_var'}'` = yes; then
21178   cat >>confdefs.h <<EOF
21179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21180 EOF
21181
21182 fi
21183 done
21184  }
21185 echo "$as_me:21185: checking if poll really works" >&5
21186 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21187 if test "${cf_cv_working_poll+set}" = set; then
21188   echo $ECHO_N "(cached) $ECHO_C" >&6
21189 else
21190
21191 if test "$cross_compiling" = yes; then
21192   cf_cv_working_poll=unknown
21193 else
21194   cat >conftest.$ac_ext <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197
21198 #include <stdlib.h>
21199 #include <stdio.h>
21200 #include <unistd.h>
21201 #include <fcntl.h>
21202 #ifdef HAVE_POLL_H
21203 #include <poll.h>
21204 #else
21205 #include <sys/poll.h>
21206 #endif
21207 int main(void) {
21208         struct pollfd myfds;
21209         int ret;
21210
21211         /* check for Darwin bug with respect to "devices" */
21212         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21213         if (myfds.fd < 0)
21214                 myfds.fd = 0;
21215         myfds.events = POLLIN;
21216         myfds.revents = 0;
21217
21218         ret = poll(&myfds, 1, 100);
21219
21220         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21221                 ret = -1;
21222         } else {
21223                 int fd = 0;
21224                 if (!isatty(fd)) {
21225                         fd = open("/dev/tty", 2);       /* O_RDWR */
21226                 }
21227 #ifdef HAVE_POSIX_OPENPT
21228                 if (fd < 0) {
21229                         fd = posix_openpt(O_RDWR);
21230                 }
21231 #endif
21232
21233                 if (fd >= 0) {
21234                         /* also check with standard input */
21235                         myfds.fd = fd;
21236                         myfds.events = POLLIN;
21237                         myfds.revents = 0;
21238                         ret = poll(&myfds, 1, 100);
21239                 } else {
21240                         ret = -1;
21241                 }
21242         }
21243         ${cf_cv_main_return:-return}(ret < 0);
21244 }
21245 _ACEOF
21246 rm -f conftest$ac_exeext
21247 if { (eval echo "$as_me:21247: \"$ac_link\"") >&5
21248   (eval $ac_link) 2>&5
21249   ac_status=$?
21250   echo "$as_me:21250: \$? = $ac_status" >&5
21251   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21252   { (eval echo "$as_me:21252: \"$ac_try\"") >&5
21253   (eval $ac_try) 2>&5
21254   ac_status=$?
21255   echo "$as_me:21255: \$? = $ac_status" >&5
21256   (exit $ac_status); }; }; then
21257   cf_cv_working_poll=yes
21258 else
21259   echo "$as_me: program exited with status $ac_status" >&5
21260 echo "$as_me: failed program was:" >&5
21261 cat conftest.$ac_ext >&5
21262 cf_cv_working_poll=no
21263 fi
21264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21265 fi
21266 fi
21267 echo "$as_me:21267: result: $cf_cv_working_poll" >&5
21268 echo "${ECHO_T}$cf_cv_working_poll" >&6
21269 test "$cf_cv_working_poll" = "yes" &&
21270 cat >>confdefs.h <<\EOF
21271 #define HAVE_WORKING_POLL 1
21272 EOF
21273
21274 echo "$as_me:21274: checking for va_copy" >&5
21275 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21276 if test "${cf_cv_have_va_copy+set}" = set; then
21277   echo $ECHO_N "(cached) $ECHO_C" >&6
21278 else
21279
21280 cat >conftest.$ac_ext <<_ACEOF
21281 #line 21281 "configure"
21282 #include "confdefs.h"
21283
21284 #include <stdarg.h>
21285
21286 int
21287 main (void)
21288 {
21289
21290         static va_list dst;
21291         static va_list src;
21292         va_copy(dst, src)
21293   ;
21294   return 0;
21295 }
21296 _ACEOF
21297 rm -f conftest.$ac_objext conftest$ac_exeext
21298 if { (eval echo "$as_me:21298: \"$ac_link\"") >&5
21299   (eval $ac_link) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit $ac_status); } &&
21303          { ac_try='test -s conftest$ac_exeext'
21304   { (eval echo "$as_me:21304: \"$ac_try\"") >&5
21305   (eval $ac_try) 2>&5
21306   ac_status=$?
21307   echo "$as_me:21307: \$? = $ac_status" >&5
21308   (exit $ac_status); }; }; then
21309   cf_cv_have_va_copy=yes
21310 else
21311   echo "$as_me: failed program was:" >&5
21312 cat conftest.$ac_ext >&5
21313 cf_cv_have_va_copy=no
21314 fi
21315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21316 fi
21317 echo "$as_me:21317: result: $cf_cv_have_va_copy" >&5
21318 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21319
21320 if test "$cf_cv_have_va_copy" = yes;
21321 then
21322
21323 cat >>confdefs.h <<\EOF
21324 #define HAVE_VA_COPY 1
21325 EOF
21326
21327 else # !cf_cv_have_va_copy
21328
21329 echo "$as_me:21329: checking for __va_copy" >&5
21330 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21331 if test "${cf_cv_have___va_copy+set}" = set; then
21332   echo $ECHO_N "(cached) $ECHO_C" >&6
21333 else
21334
21335 cat >conftest.$ac_ext <<_ACEOF
21336 #line 21336 "configure"
21337 #include "confdefs.h"
21338
21339 #include <stdarg.h>
21340
21341 int
21342 main (void)
21343 {
21344
21345         static va_list dst;
21346         static va_list src;
21347         __va_copy(dst, src)
21348   ;
21349   return 0;
21350 }
21351 _ACEOF
21352 rm -f conftest.$ac_objext conftest$ac_exeext
21353 if { (eval echo "$as_me:21353: \"$ac_link\"") >&5
21354   (eval $ac_link) 2>&5
21355   ac_status=$?
21356   echo "$as_me:21356: \$? = $ac_status" >&5
21357   (exit $ac_status); } &&
21358          { ac_try='test -s conftest$ac_exeext'
21359   { (eval echo "$as_me:21359: \"$ac_try\"") >&5
21360   (eval $ac_try) 2>&5
21361   ac_status=$?
21362   echo "$as_me:21362: \$? = $ac_status" >&5
21363   (exit $ac_status); }; }; then
21364   cf_cv_have___va_copy=yes
21365 else
21366   echo "$as_me: failed program was:" >&5
21367 cat conftest.$ac_ext >&5
21368 cf_cv_have___va_copy=no
21369 fi
21370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21371 fi
21372 echo "$as_me:21372: result: $cf_cv_have___va_copy" >&5
21373 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21374
21375 if test "$cf_cv_have___va_copy" = yes
21376 then
21377
21378 cat >>confdefs.h <<\EOF
21379 #define HAVE___VA_COPY 1
21380 EOF
21381
21382 else # !cf_cv_have___va_copy
21383
21384 echo "$as_me:21384: checking for __builtin_va_copy" >&5
21385 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21386 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21387   echo $ECHO_N "(cached) $ECHO_C" >&6
21388 else
21389
21390 cat >conftest.$ac_ext <<_ACEOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393
21394 #include <stdarg.h>
21395
21396 int
21397 main (void)
21398 {
21399
21400         static va_list dst;
21401         static va_list src;
21402         __builtin_va_copy(dst, src)
21403   ;
21404   return 0;
21405 }
21406 _ACEOF
21407 rm -f conftest.$ac_objext conftest$ac_exeext
21408 if { (eval echo "$as_me:21408: \"$ac_link\"") >&5
21409   (eval $ac_link) 2>&5
21410   ac_status=$?
21411   echo "$as_me:21411: \$? = $ac_status" >&5
21412   (exit $ac_status); } &&
21413          { ac_try='test -s conftest$ac_exeext'
21414   { (eval echo "$as_me:21414: \"$ac_try\"") >&5
21415   (eval $ac_try) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit $ac_status); }; }; then
21419   cf_cv_have___builtin_va_copy=yes
21420 else
21421   echo "$as_me: failed program was:" >&5
21422 cat conftest.$ac_ext >&5
21423 cf_cv_have___builtin_va_copy=no
21424 fi
21425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21426 fi
21427 echo "$as_me:21427: result: $cf_cv_have___builtin_va_copy" >&5
21428 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21429
21430 test "$cf_cv_have___builtin_va_copy" = yes &&
21431
21432 cat >>confdefs.h <<\EOF
21433 #define HAVE___BUILTIN_VA_COPY 1
21434 EOF
21435
21436 fi # cf_cv_have___va_copy
21437
21438 fi # cf_cv_have_va_copy
21439
21440 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21441 (*yes*)
21442         ;;
21443
21444 (*)
21445         echo "$as_me:21445: checking if we can simply copy va_list" >&5
21446 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21447 if test "${cf_cv_pointer_va_list+set}" = set; then
21448   echo $ECHO_N "(cached) $ECHO_C" >&6
21449 else
21450
21451 cat >conftest.$ac_ext <<_ACEOF
21452 #line 21452 "configure"
21453 #include "confdefs.h"
21454
21455 #include <stdarg.h>
21456
21457 int
21458 main (void)
21459 {
21460
21461         va_list dst;
21462         va_list src;
21463         dst = src
21464   ;
21465   return 0;
21466 }
21467 _ACEOF
21468 rm -f conftest.$ac_objext conftest$ac_exeext
21469 if { (eval echo "$as_me:21469: \"$ac_link\"") >&5
21470   (eval $ac_link) 2>&5
21471   ac_status=$?
21472   echo "$as_me:21472: \$? = $ac_status" >&5
21473   (exit $ac_status); } &&
21474          { ac_try='test -s conftest$ac_exeext'
21475   { (eval echo "$as_me:21475: \"$ac_try\"") >&5
21476   (eval $ac_try) 2>&5
21477   ac_status=$?
21478   echo "$as_me:21478: \$? = $ac_status" >&5
21479   (exit $ac_status); }; }; then
21480   cf_cv_pointer_va_list=yes
21481 else
21482   echo "$as_me: failed program was:" >&5
21483 cat conftest.$ac_ext >&5
21484 cf_cv_pointer_va_list=no
21485 fi
21486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21487 fi
21488 echo "$as_me:21488: result: $cf_cv_pointer_va_list" >&5
21489 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21490
21491         if test "$cf_cv_pointer_va_list" = no
21492         then
21493                 echo "$as_me:21493: checking if we can copy va_list indirectly" >&5
21494 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21495 if test "${cf_cv_array_va_list+set}" = set; then
21496   echo $ECHO_N "(cached) $ECHO_C" >&6
21497 else
21498
21499 cat >conftest.$ac_ext <<_ACEOF
21500 #line 21500 "configure"
21501 #include "confdefs.h"
21502
21503 #include <stdarg.h>
21504
21505 int
21506 main (void)
21507 {
21508
21509         va_list dst;
21510         va_list src;
21511         *dst = *src
21512   ;
21513   return 0;
21514 }
21515 _ACEOF
21516 rm -f conftest.$ac_objext conftest$ac_exeext
21517 if { (eval echo "$as_me:21517: \"$ac_link\"") >&5
21518   (eval $ac_link) 2>&5
21519   ac_status=$?
21520   echo "$as_me:21520: \$? = $ac_status" >&5
21521   (exit $ac_status); } &&
21522          { ac_try='test -s conftest$ac_exeext'
21523   { (eval echo "$as_me:21523: \"$ac_try\"") >&5
21524   (eval $ac_try) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit $ac_status); }; }; then
21528   cf_cv_array_va_list=yes
21529 else
21530   echo "$as_me: failed program was:" >&5
21531 cat conftest.$ac_ext >&5
21532 cf_cv_array_va_list=no
21533 fi
21534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21535 fi
21536 echo "$as_me:21536: result: $cf_cv_array_va_list" >&5
21537 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21538                 test "$cf_cv_array_va_list" = yes &&
21539 cat >>confdefs.h <<\EOF
21540 #define ARRAY_VA_LIST 1
21541 EOF
21542
21543         fi
21544         ;;
21545 esac
21546
21547 echo "$as_me:21547: checking for pid_t" >&5
21548 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21549 if test "${ac_cv_type_pid_t+set}" = set; then
21550   echo $ECHO_N "(cached) $ECHO_C" >&6
21551 else
21552   cat >conftest.$ac_ext <<_ACEOF
21553 #line 21553 "configure"
21554 #include "confdefs.h"
21555 $ac_includes_default
21556 int
21557 main (void)
21558 {
21559 if ((pid_t *) 0)
21560   return 0;
21561 if (sizeof (pid_t))
21562   return 0;
21563   ;
21564   return 0;
21565 }
21566 _ACEOF
21567 rm -f conftest.$ac_objext
21568 if { (eval echo "$as_me:21568: \"$ac_compile\"") >&5
21569   (eval $ac_compile) 2>&5
21570   ac_status=$?
21571   echo "$as_me:21571: \$? = $ac_status" >&5
21572   (exit $ac_status); } &&
21573          { ac_try='test -s conftest.$ac_objext'
21574   { (eval echo "$as_me:21574: \"$ac_try\"") >&5
21575   (eval $ac_try) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit $ac_status); }; }; then
21579   ac_cv_type_pid_t=yes
21580 else
21581   echo "$as_me: failed program was:" >&5
21582 cat conftest.$ac_ext >&5
21583 ac_cv_type_pid_t=no
21584 fi
21585 rm -f conftest.$ac_objext conftest.$ac_ext
21586 fi
21587 echo "$as_me:21587: result: $ac_cv_type_pid_t" >&5
21588 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21589 if test $ac_cv_type_pid_t = yes; then
21590   :
21591 else
21592
21593 cat >>confdefs.h <<EOF
21594 #define pid_t int
21595 EOF
21596
21597 fi
21598
21599 for ac_header in unistd.h vfork.h
21600 do
21601 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21602 echo "$as_me:21602: checking for $ac_header" >&5
21603 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21604 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21605   echo $ECHO_N "(cached) $ECHO_C" >&6
21606 else
21607   cat >conftest.$ac_ext <<_ACEOF
21608 #line 21608 "configure"
21609 #include "confdefs.h"
21610 #include <$ac_header>
21611 _ACEOF
21612 if { (eval echo "$as_me:21612: \"$ac_cpp conftest.$ac_ext\"") >&5
21613   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21614   ac_status=$?
21615   egrep -v '^ *\+' conftest.er1 >conftest.err
21616   rm -f conftest.er1
21617   cat conftest.err >&5
21618   echo "$as_me:21618: \$? = $ac_status" >&5
21619   (exit $ac_status); } >/dev/null; then
21620   if test -s conftest.err; then
21621     ac_cpp_err=$ac_c_preproc_warn_flag
21622   else
21623     ac_cpp_err=
21624   fi
21625 else
21626   ac_cpp_err=yes
21627 fi
21628 if test -z "$ac_cpp_err"; then
21629   eval "$as_ac_Header=yes"
21630 else
21631   echo "$as_me: failed program was:" >&5
21632   cat conftest.$ac_ext >&5
21633   eval "$as_ac_Header=no"
21634 fi
21635 rm -f conftest.err conftest.$ac_ext
21636 fi
21637 echo "$as_me:21637: result: `eval echo '${'$as_ac_Header'}'`" >&5
21638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21639 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21640   cat >>confdefs.h <<EOF
21641 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21642 EOF
21643
21644 fi
21645 done
21646
21647 for ac_func in fork vfork
21648 do
21649 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21650 echo "$as_me:21650: checking for $ac_func" >&5
21651 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21652 if eval "test \"\${$as_ac_var+set}\" = set"; then
21653   echo $ECHO_N "(cached) $ECHO_C" >&6
21654 else
21655   cat >conftest.$ac_ext <<_ACEOF
21656 #line 21656 "configure"
21657 #include "confdefs.h"
21658 #define $ac_func autoconf_temporary
21659 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21660 #undef $ac_func
21661
21662 #ifdef __cplusplus
21663 extern "C"
21664 #endif
21665
21666 /* We use char because int might match the return type of a gcc2
21667    builtin and then its argument prototype would still apply.  */
21668 char $ac_func (void);
21669
21670 int
21671 main (void)
21672 {
21673
21674 /* The GNU C library defines stubs for functions which it implements
21675     to always fail with ENOSYS.  Some functions are actually named
21676     something starting with __ and the normal name is an alias.  */
21677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21678 #error found stub for $ac_func
21679 #endif
21680
21681         return $ac_func ();
21682   ;
21683   return 0;
21684 }
21685 _ACEOF
21686 rm -f conftest.$ac_objext conftest$ac_exeext
21687 if { (eval echo "$as_me:21687: \"$ac_link\"") >&5
21688   (eval $ac_link) 2>&5
21689   ac_status=$?
21690   echo "$as_me:21690: \$? = $ac_status" >&5
21691   (exit $ac_status); } &&
21692          { ac_try='test -s conftest$ac_exeext'
21693   { (eval echo "$as_me:21693: \"$ac_try\"") >&5
21694   (eval $ac_try) 2>&5
21695   ac_status=$?
21696   echo "$as_me:21696: \$? = $ac_status" >&5
21697   (exit $ac_status); }; }; then
21698   eval "$as_ac_var=yes"
21699 else
21700   echo "$as_me: failed program was:" >&5
21701 cat conftest.$ac_ext >&5
21702 eval "$as_ac_var=no"
21703 fi
21704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21705 fi
21706 echo "$as_me:21706: result: `eval echo '${'$as_ac_var'}'`" >&5
21707 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21708 if test `eval echo '${'$as_ac_var'}'` = yes; then
21709   cat >>confdefs.h <<EOF
21710 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21711 EOF
21712
21713 fi
21714 done
21715
21716 ac_cv_func_fork_works=$ac_cv_func_fork
21717 if test "x$ac_cv_func_fork" = xyes; then
21718   echo "$as_me:21718: checking for working fork" >&5
21719 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21720 if test "${ac_cv_func_fork_works+set}" = set; then
21721   echo $ECHO_N "(cached) $ECHO_C" >&6
21722 else
21723   if test "$cross_compiling" = yes; then
21724   ac_cv_func_fork_works=cross
21725 else
21726   cat >conftest.$ac_ext <<_ACEOF
21727 /* By Rüdiger Kuhlmann. */
21728       #include <sys/types.h>
21729       #if HAVE_UNISTD_H
21730       # include <unistd.h>
21731       #endif
21732       /* Some systems only have a dummy stub for fork() */
21733       int main (void)
21734       {
21735         if (fork() < 0)
21736           $ac_main_return (1);
21737         $ac_main_return (0);
21738       }
21739 _ACEOF
21740 rm -f conftest$ac_exeext
21741 if { (eval echo "$as_me:21741: \"$ac_link\"") >&5
21742   (eval $ac_link) 2>&5
21743   ac_status=$?
21744   echo "$as_me:21744: \$? = $ac_status" >&5
21745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21746   { (eval echo "$as_me:21746: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:21749: \$? = $ac_status" >&5
21750   (exit $ac_status); }; }; then
21751   ac_cv_func_fork_works=yes
21752 else
21753   echo "$as_me: program exited with status $ac_status" >&5
21754 echo "$as_me: failed program was:" >&5
21755 cat conftest.$ac_ext >&5
21756 ac_cv_func_fork_works=no
21757 fi
21758 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21759 fi
21760 fi
21761 echo "$as_me:21761: result: $ac_cv_func_fork_works" >&5
21762 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21763
21764 fi
21765 if test "x$ac_cv_func_fork_works" = xcross; then
21766   case $host in
21767     *-*-amigaos* | *-*-msdosdjgpp*)
21768       # Override, as these systems have only a dummy fork() stub
21769       ac_cv_func_fork_works=no
21770       ;;
21771     *)
21772       ac_cv_func_fork_works=yes
21773       ;;
21774   esac
21775   { echo "$as_me:21775: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21776 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21777 fi
21778 ac_cv_func_vfork_works=$ac_cv_func_vfork
21779 if test "x$ac_cv_func_vfork" = xyes; then
21780   echo "$as_me:21780: checking for working vfork" >&5
21781 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21782 if test "${ac_cv_func_vfork_works+set}" = set; then
21783   echo $ECHO_N "(cached) $ECHO_C" >&6
21784 else
21785   if test "$cross_compiling" = yes; then
21786   ac_cv_func_vfork_works=cross
21787 else
21788   cat >conftest.$ac_ext <<_ACEOF
21789 #line 21789 "configure"
21790 #include "confdefs.h"
21791 /* Thanks to Paul Eggert for this test.  */
21792 #include <stdio.h>
21793 #include <sys/types.h>
21794 #include <sys/stat.h>
21795 #if HAVE_UNISTD_H
21796 # include <unistd.h>
21797 #endif
21798 #if HAVE_VFORK_H
21799 # include <vfork.h>
21800 #endif
21801 /* On some sparc systems, changes by the child to local and incoming
21802    argument registers are propagated back to the parent.  The compiler
21803    is told about this with #include <vfork.h>, but some compilers
21804    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21805    static variable whose address is put into a register that is
21806    clobbered by the vfork.  */
21807 static
21808 #ifdef __cplusplus
21809 sparc_address_test (int arg)
21810 # else
21811 sparc_address_test (arg) int arg;
21812 #endif
21813 {
21814   static pid_t child;
21815   if (!child) {
21816     child = vfork ();
21817     if (child < 0) {
21818       perror ("vfork");
21819       _exit(2);
21820     }
21821     if (!child) {
21822       arg = getpid();
21823       write(-1, "", 0);
21824       _exit (arg);
21825     }
21826   }
21827 }
21828
21829 int
21830 main (void)
21831 {
21832   pid_t parent = getpid ();
21833   pid_t child;
21834
21835   sparc_address_test ();
21836
21837   child = vfork ();
21838
21839   if (child == 0) {
21840     /* Here is another test for sparc vfork register problems.  This
21841        test uses lots of local variables, at least as many local
21842        variables as main has allocated so far including compiler
21843        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21844        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21845        reuse the register of parent for one of the local variables,
21846        since it will think that parent can't possibly be used any more
21847        in this routine.  Assigning to the local variable will thus
21848        munge parent in the parent process.  */
21849     pid_t
21850       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21851       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21852     /* Convince the compiler that p..p7 are live; otherwise, it might
21853        use the same hardware register for all 8 local variables.  */
21854     if (p != p1 || p != p2 || p != p3 || p != p4
21855         || p != p5 || p != p6 || p != p7)
21856       _exit(1);
21857
21858     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21859        from child file descriptors.  If the child closes a descriptor
21860        before it execs or exits, this munges the parent's descriptor
21861        as well.  Test for this by closing stdout in the child.  */
21862     _exit(close(fileno(stdout)) != 0);
21863   } else {
21864     int status;
21865     struct stat st;
21866
21867     while (wait(&status) != child)
21868       ;
21869     $ac_main_return(
21870          /* Was there some problem with vforking?  */
21871          child < 0
21872
21873          /* Did the child fail?  (This shouldn't happen.)  */
21874          || status
21875
21876          /* Did the vfork/compiler bug occur?  */
21877          || parent != getpid()
21878
21879          /* Did the file descriptor bug occur?  */
21880          || fstat(fileno(stdout), &st) != 0
21881          );
21882   }
21883 }
21884 _ACEOF
21885 rm -f conftest$ac_exeext
21886 if { (eval echo "$as_me:21886: \"$ac_link\"") >&5
21887   (eval $ac_link) 2>&5
21888   ac_status=$?
21889   echo "$as_me:21889: \$? = $ac_status" >&5
21890   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21891   { (eval echo "$as_me:21891: \"$ac_try\"") >&5
21892   (eval $ac_try) 2>&5
21893   ac_status=$?
21894   echo "$as_me:21894: \$? = $ac_status" >&5
21895   (exit $ac_status); }; }; then
21896   ac_cv_func_vfork_works=yes
21897 else
21898   echo "$as_me: program exited with status $ac_status" >&5
21899 echo "$as_me: failed program was:" >&5
21900 cat conftest.$ac_ext >&5
21901 ac_cv_func_vfork_works=no
21902 fi
21903 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21904 fi
21905 fi
21906 echo "$as_me:21906: result: $ac_cv_func_vfork_works" >&5
21907 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21908
21909 fi;
21910 if test "x$ac_cv_func_fork_works" = xcross; then
21911   ac_cv_func_vfork_works=ac_cv_func_vfork
21912   { echo "$as_me:21912: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21913 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21914 fi
21915
21916 if test "x$ac_cv_func_vfork_works" = xyes; then
21917
21918 cat >>confdefs.h <<\EOF
21919 #define HAVE_WORKING_VFORK 1
21920 EOF
21921
21922 else
21923
21924 cat >>confdefs.h <<\EOF
21925 #define vfork fork
21926 EOF
21927
21928 fi
21929 if test "x$ac_cv_func_fork_works" = xyes; then
21930
21931 cat >>confdefs.h <<\EOF
21932 #define HAVE_WORKING_FORK 1
21933 EOF
21934
21935 fi
21936
21937 echo "$as_me:21937: checking if fopen accepts explicit binary mode" >&5
21938 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21939 if test "${cf_cv_fopen_bin_r+set}" = set; then
21940   echo $ECHO_N "(cached) $ECHO_C" >&6
21941 else
21942
21943         if test "$cross_compiling" = yes; then
21944   cf_cv_fopen_bin_r=unknown
21945 else
21946   cat >conftest.$ac_ext <<_ACEOF
21947 #line 21947 "configure"
21948 #include "confdefs.h"
21949
21950 #include <stdio.h>
21951 int main(void) {
21952         FILE *fp = fopen("conftest.tmp", "wb");
21953         int rc = 0;
21954         if (fp != 0) {
21955                 int p, q;
21956                 for (p = 0; p < 256; ++p) {
21957                         fputc(p, fp);
21958                 }
21959                 fclose(fp);
21960                 fp = fopen("conftest.tmp", "rb");
21961                 if (fp != 0) {
21962                         for (p = 0; p < 256; ++p) {
21963                                 q = fgetc(fp);
21964                                 if (q != p) {
21965                                         rc = 1;
21966                                         break;
21967                                 }
21968                         }
21969                 } else {
21970                         rc = 1;
21971                 }
21972         } else {
21973                 rc = 1;
21974         }
21975         ${cf_cv_main_return:-return} (rc);
21976 }
21977
21978 _ACEOF
21979 rm -f conftest$ac_exeext
21980 if { (eval echo "$as_me:21980: \"$ac_link\"") >&5
21981   (eval $ac_link) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21985   { (eval echo "$as_me:21985: \"$ac_try\"") >&5
21986   (eval $ac_try) 2>&5
21987   ac_status=$?
21988   echo "$as_me:21988: \$? = $ac_status" >&5
21989   (exit $ac_status); }; }; then
21990   cf_cv_fopen_bin_r=yes
21991 else
21992   echo "$as_me: program exited with status $ac_status" >&5
21993 echo "$as_me: failed program was:" >&5
21994 cat conftest.$ac_ext >&5
21995 cf_cv_fopen_bin_r=no
21996 fi
21997 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21998 fi
21999
22000 fi
22001 echo "$as_me:22001: result: $cf_cv_fopen_bin_r" >&5
22002 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22003 test "x$cf_cv_fopen_bin_r" != xno &&
22004 cat >>confdefs.h <<\EOF
22005 #define USE_FOPEN_BIN_R 1
22006 EOF
22007
22008 # special check for test/ditto.c
22009
22010 echo "$as_me:22010: checking for openpty in -lutil" >&5
22011 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22012 if test "${ac_cv_lib_util_openpty+set}" = set; then
22013   echo $ECHO_N "(cached) $ECHO_C" >&6
22014 else
22015   ac_check_lib_save_LIBS=$LIBS
22016 LIBS="-lutil  $LIBS"
22017 cat >conftest.$ac_ext <<_ACEOF
22018 #line 22018 "configure"
22019 #include "confdefs.h"
22020
22021 /* Override any gcc2 internal prototype to avoid an error.  */
22022 #ifdef __cplusplus
22023 extern "C"
22024 #endif
22025 /* We use char because int might match the return type of a gcc2
22026    builtin and then its argument prototype would still apply.  */
22027 char openpty ();
22028 int
22029 main (void)
22030 {
22031 openpty ();
22032   ;
22033   return 0;
22034 }
22035 _ACEOF
22036 rm -f conftest.$ac_objext conftest$ac_exeext
22037 if { (eval echo "$as_me:22037: \"$ac_link\"") >&5
22038   (eval $ac_link) 2>&5
22039   ac_status=$?
22040   echo "$as_me:22040: \$? = $ac_status" >&5
22041   (exit $ac_status); } &&
22042          { ac_try='test -s conftest$ac_exeext'
22043   { (eval echo "$as_me:22043: \"$ac_try\"") >&5
22044   (eval $ac_try) 2>&5
22045   ac_status=$?
22046   echo "$as_me:22046: \$? = $ac_status" >&5
22047   (exit $ac_status); }; }; then
22048   ac_cv_lib_util_openpty=yes
22049 else
22050   echo "$as_me: failed program was:" >&5
22051 cat conftest.$ac_ext >&5
22052 ac_cv_lib_util_openpty=no
22053 fi
22054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22055 LIBS=$ac_check_lib_save_LIBS
22056 fi
22057 echo "$as_me:22057: result: $ac_cv_lib_util_openpty" >&5
22058 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22059 if test $ac_cv_lib_util_openpty = yes; then
22060   cf_cv_lib_util=yes
22061 else
22062   cf_cv_lib_util=no
22063 fi
22064
22065 echo "$as_me:22065: checking for openpty header" >&5
22066 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22067 if test "${cf_cv_func_openpty+set}" = set; then
22068   echo $ECHO_N "(cached) $ECHO_C" >&6
22069 else
22070
22071         cf_save_LIBS="$LIBS"
22072         test $cf_cv_lib_util = yes && {
22073 cf_add_libs="$LIBS"
22074 # reverse order
22075 cf_add_0lib=
22076 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22077 # filter duplicates
22078 for cf_add_1lib in $cf_add_0lib; do
22079         for cf_add_2lib in $cf_add_libs; do
22080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22081                         cf_add_1lib=
22082                         break
22083                 fi
22084         done
22085         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22086 done
22087 LIBS="$cf_add_libs"
22088  }
22089         for cf_header in pty.h libutil.h util.h
22090         do
22091         cat >conftest.$ac_ext <<_ACEOF
22092 #line 22092 "configure"
22093 #include "confdefs.h"
22094
22095 #include <$cf_header>
22096
22097 int
22098 main (void)
22099 {
22100
22101         int x = openpty((int *)0, (int *)0, (char *)0,
22102                                    (struct termios *)0, (struct winsize *)0);
22103
22104   ;
22105   return 0;
22106 }
22107 _ACEOF
22108 rm -f conftest.$ac_objext conftest$ac_exeext
22109 if { (eval echo "$as_me:22109: \"$ac_link\"") >&5
22110   (eval $ac_link) 2>&5
22111   ac_status=$?
22112   echo "$as_me:22112: \$? = $ac_status" >&5
22113   (exit $ac_status); } &&
22114          { ac_try='test -s conftest$ac_exeext'
22115   { (eval echo "$as_me:22115: \"$ac_try\"") >&5
22116   (eval $ac_try) 2>&5
22117   ac_status=$?
22118   echo "$as_me:22118: \$? = $ac_status" >&5
22119   (exit $ac_status); }; }; then
22120
22121                 cf_cv_func_openpty=$cf_header
22122                 break
22123
22124 else
22125   echo "$as_me: failed program was:" >&5
22126 cat conftest.$ac_ext >&5
22127
22128                 cf_cv_func_openpty=no
22129
22130 fi
22131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22132         done
22133         LIBS="$cf_save_LIBS"
22134
22135 fi
22136 echo "$as_me:22136: result: $cf_cv_func_openpty" >&5
22137 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22138
22139 if test "$cf_cv_func_openpty" != no ; then
22140
22141 cat >>confdefs.h <<EOF
22142 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22143 EOF
22144
22145 cat >>confdefs.h <<\EOF
22146 #define USE_XTERM_PTY 1
22147 EOF
22148
22149         if test "x$cf_cv_lib_util" = xyes ; then
22150
22151 cf_add_libs="$TEST_LIBS"
22152 # reverse order
22153 cf_add_0lib=
22154 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22155 # filter duplicates
22156 for cf_add_1lib in $cf_add_0lib; do
22157         for cf_add_2lib in $cf_add_libs; do
22158                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22159                         cf_add_1lib=
22160                         break
22161                 fi
22162         done
22163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22164 done
22165 TEST_LIBS="$cf_add_libs"
22166
22167         fi
22168 fi
22169
22170 if test "$with_hashed_db" != no ; then
22171
22172 cat >>confdefs.h <<\EOF
22173 #define USE_HASHED_DB 1
22174 EOF
22175
22176 case $with_hashed_db in
22177 (yes|*able*)
22178         ;;
22179 (*)
22180         if test -d "$with_hashed_db" ; then
22181
22182 if test -n "$with_hashed_db/include" ; then
22183   for cf_add_incdir in $with_hashed_db/include
22184   do
22185         while test $cf_add_incdir != /usr/include
22186         do
22187           if test -d $cf_add_incdir
22188           then
22189                 cf_have_incdir=no
22190                 if test -n "$CFLAGS$CPPFLAGS" ; then
22191                   # a loop is needed to ensure we can add subdirs of existing dirs
22192                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22193                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22194                           cf_have_incdir=yes; break
22195                         fi
22196                   done
22197                 fi
22198
22199                 if test "$cf_have_incdir" = no ; then
22200                   if test "$cf_add_incdir" = /usr/local/include ; then
22201                         if test "$GCC" = yes
22202                         then
22203                           cf_save_CPPFLAGS=$CPPFLAGS
22204
22205         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22206         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22207
22208                           cat >conftest.$ac_ext <<_ACEOF
22209 #line 22209 "configure"
22210 #include "confdefs.h"
22211 #include <stdio.h>
22212 int
22213 main (void)
22214 {
22215 printf("Hello")
22216   ;
22217   return 0;
22218 }
22219 _ACEOF
22220 rm -f conftest.$ac_objext
22221 if { (eval echo "$as_me:22221: \"$ac_compile\"") >&5
22222   (eval $ac_compile) 2>&5
22223   ac_status=$?
22224   echo "$as_me:22224: \$? = $ac_status" >&5
22225   (exit $ac_status); } &&
22226          { ac_try='test -s conftest.$ac_objext'
22227   { (eval echo "$as_me:22227: \"$ac_try\"") >&5
22228   (eval $ac_try) 2>&5
22229   ac_status=$?
22230   echo "$as_me:22230: \$? = $ac_status" >&5
22231   (exit $ac_status); }; }; then
22232   :
22233 else
22234   echo "$as_me: failed program was:" >&5
22235 cat conftest.$ac_ext >&5
22236 cf_have_incdir=yes
22237 fi
22238 rm -f conftest.$ac_objext conftest.$ac_ext
22239                           CPPFLAGS=$cf_save_CPPFLAGS
22240                         fi
22241                   fi
22242                 fi
22243
22244                 if test "$cf_have_incdir" = no ; then
22245                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22246
22247 echo "${as_me:-configure}:22247: testing adding $cf_add_incdir to include-path ..." 1>&5
22248
22249                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22250
22251                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22252                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22253                   cf_add_incdir="$cf_top_incdir"
22254                 else
22255                   break
22256                 fi
22257           else
22258                 break
22259           fi
22260         done
22261   done
22262 fi
22263
22264 if test -n "$with_hashed_db/lib" ; then
22265         for cf_add_libdir in $with_hashed_db/lib
22266         do
22267                 if test $cf_add_libdir = /usr/lib ; then
22268                         :
22269                 elif test -d $cf_add_libdir
22270                 then
22271                         cf_have_libdir=no
22272                         if test -n "$LDFLAGS$LIBS" ; then
22273                                 # a loop is needed to ensure we can add subdirs of existing dirs
22274                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22275                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22276                                                 cf_have_libdir=yes; break
22277                                         fi
22278                                 done
22279                         fi
22280                         if test "$cf_have_libdir" = no ; then
22281                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22282
22283 echo "${as_me:-configure}:22283: testing adding $cf_add_libdir to library-path ..." 1>&5
22284
22285                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22286                         fi
22287                 fi
22288         done
22289 fi
22290
22291         else
22292                 case "$with_hashed_db" in
22293                 (./*|../*|/*)
22294                         { echo "$as_me:22294: WARNING: no such directory $with_hashed_db" >&5
22295 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22296                         ;;
22297                 (*)
22298
22299 cf_search=
22300
22301 test "x$prefix" != "xNONE" && \
22302 test -d "$prefix" && \
22303  {
22304         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22305         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22306         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22307         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22308         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22309         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22310 }
22311
22312 for cf_subdir_prefix in \
22313         /usr \
22314         /usr/local \
22315         /usr/pkg \
22316         /opt \
22317         /opt/local \
22318         $HOME
22319 do
22320
22321 test "x$cf_subdir_prefix" != "x$prefix" && \
22322 test -d "$cf_subdir_prefix" && \
22323 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22324         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22325         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22326         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22327         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22328         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22329         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"
22330 }
22331
22332 done
22333
22334         for cf_item in $cf_search
22335         do
22336                 case $cf_item in
22337                 (*/$with_hashed_db)
22338
22339 if test -n "$cf_item" ; then
22340   for cf_add_incdir in $cf_item
22341   do
22342         while test $cf_add_incdir != /usr/include
22343         do
22344           if test -d $cf_add_incdir
22345           then
22346                 cf_have_incdir=no
22347                 if test -n "$CFLAGS$CPPFLAGS" ; then
22348                   # a loop is needed to ensure we can add subdirs of existing dirs
22349                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22350                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22351                           cf_have_incdir=yes; break
22352                         fi
22353                   done
22354                 fi
22355
22356                 if test "$cf_have_incdir" = no ; then
22357                   if test "$cf_add_incdir" = /usr/local/include ; then
22358                         if test "$GCC" = yes
22359                         then
22360                           cf_save_CPPFLAGS=$CPPFLAGS
22361
22362         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22363         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22364
22365                           cat >conftest.$ac_ext <<_ACEOF
22366 #line 22366 "configure"
22367 #include "confdefs.h"
22368 #include <stdio.h>
22369 int
22370 main (void)
22371 {
22372 printf("Hello")
22373   ;
22374   return 0;
22375 }
22376 _ACEOF
22377 rm -f conftest.$ac_objext
22378 if { (eval echo "$as_me:22378: \"$ac_compile\"") >&5
22379   (eval $ac_compile) 2>&5
22380   ac_status=$?
22381   echo "$as_me:22381: \$? = $ac_status" >&5
22382   (exit $ac_status); } &&
22383          { ac_try='test -s conftest.$ac_objext'
22384   { (eval echo "$as_me:22384: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:22387: \$? = $ac_status" >&5
22388   (exit $ac_status); }; }; then
22389   :
22390 else
22391   echo "$as_me: failed program was:" >&5
22392 cat conftest.$ac_ext >&5
22393 cf_have_incdir=yes
22394 fi
22395 rm -f conftest.$ac_objext conftest.$ac_ext
22396                           CPPFLAGS=$cf_save_CPPFLAGS
22397                         fi
22398                   fi
22399                 fi
22400
22401                 if test "$cf_have_incdir" = no ; then
22402                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22403
22404 echo "${as_me:-configure}:22404: testing adding $cf_add_incdir to include-path ..." 1>&5
22405
22406                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22407
22408                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22409                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22410                   cf_add_incdir="$cf_top_incdir"
22411                 else
22412                   break
22413                 fi
22414           else
22415                 break
22416           fi
22417         done
22418   done
22419 fi
22420
22421                         ;;
22422                 esac
22423         done
22424
22425 cf_search=
22426
22427 test "x$prefix" != "xNONE" && \
22428 test -d "$prefix" && \
22429  {
22430         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22431         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22432         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22433         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22434         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22435         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22436 }
22437
22438 for cf_subdir_prefix in \
22439         /usr \
22440         /usr/local \
22441         /usr/pkg \
22442         /opt \
22443         /opt/local \
22444         $HOME
22445 do
22446
22447 test "x$cf_subdir_prefix" != "x$prefix" && \
22448 test -d "$cf_subdir_prefix" && \
22449 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22450         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22451         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22452         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22453         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22454         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22455         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"
22456 }
22457
22458 done
22459
22460         for cf_item in $cf_search
22461         do
22462                 case $cf_item in
22463                 (*/$with_hashed_db)
22464
22465 if test -n "$cf_item" ; then
22466         for cf_add_libdir in $cf_item
22467         do
22468                 if test $cf_add_libdir = /usr/lib ; then
22469                         :
22470                 elif test -d $cf_add_libdir
22471                 then
22472                         cf_have_libdir=no
22473                         if test -n "$LDFLAGS$LIBS" ; then
22474                                 # a loop is needed to ensure we can add subdirs of existing dirs
22475                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22476                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22477                                                 cf_have_libdir=yes; break
22478                                         fi
22479                                 done
22480                         fi
22481                         if test "$cf_have_libdir" = no ; then
22482                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22483
22484 echo "${as_me:-configure}:22484: testing adding $cf_add_libdir to library-path ..." 1>&5
22485
22486                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22487                         fi
22488                 fi
22489         done
22490 fi
22491
22492                         ;;
22493                 esac
22494         done
22495
22496                         ;;
22497                 esac
22498         fi
22499 esac
22500
22501 echo "$as_me:22501: checking for db.h" >&5
22502 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22503 if test "${ac_cv_header_db_h+set}" = set; then
22504   echo $ECHO_N "(cached) $ECHO_C" >&6
22505 else
22506   cat >conftest.$ac_ext <<_ACEOF
22507 #line 22507 "configure"
22508 #include "confdefs.h"
22509 #include <db.h>
22510 _ACEOF
22511 if { (eval echo "$as_me:22511: \"$ac_cpp conftest.$ac_ext\"") >&5
22512   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22513   ac_status=$?
22514   egrep -v '^ *\+' conftest.er1 >conftest.err
22515   rm -f conftest.er1
22516   cat conftest.err >&5
22517   echo "$as_me:22517: \$? = $ac_status" >&5
22518   (exit $ac_status); } >/dev/null; then
22519   if test -s conftest.err; then
22520     ac_cpp_err=$ac_c_preproc_warn_flag
22521   else
22522     ac_cpp_err=
22523   fi
22524 else
22525   ac_cpp_err=yes
22526 fi
22527 if test -z "$ac_cpp_err"; then
22528   ac_cv_header_db_h=yes
22529 else
22530   echo "$as_me: failed program was:" >&5
22531   cat conftest.$ac_ext >&5
22532   ac_cv_header_db_h=no
22533 fi
22534 rm -f conftest.err conftest.$ac_ext
22535 fi
22536 echo "$as_me:22536: result: $ac_cv_header_db_h" >&5
22537 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22538 if test $ac_cv_header_db_h = yes; then
22539
22540 echo "$as_me:22540: checking for version of db" >&5
22541 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22542 if test "${cf_cv_hashed_db_version+set}" = set; then
22543   echo $ECHO_N "(cached) $ECHO_C" >&6
22544 else
22545
22546 cf_cv_hashed_db_version=unknown
22547
22548 for cf_db_version in 1 2 3 4 5 6
22549 do
22550
22551 echo "${as_me:-configure}:22551: testing checking for db version $cf_db_version ..." 1>&5
22552
22553         cat >conftest.$ac_ext <<_ACEOF
22554 #line 22554 "configure"
22555 #include "confdefs.h"
22556
22557 $ac_includes_default
22558 #include <db.h>
22559
22560 #ifdef DB_VERSION_MAJOR
22561         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22562 #if $cf_db_version == DB_VERSION_MAJOR
22563         /* ok */
22564 #else
22565         make an error
22566 #endif
22567 #else
22568 #if $cf_db_version == 1
22569         /* ok: assuming this is DB 1.8.5 */
22570 #else
22571         make an error
22572 #endif
22573 #endif
22574
22575 int
22576 main (void)
22577 {
22578 DBT *foo = 0
22579   ;
22580   return 0;
22581 }
22582 _ACEOF
22583 rm -f conftest.$ac_objext
22584 if { (eval echo "$as_me:22584: \"$ac_compile\"") >&5
22585   (eval $ac_compile) 2>&5
22586   ac_status=$?
22587   echo "$as_me:22587: \$? = $ac_status" >&5
22588   (exit $ac_status); } &&
22589          { ac_try='test -s conftest.$ac_objext'
22590   { (eval echo "$as_me:22590: \"$ac_try\"") >&5
22591   (eval $ac_try) 2>&5
22592   ac_status=$?
22593   echo "$as_me:22593: \$? = $ac_status" >&5
22594   (exit $ac_status); }; }; then
22595
22596         cf_cv_hashed_db_version=$cf_db_version
22597         break
22598
22599 else
22600   echo "$as_me: failed program was:" >&5
22601 cat conftest.$ac_ext >&5
22602 fi
22603 rm -f conftest.$ac_objext conftest.$ac_ext
22604 done
22605
22606 fi
22607 echo "$as_me:22607: result: $cf_cv_hashed_db_version" >&5
22608 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22609
22610 if test "$cf_cv_hashed_db_version" = unknown ; then
22611         { { echo "$as_me:22611: error: Cannot determine version of db" >&5
22612 echo "$as_me: error: Cannot determine version of db" >&2;}
22613    { (exit 1); exit 1; }; }
22614 else
22615
22616 echo "$as_me:22616: checking for db libraries" >&5
22617 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22618 if test "${cf_cv_hashed_db_libs+set}" = set; then
22619   echo $ECHO_N "(cached) $ECHO_C" >&6
22620 else
22621
22622 cf_cv_hashed_db_libs=unknown
22623 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22624 do
22625         cf_save_libs="$LIBS"
22626         if test -n "$cf_db_libs"; then
22627
22628 cf_add_libs="$LIBS"
22629 # reverse order
22630 cf_add_0lib=
22631 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22632 # filter duplicates
22633 for cf_add_1lib in $cf_add_0lib; do
22634         for cf_add_2lib in $cf_add_libs; do
22635                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22636                         cf_add_1lib=
22637                         break
22638                 fi
22639         done
22640         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22641 done
22642 LIBS="$cf_add_libs"
22643
22644         fi
22645
22646 echo "${as_me:-configure}:22646: testing checking for library "$cf_db_libs" ..." 1>&5
22647
22648         cat >conftest.$ac_ext <<_ACEOF
22649 #line 22649 "configure"
22650 #include "confdefs.h"
22651
22652 $ac_includes_default
22653 #include <db.h>
22654
22655 int
22656 main (void)
22657 {
22658
22659         char *path = "/tmp/foo";
22660 #ifdef DB_VERSION_MAJOR
22661 #if DB_VERSION_MAJOR >= 4
22662         DB *result = 0;
22663         db_create(&result, NULL, 0);
22664         result->open(result,
22665                 NULL,
22666                 path,
22667                 path,
22668                 DB_HASH,
22669                 DB_CREATE,
22670                 0644);
22671 #elif DB_VERSION_MAJOR >= 3
22672         DB *result = 0;
22673         db_create(&result, NULL, 0);
22674         result->open(result,
22675                 path,
22676                 path,
22677                 DB_HASH,
22678                 DB_CREATE,
22679                 0644);
22680 #elif DB_VERSION_MAJOR >= 2
22681         DB *result = 0;
22682         db_open(path,
22683                 DB_HASH,
22684                 DB_CREATE,
22685                 0644,
22686                 (DB_ENV *) 0,
22687                 (DB_INFO *) 0,
22688                 &result);
22689 #endif /* DB_VERSION_MAJOR */
22690 #else
22691         DB *result = dbopen(path,
22692                      2,
22693                      0644,
22694                      DB_HASH,
22695                      0);
22696 #endif
22697         ${cf_cv_main_return:-return}(result != 0)
22698
22699   ;
22700   return 0;
22701 }
22702 _ACEOF
22703 rm -f conftest.$ac_objext conftest$ac_exeext
22704 if { (eval echo "$as_me:22704: \"$ac_link\"") >&5
22705   (eval $ac_link) 2>&5
22706   ac_status=$?
22707   echo "$as_me:22707: \$? = $ac_status" >&5
22708   (exit $ac_status); } &&
22709          { ac_try='test -s conftest$ac_exeext'
22710   { (eval echo "$as_me:22710: \"$ac_try\"") >&5
22711   (eval $ac_try) 2>&5
22712   ac_status=$?
22713   echo "$as_me:22713: \$? = $ac_status" >&5
22714   (exit $ac_status); }; }; then
22715
22716         if test -n "$cf_db_libs" ; then
22717                 cf_cv_hashed_db_libs=$cf_db_libs
22718         else
22719                 cf_cv_hashed_db_libs=default
22720         fi
22721         LIBS="$cf_save_libs"
22722         break
22723
22724 else
22725   echo "$as_me: failed program was:" >&5
22726 cat conftest.$ac_ext >&5
22727 fi
22728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22729         LIBS="$cf_save_libs"
22730 done
22731
22732 fi
22733 echo "$as_me:22733: result: $cf_cv_hashed_db_libs" >&5
22734 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22735
22736         if test "$cf_cv_hashed_db_libs" = unknown ; then
22737                 { { echo "$as_me:22737: error: Cannot determine library for db" >&5
22738 echo "$as_me: error: Cannot determine library for db" >&2;}
22739    { (exit 1); exit 1; }; }
22740         elif test "$cf_cv_hashed_db_libs" != default ; then
22741
22742 cf_add_libs="$LIBS"
22743 # reverse order
22744 cf_add_0lib=
22745 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22746 # filter duplicates
22747 for cf_add_1lib in $cf_add_0lib; do
22748         for cf_add_2lib in $cf_add_libs; do
22749                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22750                         cf_add_1lib=
22751                         break
22752                 fi
22753         done
22754         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22755 done
22756 LIBS="$cf_add_libs"
22757
22758         fi
22759 fi
22760
22761 else
22762
22763         { { echo "$as_me:22763: error: Cannot find db.h" >&5
22764 echo "$as_me: error: Cannot find db.h" >&2;}
22765    { (exit 1); exit 1; }; }
22766
22767 fi
22768
22769 fi
22770
22771 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22772         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22773         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22774 fi
22775
22776 # Just in case, check if the C compiler has a bool type.
22777
22778 echo "$as_me:22778: checking if we should include stdbool.h" >&5
22779 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22780
22781 if test "${cf_cv_header_stdbool_h+set}" = set; then
22782   echo $ECHO_N "(cached) $ECHO_C" >&6
22783 else
22784
22785         cat >conftest.$ac_ext <<_ACEOF
22786 #line 22786 "configure"
22787 #include "confdefs.h"
22788
22789 int
22790 main (void)
22791 {
22792 bool foo = false
22793   ;
22794   return 0;
22795 }
22796 _ACEOF
22797 rm -f conftest.$ac_objext
22798 if { (eval echo "$as_me:22798: \"$ac_compile\"") >&5
22799   (eval $ac_compile) 2>&5
22800   ac_status=$?
22801   echo "$as_me:22801: \$? = $ac_status" >&5
22802   (exit $ac_status); } &&
22803          { ac_try='test -s conftest.$ac_objext'
22804   { (eval echo "$as_me:22804: \"$ac_try\"") >&5
22805   (eval $ac_try) 2>&5
22806   ac_status=$?
22807   echo "$as_me:22807: \$? = $ac_status" >&5
22808   (exit $ac_status); }; }; then
22809   cf_cv_header_stdbool_h=0
22810 else
22811   echo "$as_me: failed program was:" >&5
22812 cat conftest.$ac_ext >&5
22813 cat >conftest.$ac_ext <<_ACEOF
22814 #line 22814 "configure"
22815 #include "confdefs.h"
22816
22817 #ifndef __BEOS__
22818 #include <stdbool.h>
22819 #endif
22820
22821 int
22822 main (void)
22823 {
22824 bool foo = false
22825   ;
22826   return 0;
22827 }
22828 _ACEOF
22829 rm -f conftest.$ac_objext
22830 if { (eval echo "$as_me:22830: \"$ac_compile\"") >&5
22831   (eval $ac_compile) 2>&5
22832   ac_status=$?
22833   echo "$as_me:22833: \$? = $ac_status" >&5
22834   (exit $ac_status); } &&
22835          { ac_try='test -s conftest.$ac_objext'
22836   { (eval echo "$as_me:22836: \"$ac_try\"") >&5
22837   (eval $ac_try) 2>&5
22838   ac_status=$?
22839   echo "$as_me:22839: \$? = $ac_status" >&5
22840   (exit $ac_status); }; }; then
22841   cf_cv_header_stdbool_h=1
22842 else
22843   echo "$as_me: failed program was:" >&5
22844 cat conftest.$ac_ext >&5
22845 cf_cv_header_stdbool_h=0
22846 fi
22847 rm -f conftest.$ac_objext conftest.$ac_ext
22848 fi
22849 rm -f conftest.$ac_objext conftest.$ac_ext
22850 fi
22851
22852 if test "$cf_cv_header_stdbool_h" = 1
22853 then    echo "$as_me:22853: result: yes" >&5
22854 echo "${ECHO_T}yes" >&6
22855 else    echo "$as_me:22855: result: no" >&5
22856 echo "${ECHO_T}no" >&6
22857 fi
22858
22859 echo "$as_me:22859: checking for builtin bool type" >&5
22860 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22861
22862 if test "${cf_cv_cc_bool_type+set}" = set; then
22863   echo $ECHO_N "(cached) $ECHO_C" >&6
22864 else
22865
22866         cat >conftest.$ac_ext <<_ACEOF
22867 #line 22867 "configure"
22868 #include "confdefs.h"
22869
22870 #include <stdio.h>
22871 #include <sys/types.h>
22872
22873 int
22874 main (void)
22875 {
22876 bool x = false
22877   ;
22878   return 0;
22879 }
22880 _ACEOF
22881 rm -f conftest.$ac_objext
22882 if { (eval echo "$as_me:22882: \"$ac_compile\"") >&5
22883   (eval $ac_compile) 2>&5
22884   ac_status=$?
22885   echo "$as_me:22885: \$? = $ac_status" >&5
22886   (exit $ac_status); } &&
22887          { ac_try='test -s conftest.$ac_objext'
22888   { (eval echo "$as_me:22888: \"$ac_try\"") >&5
22889   (eval $ac_try) 2>&5
22890   ac_status=$?
22891   echo "$as_me:22891: \$? = $ac_status" >&5
22892   (exit $ac_status); }; }; then
22893   cf_cv_cc_bool_type=1
22894 else
22895   echo "$as_me: failed program was:" >&5
22896 cat conftest.$ac_ext >&5
22897 cf_cv_cc_bool_type=0
22898 fi
22899 rm -f conftest.$ac_objext conftest.$ac_ext
22900
22901 fi
22902
22903 if test "$cf_cv_cc_bool_type" = 1
22904 then    echo "$as_me:22904: result: yes" >&5
22905 echo "${ECHO_T}yes" >&6
22906 else    echo "$as_me:22906: result: no" >&5
22907 echo "${ECHO_T}no" >&6
22908 fi
22909
22910 # Check for C++ compiler characteristics (and ensure that it's there!)
22911 if test -n "$CXX" ; then
22912         ac_ext=cc
22913 ac_cpp='$CXXCPP $CPPFLAGS'
22914 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22915 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22916 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22917 ac_main_return=return
22918
22919 if test -n "$GXX" ; then
22920
22921         cf_save="$LIBS"
22922         LIBS="$LIBS $CXXLIBS"
22923         echo "$as_me:22923: checking if we already have C++ library" >&5
22924 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22925         cat >conftest.$ac_ext <<_ACEOF
22926 #line 22926 "configure"
22927 #include "confdefs.h"
22928
22929                         #include <iostream>
22930 int
22931 main (void)
22932 {
22933
22934                         std::cout << "Hello World!" << std::endl;
22935   ;
22936   return 0;
22937 }
22938 _ACEOF
22939 rm -f conftest.$ac_objext conftest$ac_exeext
22940 if { (eval echo "$as_me:22940: \"$ac_link\"") >&5
22941   (eval $ac_link) 2>&5
22942   ac_status=$?
22943   echo "$as_me:22943: \$? = $ac_status" >&5
22944   (exit $ac_status); } &&
22945          { ac_try='test -s conftest$ac_exeext'
22946   { (eval echo "$as_me:22946: \"$ac_try\"") >&5
22947   (eval $ac_try) 2>&5
22948   ac_status=$?
22949   echo "$as_me:22949: \$? = $ac_status" >&5
22950   (exit $ac_status); }; }; then
22951   cf_have_libstdcpp=yes
22952 else
22953   echo "$as_me: failed program was:" >&5
22954 cat conftest.$ac_ext >&5
22955 cf_have_libstdcpp=no
22956 fi
22957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22958         echo "$as_me:22958: result: $cf_have_libstdcpp" >&5
22959 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22960         LIBS="$cf_save"
22961
22962         if test $cf_have_libstdcpp != yes
22963         then
22964                 case $cf_cv_system_name in
22965                 (os2*)
22966                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22967                                 cf_stdcpp_libname=stdcpp
22968                         else
22969                                 cf_stdcpp_libname=stdc++
22970                         fi
22971                         ;;
22972                 (*)
22973                         cf_stdcpp_libname=stdc++
22974                         ;;
22975                 esac
22976
22977                 echo "$as_me:22977: checking for library $cf_stdcpp_libname" >&5
22978 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22979 if test "${cf_cv_libstdcpp+set}" = set; then
22980   echo $ECHO_N "(cached) $ECHO_C" >&6
22981 else
22982
22983                         cf_save="$LIBS"
22984                         LIBS="$LIBS $CXXLIBS"
22985
22986 cf_add_libs="$LIBS"
22987 # reverse order
22988 cf_add_0lib=
22989 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22990 # filter duplicates
22991 for cf_add_1lib in $cf_add_0lib; do
22992         for cf_add_2lib in $cf_add_libs; do
22993                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22994                         cf_add_1lib=
22995                         break
22996                 fi
22997         done
22998         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22999 done
23000 LIBS="$cf_add_libs"
23001
23002                 cat >conftest.$ac_ext <<_ACEOF
23003 #line 23003 "configure"
23004 #include "confdefs.h"
23005
23006                                 #include <iostream>
23007 int
23008 main (void)
23009 {
23010
23011                                 std::cout << "Hello World!" << std::endl;
23012   ;
23013   return 0;
23014 }
23015 _ACEOF
23016 rm -f conftest.$ac_objext conftest$ac_exeext
23017 if { (eval echo "$as_me:23017: \"$ac_link\"") >&5
23018   (eval $ac_link) 2>&5
23019   ac_status=$?
23020   echo "$as_me:23020: \$? = $ac_status" >&5
23021   (exit $ac_status); } &&
23022          { ac_try='test -s conftest$ac_exeext'
23023   { (eval echo "$as_me:23023: \"$ac_try\"") >&5
23024   (eval $ac_try) 2>&5
23025   ac_status=$?
23026   echo "$as_me:23026: \$? = $ac_status" >&5
23027   (exit $ac_status); }; }; then
23028   cf_cv_libstdcpp=yes
23029 else
23030   echo "$as_me: failed program was:" >&5
23031 cat conftest.$ac_ext >&5
23032 cf_cv_libstdcpp=no
23033 fi
23034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23035                         LIBS="$cf_save"
23036
23037 fi
23038 echo "$as_me:23038: result: $cf_cv_libstdcpp" >&5
23039 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23040                 test "$cf_cv_libstdcpp" = yes && {
23041 cf_add_libs="$CXXLIBS"
23042 # reverse order
23043 cf_add_0lib=
23044 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23045 # filter duplicates
23046 for cf_add_1lib in $cf_add_0lib; do
23047         for cf_add_2lib in $cf_add_libs; do
23048                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23049                         cf_add_1lib=
23050                         break
23051                 fi
23052         done
23053         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23054 done
23055 CXXLIBS="$cf_add_libs"
23056  }
23057         fi
23058 fi
23059
23060         echo "$as_me:23060: checking whether $CXX understands -c and -o together" >&5
23061 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23062 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23063   echo $ECHO_N "(cached) $ECHO_C" >&6
23064 else
23065
23066 cat > conftest.$ac_ext <<CF_EOF
23067 int main(void)
23068 {
23069         ${cf_cv_main_return:-return}(0);
23070 }
23071 CF_EOF
23072 # We do the test twice because some compilers refuse to overwrite an
23073 # existing .o file with -o, though they will create one.
23074 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23075 if { (eval echo "$as_me:23075: \"$ac_try\"") >&5
23076   (eval $ac_try) 2>&5
23077   ac_status=$?
23078   echo "$as_me:23078: \$? = $ac_status" >&5
23079   (exit $ac_status); } &&
23080   test -f conftest2.$ac_objext && { (eval echo "$as_me:23080: \"$ac_try\"") >&5
23081   (eval $ac_try) 2>&5
23082   ac_status=$?
23083   echo "$as_me:23083: \$? = $ac_status" >&5
23084   (exit $ac_status); };
23085 then
23086   eval cf_cv_prog_CXX_c_o=yes
23087 else
23088   eval cf_cv_prog_CXX_c_o=no
23089 fi
23090 rm -rf conftest*
23091
23092 fi
23093 if test $cf_cv_prog_CXX_c_o = yes; then
23094   echo "$as_me:23094: result: yes" >&5
23095 echo "${ECHO_T}yes" >&6
23096 else
23097   echo "$as_me:23097: result: no" >&5
23098 echo "${ECHO_T}no" >&6
23099 fi
23100
23101         case $GXX_VERSION in
23102         (1*|2.0-6*)
23103                 cf_cxx_library=yes
23104                 ;;
23105         (*-2.7*|2.7*)
23106
23107 cf_cxx_library=unknown
23108 case $cf_cv_system_name in
23109 (os2*)
23110         cf_gpp_libname=gpp
23111         ;;
23112 (*)
23113         cf_gpp_libname=g++
23114         ;;
23115 esac
23116 if test "$GXX" = yes; then
23117         echo "$as_me:23117: checking for lib$cf_gpp_libname" >&5
23118 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23119         cf_save="$LIBS"
23120
23121 cf_add_libs="$LIBS"
23122 # reverse order
23123 cf_add_0lib=
23124 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23125 # filter duplicates
23126 for cf_add_1lib in $cf_add_0lib; do
23127         for cf_add_2lib in $cf_add_libs; do
23128                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23129                         cf_add_1lib=
23130                         break
23131                 fi
23132         done
23133         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23134 done
23135 LIBS="$cf_add_libs"
23136
23137         cat >conftest.$ac_ext <<_ACEOF
23138 #line 23138 "configure"
23139 #include "confdefs.h"
23140
23141 #include <$cf_gpp_libname/builtin.h>
23142
23143 int
23144 main (void)
23145 {
23146 two_arg_error_handler_t foo2 = lib_error_handler
23147   ;
23148   return 0;
23149 }
23150 _ACEOF
23151 rm -f conftest.$ac_objext conftest$ac_exeext
23152 if { (eval echo "$as_me:23152: \"$ac_link\"") >&5
23153   (eval $ac_link) 2>&5
23154   ac_status=$?
23155   echo "$as_me:23155: \$? = $ac_status" >&5
23156   (exit $ac_status); } &&
23157          { ac_try='test -s conftest$ac_exeext'
23158   { (eval echo "$as_me:23158: \"$ac_try\"") >&5
23159   (eval $ac_try) 2>&5
23160   ac_status=$?
23161   echo "$as_me:23161: \$? = $ac_status" >&5
23162   (exit $ac_status); }; }; then
23163   cf_cxx_library=yes
23164
23165 cf_add_libs="$CXXLIBS"
23166 # reverse order
23167 cf_add_0lib=
23168 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23169 # filter duplicates
23170 for cf_add_1lib in $cf_add_0lib; do
23171         for cf_add_2lib in $cf_add_libs; do
23172                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23173                         cf_add_1lib=
23174                         break
23175                 fi
23176         done
23177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23178 done
23179 CXXLIBS="$cf_add_libs"
23180
23181          if test "$cf_gpp_libname" = cpp ; then
23182
23183 cat >>confdefs.h <<\EOF
23184 #define HAVE_GPP_BUILTIN_H 1
23185 EOF
23186
23187          else
23188
23189 cat >>confdefs.h <<\EOF
23190 #define HAVE_GXX_BUILTIN_H 1
23191 EOF
23192
23193          fi
23194 else
23195   echo "$as_me: failed program was:" >&5
23196 cat conftest.$ac_ext >&5
23197 cat >conftest.$ac_ext <<_ACEOF
23198 #line 23198 "configure"
23199 #include "confdefs.h"
23200
23201 #include <builtin.h>
23202
23203 int
23204 main (void)
23205 {
23206 two_arg_error_handler_t foo2 = lib_error_handler
23207   ;
23208   return 0;
23209 }
23210 _ACEOF
23211 rm -f conftest.$ac_objext conftest$ac_exeext
23212 if { (eval echo "$as_me:23212: \"$ac_link\"") >&5
23213   (eval $ac_link) 2>&5
23214   ac_status=$?
23215   echo "$as_me:23215: \$? = $ac_status" >&5
23216   (exit $ac_status); } &&
23217          { ac_try='test -s conftest$ac_exeext'
23218   { (eval echo "$as_me:23218: \"$ac_try\"") >&5
23219   (eval $ac_try) 2>&5
23220   ac_status=$?
23221   echo "$as_me:23221: \$? = $ac_status" >&5
23222   (exit $ac_status); }; }; then
23223   cf_cxx_library=yes
23224
23225 cf_add_libs="$CXXLIBS"
23226 # reverse order
23227 cf_add_0lib=
23228 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23229 # filter duplicates
23230 for cf_add_1lib in $cf_add_0lib; do
23231         for cf_add_2lib in $cf_add_libs; do
23232                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23233                         cf_add_1lib=
23234                         break
23235                 fi
23236         done
23237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23238 done
23239 CXXLIBS="$cf_add_libs"
23240
23241 cat >>confdefs.h <<\EOF
23242 #define HAVE_BUILTIN_H 1
23243 EOF
23244
23245 else
23246   echo "$as_me: failed program was:" >&5
23247 cat conftest.$ac_ext >&5
23248 cf_cxx_library=no
23249 fi
23250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23251 fi
23252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23253         LIBS="$cf_save"
23254         echo "$as_me:23254: result: $cf_cxx_library" >&5
23255 echo "${ECHO_T}$cf_cxx_library" >&6
23256 fi
23257
23258                 ;;
23259         (*)
23260                 cf_cxx_library=no
23261                 ;;
23262         esac
23263
23264         ac_ext=cc
23265 ac_cpp='$CXXCPP $CPPFLAGS'
23266 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23267 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23268 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23269 ac_main_return=return
23270 echo "$as_me:23270: checking how to run the C++ preprocessor" >&5
23271 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23272 if test -z "$CXXCPP"; then
23273   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23274   echo $ECHO_N "(cached) $ECHO_C" >&6
23275 else
23276       # Double quotes because CXXCPP needs to be expanded
23277     for CXXCPP in "$CXX -E" "/lib/cpp"
23278     do
23279       ac_preproc_ok=false
23280 for ac_cxx_preproc_warn_flag in '' yes
23281 do
23282   # Use a header file that comes with gcc, so configuring glibc
23283   # with a fresh cross-compiler works.
23284   # On the NeXT, cc -E runs the code through the compiler's parser,
23285   # not just through cpp. "Syntax error" is here to catch this case.
23286   cat >conftest.$ac_ext <<_ACEOF
23287 #line 23287 "configure"
23288 #include "confdefs.h"
23289 #include <assert.h>
23290                      Syntax error
23291 _ACEOF
23292 if { (eval echo "$as_me:23292: \"$ac_cpp conftest.$ac_ext\"") >&5
23293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23294   ac_status=$?
23295   egrep -v '^ *\+' conftest.er1 >conftest.err
23296   rm -f conftest.er1
23297   cat conftest.err >&5
23298   echo "$as_me:23298: \$? = $ac_status" >&5
23299   (exit $ac_status); } >/dev/null; then
23300   if test -s conftest.err; then
23301     ac_cpp_err=$ac_cxx_preproc_warn_flag
23302   else
23303     ac_cpp_err=
23304   fi
23305 else
23306   ac_cpp_err=yes
23307 fi
23308 if test -z "$ac_cpp_err"; then
23309   :
23310 else
23311   echo "$as_me: failed program was:" >&5
23312   cat conftest.$ac_ext >&5
23313   # Broken: fails on valid input.
23314 continue
23315 fi
23316 rm -f conftest.err conftest.$ac_ext
23317
23318   # OK, works on sane cases.  Now check whether non-existent headers
23319   # can be detected and how.
23320   cat >conftest.$ac_ext <<_ACEOF
23321 #line 23321 "configure"
23322 #include "confdefs.h"
23323 #include <ac_nonexistent.h>
23324 _ACEOF
23325 if { (eval echo "$as_me:23325: \"$ac_cpp conftest.$ac_ext\"") >&5
23326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23327   ac_status=$?
23328   egrep -v '^ *\+' conftest.er1 >conftest.err
23329   rm -f conftest.er1
23330   cat conftest.err >&5
23331   echo "$as_me:23331: \$? = $ac_status" >&5
23332   (exit $ac_status); } >/dev/null; then
23333   if test -s conftest.err; then
23334     ac_cpp_err=$ac_cxx_preproc_warn_flag
23335   else
23336     ac_cpp_err=
23337   fi
23338 else
23339   ac_cpp_err=yes
23340 fi
23341 if test -z "$ac_cpp_err"; then
23342   # Broken: success on invalid input.
23343 continue
23344 else
23345   echo "$as_me: failed program was:" >&5
23346   cat conftest.$ac_ext >&5
23347   # Passes both tests.
23348 ac_preproc_ok=:
23349 break
23350 fi
23351 rm -f conftest.err conftest.$ac_ext
23352
23353 done
23354 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23355 rm -f conftest.err conftest.$ac_ext
23356 if $ac_preproc_ok; then
23357   break
23358 fi
23359
23360     done
23361     ac_cv_prog_CXXCPP=$CXXCPP
23362
23363 fi
23364   CXXCPP=$ac_cv_prog_CXXCPP
23365 else
23366   ac_cv_prog_CXXCPP=$CXXCPP
23367 fi
23368 echo "$as_me:23368: result: $CXXCPP" >&5
23369 echo "${ECHO_T}$CXXCPP" >&6
23370 ac_preproc_ok=false
23371 for ac_cxx_preproc_warn_flag in '' yes
23372 do
23373   # Use a header file that comes with gcc, so configuring glibc
23374   # with a fresh cross-compiler works.
23375   # On the NeXT, cc -E runs the code through the compiler's parser,
23376   # not just through cpp. "Syntax error" is here to catch this case.
23377   cat >conftest.$ac_ext <<_ACEOF
23378 #line 23378 "configure"
23379 #include "confdefs.h"
23380 #include <assert.h>
23381                      Syntax error
23382 _ACEOF
23383 if { (eval echo "$as_me:23383: \"$ac_cpp conftest.$ac_ext\"") >&5
23384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23385   ac_status=$?
23386   egrep -v '^ *\+' conftest.er1 >conftest.err
23387   rm -f conftest.er1
23388   cat conftest.err >&5
23389   echo "$as_me:23389: \$? = $ac_status" >&5
23390   (exit $ac_status); } >/dev/null; then
23391   if test -s conftest.err; then
23392     ac_cpp_err=$ac_cxx_preproc_warn_flag
23393   else
23394     ac_cpp_err=
23395   fi
23396 else
23397   ac_cpp_err=yes
23398 fi
23399 if test -z "$ac_cpp_err"; then
23400   :
23401 else
23402   echo "$as_me: failed program was:" >&5
23403   cat conftest.$ac_ext >&5
23404   # Broken: fails on valid input.
23405 continue
23406 fi
23407 rm -f conftest.err conftest.$ac_ext
23408
23409   # OK, works on sane cases.  Now check whether non-existent headers
23410   # can be detected and how.
23411   cat >conftest.$ac_ext <<_ACEOF
23412 #line 23412 "configure"
23413 #include "confdefs.h"
23414 #include <ac_nonexistent.h>
23415 _ACEOF
23416 if { (eval echo "$as_me:23416: \"$ac_cpp conftest.$ac_ext\"") >&5
23417   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23418   ac_status=$?
23419   egrep -v '^ *\+' conftest.er1 >conftest.err
23420   rm -f conftest.er1
23421   cat conftest.err >&5
23422   echo "$as_me:23422: \$? = $ac_status" >&5
23423   (exit $ac_status); } >/dev/null; then
23424   if test -s conftest.err; then
23425     ac_cpp_err=$ac_cxx_preproc_warn_flag
23426   else
23427     ac_cpp_err=
23428   fi
23429 else
23430   ac_cpp_err=yes
23431 fi
23432 if test -z "$ac_cpp_err"; then
23433   # Broken: success on invalid input.
23434 continue
23435 else
23436   echo "$as_me: failed program was:" >&5
23437   cat conftest.$ac_ext >&5
23438   # Passes both tests.
23439 ac_preproc_ok=:
23440 break
23441 fi
23442 rm -f conftest.err conftest.$ac_ext
23443
23444 done
23445 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23446 rm -f conftest.err conftest.$ac_ext
23447 if $ac_preproc_ok; then
23448   :
23449 else
23450   { { echo "$as_me:23450: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23451 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23452    { (exit 1); exit 1; }; }
23453 fi
23454
23455 ac_ext=cc
23456 ac_cpp='$CXXCPP $CPPFLAGS'
23457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23458 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23460 ac_main_return=return
23461
23462 for ac_header in typeinfo
23463 do
23464 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23465 echo "$as_me:23465: checking for $ac_header" >&5
23466 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23468   echo $ECHO_N "(cached) $ECHO_C" >&6
23469 else
23470   cat >conftest.$ac_ext <<_ACEOF
23471 #line 23471 "configure"
23472 #include "confdefs.h"
23473 #include <$ac_header>
23474 _ACEOF
23475 if { (eval echo "$as_me:23475: \"$ac_cpp conftest.$ac_ext\"") >&5
23476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23477   ac_status=$?
23478   egrep -v '^ *\+' conftest.er1 >conftest.err
23479   rm -f conftest.er1
23480   cat conftest.err >&5
23481   echo "$as_me:23481: \$? = $ac_status" >&5
23482   (exit $ac_status); } >/dev/null; then
23483   if test -s conftest.err; then
23484     ac_cpp_err=$ac_cxx_preproc_warn_flag
23485   else
23486     ac_cpp_err=
23487   fi
23488 else
23489   ac_cpp_err=yes
23490 fi
23491 if test -z "$ac_cpp_err"; then
23492   eval "$as_ac_Header=yes"
23493 else
23494   echo "$as_me: failed program was:" >&5
23495   cat conftest.$ac_ext >&5
23496   eval "$as_ac_Header=no"
23497 fi
23498 rm -f conftest.err conftest.$ac_ext
23499 fi
23500 echo "$as_me:23500: result: `eval echo '${'$as_ac_Header'}'`" >&5
23501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23502 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23503   cat >>confdefs.h <<EOF
23504 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23505 EOF
23506
23507 fi
23508 done
23509
23510 for ac_header in iostream
23511 do
23512 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23513 echo "$as_me:23513: checking for $ac_header" >&5
23514 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23515 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23516   echo $ECHO_N "(cached) $ECHO_C" >&6
23517 else
23518   cat >conftest.$ac_ext <<_ACEOF
23519 #line 23519 "configure"
23520 #include "confdefs.h"
23521 #include <$ac_header>
23522 _ACEOF
23523 if { (eval echo "$as_me:23523: \"$ac_cpp conftest.$ac_ext\"") >&5
23524   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23525   ac_status=$?
23526   egrep -v '^ *\+' conftest.er1 >conftest.err
23527   rm -f conftest.er1
23528   cat conftest.err >&5
23529   echo "$as_me:23529: \$? = $ac_status" >&5
23530   (exit $ac_status); } >/dev/null; then
23531   if test -s conftest.err; then
23532     ac_cpp_err=$ac_cxx_preproc_warn_flag
23533   else
23534     ac_cpp_err=
23535   fi
23536 else
23537   ac_cpp_err=yes
23538 fi
23539 if test -z "$ac_cpp_err"; then
23540   eval "$as_ac_Header=yes"
23541 else
23542   echo "$as_me: failed program was:" >&5
23543   cat conftest.$ac_ext >&5
23544   eval "$as_ac_Header=no"
23545 fi
23546 rm -f conftest.err conftest.$ac_ext
23547 fi
23548 echo "$as_me:23548: result: `eval echo '${'$as_ac_Header'}'`" >&5
23549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23550 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23551   cat >>confdefs.h <<EOF
23552 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23553 EOF
23554
23555 fi
23556 done
23557
23558 if test x"$ac_cv_header_iostream" = xyes ; then
23559         echo "$as_me:23559: checking if iostream uses std-namespace" >&5
23560 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23561         cat >conftest.$ac_ext <<_ACEOF
23562 #line 23562 "configure"
23563 #include "confdefs.h"
23564
23565 #include <iostream>
23566 using std::endl;
23567 using std::cerr;
23568 int
23569 main (void)
23570 {
23571
23572 cerr << "testing" << endl;
23573
23574   ;
23575   return 0;
23576 }
23577 _ACEOF
23578 rm -f conftest.$ac_objext
23579 if { (eval echo "$as_me:23579: \"$ac_compile\"") >&5
23580   (eval $ac_compile) 2>&5
23581   ac_status=$?
23582   echo "$as_me:23582: \$? = $ac_status" >&5
23583   (exit $ac_status); } &&
23584          { ac_try='test -s conftest.$ac_objext'
23585   { (eval echo "$as_me:23585: \"$ac_try\"") >&5
23586   (eval $ac_try) 2>&5
23587   ac_status=$?
23588   echo "$as_me:23588: \$? = $ac_status" >&5
23589   (exit $ac_status); }; }; then
23590   cf_iostream_namespace=yes
23591 else
23592   echo "$as_me: failed program was:" >&5
23593 cat conftest.$ac_ext >&5
23594 cf_iostream_namespace=no
23595 fi
23596 rm -f conftest.$ac_objext conftest.$ac_ext
23597         echo "$as_me:23597: result: $cf_iostream_namespace" >&5
23598 echo "${ECHO_T}$cf_iostream_namespace" >&6
23599         if test "$cf_iostream_namespace" = yes ; then
23600
23601 cat >>confdefs.h <<\EOF
23602 #define IOSTREAM_NAMESPACE 1
23603 EOF
23604
23605         fi
23606 fi
23607
23608 echo "$as_me:23608: checking if we should include stdbool.h" >&5
23609 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23610
23611 if test "${cf_cv_header_stdbool_h+set}" = set; then
23612   echo $ECHO_N "(cached) $ECHO_C" >&6
23613 else
23614
23615         cat >conftest.$ac_ext <<_ACEOF
23616 #line 23616 "configure"
23617 #include "confdefs.h"
23618
23619 int
23620 main (void)
23621 {
23622 bool foo = false
23623   ;
23624   return 0;
23625 }
23626 _ACEOF
23627 rm -f conftest.$ac_objext
23628 if { (eval echo "$as_me:23628: \"$ac_compile\"") >&5
23629   (eval $ac_compile) 2>&5
23630   ac_status=$?
23631   echo "$as_me:23631: \$? = $ac_status" >&5
23632   (exit $ac_status); } &&
23633          { ac_try='test -s conftest.$ac_objext'
23634   { (eval echo "$as_me:23634: \"$ac_try\"") >&5
23635   (eval $ac_try) 2>&5
23636   ac_status=$?
23637   echo "$as_me:23637: \$? = $ac_status" >&5
23638   (exit $ac_status); }; }; then
23639   cf_cv_header_stdbool_h=0
23640 else
23641   echo "$as_me: failed program was:" >&5
23642 cat conftest.$ac_ext >&5
23643 cat >conftest.$ac_ext <<_ACEOF
23644 #line 23644 "configure"
23645 #include "confdefs.h"
23646
23647 #ifndef __BEOS__
23648 #include <stdbool.h>
23649 #endif
23650
23651 int
23652 main (void)
23653 {
23654 bool foo = false
23655   ;
23656   return 0;
23657 }
23658 _ACEOF
23659 rm -f conftest.$ac_objext
23660 if { (eval echo "$as_me:23660: \"$ac_compile\"") >&5
23661   (eval $ac_compile) 2>&5
23662   ac_status=$?
23663   echo "$as_me:23663: \$? = $ac_status" >&5
23664   (exit $ac_status); } &&
23665          { ac_try='test -s conftest.$ac_objext'
23666   { (eval echo "$as_me:23666: \"$ac_try\"") >&5
23667   (eval $ac_try) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit $ac_status); }; }; then
23671   cf_cv_header_stdbool_h=1
23672 else
23673   echo "$as_me: failed program was:" >&5
23674 cat conftest.$ac_ext >&5
23675 cf_cv_header_stdbool_h=0
23676 fi
23677 rm -f conftest.$ac_objext conftest.$ac_ext
23678 fi
23679 rm -f conftest.$ac_objext conftest.$ac_ext
23680 fi
23681
23682 if test "$cf_cv_header_stdbool_h" = 1
23683 then    echo "$as_me:23683: result: yes" >&5
23684 echo "${ECHO_T}yes" >&6
23685 else    echo "$as_me:23685: result: no" >&5
23686 echo "${ECHO_T}no" >&6
23687 fi
23688
23689 echo "$as_me:23689: checking for builtin bool type" >&5
23690 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23691
23692 if test "${cf_cv_builtin_bool+set}" = set; then
23693   echo $ECHO_N "(cached) $ECHO_C" >&6
23694 else
23695
23696         cat >conftest.$ac_ext <<_ACEOF
23697 #line 23697 "configure"
23698 #include "confdefs.h"
23699
23700 #include <stdio.h>
23701 #include <sys/types.h>
23702
23703 int
23704 main (void)
23705 {
23706 bool x = false
23707   ;
23708   return 0;
23709 }
23710 _ACEOF
23711 rm -f conftest.$ac_objext
23712 if { (eval echo "$as_me:23712: \"$ac_compile\"") >&5
23713   (eval $ac_compile) 2>&5
23714   ac_status=$?
23715   echo "$as_me:23715: \$? = $ac_status" >&5
23716   (exit $ac_status); } &&
23717          { ac_try='test -s conftest.$ac_objext'
23718   { (eval echo "$as_me:23718: \"$ac_try\"") >&5
23719   (eval $ac_try) 2>&5
23720   ac_status=$?
23721   echo "$as_me:23721: \$? = $ac_status" >&5
23722   (exit $ac_status); }; }; then
23723   cf_cv_builtin_bool=1
23724 else
23725   echo "$as_me: failed program was:" >&5
23726 cat conftest.$ac_ext >&5
23727 cf_cv_builtin_bool=0
23728 fi
23729 rm -f conftest.$ac_objext conftest.$ac_ext
23730
23731 fi
23732
23733 if test "$cf_cv_builtin_bool" = 1
23734 then    echo "$as_me:23734: result: yes" >&5
23735 echo "${ECHO_T}yes" >&6
23736 else    echo "$as_me:23736: result: no" >&5
23737 echo "${ECHO_T}no" >&6
23738 fi
23739
23740 echo "$as_me:23740: checking for size of bool" >&5
23741 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23742 if test "${cf_cv_type_of_bool+set}" = set; then
23743   echo $ECHO_N "(cached) $ECHO_C" >&6
23744 else
23745
23746         rm -f cf_test.out
23747         if test "$cross_compiling" = yes; then
23748   cf_cv_type_of_bool=unknown
23749 else
23750   cat >conftest.$ac_ext <<_ACEOF
23751 #line 23751 "configure"
23752 #include "confdefs.h"
23753
23754 #include <stdlib.h>
23755 #include <stdio.h>
23756
23757 #if defined(__cplusplus)
23758
23759 #ifdef HAVE_GXX_BUILTIN_H
23760 #include <g++/builtin.h>
23761 #elif HAVE_GPP_BUILTIN_H
23762 #include <gpp/builtin.h>
23763 #elif HAVE_BUILTIN_H
23764 #include <builtin.h>
23765 #endif
23766
23767 #else
23768
23769 #if $cf_cv_header_stdbool_h
23770 #include <stdbool.h>
23771 #endif
23772
23773 #endif
23774
23775 int main(void)
23776 {
23777         FILE *fp = fopen("cf_test.out", "w");
23778         if (fp != 0) {
23779                 bool x = true;
23780                 if ((bool)(-x) >= 0)
23781                         fputs("unsigned ", fp);
23782                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23783                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23784                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23785                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23786                 fclose(fp);
23787         }
23788         ${cf_cv_main_return:-return}(0);
23789 }
23790
23791 _ACEOF
23792 rm -f conftest$ac_exeext
23793 if { (eval echo "$as_me:23793: \"$ac_link\"") >&5
23794   (eval $ac_link) 2>&5
23795   ac_status=$?
23796   echo "$as_me:23796: \$? = $ac_status" >&5
23797   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23798   { (eval echo "$as_me:23798: \"$ac_try\"") >&5
23799   (eval $ac_try) 2>&5
23800   ac_status=$?
23801   echo "$as_me:23801: \$? = $ac_status" >&5
23802   (exit $ac_status); }; }; then
23803   cf_cv_type_of_bool=`cat cf_test.out`
23804                  if test -z "$cf_cv_type_of_bool"; then
23805                    cf_cv_type_of_bool=unknown
23806                  fi
23807 else
23808   echo "$as_me: program exited with status $ac_status" >&5
23809 echo "$as_me: failed program was:" >&5
23810 cat conftest.$ac_ext >&5
23811 cf_cv_type_of_bool=unknown
23812 fi
23813 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23814 fi
23815
23816 fi
23817
23818         rm -f cf_test.out
23819 echo "$as_me:23819: result: $cf_cv_type_of_bool" >&5
23820 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23821 if test "$cf_cv_type_of_bool" = unknown ; then
23822         case .$NCURSES_BOOL in
23823         (.auto|.) NCURSES_BOOL=unsigned;;
23824         esac
23825         { echo "$as_me:23825: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23826 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23827         cf_cv_type_of_bool=$NCURSES_BOOL
23828 fi
23829
23830 echo "$as_me:23830: checking for special defines needed for etip.h" >&5
23831 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23832 cf_save_CXXFLAGS="$CXXFLAGS"
23833 cf_result="none"
23834
23835 # etip.h includes ncurses.h which includes ncurses_dll.h
23836 # But ncurses_dll.h is generated - fix here.
23837 test -d include || mkdir include
23838 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
23839
23840 for cf_math in "" MATH_H
23841 do
23842 for cf_excp in "" MATH_EXCEPTION
23843 do
23844         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23845         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23846         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23847 cat >conftest.$ac_ext <<_ACEOF
23848 #line 23848 "configure"
23849 #include "confdefs.h"
23850
23851 #include <etip.h.in>
23852
23853 int
23854 main (void)
23855 {
23856
23857   ;
23858   return 0;
23859 }
23860 _ACEOF
23861 rm -f conftest.$ac_objext
23862 if { (eval echo "$as_me:23862: \"$ac_compile\"") >&5
23863   (eval $ac_compile) 2>&5
23864   ac_status=$?
23865   echo "$as_me:23865: \$? = $ac_status" >&5
23866   (exit $ac_status); } &&
23867          { ac_try='test -s conftest.$ac_objext'
23868   { (eval echo "$as_me:23868: \"$ac_try\"") >&5
23869   (eval $ac_try) 2>&5
23870   ac_status=$?
23871   echo "$as_me:23871: \$? = $ac_status" >&5
23872   (exit $ac_status); }; }; then
23873
23874         test -n "$cf_math" && cat >>confdefs.h <<EOF
23875 #define ETIP_NEEDS_${cf_math} 1
23876 EOF
23877
23878         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23879 #define ETIP_NEEDS_${cf_excp} 1
23880 EOF
23881
23882         cf_result="$cf_math $cf_excp"
23883         break 2
23884
23885 else
23886   echo "$as_me: failed program was:" >&5
23887 cat conftest.$ac_ext >&5
23888 fi
23889 rm -f conftest.$ac_objext conftest.$ac_ext
23890 done
23891 done
23892 echo "$as_me:23892: result: $cf_result" >&5
23893 echo "${ECHO_T}$cf_result" >&6
23894 CXXFLAGS="$cf_save_CXXFLAGS"
23895
23896 if test -n "$CXX"; then
23897 echo "$as_me:23897: checking if $CXX accepts parameter initialization" >&5
23898 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23899 if test "${cf_cv_cpp_param_init+set}" = set; then
23900   echo $ECHO_N "(cached) $ECHO_C" >&6
23901 else
23902
23903         ac_ext=cc
23904 ac_cpp='$CXXCPP $CPPFLAGS'
23905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23908 ac_main_return=return
23909
23910         if test "$cross_compiling" = yes; then
23911   cf_cv_cpp_param_init=unknown
23912 else
23913   cat >conftest.$ac_ext <<_ACEOF
23914 #line 23914 "configure"
23915 #include "confdefs.h"
23916
23917 class TEST {
23918 private:
23919         int value;
23920 public:
23921         TEST(int x = 1);
23922         ~TEST();
23923 };
23924
23925 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23926 {
23927         value = x;
23928 }
23929 int main(void) { }
23930
23931 _ACEOF
23932 rm -f conftest$ac_exeext
23933 if { (eval echo "$as_me:23933: \"$ac_link\"") >&5
23934   (eval $ac_link) 2>&5
23935   ac_status=$?
23936   echo "$as_me:23936: \$? = $ac_status" >&5
23937   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23938   { (eval echo "$as_me:23938: \"$ac_try\"") >&5
23939   (eval $ac_try) 2>&5
23940   ac_status=$?
23941   echo "$as_me:23941: \$? = $ac_status" >&5
23942   (exit $ac_status); }; }; then
23943   cf_cv_cpp_param_init=yes
23944 else
23945   echo "$as_me: program exited with status $ac_status" >&5
23946 echo "$as_me: failed program was:" >&5
23947 cat conftest.$ac_ext >&5
23948 cf_cv_cpp_param_init=no
23949 fi
23950 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23951 fi
23952         ac_ext=cc
23953 ac_cpp='$CXXCPP $CPPFLAGS'
23954 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23955 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23956 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23957 ac_main_return=return
23958
23959 fi
23960 echo "$as_me:23960: result: $cf_cv_cpp_param_init" >&5
23961 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23962 fi
23963 test "$cf_cv_cpp_param_init" = yes &&
23964 cat >>confdefs.h <<\EOF
23965 #define CPP_HAS_PARAM_INIT 1
23966 EOF
23967
23968 if test -n "$CXX"; then
23969
23970 echo "$as_me:23970: checking if $CXX accepts static_cast" >&5
23971 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23972 if test "${cf_cv_cpp_static_cast+set}" = set; then
23973   echo $ECHO_N "(cached) $ECHO_C" >&6
23974 else
23975
23976         ac_ext=cc
23977 ac_cpp='$CXXCPP $CPPFLAGS'
23978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23981 ac_main_return=return
23982
23983         cat >conftest.$ac_ext <<_ACEOF
23984 #line 23984 "configure"
23985 #include "confdefs.h"
23986
23987 class NCursesPanel
23988 {
23989 public:
23990   NCursesPanel(int nlines,
23991                int ncols,
23992                int begin_y = 0,
23993                int begin_x = 0)
23994   {
23995   }
23996   NCursesPanel();
23997   ~NCursesPanel();
23998 };
23999
24000 template<class T> class NCursesUserPanel : public NCursesPanel
24001 {
24002 public:
24003   NCursesUserPanel (int nlines,
24004                     int ncols,
24005                     int begin_y = 0,
24006                     int begin_x = 0,
24007                     const T* p_UserData = static_cast<T*>(0))
24008     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24009   {
24010   };
24011   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24012   {
24013   };
24014
24015   virtual ~NCursesUserPanel() {};
24016 };
24017
24018 int
24019 main (void)
24020 {
24021
24022         const char* p_UserData = static_cast<char*>(0)
24023   ;
24024   return 0;
24025 }
24026 _ACEOF
24027 rm -f conftest.$ac_objext
24028 if { (eval echo "$as_me:24028: \"$ac_compile\"") >&5
24029   (eval $ac_compile) 2>&5
24030   ac_status=$?
24031   echo "$as_me:24031: \$? = $ac_status" >&5
24032   (exit $ac_status); } &&
24033          { ac_try='test -s conftest.$ac_objext'
24034   { (eval echo "$as_me:24034: \"$ac_try\"") >&5
24035   (eval $ac_try) 2>&5
24036   ac_status=$?
24037   echo "$as_me:24037: \$? = $ac_status" >&5
24038   (exit $ac_status); }; }; then
24039   cf_cv_cpp_static_cast=yes
24040 else
24041   echo "$as_me: failed program was:" >&5
24042 cat conftest.$ac_ext >&5
24043 cf_cv_cpp_static_cast=no
24044 fi
24045 rm -f conftest.$ac_objext conftest.$ac_ext
24046
24047         ac_ext=cc
24048 ac_cpp='$CXXCPP $CPPFLAGS'
24049 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24050 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24051 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24052 ac_main_return=return
24053
24054 fi
24055 echo "$as_me:24055: result: $cf_cv_cpp_static_cast" >&5
24056 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24057
24058 fi
24059
24060 test "$cf_cv_cpp_static_cast" = yes &&
24061 cat >>confdefs.h <<\EOF
24062 #define CPP_HAS_STATIC_CAST 1
24063 EOF
24064
24065         CXX_AR='$(AR)'
24066         CXX_ARFLAGS='$(ARFLAGS)'
24067         case $cf_cv_system_name in
24068         (irix*)
24069             if test "$GXX" != yes ; then
24070                 CXX_AR='$(CXX)'
24071                 CXX_ARFLAGS='-ar -o'
24072             fi
24073             ;;
24074         (sco3.2v5*)
24075             CXXLDFLAGS="-u main"
24076             ;;
24077         (solaris2*)
24078             if test "$GXX" != yes ; then
24079                 CXX_AR='$(CXX)'
24080                 CXX_ARFLAGS='-xar -o'
24081             fi
24082             ;;
24083         esac
24084
24085 else
24086         cf_cxx_library=no
24087         cf_cv_builtin_bool=1
24088
24089         # Just because we are not configuring against C++ right now does not
24090         # mean that a user will not want to use C++.  Some distributors disable
24091         # the C++ portion of this configuration as a shortcut (or just to avoid
24092         # compiling the demo in the c++ directory).  So we need a reasonable
24093         # default for the 'bool' type.
24094         #
24095         # Caveat: since the storage of the bool type is not standardized, it
24096         # may change.
24097
24098         if test "$NCURSES_BOOL" != auto ; then
24099                 cf_cv_type_of_bool=$NCURSES_BOOL
24100                 cf_cv_header_stdbool_h=0
24101         else
24102                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24103
24104 echo "$as_me:24104: checking for size of bool" >&5
24105 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24106 if test "${cf_cv_type_of_bool+set}" = set; then
24107   echo $ECHO_N "(cached) $ECHO_C" >&6
24108 else
24109
24110         rm -f cf_test.out
24111         if test "$cross_compiling" = yes; then
24112   cf_cv_type_of_bool=unknown
24113 else
24114   cat >conftest.$ac_ext <<_ACEOF
24115 #line 24115 "configure"
24116 #include "confdefs.h"
24117
24118 #include <stdlib.h>
24119 #include <stdio.h>
24120
24121 #if defined(__cplusplus)
24122
24123 #ifdef HAVE_GXX_BUILTIN_H
24124 #include <g++/builtin.h>
24125 #elif HAVE_GPP_BUILTIN_H
24126 #include <gpp/builtin.h>
24127 #elif HAVE_BUILTIN_H
24128 #include <builtin.h>
24129 #endif
24130
24131 #else
24132
24133 #if $cf_cv_header_stdbool_h
24134 #include <stdbool.h>
24135 #endif
24136
24137 #endif
24138
24139 int main(void)
24140 {
24141         FILE *fp = fopen("cf_test.out", "w");
24142         if (fp != 0) {
24143                 bool x = true;
24144                 if ((bool)(-x) >= 0)
24145                         fputs("unsigned ", fp);
24146                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24147                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24148                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24149                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24150                 fclose(fp);
24151         }
24152         ${cf_cv_main_return:-return}(0);
24153 }
24154
24155 _ACEOF
24156 rm -f conftest$ac_exeext
24157 if { (eval echo "$as_me:24157: \"$ac_link\"") >&5
24158   (eval $ac_link) 2>&5
24159   ac_status=$?
24160   echo "$as_me:24160: \$? = $ac_status" >&5
24161   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24162   { (eval echo "$as_me:24162: \"$ac_try\"") >&5
24163   (eval $ac_try) 2>&5
24164   ac_status=$?
24165   echo "$as_me:24165: \$? = $ac_status" >&5
24166   (exit $ac_status); }; }; then
24167   cf_cv_type_of_bool=`cat cf_test.out`
24168                  if test -z "$cf_cv_type_of_bool"; then
24169                    cf_cv_type_of_bool=unknown
24170                  fi
24171 else
24172   echo "$as_me: program exited with status $ac_status" >&5
24173 echo "$as_me: failed program was:" >&5
24174 cat conftest.$ac_ext >&5
24175 cf_cv_type_of_bool=unknown
24176 fi
24177 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24178 fi
24179
24180 fi
24181
24182         rm -f cf_test.out
24183 echo "$as_me:24183: result: $cf_cv_type_of_bool" >&5
24184 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24185 if test "$cf_cv_type_of_bool" = unknown ; then
24186         case .$NCURSES_BOOL in
24187         (.auto|.) NCURSES_BOOL=unsigned;;
24188         esac
24189         { echo "$as_me:24189: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24190 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24191         cf_cv_type_of_bool=$NCURSES_BOOL
24192 fi
24193
24194                 else
24195                         echo "$as_me:24195: checking for fallback type of bool" >&5
24196 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24197                         case "$host_cpu" in
24198                         (i?86)  cf_cv_type_of_bool=char ;;
24199                         (*)     cf_cv_type_of_bool=int  ;;
24200                         esac
24201                         echo "$as_me:24201: result: $cf_cv_type_of_bool" >&5
24202 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24203                 fi
24204         fi
24205 fi
24206
24207 # If the C compiler did not declare bool, and we did not determine that the C++
24208 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24209 # ncurses library use the same type as C++ bool.  Note that this allows one to
24210 # specify the type of bool in a configure-script option and postpone
24211 # integration with the C++ compiler provided that the types are compatible.
24212 USE_CXX_BOOL=1
24213 if test $cf_cv_cc_bool_type = 1
24214 then
24215         # oops: C has a bool.  Unlikely, but C++ could differ.
24216         USE_CXX_BOOL=0
24217 elif test $cf_cv_builtin_bool = 0
24218 then
24219         # C++ has no bool
24220         USE_CXX_BOOL=0
24221 else
24222         # this is the normal case
24223         USE_CXX_BOOL='defined(__cplusplus)'
24224 fi
24225
24226 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24227
24228         if test "$cf_with_ada" != "no" ; then
24229                 if test "$with_libtool" != "no"; then
24230                         { echo "$as_me:24230: WARNING: libtool does not support Ada - disabling feature" >&5
24231 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24232                         cf_with_ada=no
24233                 fi
24234         fi
24235
24236         if test "$cf_with_ada" != "no" ; then
24237
24238 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24239 do
24240
24241 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24242
24243         unset ac_cv_path_cf_TEMP_gnat
24244         unset cf_TEMP_gnat
24245         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24246 set dummy $cf_prog_gnat; ac_word=$2
24247 echo "$as_me:24247: checking for $ac_word" >&5
24248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24249 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24250   echo $ECHO_N "(cached) $ECHO_C" >&6
24251 else
24252   case $cf_TEMP_gnat in
24253   [\\/]* | ?:[\\/]*)
24254   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24255   ;;
24256   *)
24257   ac_save_IFS=$IFS; IFS=$ac_path_separator
24258 ac_dummy="$PATH"
24259 for ac_dir in $ac_dummy; do
24260   IFS=$ac_save_IFS
24261   test -z "$ac_dir" && ac_dir=.
24262   if $as_executable_p "$ac_dir/$ac_word"; then
24263    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24264    echo "$as_me:24264: found $ac_dir/$ac_word" >&5
24265    break
24266 fi
24267 done
24268
24269   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24270   ;;
24271 esac
24272 fi
24273 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24274
24275 if test -n "$cf_TEMP_gnat"; then
24276   echo "$as_me:24276: result: $cf_TEMP_gnat" >&5
24277 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24278 else
24279   echo "$as_me:24279: result: no" >&5
24280 echo "${ECHO_T}no" >&6
24281 fi
24282
24283         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24284
24285         if test "x$cf_TEMP_gnat" != xno; then
24286                 unset cf_cv_gnat_version
24287                 unset cf_TEMP_gnat
24288
24289 echo "$as_me:24289: checking for $cf_prog_gnat version" >&5
24290 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24291 if test "${cf_cv_gnat_version+set}" = set; then
24292   echo $ECHO_N "(cached) $ECHO_C" >&6
24293 else
24294
24295 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24296         grep '[0-9].[0-9][0-9]*' |\
24297         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24298
24299 fi
24300 echo "$as_me:24300: result: $cf_cv_gnat_version" >&5
24301 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24302 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24303 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24304
24305         fi
24306         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24307
24308         unset cf_TEMP_gnat
24309         unset cf_cv_gnat_version
24310         unset ac_cv_path_cf_TEMP_gnat
24311 done
24312
24313 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24314         cf_ada_make=
24315         cf_cv_prog_gnat_correct=no
24316 else
24317         cf_ada_make=gnatmake
24318         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24319                 # gprconfig is newer than gnatmake; we can continue...
24320                 cf_ada_config="##"
24321         else
24322                 rm -rf conftest* *~conftest*
24323                 if mkdir conftest.src
24324                 then
24325                         cf_ada_config=""
24326                         cd conftest.src
24327                         for cf_gprconfig in Ada C
24328                         do
24329                                 echo "$as_me:24329: checking for gprconfig name for $cf_gprconfig" >&5
24330 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24331                                 if test $cf_gprconfig = C
24332                                 then
24333                                         for cf_gprconfig_param in \
24334                                                 $cf_gprconfig,,,,GNATGCC \
24335                                                 $cf_gprconfig,,,,GCC \
24336                                                 $cf_gprconfig
24337                                         do
24338                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24339                                                 test -n "$cf_gprconfig_value" && break
24340                                         done
24341                                 else
24342                                         cf_gprconfig_param=$cf_gprconfig
24343                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24344                                 fi
24345                                 if test -n "$cf_gprconfig_value"
24346                                 then
24347                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24348                                         echo "$as_me:24348: result: $cf_gprconfig_value" >&5
24349 echo "${ECHO_T}$cf_gprconfig_value" >&6
24350                                 else
24351                                         echo "$as_me:24351: result: missing" >&5
24352 echo "${ECHO_T}missing" >&6
24353                                         cf_ada_config="#"
24354                                         break
24355                                 fi
24356                         done
24357                         cd ..
24358                         rm -rf conftest* *~conftest*
24359                 fi
24360         fi
24361         if test "x$cf_ada_config" != "x#"
24362         then
24363
24364 echo "$as_me:24364: checking for gnat version" >&5
24365 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24366 if test "${cf_cv_gnat_version+set}" = set; then
24367   echo $ECHO_N "(cached) $ECHO_C" >&6
24368 else
24369
24370 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24371         grep '[0-9].[0-9][0-9]*' |\
24372         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24373
24374 fi
24375 echo "$as_me:24375: result: $cf_cv_gnat_version" >&5
24376 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24377 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24378
24379 case $cf_cv_gnat_version in
24380 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24381         cf_cv_prog_gnat_correct=yes
24382         ;;
24383 (*)
24384         { echo "$as_me:24384: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24385 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24386         cf_cv_prog_gnat_correct=no
24387         ;;
24388 esac
24389
24390                 # Extract the first word of "m4", so it can be a program name with args.
24391 set dummy m4; ac_word=$2
24392 echo "$as_me:24392: checking for $ac_word" >&5
24393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24394 if test "${ac_cv_prog_M4_exists+set}" = set; then
24395   echo $ECHO_N "(cached) $ECHO_C" >&6
24396 else
24397   if test -n "$M4_exists"; then
24398   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24399 else
24400   ac_save_IFS=$IFS; IFS=$ac_path_separator
24401 ac_dummy="$PATH"
24402 for ac_dir in $ac_dummy; do
24403   IFS=$ac_save_IFS
24404   test -z "$ac_dir" && ac_dir=.
24405   $as_executable_p "$ac_dir/$ac_word" || continue
24406 ac_cv_prog_M4_exists="yes"
24407 echo "$as_me:24407: found $ac_dir/$ac_word" >&5
24408 break
24409 done
24410
24411   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24412 fi
24413 fi
24414 M4_exists=$ac_cv_prog_M4_exists
24415 if test -n "$M4_exists"; then
24416   echo "$as_me:24416: result: $M4_exists" >&5
24417 echo "${ECHO_T}$M4_exists" >&6
24418 else
24419   echo "$as_me:24419: result: no" >&5
24420 echo "${ECHO_T}no" >&6
24421 fi
24422
24423                 if test "$ac_cv_prog_M4_exists" = no; then
24424                         cf_cv_prog_gnat_correct=no
24425                         { echo "$as_me:24425: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24426 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24427                 fi
24428                 if test "$cf_cv_prog_gnat_correct" = yes; then
24429                         echo "$as_me:24429: checking if GNAT works" >&5
24430 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24431
24432 rm -rf conftest* *~conftest*
24433 cat >>conftest.ads <<CF_EOF
24434 procedure conftest;
24435 CF_EOF
24436 cat >>conftest.adb <<CF_EOF
24437 with Text_IO;
24438 with GNAT.OS_Lib;
24439 procedure conftest is
24440 begin
24441    Text_IO.Put ("Hello World");
24442    Text_IO.New_Line;
24443    GNAT.OS_Lib.OS_Exit (0);
24444 end conftest;
24445 CF_EOF
24446 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24447    if ( ./conftest 1>&5 2>&1 ) ; then
24448       cf_cv_prog_gnat_correct=yes
24449    else
24450       cf_cv_prog_gnat_correct=no
24451    fi
24452 else
24453    cf_cv_prog_gnat_correct=no
24454 fi
24455 rm -rf conftest* *~conftest*
24456
24457                         echo "$as_me:24457: result: $cf_cv_prog_gnat_correct" >&5
24458 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24459                 fi
24460         else
24461                 cf_cv_prog_gnat_correct=no
24462         fi
24463 fi
24464
24465                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24466
24467         ADAFLAGS="$ADAFLAGS -gnatpn"
24468
24469         echo "$as_me:24469: checking optimization options for ADAFLAGS" >&5
24470 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24471         case "$CFLAGS" in
24472         (*-g*)
24473
24474         ADAFLAGS="$ADAFLAGS -g"
24475
24476                 ;;
24477         esac
24478         case "$CFLAGS" in
24479         (*-O*)
24480                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24481
24482         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24483
24484                 ;;
24485         esac
24486         echo "$as_me:24486: result: $ADAFLAGS" >&5
24487 echo "${ECHO_T}$ADAFLAGS" >&6
24488
24489 echo "$as_me:24489: checking if GNATPREP supports -T option" >&5
24490 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24491 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24492   echo $ECHO_N "(cached) $ECHO_C" >&6
24493 else
24494
24495 cf_cv_gnatprep_opt_t=no
24496 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24497
24498 fi
24499 echo "$as_me:24499: result: $cf_cv_gnatprep_opt_t" >&5
24500 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24501 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24502
24503 echo "$as_me:24503: checking if GNAT supports generics" >&5
24504 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24505 case $cf_cv_gnat_version in
24506 (3.[1-9]*|[4-9].*)
24507         cf_gnat_generics=yes
24508         ;;
24509 (*)
24510         cf_gnat_generics=no
24511         ;;
24512 esac
24513 echo "$as_me:24513: result: $cf_gnat_generics" >&5
24514 echo "${ECHO_T}$cf_gnat_generics" >&6
24515
24516 if test "$cf_gnat_generics" = yes
24517 then
24518         cf_compile_generics=generics
24519         cf_generic_objects="\${GENOBJS}"
24520 else
24521         cf_compile_generics=
24522         cf_generic_objects=
24523 fi
24524
24525 echo "$as_me:24525: checking if GNAT supports SIGINT" >&5
24526 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24527 if test "${cf_cv_gnat_sigint+set}" = set; then
24528   echo $ECHO_N "(cached) $ECHO_C" >&6
24529 else
24530
24531 rm -rf conftest* *~conftest*
24532 cat >>conftest.ads <<CF_EOF
24533 with Ada.Interrupts.Names;
24534
24535 package ConfTest is
24536
24537    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24538    pragma Unreserve_All_Interrupts;
24539    pragma Warnings (On);
24540
24541    protected Process is
24542       procedure Stop;
24543       function Continue return Boolean;
24544       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24545    private
24546       Done : Boolean := False;
24547    end Process;
24548
24549 end ConfTest;
24550 CF_EOF
24551 cat >>conftest.adb <<CF_EOF
24552 package body ConfTest is
24553    protected body Process is
24554       procedure Stop is
24555       begin
24556          Done := True;
24557       end Stop;
24558       function Continue return Boolean is
24559       begin
24560          return not Done;
24561       end Continue;
24562    end Process;
24563 end ConfTest;
24564 CF_EOF
24565 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24566       cf_cv_gnat_sigint=yes
24567 else
24568    cf_cv_gnat_sigint=no
24569 fi
24570 rm -rf conftest* *~conftest*
24571
24572 fi
24573 echo "$as_me:24573: result: $cf_cv_gnat_sigint" >&5
24574 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24575
24576 if test $cf_cv_gnat_sigint = yes ; then
24577         USE_GNAT_SIGINT=""
24578 else
24579         USE_GNAT_SIGINT="#"
24580 fi
24581
24582 cf_gnat_libraries=no
24583 cf_gnat_projects=no
24584
24585 if test "$enable_gnat_projects" != no ; then
24586 echo "$as_me:24586: checking if GNAT supports project files" >&5
24587 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24588 case $cf_cv_gnat_version in
24589 (3.[0-9]*)
24590         ;;
24591 (*)
24592         case $cf_cv_system_name in
24593         (cygwin*|msys*)
24594                 ;;
24595         (*)
24596                 rm -rf conftest* *~conftest*
24597                 if mkdir conftest.src conftest.bin conftest.lib
24598                 then
24599                         cd conftest.src
24600                         rm -rf conftest* *~conftest*
24601                         cat >>library.gpr <<CF_EOF
24602 project Library is
24603   Kind := External ("LIB_KIND");
24604   for Library_Name use "ConfTest";
24605   for Object_Dir use ".";
24606   for Library_ALI_Dir use External("LIBRARY_DIR");
24607   for Library_Version use External ("SONAME");
24608   for Library_Kind use Kind;
24609   for Library_Dir use External("BUILD_DIR");
24610   Source_Dir := External ("SOURCE_DIR");
24611   for Source_Dirs use (Source_Dir);
24612 end Library;
24613 CF_EOF
24614                         cat >>confpackage.ads <<CF_EOF
24615 package ConfPackage is
24616    procedure conftest;
24617 end ConfPackage;
24618 CF_EOF
24619                         cat >>confpackage.adb <<CF_EOF
24620 with Text_IO;
24621 package body ConfPackage is
24622    procedure conftest is
24623    begin
24624       Text_IO.Put ("Hello World");
24625       Text_IO.New_Line;
24626    end conftest;
24627 end ConfPackage;
24628 CF_EOF
24629                         if ( $cf_ada_make $ADAFLAGS \
24630                                         -Plibrary.gpr \
24631                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24632                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24633                                         -XSOURCE_DIR=`pwd` \
24634                                         -XSONAME=libConfTest.so.1 \
24635                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24636                                 cf_gnat_projects=yes
24637                         fi
24638                         cd ..
24639                 fi
24640                 if test -f conftest.lib/confpackage.ali
24641                 then
24642                         cf_gnat_libraries=yes
24643                 fi
24644                 rm -rf conftest* *~conftest*
24645                 ;;
24646         esac
24647         ;;
24648 esac
24649 echo "$as_me:24649: result: $cf_gnat_projects" >&5
24650 echo "${ECHO_T}$cf_gnat_projects" >&6
24651 fi # enable_gnat_projects
24652
24653 if test $cf_gnat_projects = yes
24654 then
24655         echo "$as_me:24655: checking if GNAT supports libraries" >&5
24656 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24657         echo "$as_me:24657: result: $cf_gnat_libraries" >&5
24658 echo "${ECHO_T}$cf_gnat_libraries" >&6
24659 fi
24660
24661 if test "$cf_gnat_projects" = yes
24662 then
24663         USE_OLD_MAKERULES="#"
24664         USE_GNAT_PROJECTS=""
24665 else
24666         USE_OLD_MAKERULES=""
24667         USE_GNAT_PROJECTS="#"
24668 fi
24669
24670 if test "$cf_gnat_libraries" = yes
24671 then
24672         USE_GNAT_LIBRARIES=""
24673 else
24674         USE_GNAT_LIBRARIES="#"
24675 fi
24676
24677 echo "$as_me:24677: checking for ada-compiler" >&5
24678 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24679
24680 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24681 if test "${with_ada_compiler+set}" = set; then
24682   withval="$with_ada_compiler"
24683   cf_ada_compiler=$withval
24684 else
24685   cf_ada_compiler=gnatmake
24686 fi;
24687
24688 echo "$as_me:24688: result: $cf_ada_compiler" >&5
24689 echo "${ECHO_T}$cf_ada_compiler" >&6
24690
24691                         cf_ada_package=terminal_interface
24692
24693 echo "$as_me:24693: checking for ada-include" >&5
24694 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24695
24696 # Check whether --with-ada-include or --without-ada-include was given.
24697 if test "${with_ada_include+set}" = set; then
24698   withval="$with_ada_include"
24699
24700 else
24701   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24702 fi; if test -n "$prefix/share/ada/adainclude" ; then
24703
24704 if test "x$prefix" != xNONE; then
24705         cf_path_syntax="$prefix"
24706 else
24707         cf_path_syntax="$ac_default_prefix"
24708 fi
24709
24710 case ".$withval" in
24711 (.\$\(*\)*|.\'*\'*)
24712         ;;
24713 (..|./*|.\\*)
24714         ;;
24715 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24716         ;;
24717 (.\${*prefix}*|.\${*dir}*)
24718         eval withval="$withval"
24719         case ".$withval" in
24720         (.NONE/*)
24721                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24722                 ;;
24723         esac
24724         ;;
24725 (.no|.NONE/*)
24726         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24727         ;;
24728 (*)
24729         { { echo "$as_me:24729: error: expected a pathname, not \"$withval\"" >&5
24730 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24731    { (exit 1); exit 1; }; }
24732         ;;
24733 esac
24734
24735 fi
24736 eval ADA_INCLUDE="$withval"
24737
24738 echo "$as_me:24738: result: $ADA_INCLUDE" >&5
24739 echo "${ECHO_T}$ADA_INCLUDE" >&6
24740
24741 echo "$as_me:24741: checking for ada-objects" >&5
24742 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24743
24744 # Check whether --with-ada-objects or --without-ada-objects was given.
24745 if test "${with_ada_objects+set}" = set; then
24746   withval="$with_ada_objects"
24747
24748 else
24749   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24750 fi; if test -n "$prefix/lib/ada/adalib" ; then
24751
24752 if test "x$prefix" != xNONE; then
24753         cf_path_syntax="$prefix"
24754 else
24755         cf_path_syntax="$ac_default_prefix"
24756 fi
24757
24758 case ".$withval" in
24759 (.\$\(*\)*|.\'*\'*)
24760         ;;
24761 (..|./*|.\\*)
24762         ;;
24763 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24764         ;;
24765 (.\${*prefix}*|.\${*dir}*)
24766         eval withval="$withval"
24767         case ".$withval" in
24768         (.NONE/*)
24769                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24770                 ;;
24771         esac
24772         ;;
24773 (.no|.NONE/*)
24774         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24775         ;;
24776 (*)
24777         { { echo "$as_me:24777: error: expected a pathname, not \"$withval\"" >&5
24778 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24779    { (exit 1); exit 1; }; }
24780         ;;
24781 esac
24782
24783 fi
24784 eval ADA_OBJECTS="$withval"
24785
24786 echo "$as_me:24786: result: $ADA_OBJECTS" >&5
24787 echo "${ECHO_T}$ADA_OBJECTS" >&6
24788
24789 echo "$as_me:24789: checking if an Ada95 shared-library should be built" >&5
24790 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24791
24792 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24793 if test "${with_ada_sharedlib+set}" = set; then
24794   withval="$with_ada_sharedlib"
24795   with_ada_sharedlib=$withval
24796 else
24797   with_ada_sharedlib=no
24798 fi;
24799 echo "$as_me:24799: result: $with_ada_sharedlib" >&5
24800 echo "${ECHO_T}$with_ada_sharedlib" >&6
24801
24802 if test "x$with_ada_sharedlib" != xno
24803 then
24804         if test "x$cf_gnat_projects" != xyes
24805         then
24806                 { echo "$as_me:24806: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24807 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24808                 with_ada_sharedlib=no
24809         fi
24810 fi
24811
24812 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24813 MAKE_ADA_SHAREDLIB="#"
24814
24815 if test "x$with_ada_sharedlib" != xno
24816 then
24817         MAKE_ADA_SHAREDLIB=
24818         if test "x$with_ada_sharedlib" != xyes
24819         then
24820                 ADA_SHAREDLIB="$with_ada_sharedlib"
24821         fi
24822 fi
24823
24824                         # allow the Ada binding to be renamed
24825
24826 echo "$as_me:24826: checking for ada-libname" >&5
24827 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24828
24829 # Check whether --with-ada-libname or --without-ada-libname was given.
24830 if test "${with_ada_libname+set}" = set; then
24831   withval="$with_ada_libname"
24832   ADA_LIBNAME=$withval
24833 else
24834   ADA_LIBNAME=AdaCurses
24835 fi;
24836 case "x$ADA_LIBNAME" in
24837 (x|xyes|xno)
24838         ADA_LIBNAME=AdaCurses
24839         ;;
24840 esac
24841
24842 echo "$as_me:24842: result: $ADA_LIBNAME" >&5
24843 echo "${ECHO_T}$ADA_LIBNAME" >&6
24844
24845                 fi
24846         fi
24847 else
24848         cf_with_ada=no
24849 fi
24850
24851 # do this "late" to avoid conflict with header-checks
24852 if test "x$with_widec" = xyes ; then
24853         echo "$as_me:24853: checking for wchar_t" >&5
24854 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24855 if test "${ac_cv_type_wchar_t+set}" = set; then
24856   echo $ECHO_N "(cached) $ECHO_C" >&6
24857 else
24858   cat >conftest.$ac_ext <<_ACEOF
24859 #line 24859 "configure"
24860 #include "confdefs.h"
24861 $ac_includes_default
24862 int
24863 main (void)
24864 {
24865 if ((wchar_t *) 0)
24866   return 0;
24867 if (sizeof (wchar_t))
24868   return 0;
24869   ;
24870   return 0;
24871 }
24872 _ACEOF
24873 rm -f conftest.$ac_objext
24874 if { (eval echo "$as_me:24874: \"$ac_compile\"") >&5
24875   (eval $ac_compile) 2>&5
24876   ac_status=$?
24877   echo "$as_me:24877: \$? = $ac_status" >&5
24878   (exit $ac_status); } &&
24879          { ac_try='test -s conftest.$ac_objext'
24880   { (eval echo "$as_me:24880: \"$ac_try\"") >&5
24881   (eval $ac_try) 2>&5
24882   ac_status=$?
24883   echo "$as_me:24883: \$? = $ac_status" >&5
24884   (exit $ac_status); }; }; then
24885   ac_cv_type_wchar_t=yes
24886 else
24887   echo "$as_me: failed program was:" >&5
24888 cat conftest.$ac_ext >&5
24889 ac_cv_type_wchar_t=no
24890 fi
24891 rm -f conftest.$ac_objext conftest.$ac_ext
24892 fi
24893 echo "$as_me:24893: result: $ac_cv_type_wchar_t" >&5
24894 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24895
24896 echo "$as_me:24896: checking size of wchar_t" >&5
24897 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24898 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24899   echo $ECHO_N "(cached) $ECHO_C" >&6
24900 else
24901   if test "$ac_cv_type_wchar_t" = yes; then
24902   if test "$cross_compiling" = yes; then
24903   # Depending upon the size, compute the lo and hi bounds.
24904 cat >conftest.$ac_ext <<_ACEOF
24905 #line 24905 "configure"
24906 #include "confdefs.h"
24907 $ac_includes_default
24908 int
24909 main (void)
24910 {
24911 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24912   ;
24913   return 0;
24914 }
24915 _ACEOF
24916 rm -f conftest.$ac_objext
24917 if { (eval echo "$as_me:24917: \"$ac_compile\"") >&5
24918   (eval $ac_compile) 2>&5
24919   ac_status=$?
24920   echo "$as_me:24920: \$? = $ac_status" >&5
24921   (exit $ac_status); } &&
24922          { ac_try='test -s conftest.$ac_objext'
24923   { (eval echo "$as_me:24923: \"$ac_try\"") >&5
24924   (eval $ac_try) 2>&5
24925   ac_status=$?
24926   echo "$as_me:24926: \$? = $ac_status" >&5
24927   (exit $ac_status); }; }; then
24928   ac_lo=0 ac_mid=0
24929   while :; do
24930     cat >conftest.$ac_ext <<_ACEOF
24931 #line 24931 "configure"
24932 #include "confdefs.h"
24933 $ac_includes_default
24934 int
24935 main (void)
24936 {
24937 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24938   ;
24939   return 0;
24940 }
24941 _ACEOF
24942 rm -f conftest.$ac_objext
24943 if { (eval echo "$as_me:24943: \"$ac_compile\"") >&5
24944   (eval $ac_compile) 2>&5
24945   ac_status=$?
24946   echo "$as_me:24946: \$? = $ac_status" >&5
24947   (exit $ac_status); } &&
24948          { ac_try='test -s conftest.$ac_objext'
24949   { (eval echo "$as_me:24949: \"$ac_try\"") >&5
24950   (eval $ac_try) 2>&5
24951   ac_status=$?
24952   echo "$as_me:24952: \$? = $ac_status" >&5
24953   (exit $ac_status); }; }; then
24954   ac_hi=$ac_mid; break
24955 else
24956   echo "$as_me: failed program was:" >&5
24957 cat conftest.$ac_ext >&5
24958 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24959 fi
24960 rm -f conftest.$ac_objext conftest.$ac_ext
24961   done
24962 else
24963   echo "$as_me: failed program was:" >&5
24964 cat conftest.$ac_ext >&5
24965 ac_hi=-1 ac_mid=-1
24966   while :; do
24967     cat >conftest.$ac_ext <<_ACEOF
24968 #line 24968 "configure"
24969 #include "confdefs.h"
24970 $ac_includes_default
24971 int
24972 main (void)
24973 {
24974 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24975   ;
24976   return 0;
24977 }
24978 _ACEOF
24979 rm -f conftest.$ac_objext
24980 if { (eval echo "$as_me:24980: \"$ac_compile\"") >&5
24981   (eval $ac_compile) 2>&5
24982   ac_status=$?
24983   echo "$as_me:24983: \$? = $ac_status" >&5
24984   (exit $ac_status); } &&
24985          { ac_try='test -s conftest.$ac_objext'
24986   { (eval echo "$as_me:24986: \"$ac_try\"") >&5
24987   (eval $ac_try) 2>&5
24988   ac_status=$?
24989   echo "$as_me:24989: \$? = $ac_status" >&5
24990   (exit $ac_status); }; }; then
24991   ac_lo=$ac_mid; break
24992 else
24993   echo "$as_me: failed program was:" >&5
24994 cat conftest.$ac_ext >&5
24995 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24996 fi
24997 rm -f conftest.$ac_objext conftest.$ac_ext
24998   done
24999 fi
25000 rm -f conftest.$ac_objext conftest.$ac_ext
25001 # Binary search between lo and hi bounds.
25002 while test "x$ac_lo" != "x$ac_hi"; do
25003   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25004   cat >conftest.$ac_ext <<_ACEOF
25005 #line 25005 "configure"
25006 #include "confdefs.h"
25007 $ac_includes_default
25008 int
25009 main (void)
25010 {
25011 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25012   ;
25013   return 0;
25014 }
25015 _ACEOF
25016 rm -f conftest.$ac_objext
25017 if { (eval echo "$as_me:25017: \"$ac_compile\"") >&5
25018   (eval $ac_compile) 2>&5
25019   ac_status=$?
25020   echo "$as_me:25020: \$? = $ac_status" >&5
25021   (exit $ac_status); } &&
25022          { ac_try='test -s conftest.$ac_objext'
25023   { (eval echo "$as_me:25023: \"$ac_try\"") >&5
25024   (eval $ac_try) 2>&5
25025   ac_status=$?
25026   echo "$as_me:25026: \$? = $ac_status" >&5
25027   (exit $ac_status); }; }; then
25028   ac_hi=$ac_mid
25029 else
25030   echo "$as_me: failed program was:" >&5
25031 cat conftest.$ac_ext >&5
25032 ac_lo=`expr $ac_mid + 1`
25033 fi
25034 rm -f conftest.$ac_objext conftest.$ac_ext
25035 done
25036 ac_cv_sizeof_wchar_t=$ac_lo
25037 else
25038   if test "$cross_compiling" = yes; then
25039   { { echo "$as_me:25039: error: cannot run test program while cross compiling" >&5
25040 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25041    { (exit 1); exit 1; }; }
25042 else
25043   cat >conftest.$ac_ext <<_ACEOF
25044 #line 25044 "configure"
25045 #include "confdefs.h"
25046 $ac_includes_default
25047 int
25048 main (void)
25049 {
25050 FILE *f = fopen ("conftest.val", "w");
25051 if (!f)
25052   $ac_main_return (1);
25053 fprintf (f, "%d", (sizeof (wchar_t)));
25054 fclose (f);
25055   ;
25056   return 0;
25057 }
25058 _ACEOF
25059 rm -f conftest$ac_exeext
25060 if { (eval echo "$as_me:25060: \"$ac_link\"") >&5
25061   (eval $ac_link) 2>&5
25062   ac_status=$?
25063   echo "$as_me:25063: \$? = $ac_status" >&5
25064   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25065   { (eval echo "$as_me:25065: \"$ac_try\"") >&5
25066   (eval $ac_try) 2>&5
25067   ac_status=$?
25068   echo "$as_me:25068: \$? = $ac_status" >&5
25069   (exit $ac_status); }; }; then
25070   ac_cv_sizeof_wchar_t=`cat conftest.val`
25071 else
25072   echo "$as_me: program exited with status $ac_status" >&5
25073 echo "$as_me: failed program was:" >&5
25074 cat conftest.$ac_ext >&5
25075 fi
25076 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25077 fi
25078 fi
25079 rm -f conftest.val
25080 else
25081   ac_cv_sizeof_wchar_t=0
25082 fi
25083 fi
25084 echo "$as_me:25084: result: $ac_cv_sizeof_wchar_t" >&5
25085 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25086 cat >>confdefs.h <<EOF
25087 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25088 EOF
25089
25090         # cross-compiling to mingw can run into the problem that attempting to
25091         # link with the regex library fails, causing the test to not set this to
25092         # a number.  "recent" autoconf does not address this problem either -TD
25093         if test -z "$ac_cv_sizeof_wchar_t"
25094         then
25095                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25096
25097 echo "${as_me:-configure}:25097: testing test failed (assume 2) ..." 1>&5
25098
25099                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25100                 mv confdefs.tmp confdefs.h
25101                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25102         fi
25103 fi
25104
25105 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25106 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25107 ###
25108 ### ticlib modules may be a separate library, otherwise contained in termlib.
25109 ### termlib modules may be a separate library, otherwise contained in ncurses.
25110 ###
25111 ### The of "+" or " " between the tokens controls the way the script
25112 ### chooses to split module lists into libraries.
25113 ###
25114 ### (see CF_LIB_RULES).
25115 echo "$as_me:25115: checking for library subsets" >&5
25116 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25117 LIB_SUBSETS=
25118
25119 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25120         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25121         if test "$with_ticlib" != no ; then
25122                 LIB_SUBSETS="${LIB_SUBSETS} "
25123         else
25124                 LIB_SUBSETS="${LIB_SUBSETS}+"
25125         fi
25126 fi
25127
25128 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25129 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25130
25131 if test "$with_termlib" != no ; then
25132         LIB_SUBSETS="${LIB_SUBSETS} "
25133 else
25134         LIB_SUBSETS="${LIB_SUBSETS}+"
25135 fi
25136
25137 LIB_SUBSETS="${LIB_SUBSETS}base"
25138
25139 # Most term-driver calls are to tinfo, but some like init_pair are to the
25140 # base library (so it resides in base).
25141 if test "$with_term_driver" != no ; then
25142         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25143         case $cf_cv_system_name in
25144         (*mingw32*|*mingw64*)
25145                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25146                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25147                 ;;
25148         (*)
25149                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25150                 ;;
25151         esac
25152 fi
25153
25154 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25155 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25156
25157 echo "$as_me:25157: result: $LIB_SUBSETS" >&5
25158 echo "${ECHO_T}$LIB_SUBSETS" >&6
25159
25160 ### Construct the list of include-directories to be generated
25161
25162 if test "$srcdir" != "."; then
25163         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25164 fi
25165 CPPFLAGS="-I../include $CPPFLAGS"
25166 if test "$srcdir" != "."; then
25167         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25168 fi
25169 CPPFLAGS="-I. $CPPFLAGS"
25170
25171 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25172 if test "$srcdir" != "."; then
25173         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25174 fi
25175 if test "$GCC" != yes; then
25176         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25177 elif test "$includedir" != "/usr/include"; then
25178         if test "$includedir" = '${prefix}/include' ; then
25179                 if test x$prefix != x/usr ; then
25180                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25181                 fi
25182         else
25183                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25184         fi
25185 fi
25186
25187 ### Build up pieces for makefile rules
25188 echo "$as_me:25188: checking default library suffix" >&5
25189 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25190
25191         case $DFT_LWR_MODEL in
25192         (libtool) DFT_ARG_SUFFIX=''   ;;
25193         (normal)  DFT_ARG_SUFFIX=''   ;;
25194         (debug)   DFT_ARG_SUFFIX='_g' ;;
25195         (profile) DFT_ARG_SUFFIX='_p' ;;
25196         (shared)  DFT_ARG_SUFFIX=''   ;;
25197         esac
25198         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25199 echo "$as_me:25199: result: $DFT_ARG_SUFFIX" >&5
25200 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25201
25202 echo "$as_me:25202: checking default library-dependency suffix" >&5
25203 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25204
25205         case X$DFT_LWR_MODEL in
25206         (Xlibtool)
25207                 DFT_LIB_SUFFIX='.la'
25208                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25209                 ;;
25210         (Xdebug)
25211                 DFT_LIB_SUFFIX='_g.a'
25212                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25213                 ;;
25214         (Xprofile)
25215                 DFT_LIB_SUFFIX='_p.a'
25216                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25217                 ;;
25218         (Xshared)
25219                 case $cf_cv_system_name in
25220                 (aix[5-7]*)
25221                         DFT_LIB_SUFFIX='.so'
25222                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25223                         ;;
25224                 (cygwin*|msys*|mingw*)
25225                         DFT_LIB_SUFFIX='.dll'
25226                         DFT_DEP_SUFFIX='.dll.a'
25227                         ;;
25228                 (darwin*)
25229                         DFT_LIB_SUFFIX='.dylib'
25230                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25231                         ;;
25232                 (hpux*)
25233                         case $target in
25234                         (ia64*)
25235                                 DFT_LIB_SUFFIX='.so'
25236                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25237                                 ;;
25238                         (*)
25239                                 DFT_LIB_SUFFIX='.sl'
25240                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25241                                 ;;
25242                         esac
25243                         ;;
25244                 (*)
25245                         DFT_LIB_SUFFIX='.so'
25246                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25247                         ;;
25248                 esac
25249                 ;;
25250         (*)
25251                 DFT_LIB_SUFFIX='.a'
25252                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25253                 ;;
25254         esac
25255         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25256         then
25257                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25258                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25259         fi
25260 echo "$as_me:25260: result: $DFT_DEP_SUFFIX" >&5
25261 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25262
25263 echo "$as_me:25263: checking default object directory" >&5
25264 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25265
25266         case $DFT_LWR_MODEL in
25267         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25268         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25269         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25270         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25271         (shared)
25272                 case $cf_cv_system_name in
25273                 (cygwin|msys)
25274                         DFT_OBJ_SUBDIR='objects' ;;
25275                 (*)
25276                         DFT_OBJ_SUBDIR='obj_s' ;;
25277                 esac
25278         esac
25279 echo "$as_me:25279: result: $DFT_OBJ_SUBDIR" >&5
25280 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25281
25282 if test "x$cf_with_cxx" = xyes ; then
25283 echo "$as_me:25283: checking c++ library-dependency suffix" >&5
25284 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25285 if test "$with_libtool" != "no"; then
25286         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25287         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25288 elif test "$with_shared_cxx" != "no"; then
25289         # also for g++ users...
25290         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25291 else
25292         # we normally make a static library because C/C++ library rules differ
25293
25294         case Xnormal in
25295         (Xlibtool)
25296                 CXX_LIB_SUFFIX='.la'
25297                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25298                 ;;
25299         (Xdebug)
25300                 CXX_LIB_SUFFIX='_g.a'
25301                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25302                 ;;
25303         (Xprofile)
25304                 CXX_LIB_SUFFIX='_p.a'
25305                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25306                 ;;
25307         (Xshared)
25308                 case $cf_cv_system_name in
25309                 (aix[5-7]*)
25310                         CXX_LIB_SUFFIX='.so'
25311                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25312                         ;;
25313                 (cygwin*|msys*|mingw*)
25314                         CXX_LIB_SUFFIX='.dll'
25315                         CXX_DEP_SUFFIX='.dll.a'
25316                         ;;
25317                 (darwin*)
25318                         CXX_LIB_SUFFIX='.dylib'
25319                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25320                         ;;
25321                 (hpux*)
25322                         case $target in
25323                         (ia64*)
25324                                 CXX_LIB_SUFFIX='.so'
25325                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25326                                 ;;
25327                         (*)
25328                                 CXX_LIB_SUFFIX='.sl'
25329                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25330                                 ;;
25331                         esac
25332                         ;;
25333                 (*)
25334                         CXX_LIB_SUFFIX='.so'
25335                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25336                         ;;
25337                 esac
25338                 ;;
25339         (*)
25340                 CXX_LIB_SUFFIX='.a'
25341                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25342                 ;;
25343         esac
25344         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25345         then
25346                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25347                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25348         fi
25349
25350 fi
25351 echo "$as_me:25351: result: $CXX_LIB_SUFFIX" >&5
25352 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25353
25354 fi
25355
25356 # do not want -ldl in build except as needed for -lncurses dependency
25357 if test "x$with_dlsym" = xyes ; then
25358 if test $DFT_LWR_MODEL = shared || \
25359    test $DFT_LWR_MODEL = libtool ; then
25360
25361 # remove dl library from $LIBS
25362 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25363
25364 fi
25365 fi
25366 ### Set up low-level terminfo dependencies for makefiles.
25367
25368 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25369 # do not need libdl
25370 TICS_LIST=
25371 if test "x$with_dlsym" = xyes ; then
25372
25373 # remove dl library from $SHLIB_LIST
25374 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25375
25376 fi
25377
25378 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25379 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25380 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25381 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25382 then
25383         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25384 fi
25385
25386 if test "$with_ticlib" != no ; then
25387
25388         if test "x$with_ticlib" != xyes ; then
25389                 TICS_NAME=$with_ticlib
25390                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25391                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25392                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25393                 TICS_LIB_SUFFIX="${with_ticlib}"
25394         else
25395                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25396                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25397                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25398                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25399         fi
25400         TICS_LDFLAGS="-L${LIB_DIR}"
25401         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25402 else
25403         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25404         TICS_LDFLAGS="-L${LIB_DIR}"
25405         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25406 fi
25407
25408 if test "$with_termlib" != no ; then
25409
25410         if test "x$with_termlib" != xyes ; then
25411                 TINFO_NAME=$with_termlib
25412                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25413                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25414                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25415                 TINFO_LIB_SUFFIX="${with_termlib}"
25416         else
25417                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25418                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25419                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25420                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25421         fi
25422
25423         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25424         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25425         if test "$DFT_LWR_MODEL" = "libtool"; then
25426                 TEST_ARGS="${TEST_DEPS}"
25427                 TEST_ARG2="${TEST_DEP2}"
25428                 TINFO_LDFLAGS="-L${LIB_DIR}"
25429                 TINFO_LIBS="$TEST_ARGS"
25430                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25431                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25432         else
25433                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25434                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25435                 if test "x$with_term_driver" != xno ; then
25436                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25437                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25438                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25439                 else
25440                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25441                         TINFO_LIBS="$TEST_ARGS"
25442                 fi
25443                 TINFO_LDFLAGS="-L${LIB_DIR}"
25444                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25445         fi
25446 else
25447         # the next lines are needed for linking libtic over libncurses
25448         TINFO_NAME=${LIB_NAME}
25449         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25450         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25451         if test "x$with_tic_depends" = xyes ; then
25452                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25453         else
25454                 TICS_LIST="$SHLIB_LIST"
25455         fi
25456
25457         TINFO_LDFLAGS="-L${LIB_DIR}"
25458         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25459 fi
25460
25461 if test "$DFT_LWR_MODEL" = shared ; then
25462         case $cf_cv_system_name in
25463         (cygwin*|msys*)
25464                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25465                 TINFO_SUFFIX=.dll
25466                 ;;
25467         esac
25468 fi
25469
25470 if test "x$with_dlsym" = xyes ; then
25471
25472 # remove dl library from $TICS_LIST
25473 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25474
25475 fi
25476
25477 if test "$DFT_LWR_MODEL" = "libtool"; then
25478         OBJEXT=lo
25479 fi
25480
25481 # needed for Ada95
25482 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25483
25484 case $DFT_LWR_MODEL in
25485 (normal|debug|profile)
25486
25487 if test "$GCC" = yes ; then
25488         case $cf_cv_system_name in
25489         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25490                 LDFLAGS_STATIC=
25491                 LDFLAGS_SHARED=
25492                 ;;
25493         (*)     # normally, except when broken
25494                 LDFLAGS_STATIC=-static
25495                 LDFLAGS_SHARED=-dynamic
25496                 ;;
25497         esac
25498 else
25499         case $cf_cv_system_name in
25500         (aix[4-7]*)     # from ld manpage
25501                 LDFLAGS_STATIC=-bstatic
25502                 LDFLAGS_SHARED=-bdynamic
25503                 ;;
25504         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25505                 # We could also use just "archive" and "shared".
25506                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25507                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25508                 ;;
25509         (irix*)         # from ld manpage IRIX64
25510                 LDFLAGS_STATIC=-Bstatic
25511                 LDFLAGS_SHARED=-Bdynamic
25512                 ;;
25513         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25514                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25515                 LDFLAGS_STATIC=-noso
25516                 LDFLAGS_SHARED=-so_archive
25517                 ;;
25518         (solaris2*)
25519                 LDFLAGS_STATIC=-Bstatic
25520                 LDFLAGS_SHARED=-Bdynamic
25521                 ;;
25522         esac
25523 fi
25524
25525 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25526 then
25527         echo "$as_me:25527: checking if linker supports switching between static/dynamic" >&5
25528 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25529
25530         rm -f libconftest.a
25531         cat >conftest.$ac_ext <<EOF
25532 #line 25532 "configure"
25533 #include <stdio.h>
25534 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25535 EOF
25536         if { (eval echo "$as_me:25536: \"$ac_compile\"") >&5
25537   (eval $ac_compile) 2>&5
25538   ac_status=$?
25539   echo "$as_me:25539: \$? = $ac_status" >&5
25540   (exit $ac_status); } ; then
25541                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25542                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25543         fi
25544         rm -f conftest.*
25545
25546         cf_save_LIBS="$LIBS"
25547
25548         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25549         cat >conftest.$ac_ext <<_ACEOF
25550 #line 25550 "configure"
25551 #include "confdefs.h"
25552
25553 #line 25553 "configure"
25554 #include <stdio.h>
25555 int cf_ldflags_static(FILE *fp);
25556
25557 int
25558 main (void)
25559 {
25560
25561         return cf_ldflags_static(stdin);
25562
25563   ;
25564   return 0;
25565 }
25566 _ACEOF
25567 rm -f conftest.$ac_objext conftest$ac_exeext
25568 if { (eval echo "$as_me:25568: \"$ac_link\"") >&5
25569   (eval $ac_link) 2>&5
25570   ac_status=$?
25571   echo "$as_me:25571: \$? = $ac_status" >&5
25572   (exit $ac_status); } &&
25573          { ac_try='test -s conftest$ac_exeext'
25574   { (eval echo "$as_me:25574: \"$ac_try\"") >&5
25575   (eval $ac_try) 2>&5
25576   ac_status=$?
25577   echo "$as_me:25577: \$? = $ac_status" >&5
25578   (exit $ac_status); }; }; then
25579
25580         # some linkers simply ignore the -dynamic
25581         case x`file conftest$ac_exeext 2>/dev/null` in
25582         (*static*)
25583                 cf_ldflags_static=no
25584                 ;;
25585         (*)
25586                 cf_ldflags_static=yes
25587                 ;;
25588         esac
25589
25590 else
25591   echo "$as_me: failed program was:" >&5
25592 cat conftest.$ac_ext >&5
25593 cf_ldflags_static=no
25594 fi
25595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25596
25597         rm -f libconftest.*
25598         LIBS="$cf_save_LIBS"
25599
25600         echo "$as_me:25600: result: $cf_ldflags_static" >&5
25601 echo "${ECHO_T}$cf_ldflags_static" >&6
25602
25603         if test $cf_ldflags_static != yes
25604         then
25605                 LDFLAGS_STATIC=
25606                 LDFLAGS_SHARED=
25607         fi
25608 else
25609         LDFLAGS_STATIC=
25610         LDFLAGS_SHARED=
25611 fi
25612
25613         ;;
25614 esac
25615
25616 echo "$as_me:25616: checking where we will install curses.h" >&5
25617 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25618
25619 includesubdir=
25620 if test "$with_overwrite" = no && \
25621  ( test "x$includedir" = 'x${prefix}/include' || \
25622    test "x$includedir" = "x${prefix}/include" )
25623 then
25624         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25625 fi
25626 echo "$as_me:25626: result: ${includedir}${includesubdir}" >&5
25627 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25628
25629 ### Resolve a conflict between normal and wide-curses by forcing applications
25630 ### that will need libutf8 to add it to their configure script.
25631 if test "$with_overwrite" != no ; then
25632 if test "$NCURSES_LIBUTF8" = 1 ; then
25633         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25634         { echo "$as_me:25634: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25635 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25636 fi
25637 fi
25638 WITH_OVERWRITE=$with_overwrite
25639
25640 # used to separate tack out of the tree
25641 NCURSES_TREE=
25642
25643 ### predefined stuff for the test programs
25644
25645 cat >>confdefs.h <<\EOF
25646 #define HAVE_SLK_COLOR 1
25647 EOF
25648
25649 # pkgsrc uses these
25650
25651 echo "$as_me:25651: checking for desired basename for form library" >&5
25652 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
25653
25654 # Check whether --with-form-libname or --without-form-libname was given.
25655 if test "${with_form_libname+set}" = set; then
25656   withval="$with_form_libname"
25657   with_lib_basename=$withval
25658 else
25659   with_lib_basename=form
25660 fi;
25661 FORM_NAME="$with_lib_basename"
25662
25663 case "x$FORM_NAME" in
25664 (x|xno|xnone|xyes)
25665         FORM_NAME=form
25666         ;;
25667 (*)
25668         ;;
25669 esac
25670
25671 echo "$as_me:25671: result: $FORM_NAME" >&5
25672 echo "${ECHO_T}$FORM_NAME" >&6
25673
25674 echo "$as_me:25674: checking for desired basename for menu library" >&5
25675 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
25676
25677 # Check whether --with-menu-libname or --without-menu-libname was given.
25678 if test "${with_menu_libname+set}" = set; then
25679   withval="$with_menu_libname"
25680   with_lib_basename=$withval
25681 else
25682   with_lib_basename=menu
25683 fi;
25684 MENU_NAME="$with_lib_basename"
25685
25686 case "x$MENU_NAME" in
25687 (x|xno|xnone|xyes)
25688         MENU_NAME=menu
25689         ;;
25690 (*)
25691         ;;
25692 esac
25693
25694 echo "$as_me:25694: result: $MENU_NAME" >&5
25695 echo "${ECHO_T}$MENU_NAME" >&6
25696
25697 echo "$as_me:25697: checking for desired basename for panel library" >&5
25698 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
25699
25700 # Check whether --with-panel-libname or --without-panel-libname was given.
25701 if test "${with_panel_libname+set}" = set; then
25702   withval="$with_panel_libname"
25703   with_lib_basename=$withval
25704 else
25705   with_lib_basename=panel
25706 fi;
25707 PANEL_NAME="$with_lib_basename"
25708
25709 case "x$PANEL_NAME" in
25710 (x|xno|xnone|xyes)
25711         PANEL_NAME=panel
25712         ;;
25713 (*)
25714         ;;
25715 esac
25716
25717 echo "$as_me:25717: result: $PANEL_NAME" >&5
25718 echo "${ECHO_T}$PANEL_NAME" >&6
25719
25720 echo "$as_me:25720: checking for desired basename for cxx library" >&5
25721 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
25722
25723 # Check whether --with-cxx-libname or --without-cxx-libname was given.
25724 if test "${with_cxx_libname+set}" = set; then
25725   withval="$with_cxx_libname"
25726   with_lib_basename=$withval
25727 else
25728   with_lib_basename=ncurses++
25729 fi;
25730 CXX_NAME="$with_lib_basename"
25731
25732 case "x$CXX_NAME" in
25733 (x|xno|xnone|xyes)
25734         CXX_NAME=ncurses++
25735         ;;
25736 (*)
25737         ;;
25738 esac
25739
25740 echo "$as_me:25740: result: $CXX_NAME" >&5
25741 echo "${ECHO_T}$CXX_NAME" >&6
25742
25743 ### Construct the list of subdirectories for which we'll customize makefiles
25744 ### with the appropriate compile-rules.
25745
25746 echo "$as_me:25746: checking for src modules" >&5
25747 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25748
25749 # dependencies and linker-arguments for test-programs
25750 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25751 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25752 if test "$DFT_LWR_MODEL" = "libtool"; then
25753         TEST_ARGS="${TEST_DEPS}"
25754         TEST_ARG2="${TEST_DEP2}"
25755 else
25756         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25757         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25758 fi
25759
25760 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25761 cf_cv_src_modules=
25762 for cf_dir in $modules_to_build
25763 do
25764         if test -f $srcdir/$cf_dir/modules; then
25765
25766                 # We may/may not have tack in the distribution, though the
25767                 # makefile is.
25768                 if test $cf_dir = tack ; then
25769                         if test "x$cf_with_tack" != "xyes"; then
25770                                 continue
25771                         fi
25772                 fi
25773
25774                 if test -z "$cf_cv_src_modules"; then
25775                         cf_cv_src_modules=$cf_dir
25776                 else
25777                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25778                 fi
25779
25780                 # Make the ncurses_cfg.h file record the library interface files as
25781                 # well.  These are header files that are the same name as their
25782                 # directory.  Ncurses is the only library that does not follow
25783                 # that pattern.
25784                 if test $cf_dir = tack ; then
25785                         continue
25786                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25787
25788 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25789
25790                         cat >>confdefs.h <<EOF
25791 #define HAVE_${cf_have_include}_H 1
25792 EOF
25793
25794                         cat >>confdefs.h <<EOF
25795 #define HAVE_LIB${cf_have_include} 1
25796 EOF
25797
25798 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25799
25800 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
25801
25802                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
25803                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
25804                         if test "$DFT_LWR_MODEL" = "libtool"; then
25805                                 TEST_ARGS="${TEST_DEPS}"
25806                                 TEST_ARG2="${TEST_DEP2}"
25807                         else
25808                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
25809                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
25810                         fi
25811                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25812                 fi
25813         fi
25814 done
25815 echo "$as_me:25815: result: $cf_cv_src_modules" >&5
25816 echo "${ECHO_T}$cf_cv_src_modules" >&6
25817
25818 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25819 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25820
25821 SRC_SUBDIRS=
25822 if test "x$cf_with_manpages" != xno ; then
25823         SRC_SUBDIRS="$SRC_SUBDIRS man"
25824 fi
25825 SRC_SUBDIRS="$SRC_SUBDIRS include"
25826 for cf_dir in $cf_cv_src_modules
25827 do
25828         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25829 done
25830 if test "x$cf_with_tests" != "xno" ; then
25831         SRC_SUBDIRS="$SRC_SUBDIRS test"
25832 fi
25833 # always make this, to install the ncurses-config script
25834 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25835 if test "$cf_with_cxx_binding" != no; then
25836         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25837         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25838 fi
25839
25840 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25841 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25842
25843 ADA_SUBDIRS=
25844 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25845         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25846         ADA_SUBDIRS="gen src"
25847         if test "x$cf_with_tests" != "xno" ; then
25848                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25849         fi
25850 fi
25851
25852 SUB_MAKEFILES=
25853 for cf_dir in $SRC_SUBDIRS
25854 do
25855         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25856 done
25857
25858 if test -n "$ADA_SUBDIRS"; then
25859         for cf_dir in $ADA_SUBDIRS
25860         do
25861                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25862         done
25863
25864 fi
25865
25866 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25867    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25868    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25869    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25870 fi
25871
25872 DIRS_TO_MAKE="lib"
25873 for cf_item in $cf_list_models
25874 do
25875
25876         case $cf_item in
25877         (libtool) cf_subdir='obj_lo'  ;;
25878         (normal)  cf_subdir='objects' ;;
25879         (debug)   cf_subdir='obj_g' ;;
25880         (profile) cf_subdir='obj_p' ;;
25881         (shared)
25882                 case $cf_cv_system_name in
25883                 (cygwin|msys)
25884                         cf_subdir='objects' ;;
25885                 (*)
25886                         cf_subdir='obj_s' ;;
25887                 esac
25888         esac
25889
25890         for cf_item2 in $DIRS_TO_MAKE
25891         do
25892                 test $cf_item2 = $cf_subdir && break
25893         done
25894         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25895 done
25896 for cf_dir in $DIRS_TO_MAKE
25897 do
25898         test ! -d $cf_dir && mkdir $cf_dir
25899 done
25900
25901 # symbols that differ when compiling Ada95 by itself.
25902 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25903
25904 # values to use as strings
25905
25906 cat >>confdefs.h <<EOF
25907 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25908 EOF
25909
25910 cat >>confdefs.h <<EOF
25911 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25912 EOF
25913
25914 ### Now that we're done running tests, add the compiler-warnings, if any
25915
25916 cf_fix_cppflags=no
25917 cf_new_cflags=
25918 cf_new_cppflags=
25919 cf_new_extra_cppflags=
25920
25921 for cf_add_cflags in $EXTRA_CFLAGS
25922 do
25923 case $cf_fix_cppflags in
25924 (no)
25925         case $cf_add_cflags in
25926         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25927                 case $cf_add_cflags in
25928                 (-D*)
25929                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25930
25931                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25932                                 && test -z "${cf_tst_cflags}" \
25933                                 && cf_fix_cppflags=yes
25934
25935                         if test $cf_fix_cppflags = yes ; then
25936
25937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25939
25940                                 continue
25941                         elif test "${cf_tst_cflags}" = "\"'" ; then
25942
25943         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25944         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25945
25946                                 continue
25947                         fi
25948                         ;;
25949                 esac
25950                 case "$CPPFLAGS" in
25951                 (*$cf_add_cflags)
25952                         ;;
25953                 (*)
25954                         case $cf_add_cflags in
25955                         (-D*)
25956                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25957
25958 CPPFLAGS=`echo "$CPPFLAGS" | \
25959         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25960                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25961
25962                                 ;;
25963                         esac
25964
25965         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25966         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25967
25968                         ;;
25969                 esac
25970                 ;;
25971         (*)
25972
25973         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25974         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25975
25976                 ;;
25977         esac
25978         ;;
25979 (yes)
25980
25981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25983
25984         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25985
25986         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25987                 && test -z "${cf_tst_cflags}" \
25988                 && cf_fix_cppflags=no
25989         ;;
25990 esac
25991 done
25992
25993 if test -n "$cf_new_cflags" ; then
25994
25995         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25996         CFLAGS="${CFLAGS}$cf_new_cflags"
25997
25998 fi
25999
26000 if test -n "$cf_new_cppflags" ; then
26001
26002         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26003         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26004
26005 fi
26006
26007 if test -n "$cf_new_extra_cppflags" ; then
26008
26009         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26010         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26011
26012 fi
26013
26014 ### Define substitutions for header files to avoid name-pollution
26015
26016 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26017         HAVE_TCGETATTR=1
26018 else
26019         HAVE_TCGETATTR=0
26020 fi
26021
26022 if test "x$ac_cv_header_stdint_h" = xyes ; then
26023         HAVE_STDINT_H=1
26024 else
26025         HAVE_STDINT_H=0
26026 fi
26027
26028 if test "x$ac_cv_header_termio_h" = xyes ; then
26029         HAVE_TERMIO_H=1
26030 else
26031         HAVE_TERMIO_H=0
26032 fi
26033
26034 if test "x$ac_cv_header_termios_h" = xyes ; then
26035         HAVE_TERMIOS_H=1
26036 else
26037         HAVE_TERMIOS_H=0
26038 fi
26039
26040 ################################################################################
26041 test "x$use_database" = xyes && \
26042 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26043
26044 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26045 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26046
26047 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26048 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26049 fi
26050
26051 if test "x$cf_with_tests" != xno ; then
26052         MAKE_TESTS=
26053 else
26054         MAKE_TESTS="#"
26055 fi
26056
26057 ADAHTML_DIR=../../doc/html/ada
26058
26059 # workaround for OS/2 (20151017)
26060 case $cf_cv_system_name in
26061 (os2*)
26062         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26063         ;;
26064 (*)
26065         LIBTOOL_OPTS_CXX=
26066         ;;
26067 esac
26068
26069 # workaround for g++ versus Solaris (20131116)
26070 case $cf_cv_system_name in
26071 (solaris2*)
26072         case "x$CPPFLAGS" in
26073         (*-D_XOPEN_SOURCE_EXTENDED*)
26074                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26075
26076 echo "${as_me:-configure}:26076: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26077
26078                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26079                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26080                 ;;
26081         esac
26082         ;;
26083 esac
26084
26085 # Help to automatically enable the extended curses features when using either
26086 # the *-config or the ".pc" files by adding defines.
26087 echo "$as_me:26087: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26088 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26089 PKG_CFLAGS=
26090 for cf_loop1 in $CPPFLAGS_after_XOPEN
26091 do
26092         cf_found=no
26093         for cf_loop2 in $CPPFLAGS_before_XOPEN
26094         do
26095                 if test "x$cf_loop1" = "x$cf_loop2"
26096                 then
26097                         cf_found=yes
26098                         break
26099                 fi
26100         done
26101         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26102 done
26103 echo "$as_me:26103: result: $PKG_CFLAGS" >&5
26104 echo "${ECHO_T}$PKG_CFLAGS" >&6
26105
26106 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26107 case "x$NCURSES_OSPEED" in
26108 (*short*)
26109         cf_compatible=1
26110         ;;
26111 (*)
26112         cf_compatible=0
26113         ;;
26114 esac
26115
26116 cat >>confdefs.h <<EOF
26117 #define NCURSES_OSPEED_COMPAT $cf_compatible
26118 EOF
26119
26120 case "x$cf_cv_typeof_chtype" in
26121 (xshort|xint|xlong)
26122         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26123         ;;
26124 esac
26125
26126 case "x$cf_cv_typeof_mmask_t" in
26127 (xshort|xint|xlong)
26128         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26129         ;;
26130 esac
26131
26132 # substitute into misc/Makefile to suppress
26133 # (un)install.data from the
26134 # (un)install rules.
26135 if test "x$cf_with_db_install" = "xno"; then
26136         MISC_INSTALL_DATA=
26137         MISC_UNINSTALL_DATA=
26138 else
26139         MISC_INSTALL_DATA=install.data
26140         MISC_UNINSTALL_DATA=uninstall.data
26141 fi
26142
26143 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26144         MAKE_DATABASE="#"
26145 else
26146         MAKE_DATABASE="$MAKE_TERMINFO"
26147 fi
26148
26149 if test -n "$PACKAGE"
26150 then
26151         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26152         export PACKAGE
26153         echo "package: $PACKAGE"
26154 fi
26155
26156 UNALTERED_SYMS=
26157 cf_filter_syms=no
26158
26159 if test -n "$RESULTING_SYMS"
26160 then
26161         cf_filter_syms=$cf_dft_filter_syms
26162         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26163
26164 echo "${as_me:-configure}:26164: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26165
26166 fi
26167
26168 if test "x$WILDCARD_SYMS" = xno
26169 then
26170         cf_filter_syms=yes
26171 fi
26172
26173 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26174
26175 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26176 if test $cf_filter_syms = yes
26177 then
26178         RESULTING_SYMS=resulting.map
26179 fi
26180
26181 if test "x$cross_compiling" = xyes ; then
26182         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26183         CHECK_BUILD="#"
26184 else
26185         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26186         CHECK_BUILD=
26187 fi
26188
26189 # This is used for the *-config script and *.pc data files.
26190
26191 echo "$as_me:26191: checking for linker search path" >&5
26192 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26193 if test "${cf_cv_ld_searchpath+set}" = set; then
26194   echo $ECHO_N "(cached) $ECHO_C" >&6
26195 else
26196
26197 if test "$cross_compiling" != yes ; then
26198
26199 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26200 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26201
26202 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26203 # update the cache, which makes it run faster.
26204 test -z "$cf_pathlist" && \
26205         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26206
26207 test -z "$cf_pathlist" &&
26208         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26209
26210 # This works with OpenBSD 6.5, which lists only filenames
26211 test -z "$cf_pathlist" &&
26212         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26213
26214 if test -z "$cf_pathlist"
26215 then
26216         # dyld default path with MacOS
26217         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26218         then
26219                 # do this to bypass check
26220                 cf_cv_ld_searchpath='$HOME/lib'
26221                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26222         fi
26223 fi
26224
26225 if test -z "$cf_pathlist"
26226 then
26227         # Solaris is hardcoded
26228         if test -d /opt/SUNWspro/lib
26229         then
26230                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26231         elif test -d /usr/ccs/lib
26232         then
26233                 cf_pathlist="/usr/ccs/lib /usr/lib"
26234         fi
26235 fi
26236
26237 fi
26238
26239 # If nothing else, assume it is conventional
26240 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26241
26242 # Finally, check that this is only directories
26243 for cf_path in $0 $cf_pathlist
26244 do
26245         if test -d "$cf_path"; then
26246                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26247                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26248         fi
26249 done
26250
26251 # Ensure that it is nonempty
26252 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26253
26254 fi
26255 echo "$as_me:26255: result: $cf_cv_ld_searchpath" >&5
26256 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26257
26258 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26259
26260 cat >>confdefs.h <<\EOF
26261 #define HAVE_CURSES_DATA_BOOLNAMES 1
26262 EOF
26263
26264 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"
26265 ac_config_commands="$ac_config_commands default"
26266 cat >confcache <<\_ACEOF
26267 # This file is a shell script that caches the results of configure
26268 # tests run on this system so they can be shared between configure
26269 # scripts and configure runs, see configure's option --config-cache.
26270 # It is not useful on other systems.  If it contains results you don't
26271 # want to keep, you may remove or edit it.
26272 #
26273 # config.status only pays attention to the cache file if you give it
26274 # the --recheck option to rerun configure.
26275 #
26276 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26277 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26278 # following values.
26279
26280 _ACEOF
26281
26282 # The following way of writing the cache mishandles newlines in values,
26283 # but we know of no workaround that is simple, portable, and efficient.
26284 # So, don't put newlines in cache variables' values.
26285 # Ultrix sh set writes to stderr and can't be redirected directly,
26286 # and sets the high bit in the cache file unless we assign to the vars.
26287 {
26288   (set) 2>&1 |
26289     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26290     *ac_space=\ *)
26291       # `set' does not quote correctly, so add quotes (double-quote
26292       # substitution turns \\\\ into \\, and sed turns \\ into \).
26293       sed -n \
26294         "s/'/'\\\\''/g;
26295           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26296       ;;
26297     *)
26298       # `set' quotes correctly as required by POSIX, so do not add quotes.
26299       sed -n \
26300         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26301       ;;
26302     esac;
26303 } |
26304   sed '
26305      t clear
26306      : clear
26307      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26308      t end
26309      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26310      : end' >>confcache
26311 if cmp -s $cache_file confcache; then :; else
26312   if test -w $cache_file; then
26313     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26314     cat confcache >$cache_file
26315   else
26316     echo "not updating unwritable cache $cache_file"
26317   fi
26318 fi
26319 rm -f confcache
26320
26321 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26322 # Let make expand exec_prefix.
26323 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26324
26325 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26326 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26327 # trailing colons and then remove the whole line if VPATH becomes empty
26328 # (actually we leave an empty line to preserve line numbers).
26329 if test "x$srcdir" = x.; then
26330   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26331 s/:*\$(srcdir):*/:/;
26332 s/:*\${srcdir}:*/:/;
26333 s/:*@srcdir@:*/:/;
26334 s/^\([^=]*=[    ]*\):*/\1/;
26335 s/:*$//;
26336 s/^[^=]*=[      ]*$//;
26337 }'
26338 fi
26339
26340 DEFS=-DHAVE_CONFIG_H
26341
26342 : ${CONFIG_STATUS=./config.status}
26343 ac_clean_files_save=$ac_clean_files
26344 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26345 { echo "$as_me:26345: creating $CONFIG_STATUS" >&5
26346 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26347 cat >$CONFIG_STATUS <<_ACEOF
26348 #! $SHELL
26349 # Generated automatically by configure.
26350 # Run this file to recreate the current configuration.
26351 # Compiler output produced by configure, useful for debugging
26352 # configure, is in config.log if it exists.
26353
26354 debug=false
26355 SHELL=\${CONFIG_SHELL-$SHELL}
26356 ac_cs_invocation="\$0 \$@"
26357
26358 _ACEOF
26359
26360 cat >>$CONFIG_STATUS <<\_ACEOF
26361 # Be Bourne compatible
26362 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26363   emulate sh
26364   NULLCMD=:
26365 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26366   set -o posix
26367 fi
26368
26369 # Name of the executable.
26370 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26371
26372 if expr a : '\(a\)' >/dev/null 2>&1; then
26373   as_expr=expr
26374 else
26375   as_expr=false
26376 fi
26377
26378 rm -f conf$$ conf$$.exe conf$$.file
26379 echo >conf$$.file
26380 if ln -s conf$$.file conf$$ 2>/dev/null; then
26381   # We could just check for DJGPP; but this test a) works b) is more generic
26382   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26383   if test -f conf$$.exe; then
26384     # Don't use ln at all; we don't have any links
26385     as_ln_s='cp -p'
26386   else
26387     as_ln_s='ln -s'
26388   fi
26389 elif ln conf$$.file conf$$ 2>/dev/null; then
26390   as_ln_s=ln
26391 else
26392   as_ln_s='cp -p'
26393 fi
26394 rm -f conf$$ conf$$.exe conf$$.file
26395
26396 as_executable_p="test -f"
26397
26398 # Support unset when possible.
26399 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26400   as_unset=unset
26401 else
26402   as_unset=false
26403 fi
26404
26405 # NLS nuisances.
26406 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26407 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26408 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26409 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26410 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26411 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26412 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26413 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26414
26415 # IFS
26416 # We need space, tab and new line, in precisely that order.
26417 as_nl='
26418 '
26419 IFS="   $as_nl"
26420
26421 # CDPATH.
26422 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26423
26424 exec 6>&1
26425
26426 _ACEOF
26427
26428 # Files that config.status was made for.
26429 if test -n "$ac_config_files"; then
26430   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26431 fi
26432
26433 if test -n "$ac_config_headers"; then
26434   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26435 fi
26436
26437 if test -n "$ac_config_links"; then
26438   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26439 fi
26440
26441 if test -n "$ac_config_commands"; then
26442   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26443 fi
26444
26445 cat >>$CONFIG_STATUS <<\EOF
26446
26447 ac_cs_usage="\
26448 \`$as_me' instantiates files from templates according to the
26449 current configuration.
26450
26451 Usage: $0 [OPTIONS] [FILE]...
26452
26453   -h, --help       print this help, then exit
26454   -V, --version    print version number, then exit
26455   -d, --debug      don't remove temporary files
26456       --recheck    update $as_me by reconfiguring in the same conditions
26457   --file=FILE[:TEMPLATE]
26458                    instantiate the configuration file FILE
26459   --header=FILE[:TEMPLATE]
26460                    instantiate the configuration header FILE
26461
26462 Configuration files:
26463 $config_files
26464
26465 Configuration headers:
26466 $config_headers
26467
26468 Configuration commands:
26469 $config_commands
26470
26471 Report bugs to <dickey@invisible-island.net>."
26472 EOF
26473
26474 cat >>$CONFIG_STATUS <<EOF
26475 ac_cs_version="\\
26476 config.status
26477 configured by $0, generated by GNU Autoconf 2.52.20200111,
26478   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26479
26480 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26481 Free Software Foundation, Inc.
26482 This config.status script is free software; the Free Software Foundation
26483 gives unlimited permission to copy, distribute and modify it."
26484 srcdir=$srcdir
26485 INSTALL="$INSTALL"
26486 EOF
26487
26488 cat >>$CONFIG_STATUS <<\EOF
26489 # If no file are specified by the user, then we need to provide default
26490 # value.  By we need to know if files were specified by the user.
26491 ac_need_defaults=:
26492 while test $# != 0
26493 do
26494   case $1 in
26495   --*=*)
26496     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26497     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26498     shift
26499     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26500     shift
26501     ;;
26502   -*);;
26503   *) # This is not an option, so the user has probably given explicit
26504      # arguments.
26505      ac_need_defaults=false;;
26506   esac
26507
26508   case $1 in
26509   # Handling of the options.
26510 EOF
26511 cat >>$CONFIG_STATUS <<EOF
26512   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26513     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26514     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26515 EOF
26516 cat >>$CONFIG_STATUS <<\EOF
26517   --version | --vers* | -V )
26518     echo "$ac_cs_version"; exit 0 ;;
26519   --he | --h)
26520     # Conflict between --help and --header
26521     { { echo "$as_me:26521: error: ambiguous option: $1
26522 Try \`$0 --help' for more information." >&5
26523 echo "$as_me: error: ambiguous option: $1
26524 Try \`$0 --help' for more information." >&2;}
26525    { (exit 1); exit 1; }; };;
26526   --help | --hel | -h )
26527     echo "$ac_cs_usage"; exit 0 ;;
26528   --debug | --d* | -d )
26529     debug=: ;;
26530   --file | --fil | --fi | --f )
26531     shift
26532     CONFIG_FILES="$CONFIG_FILES $1"
26533     ac_need_defaults=false;;
26534   --header | --heade | --head | --hea )
26535     shift
26536     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26537     ac_need_defaults=false;;
26538
26539   # This is an error.
26540   -*) { { echo "$as_me:26540: error: unrecognized option: $1
26541 Try \`$0 --help' for more information." >&5
26542 echo "$as_me: error: unrecognized option: $1
26543 Try \`$0 --help' for more information." >&2;}
26544    { (exit 1); exit 1; }; } ;;
26545
26546   *) ac_config_targets="$ac_config_targets $1" ;;
26547
26548   esac
26549   shift
26550 done
26551
26552 exec 5>>config.log
26553 cat >&5 << _ACEOF
26554
26555 ## ----------------------- ##
26556 ## Running config.status.  ##
26557 ## ----------------------- ##
26558
26559 This file was extended by $as_me 2.52.20200111, executed with
26560   CONFIG_FILES    = $CONFIG_FILES
26561   CONFIG_HEADERS  = $CONFIG_HEADERS
26562   CONFIG_LINKS    = $CONFIG_LINKS
26563   CONFIG_COMMANDS = $CONFIG_COMMANDS
26564   > $ac_cs_invocation
26565 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26566
26567 _ACEOF
26568 EOF
26569
26570 cat >>$CONFIG_STATUS <<EOF
26571 #
26572 # INIT-COMMANDS section.
26573 #
26574
26575 ### Special initialization commands, used to pass information from the
26576 ### configuration-run into config.status
26577
26578 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26579 AWK="$AWK"
26580 CXX_NAME="$CXX_NAME"
26581 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26582 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26583 ECHO_LD="$ECHO_LD"
26584 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26585 FORM_NAME="$FORM_NAME"
26586 LDCONFIG="$LDCONFIG"
26587 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26588 LIB_NAME="$LIB_NAME"
26589 LIB_PREFIX="$LIB_PREFIX"
26590 LIB_SUBSETS="$LIB_SUBSETS"
26591 LIB_SUFFIX="$LIB_SUFFIX"
26592 LIB_TRACING="$LIB_TRACING"
26593 LN_S="$LN_S"
26594 MAKE_TERMINFO="$MAKE_TERMINFO"
26595 MENU_NAME="$MENU_NAME"
26596 NCURSES_MAJOR="$NCURSES_MAJOR"
26597 NCURSES_MINOR="$NCURSES_MINOR"
26598 NCURSES_OSPEED="$NCURSES_OSPEED"
26599 NCURSES_PATCH="$NCURSES_PATCH"
26600 PANEL_NAME="$PANEL_NAME"
26601 SRC_SUBDIRS="$SRC_SUBDIRS"
26602 TERMINFO="$TERMINFO"
26603 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26604 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26605 TICS_NAME="$TICS_NAME"
26606 TICS_SUFFIX="$TICS_SUFFIX"
26607 TIC_PATH="$TIC_PATH"
26608 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26609 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26610 TINFO_NAME="$TINFO_NAME"
26611 TINFO_SUFFIX="$TINFO_SUFFIX"
26612 UNALTERED_SYMS="$UNALTERED_SYMS"
26613 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26614 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26615 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26616 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26617 WILDCARD_SYMS="$WILDCARD_SYMS"
26618 WITH_CURSES_H="$with_curses_h"
26619 WITH_ECHO="${enable_echo:=yes}"
26620 WITH_OVERWRITE="$with_overwrite"
26621 cf_LIST_MODELS="$cf_list_models"
26622 cf_cv_abi_version="$cf_cv_abi_version"
26623 cf_cv_do_relink="$cf_cv_do_relink"
26624 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26625 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26626 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26627 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26628 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26629 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26630 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26631 cf_cv_rel_version="$cf_cv_rel_version"
26632 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26633 cf_cv_shared_soname='$cf_cv_shared_soname'
26634 cf_cv_shlib_version="$cf_cv_shlib_version"
26635 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26636 cf_cv_system_name="$cf_cv_system_name"
26637 cf_cv_term_driver="$with_term_driver"
26638 cf_with_ada="$cf_with_ada"
26639 cf_with_cxx_binding="$cf_with_cxx_binding"
26640 cf_with_db_install="$cf_with_db_install"
26641 cf_with_manpages="$cf_with_manpages"
26642 cf_with_tests="$cf_with_tests"
26643 host="$host"
26644 target="$target"
26645 with_shared_cxx="$with_shared_cxx"
26646
26647 EOF
26648
26649 cat >>$CONFIG_STATUS <<\EOF
26650 for ac_config_target in $ac_config_targets
26651 do
26652   case "$ac_config_target" in
26653   # Handling of arguments.
26654   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26655   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26656   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26657   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26658   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26659   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26660   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26661   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26662   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26663   *) { { echo "$as_me:26663: error: invalid argument: $ac_config_target" >&5
26664 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26665    { (exit 1); exit 1; }; };;
26666   esac
26667 done
26668
26669 # If the user did not use the arguments to specify the items to instantiate,
26670 # then the envvar interface is used.  Set only those that are not.
26671 # We use the long form for the default assignment because of an extremely
26672 # bizarre bug on SunOS 4.1.3.
26673 if $ac_need_defaults; then
26674   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26675   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26676   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26677 fi
26678
26679 # Create a temporary directory, and hook for its removal unless debugging.
26680 $debug ||
26681 {
26682   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26683   trap '{ (exit 1); exit 1; }' 1 2 13 15
26684 }
26685
26686 # Create a (secure) tmp directory for tmp files.
26687 : ${TMPDIR=/tmp}
26688 {
26689   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26690   test -n "$tmp" && test -d "$tmp"
26691 }  ||
26692 {
26693   tmp=$TMPDIR/cs$$-$RANDOM
26694   (umask 077 && mkdir $tmp)
26695 } ||
26696 {
26697    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26698    { (exit 1); exit 1; }
26699 }
26700
26701 EOF
26702
26703 cat >>$CONFIG_STATUS <<EOF
26704
26705 #
26706 # CONFIG_FILES section.
26707 #
26708
26709 # No need to generate the scripts if there are no CONFIG_FILES.
26710 # This happens for instance when ./config.status config.h
26711 if test -n "\$CONFIG_FILES"; then
26712   # Protect against being on the right side of a sed subst in config.status.
26713   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26714    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26715 s,@SHELL@,$SHELL,;t t
26716 s,@exec_prefix@,$exec_prefix,;t t
26717 s,@prefix@,$prefix,;t t
26718 s,@program_transform_name@,$program_transform_name,;t t
26719 s,@bindir@,$bindir,;t t
26720 s,@sbindir@,$sbindir,;t t
26721 s,@libexecdir@,$libexecdir,;t t
26722 s,@datarootdir@,$datarootdir,;t t
26723 s,@datadir@,$datadir,;t t
26724 s,@sysconfdir@,$sysconfdir,;t t
26725 s,@sharedstatedir@,$sharedstatedir,;t t
26726 s,@localstatedir@,$localstatedir,;t t
26727 s,@runstatedir@,$runstatedir,;t t
26728 s,@libdir@,$libdir,;t t
26729 s,@includedir@,$includedir,;t t
26730 s,@oldincludedir@,$oldincludedir,;t t
26731 s,@infodir@,$infodir,;t t
26732 s,@mandir@,$mandir,;t t
26733 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26734 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26735 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26736 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26737 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26738 s,@build_alias@,$build_alias,;t t
26739 s,@host_alias@,$host_alias,;t t
26740 s,@target_alias@,$target_alias,;t t
26741 s,@ECHO_C@,$ECHO_C,;t t
26742 s,@ECHO_N@,$ECHO_N,;t t
26743 s,@ECHO_T@,$ECHO_T,;t t
26744 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26745 s,@DEFS@,$DEFS,;t t
26746 s,@LIBS@,$LIBS,;t t
26747 s,@top_builddir@,$top_builddir,;t t
26748 s,@EGREP@,$EGREP,;t t
26749 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26750 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26751 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26752 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26753 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26754 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26755 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26756 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26757 s,@VERSION@,$VERSION,;t t
26758 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26759 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26760 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26761 s,@PACKAGE@,$PACKAGE,;t t
26762 s,@build@,$build,;t t
26763 s,@build_cpu@,$build_cpu,;t t
26764 s,@build_vendor@,$build_vendor,;t t
26765 s,@build_os@,$build_os,;t t
26766 s,@host@,$host,;t t
26767 s,@host_cpu@,$host_cpu,;t t
26768 s,@host_vendor@,$host_vendor,;t t
26769 s,@host_os@,$host_os,;t t
26770 s,@target@,$target,;t t
26771 s,@target_cpu@,$target_cpu,;t t
26772 s,@target_vendor@,$target_vendor,;t t
26773 s,@target_os@,$target_os,;t t
26774 s,@CC@,$CC,;t t
26775 s,@CFLAGS@,$CFLAGS,;t t
26776 s,@LDFLAGS@,$LDFLAGS,;t t
26777 s,@CPPFLAGS@,$CPPFLAGS,;t t
26778 s,@ac_ct_CC@,$ac_ct_CC,;t t
26779 s,@EXEEXT@,$EXEEXT,;t t
26780 s,@OBJEXT@,$OBJEXT,;t t
26781 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26782 s,@CPP@,$CPP,;t t
26783 s,@LDCONFIG@,$LDCONFIG,;t t
26784 s,@CXX@,$CXX,;t t
26785 s,@CXXFLAGS@,$CXXFLAGS,;t t
26786 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26787 s,@AWK@,$AWK,;t t
26788 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26789 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26790 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26791 s,@LINT@,$LINT,;t t
26792 s,@LINT_OPTS@,$LINT_OPTS,;t t
26793 s,@LN_S@,$LN_S,;t t
26794 s,@cf_config_suffix@,$cf_config_suffix,;t t
26795 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26796 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26797 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26798 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26799 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26800 s,@SET_MAKE@,$SET_MAKE,;t t
26801 s,@CTAGS@,$CTAGS,;t t
26802 s,@ETAGS@,$ETAGS,;t t
26803 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26804 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26805 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26806 s,@RANLIB@,$RANLIB,;t t
26807 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26808 s,@LD@,$LD,;t t
26809 s,@ac_ct_LD@,$ac_ct_LD,;t t
26810 s,@AR@,$AR,;t t
26811 s,@ac_ct_AR@,$ac_ct_AR,;t t
26812 s,@NM@,$NM,;t t
26813 s,@ac_ct_NM@,$ac_ct_NM,;t t
26814 s,@ARFLAGS@,$ARFLAGS,;t t
26815 s,@DESTDIR@,$DESTDIR,;t t
26816 s,@BUILD_CC@,$BUILD_CC,;t t
26817 s,@BUILD_CPP@,$BUILD_CPP,;t t
26818 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26819 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26820 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26821 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26822 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26823 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26824 s,@cf_list_models@,$cf_list_models,;t t
26825 s,@ABI_VERSION@,$ABI_VERSION,;t t
26826 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26827 s,@LIBTOOL@,$LIBTOOL,;t t
26828 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26829 s,@LT_UNDEF@,$LT_UNDEF,;t t
26830 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26831 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26832 s,@LIB_CREATE@,$LIB_CREATE,;t t
26833 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26834 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26835 s,@LIB_PREP@,$LIB_PREP,;t t
26836 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26837 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26838 s,@LIB_LINK@,$LIB_LINK,;t t
26839 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26840 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26841 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26842 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26843 s,@TICS_NAME@,$TICS_NAME,;t t
26844 s,@TINFO_NAME@,$TINFO_NAME,;t t
26845 s,@LIB_NAME@,$LIB_NAME,;t t
26846 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26847 s,@CC_G_OPT@,$CC_G_OPT,;t t
26848 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26849 s,@LD_MODEL@,$LD_MODEL,;t t
26850 s,@shlibdir@,$shlibdir,;t t
26851 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26852 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26853 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26854 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26855 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26856 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26857 s,@LINK_PROGS@,$LINK_PROGS,;t t
26858 s,@LINK_TESTS@,$LINK_TESTS,;t t
26859 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26860 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26861 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26862 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26863 s,@RPATH_LIST@,$RPATH_LIST,;t t
26864 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26865 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26866 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26867 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26868 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26869 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26870 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26871 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26872 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26873 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26874 s,@TIC@,$TIC,;t t
26875 s,@INFOCMP@,$INFOCMP,;t t
26876 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26877 s,@XTERM_KBS@,$XTERM_KBS,;t t
26878 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26879 s,@TERMINFO@,$TERMINFO,;t t
26880 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26881 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26882 s,@TERMPATH@,$TERMPATH,;t t
26883 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26884 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26885 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26886 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26887 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26888 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26889 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26890 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26891 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26892 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26893 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26894 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26895 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26896 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26897 s,@RGB_PATH@,$RGB_PATH,;t t
26898 s,@no_x11_rgb@,$no_x11_rgb,;t t
26899 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26900 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26901 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26902 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26903 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26904 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26905 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26906 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26907 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26908 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26909 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26910 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26911 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26912 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26913 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26914 s,@PTHREAD@,$PTHREAD,;t t
26915 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26916 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26917 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26918 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26919 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26920 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26921 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26922 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26923 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26924 s,@ECHO_LT@,$ECHO_LT,;t t
26925 s,@ECHO_LD@,$ECHO_LD,;t t
26926 s,@RULE_CC@,$RULE_CC,;t t
26927 s,@SHOW_CC@,$SHOW_CC,;t t
26928 s,@ECHO_CC@,$ECHO_CC,;t t
26929 s,@ECHO_LINK@,$ECHO_LINK,;t t
26930 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26931 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26932 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26933 s,@ADAFLAGS@,$ADAFLAGS,;t t
26934 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26935 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26936 s,@ADA_TRACE@,$ADA_TRACE,;t t
26937 s,@MATH_LIB@,$MATH_LIB,;t t
26938 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26939 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26940 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26941 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26942 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26943 s,@TEST_LIBS@,$TEST_LIBS,;t t
26944 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26945 s,@CXXCPP@,$CXXCPP,;t t
26946 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26947 s,@CXX_AR@,$CXX_AR,;t t
26948 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26949 s,@CXXLIBS@,$CXXLIBS,;t t
26950 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26951 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26952 s,@M4_exists@,$M4_exists,;t t
26953 s,@cf_ada_make@,$cf_ada_make,;t t
26954 s,@cf_ada_config@,$cf_ada_config,;t t
26955 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26956 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26957 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26958 s,@cf_compile_generics@,$cf_compile_generics,;t t
26959 s,@cf_generic_objects@,$cf_generic_objects,;t t
26960 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26961 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26962 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26963 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26964 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26965 s,@cf_ada_package@,$cf_ada_package,;t t
26966 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26967 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26968 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26969 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26970 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26971 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26972 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26973 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26974 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26975 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26976 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26977 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26978 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26979 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26980 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26981 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26982 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26983 s,@TICS_LIBS@,$TICS_LIBS,;t t
26984 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26985 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26986 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26987 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26988 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26989 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26990 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26991 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26992 s,@includesubdir@,$includesubdir,;t t
26993 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26994 s,@TICS_LIST@,$TICS_LIST,;t t
26995 s,@TINFO_LIST@,$TINFO_LIST,;t t
26996 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26997 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26998 s,@FORM_NAME@,$FORM_NAME,;t t
26999 s,@MENU_NAME@,$MENU_NAME,;t t
27000 s,@PANEL_NAME@,$PANEL_NAME,;t t
27001 s,@CXX_NAME@,$CXX_NAME,;t t
27002 s,@TEST_ARGS@,$TEST_ARGS,;t t
27003 s,@TEST_DEPS@,$TEST_DEPS,;t t
27004 s,@TEST_ARG2@,$TEST_ARG2,;t t
27005 s,@TEST_DEP2@,$TEST_DEP2,;t t
27006 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27007 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27008 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27009 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27010 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27011 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27012 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27013 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27014 s,@cross_compiling@,$cross_compiling,;t t
27015 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27016 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27017 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27018 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27019 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27020 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27021 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27022 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27023 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27024 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27025 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27026 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27027 CEOF
27028
27029 EOF
27030
27031   cat >>$CONFIG_STATUS <<\EOF
27032   # Split the substitutions into bite-sized pieces for seds with
27033   # small command number limits, like on Digital OSF/1 and HP-UX.
27034   ac_max_sed_lines=48
27035   ac_sed_frag=1 # Number of current file.
27036   ac_beg=1 # First line for current file.
27037   ac_end=$ac_max_sed_lines # Line after last line for current file.
27038   ac_more_lines=:
27039   ac_sed_cmds=
27040   while $ac_more_lines; do
27041     if test $ac_beg -gt 1; then
27042       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27043     else
27044       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27045     fi
27046     if test ! -s $tmp/subs.frag; then
27047       ac_more_lines=false
27048     else
27049       # The purpose of the label and of the branching condition is to
27050       # speed up the sed processing (if there are no `@' at all, there
27051       # is no need to browse any of the substitutions).
27052       # These are the two extra sed commands mentioned above.
27053       (echo ':t
27054   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27055       # It is possible to make a multiline substitution using escaped newlines.
27056       # Ensure that we do not split the substitution between script fragments.
27057       ac_BEG=$ac_end
27058       ac_END=`expr $ac_end + $ac_max_sed_lines`
27059       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27060       if test -s $tmp/subs.next; then
27061         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27062         if test ! -s $tmp/subs.edit; then
27063           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27064           if test ! -s $tmp/subs.edit; then
27065             if test $ac_beg -gt 1; then
27066               ac_end=`expr $ac_end - 1`
27067               continue
27068             fi
27069           fi
27070         fi
27071       fi
27072
27073       if test -z "$ac_sed_cmds"; then
27074         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27075       else
27076         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27077       fi
27078       ac_sed_frag=`expr $ac_sed_frag + 1`
27079       ac_beg=$ac_end
27080       ac_end=`expr $ac_end + $ac_max_sed_lines`
27081     fi
27082   done
27083   if test -z "$ac_sed_cmds"; then
27084     ac_sed_cmds=cat
27085   fi
27086 fi # test -n "$CONFIG_FILES"
27087
27088 EOF
27089 cat >>$CONFIG_STATUS <<\EOF
27090 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27091   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27092   case $ac_file in
27093   - | *:- | *:-:* ) # input from stdin
27094         cat >$tmp/stdin
27095         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27096         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27097   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27098         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27099   * )   ac_file_in=$ac_file.in ;;
27100   esac
27101
27102   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27103   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27104          X"$ac_file" : 'X\(//\)[^/]' \| \
27105          X"$ac_file" : 'X\(//\)$' \| \
27106          X"$ac_file" : 'X\(/\)' \| \
27107          .     : '\(.\)' 2>/dev/null ||
27108 echo X"$ac_file" |
27109     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27110           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27111           /^X\(\/\/\)$/{ s//\1/; q; }
27112           /^X\(\/\).*/{ s//\1/; q; }
27113           s/.*/./; q'`
27114   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27115     { case "$ac_dir" in
27116   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27117   *)                      as_incr_dir=.;;
27118 esac
27119 as_dummy="$ac_dir"
27120 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27121   case $as_mkdir_dir in
27122     # Skip DOS drivespec
27123     ?:) as_incr_dir=$as_mkdir_dir ;;
27124     *)
27125       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27126       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27127     ;;
27128   esac
27129 done; }
27130
27131     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27132     # A "../" for each directory in $ac_dir_suffix.
27133     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27134   else
27135     ac_dir_suffix= ac_dots=
27136   fi
27137
27138   case $srcdir in
27139   .)  ac_srcdir=.
27140       if test -z "$ac_dots"; then
27141          ac_top_srcdir=.
27142       else
27143          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27144       fi ;;
27145   [\\/]* | ?:[\\/]* )
27146       ac_srcdir=$srcdir$ac_dir_suffix;
27147       ac_top_srcdir=$srcdir ;;
27148   *) # Relative path.
27149     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27150     ac_top_srcdir=$ac_dots$srcdir ;;
27151   esac
27152
27153   case $INSTALL in
27154   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27155   *) ac_INSTALL=$ac_dots$INSTALL ;;
27156   esac
27157
27158   if test x"$ac_file" != x-; then
27159     { echo "$as_me:27159: creating $ac_file" >&5
27160 echo "$as_me: creating $ac_file" >&6;}
27161     rm -f "$ac_file"
27162   fi
27163   # Let's still pretend it is `configure' which instantiates (i.e., don't
27164   # use $as_me), people would be surprised to read:
27165   #    /* config.h.  Generated automatically by config.status.  */
27166   configure_input="Generated automatically from `echo $ac_file_in |
27167                                                  sed 's,.*/,,'` by configure."
27168
27169   # First look for the input files in the build tree, otherwise in the
27170   # src tree.
27171   ac_file_inputs=`IFS=:
27172     for f in $ac_file_in; do
27173       case $f in
27174       -) echo $tmp/stdin ;;
27175       [\\/$]*)
27176          # Absolute (can't be DOS-style, as IFS=:)
27177          test -f "$f" || { { echo "$as_me:27177: error: cannot find input file: $f" >&5
27178 echo "$as_me: error: cannot find input file: $f" >&2;}
27179    { (exit 1); exit 1; }; }
27180          echo $f;;
27181       *) # Relative
27182          if test -f "$f"; then
27183            # Build tree
27184            echo $f
27185          elif test -f "$srcdir/$f"; then
27186            # Source tree
27187            echo $srcdir/$f
27188          else
27189            # /dev/null tree
27190            { { echo "$as_me:27190: error: cannot find input file: $f" >&5
27191 echo "$as_me: error: cannot find input file: $f" >&2;}
27192    { (exit 1); exit 1; }; }
27193          fi;;
27194       esac
27195     done` || { (exit 1); exit 1; }
27196 EOF
27197 cat >>$CONFIG_STATUS <<\EOF
27198   ac_warn_datarootdir=no
27199   if test x"$ac_file" != x-; then
27200     for ac_item in $ac_file_inputs
27201     do
27202       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27203       if test -n "$ac_seen"; then
27204         ac_used=`grep '@datarootdir@' $ac_item`
27205         if test -z "$ac_used"; then
27206           { echo "$as_me:27206: WARNING: datarootdir was used implicitly but not set:
27207 $ac_seen" >&5
27208 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27209 $ac_seen" >&2;}
27210           ac_warn_datarootdir=yes
27211         fi
27212       fi
27213       ac_seen=`grep '${datarootdir}' $ac_item`
27214       if test -n "$ac_seen"; then
27215         { echo "$as_me:27215: WARNING: datarootdir was used explicitly but not set:
27216 $ac_seen" >&5
27217 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27218 $ac_seen" >&2;}
27219         ac_warn_datarootdir=yes
27220       fi
27221     done
27222   fi
27223
27224 if test "x$ac_warn_datarootdir" = xyes; then
27225   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27226 fi
27227
27228 EOF
27229 cat >>$CONFIG_STATUS <<EOF
27230   sed "$ac_vpsub
27231 $extrasub
27232 EOF
27233 cat >>$CONFIG_STATUS <<\EOF
27234 :t
27235 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27236 s,@configure_input@,$configure_input,;t t
27237 s,@srcdir@,$ac_srcdir,;t t
27238 s,@top_srcdir@,$ac_top_srcdir,;t t
27239 s,@INSTALL@,$ac_INSTALL,;t t
27240 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27241   rm -f $tmp/stdin
27242   if test x"$ac_file" != x-; then
27243     cp $tmp/out $ac_file
27244
27245     for ac_name in prefix exec_prefix datarootdir
27246     do
27247         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27248         if test -n "$ac_seen"; then
27249             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27250             if test -z "$ac_init"; then
27251               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27252               { echo "$as_me:27252: WARNING: Variable $ac_name is used but was not set:
27253 $ac_seen" >&5
27254 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27255 $ac_seen" >&2;}
27256             fi
27257         fi
27258     done
27259     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27260     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27261     if test -s $tmp/out; then
27262       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27263       { echo "$as_me:27263: WARNING: Some variables may not be substituted:
27264 $ac_seen" >&5
27265 echo "$as_me: WARNING: Some variables may not be substituted:
27266 $ac_seen" >&2;}
27267     fi
27268   else
27269     cat $tmp/out
27270   fi
27271   rm -f $tmp/out
27272
27273 done
27274 EOF
27275 cat >>$CONFIG_STATUS <<\EOF
27276
27277 #
27278 # CONFIG_HEADER section.
27279 #
27280
27281 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27282 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27283 #
27284 # ac_d sets the value in "#define NAME VALUE" lines.
27285 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27286 ac_dB='[        ].*$,\1#\2'
27287 ac_dC=' '
27288 ac_dD=',;t'
27289 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27290 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27291 ac_iB='\([      ]\),\1#\2define\3'
27292 ac_iC=' '
27293 ac_iD='\4,;t'
27294 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27295 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27296 ac_uB='$,\1#\2define\3'
27297 ac_uC=' '
27298 ac_uD=',;t'
27299
27300 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27301   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27302   case $ac_file in
27303   - | *:- | *:-:* ) # input from stdin
27304         cat >$tmp/stdin
27305         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27306         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27307   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27308         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27309   * )   ac_file_in=$ac_file.in ;;
27310   esac
27311
27312   test x"$ac_file" != x- && { echo "$as_me:27312: creating $ac_file" >&5
27313 echo "$as_me: creating $ac_file" >&6;}
27314
27315   # First look for the input files in the build tree, otherwise in the
27316   # src tree.
27317   ac_file_inputs=`IFS=:
27318     for f in $ac_file_in; do
27319       case $f in
27320       -) echo $tmp/stdin ;;
27321       [\\/$]*)
27322          # Absolute (can't be DOS-style, as IFS=:)
27323          test -f "$f" || { { echo "$as_me:27323: error: cannot find input file: $f" >&5
27324 echo "$as_me: error: cannot find input file: $f" >&2;}
27325    { (exit 1); exit 1; }; }
27326          echo $f;;
27327       *) # Relative
27328          if test -f "$f"; then
27329            # Build tree
27330            echo $f
27331          elif test -f "$srcdir/$f"; then
27332            # Source tree
27333            echo $srcdir/$f
27334          else
27335            # /dev/null tree
27336            { { echo "$as_me:27336: error: cannot find input file: $f" >&5
27337 echo "$as_me: error: cannot find input file: $f" >&2;}
27338    { (exit 1); exit 1; }; }
27339          fi;;
27340       esac
27341     done` || { (exit 1); exit 1; }
27342   # Remove the trailing spaces.
27343   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27344
27345 EOF
27346
27347 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27348 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27349 # be either 'cat' or 'sort'.
27350 cat confdefs.h | uniq >conftest.vals
27351
27352 # Break up conftest.vals because some shells have a limit on
27353 # the size of here documents, and old seds have small limits too.
27354
27355 rm -f conftest.tail
27356 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27357 while grep . conftest.vals >/dev/null
27358 do
27359   # Write chunks of a limited-size here document to conftest.frag.
27360   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27361   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27362   echo 'CEOF' >> $CONFIG_STATUS
27363   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27364   rm -f conftest.vals
27365   mv conftest.tail conftest.vals
27366 done
27367 rm -f conftest.vals
27368
27369 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27370 # marker @DEFS@.
27371 echo '  cat >> conftest.edit <<CEOF
27372 /@DEFS@/r conftest.frag
27373 /@DEFS@/d
27374 CEOF
27375 sed -f conftest.edit $tmp/in > $tmp/out
27376 rm -f $tmp/in
27377 mv $tmp/out $tmp/in
27378 rm -f conftest.edit conftest.frag
27379 ' >> $CONFIG_STATUS
27380
27381 cat >>$CONFIG_STATUS <<\EOF
27382   # Let's still pretend it is `configure' which instantiates (i.e., don't
27383   # use $as_me), people would be surprised to read:
27384   #    /* config.h.  Generated automatically by config.status.  */
27385   if test x"$ac_file" = x-; then
27386     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27387   else
27388     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27389   fi
27390   cat $tmp/in >>$tmp/config.h
27391   rm -f $tmp/in
27392   if test x"$ac_file" != x-; then
27393     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27394       { echo "$as_me:27394: $ac_file is unchanged" >&5
27395 echo "$as_me: $ac_file is unchanged" >&6;}
27396     else
27397       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27398          X"$ac_file" : 'X\(//\)[^/]' \| \
27399          X"$ac_file" : 'X\(//\)$' \| \
27400          X"$ac_file" : 'X\(/\)' \| \
27401          .     : '\(.\)' 2>/dev/null ||
27402 echo X"$ac_file" |
27403     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27404           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27405           /^X\(\/\/\)$/{ s//\1/; q; }
27406           /^X\(\/\).*/{ s//\1/; q; }
27407           s/.*/./; q'`
27408       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27409         { case "$ac_dir" in
27410   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27411   *)                      as_incr_dir=.;;
27412 esac
27413 as_dummy="$ac_dir"
27414 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27415   case $as_mkdir_dir in
27416     # Skip DOS drivespec
27417     ?:) as_incr_dir=$as_mkdir_dir ;;
27418     *)
27419       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27420       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27421     ;;
27422   esac
27423 done; }
27424
27425       fi
27426       rm -f $ac_file
27427       mv $tmp/config.h $ac_file
27428     fi
27429   else
27430     cat $tmp/config.h
27431     rm -f $tmp/config.h
27432   fi
27433 done
27434 EOF
27435 cat >>$CONFIG_STATUS <<\EOF
27436 #
27437 # CONFIG_COMMANDS section.
27438 #
27439 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27440   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27441   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27442
27443   case $ac_dest in
27444     default )
27445 if test "x$cf_with_tests" != xno ; then
27446
27447 for cf_dir in test
27448 do
27449         if test ! -d $srcdir/$cf_dir; then
27450                 continue
27451         elif test -f $srcdir/$cf_dir/programs; then
27452                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27453         fi
27454 done
27455
27456 fi
27457
27458 cf_prefix=$LIB_PREFIX
27459
27460 case $cf_cv_shlib_version in
27461 (cygdll|msysdll|mingw)
27462         TINFO_NAME=$TINFO_ARG_SUFFIX
27463         TINFO_SUFFIX=.dll
27464         ;;
27465 esac
27466
27467 if test -n "$TINFO_SUFFIX" ; then
27468         case $TINFO_SUFFIX in
27469         (tw*)
27470                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27471                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27472                 ;;
27473         (t*)
27474                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27475                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27476                 ;;
27477         (w*)
27478                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27479                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27480                 ;;
27481         esac
27482 fi
27483
27484 for cf_dir in $SRC_SUBDIRS
27485 do
27486         if test ! -d $srcdir/$cf_dir ; then
27487                 continue
27488         elif test -f $srcdir/$cf_dir/modules; then
27489
27490                 SHARED_LIB=
27491                 Libs_To_Make=
27492                 cf_awk_program=
27493                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27494                 then
27495                         cf_awk_program="$cf_awk_program\
27496 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27497 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27498 "
27499                 fi
27500
27501                 if test "x$WILDCARD_SYMS" = xno
27502                 then
27503                         cf_awk_program="$cf_awk_program\
27504 /[      ]_\\*;/ { skip=1; next; }\
27505 "
27506                 fi
27507
27508                 if test "x$cf_awk_program" != "x"
27509                 then
27510                         cat >>$cf_dir/Makefile <<CF_EOF
27511
27512 # Generated by CF_LIB_RULES
27513 resulting.map: $UNALTERED_SYMS
27514         $AWK 'BEGIN { skip = 1; last=""; } \
27515 $cf_awk_program \
27516 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27517  skip = 0; last = \$\$0; } \
27518 END { print last; }' < $UNALTERED_SYMS >\$@
27519
27520 distclean::
27521         rm -f resulting.map
27522 CF_EOF
27523                 fi
27524
27525                 for cf_item in $cf_LIST_MODELS
27526                 do
27527
27528         case X$cf_item in
27529         (Xlibtool)
27530                 cf_suffix='.la'
27531                 cf_depsuf=$cf_suffix
27532                 ;;
27533         (Xdebug)
27534                 cf_suffix='_g.a'
27535                 cf_depsuf=$cf_suffix
27536                 ;;
27537         (Xprofile)
27538                 cf_suffix='_p.a'
27539                 cf_depsuf=$cf_suffix
27540                 ;;
27541         (Xshared)
27542                 case $cf_cv_system_name in
27543                 (aix[5-7]*)
27544                         cf_suffix='.so'
27545                         cf_depsuf=$cf_suffix
27546                         ;;
27547                 (cygwin*|msys*|mingw*)
27548                         cf_suffix='.dll'
27549                         cf_depsuf='.dll.a'
27550                         ;;
27551                 (darwin*)
27552                         cf_suffix='.dylib'
27553                         cf_depsuf=$cf_suffix
27554                         ;;
27555                 (hpux*)
27556                         case $target in
27557                         (ia64*)
27558                                 cf_suffix='.so'
27559                                 cf_depsuf=$cf_suffix
27560                                 ;;
27561                         (*)
27562                                 cf_suffix='.sl'
27563                                 cf_depsuf=$cf_suffix
27564                                 ;;
27565                         esac
27566                         ;;
27567                 (*)
27568                         cf_suffix='.so'
27569                         cf_depsuf=$cf_suffix
27570                         ;;
27571                 esac
27572                 ;;
27573         (*)
27574                 cf_suffix='.a'
27575                 cf_depsuf=$cf_suffix
27576                 ;;
27577         esac
27578         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27579         then
27580                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27581                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27582         fi
27583
27584                         if test "$cf_dir" = "c++"
27585                         then
27586
27587 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27588
27589 eval cf_libname=\$${cf_map_lib_basename}_NAME
27590
27591                         else
27592
27593 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27594
27595 eval cf_libname=\$${cf_map_lib_basename}_NAME
27596
27597                         fi
27598                         test -z "$cf_libname" && cf_libname="$cf_dir"
27599                         if test $cf_item = shared ; then
27600                                 if test -n "${LIB_SUFFIX}"
27601                                 then
27602                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27603                                 else
27604                                         cf_shared_suffix="$cf_suffix"
27605                                 fi
27606                                 if test "$cf_cv_do_symlinks" = yes ; then
27607                                         cf_version_name=
27608
27609                                         case "$cf_cv_shlib_version" in
27610                                         (rel)
27611                                                 cf_version_name=REL_VERSION
27612                                                 ;;
27613                                         (abi)
27614                                                 cf_version_name=ABI_VERSION
27615                                                 ;;
27616                                         esac
27617
27618                                         if test -n "$cf_version_name"
27619                                         then
27620                                                 case "$cf_cv_system_name" in
27621                                                 (darwin*)
27622                                                         # "w", etc?
27623                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27624                                                         ;;
27625                                                 (*)
27626                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27627                                                         ;;
27628                                                 esac
27629                                         fi
27630                                         if test -n "${USE_LIB_SUFFIX}"
27631                                         then
27632                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27633                                         else
27634                                                 cf_shared_suffix="$cf_suffix"
27635                                         fi
27636                                 fi
27637                                 # cygwin needs import library, and has unique naming convention
27638                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27639                                 # use 'cyg' prefix for shared lib.
27640                                 case $cf_cv_shlib_version in
27641                                 (cygdll)
27642                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27643                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27644                                         ;;
27645                                 (msysdll)
27646                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27647                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27648                                         ;;
27649                                 (mingw)
27650                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27651                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27652                                         ;;
27653                                 (*)
27654                                         cf_add_lib=
27655                                         ;;
27656                                 esac
27657                                 if test -n "$cf_add_lib"
27658                                 then
27659                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27660                                         continue
27661                                 fi
27662                         fi
27663                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27664                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27665                 done
27666
27667                 if test $cf_dir = ncurses ; then
27668                         cf_subsets="$LIB_SUBSETS"
27669                         cf_r_parts="$cf_subsets"
27670                         cf_liblist="$Libs_To_Make"
27671
27672                         while test -n "$cf_r_parts"
27673                         do
27674                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27675                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27676                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27677                                         cf_add_lib=
27678                                         case $cf_l_parts in
27679                                         (*termlib*)
27680                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27681                                                 ;;
27682                                         (*ticlib*)
27683                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27684                                                 ;;
27685                                         (*)
27686                                                 break
27687                                                 ;;
27688                                         esac
27689                                         if test -n "$cf_add_lib"; then
27690                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27691                                         fi
27692                                 else
27693                                         break
27694                                 fi
27695                         done
27696                 else
27697                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27698                 fi
27699
27700                 if test $cf_dir = c++; then
27701                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27702                                 cf_list=
27703                                 for cf_item in $Libs_To_Make
27704                                 do
27705                                         case $cf_item in
27706                                         (*.a)
27707                                                 ;;
27708                                         (*)
27709                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27710                                                 ;;
27711                                         esac
27712                                         for cf_test in $cf_list
27713                                         do
27714                                                 if test "$cf_test" = "$cf_item"
27715                                                 then
27716                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27717                                                         cf_item=
27718                                                         break
27719                                                 fi
27720                                         done
27721                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27722                                 done
27723                                 Libs_To_Make="$cf_list"
27724                         fi
27725                 fi
27726
27727                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27728                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27729                         $cf_dir/Makefile >$cf_dir/Makefile.out
27730                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27731
27732                 $AWK -f $srcdir/mk-0th.awk \
27733                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27734                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27735
27736                 for cf_subset in $cf_subsets
27737                 do
27738                         cf_subdirs=
27739                         for cf_item in $cf_LIST_MODELS
27740                         do
27741
27742                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27743
27744 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27745
27746                         CXX_MODEL=$cf_ITEM
27747                         if test "$CXX_MODEL" = SHARED; then
27748                                 case $cf_cv_shlib_version in
27749                                 (cygdll|msysdll|mingw)
27750                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27751
27752 echo "${as_me:-configure}:27752: testing overriding CXX_MODEL to SHARED ..." 1>&5
27753
27754                                         with_shared_cxx=yes
27755                                         ;;
27756                                 (*)
27757                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27758                                         ;;
27759                                 esac
27760                         fi
27761
27762         case X$cf_item in
27763         (Xlibtool)
27764                 cf_suffix='.la'
27765                 cf_depsuf=$cf_suffix
27766                 ;;
27767         (Xdebug)
27768                 cf_suffix='_g.a'
27769                 cf_depsuf=$cf_suffix
27770                 ;;
27771         (Xprofile)
27772                 cf_suffix='_p.a'
27773                 cf_depsuf=$cf_suffix
27774                 ;;
27775         (Xshared)
27776                 case $cf_cv_system_name in
27777                 (aix[5-7]*)
27778                         cf_suffix='.so'
27779                         cf_depsuf=$cf_suffix
27780                         ;;
27781                 (cygwin*|msys*|mingw*)
27782                         cf_suffix='.dll'
27783                         cf_depsuf='.dll.a'
27784                         ;;
27785                 (darwin*)
27786                         cf_suffix='.dylib'
27787                         cf_depsuf=$cf_suffix
27788                         ;;
27789                 (hpux*)
27790                         case $target in
27791                         (ia64*)
27792                                 cf_suffix='.so'
27793                                 cf_depsuf=$cf_suffix
27794                                 ;;
27795                         (*)
27796                                 cf_suffix='.sl'
27797                                 cf_depsuf=$cf_suffix
27798                                 ;;
27799                         esac
27800                         ;;
27801                 (*)
27802                         cf_suffix='.so'
27803                         cf_depsuf=$cf_suffix
27804                         ;;
27805                 esac
27806                 ;;
27807         (*)
27808                 cf_suffix='.a'
27809                 cf_depsuf=$cf_suffix
27810                 ;;
27811         esac
27812         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27813         then
27814                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27815                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27816         fi
27817
27818         case $cf_item in
27819         (libtool) cf_subdir='obj_lo'  ;;
27820         (normal)  cf_subdir='objects' ;;
27821         (debug)   cf_subdir='obj_g' ;;
27822         (profile) cf_subdir='obj_p' ;;
27823         (shared)
27824                 case $cf_cv_system_name in
27825                 (cygwin|msys)
27826                         cf_subdir='objects' ;;
27827                 (*)
27828                         cf_subdir='obj_s' ;;
27829                 esac
27830         esac
27831
27832                         # Test for case where we build libtinfo with a different name.
27833                         cf_libname=$cf_dir
27834                         if test $cf_dir = ncurses ; then
27835                                 case $cf_subset in
27836                                 (*base*)
27837                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27838                                         ;;
27839                                 (*termlib*)
27840                                         cf_libname=$TINFO_LIB_SUFFIX
27841                                         ;;
27842                                 (ticlib*)
27843                                         cf_libname=$TICS_LIB_SUFFIX
27844                                         ;;
27845                                 esac
27846                         elif test $cf_dir = c++ ; then
27847
27848 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27849
27850 eval cf_libname=\$${cf_map_lib_basename}_NAME
27851
27852                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27853                         else
27854
27855 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27856
27857 eval cf_libname=\$${cf_map_lib_basename}_NAME
27858
27859                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27860                         fi
27861                         if test -n "${USE_ARG_SUFFIX}" ; then
27862                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27863                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27864                         fi
27865
27866                         # These dependencies really are for development, not
27867                         # builds, but they are useful in porting, too.
27868                         cf_depend="../include/ncurses_cfg.h"
27869                         if test "$srcdir" = "."; then
27870                                 cf_reldir="."
27871                         else
27872                                 cf_reldir="\${srcdir}"
27873                         fi
27874
27875                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27876                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27877                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27878                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27879                         fi
27880
27881                         cf_dir_suffix=
27882                         old_cf_suffix="$cf_suffix"
27883                         if test "$cf_cv_shlib_version_infix" = yes ; then
27884                         if test -n "$USE_LIB_SUFFIX" ; then
27885                                 case $USE_LIB_SUFFIX in
27886                                 (tw*)
27887                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27888                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27889                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27890                                         ;;
27891                                 (t*)
27892                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27893                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27894                                         cf_dir_suffix=t$EXTRA_SUFFIX
27895                                         ;;
27896                                 (w*)
27897                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27898                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27899                                         cf_dir_suffix=w$EXTRA_SUFFIX
27900                                         ;;
27901                                 (*)
27902                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27903                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27904                                         cf_dir_suffix=$EXTRA_SUFFIX
27905                                         ;;
27906                                 esac
27907                         fi
27908                         fi
27909
27910                         $AWK -f $srcdir/mk-1st.awk \
27911                                 name=${cf_libname}${cf_dir_suffix} \
27912                                 traces=$LIB_TRACING \
27913                                 MODEL=$cf_ITEM \
27914                                 CXX_MODEL=$CXX_MODEL \
27915                                 model=$cf_subdir \
27916                                 prefix=$cf_prefix \
27917                                 suffix=$cf_suffix \
27918                                 subset=$cf_subset \
27919                                 driver=$cf_cv_term_driver \
27920                                 SymLink="$LN_S" \
27921                                 TermlibRoot=$TINFO_NAME \
27922                                 TermlibSuffix=$TINFO_SUFFIX \
27923                                 ShlibVer=$cf_cv_shlib_version \
27924                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27925                                 ReLink=${cf_cv_do_relink:-no} \
27926                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27927                                 DoLinks=$cf_cv_do_symlinks \
27928                                 rmSoLocs=$cf_cv_rm_so_locs \
27929                                 ldconfig="$LDCONFIG" \
27930                                 overwrite=$WITH_OVERWRITE \
27931                                 depend="$cf_depend" \
27932                                 host="$host" \
27933                                 libtool_version="$LIBTOOL_VERSION" \
27934                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27935
27936                         cf_suffix="$old_cf_suffix"
27937
27938                         for cf_subdir2 in $cf_subdirs lib
27939                         do
27940                                 test $cf_subdir = $cf_subdir2 && break
27941                         done
27942                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27943                         $AWK -f $srcdir/mk-2nd.awk \
27944                                 name=$cf_dir \
27945                                 traces=$LIB_TRACING \
27946                                 MODEL=$cf_ITEM \
27947                                 model=$cf_subdir \
27948                                 subset=$cf_subset \
27949                                 srcdir=$srcdir \
27950                                 echo=$WITH_ECHO \
27951                                 crenames=$cf_cv_prog_CC_c_o \
27952                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27953                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27954                         cf_subdirs="$cf_subdirs $cf_subdir"
27955                         done
27956                 done
27957         fi
27958
27959         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27960 done
27961
27962 for cf_dir in $SRC_SUBDIRS
27963 do
27964         if test ! -d $srcdir/$cf_dir ; then
27965                 continue
27966         fi
27967
27968         if test -f $cf_dir/Makefile ; then
27969                 case "$cf_dir" in
27970                 (Ada95)
27971                         echo 'libs \' >> Makefile
27972                         echo 'install.libs \' >> Makefile
27973                         echo 'uninstall.libs ::' >> Makefile
27974                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27975                         ;;
27976                 esac
27977         fi
27978
27979         if test -f $srcdir/$cf_dir/modules; then
27980                 echo >> Makefile
27981                 if test -f $srcdir/$cf_dir/headers; then
27982 cat >> Makefile <<CF_EOF
27983 install.includes \\
27984 uninstall.includes \\
27985 CF_EOF
27986                 fi
27987 if test "$cf_dir" != "c++" ; then
27988 echo 'lint \' >> Makefile
27989 fi
27990 cat >> Makefile <<CF_EOF
27991 libs \\
27992 lintlib \\
27993 install.libs \\
27994 uninstall.libs \\
27995 install.$cf_dir \\
27996 uninstall.$cf_dir ::
27997         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27998 CF_EOF
27999         elif test -f $srcdir/$cf_dir/headers; then
28000 cat >> Makefile <<CF_EOF
28001
28002 libs \\
28003 install.libs \\
28004 uninstall.libs \\
28005 install.includes \\
28006 uninstall.includes ::
28007         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28008 CF_EOF
28009 fi
28010 done
28011
28012 if test "x$cf_with_db_install" = xyes; then
28013 cat >> Makefile <<CF_EOF
28014
28015 install.libs uninstall.libs \\
28016 install.data uninstall.data ::
28017 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28018 CF_EOF
28019 else
28020 cat >> Makefile <<CF_EOF
28021
28022 install.libs uninstall.libs ::
28023         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28024 CF_EOF
28025 fi
28026
28027 if test "x$cf_with_manpages" = xyes; then
28028 cat >> Makefile <<CF_EOF
28029
28030 install.man \\
28031 uninstall.man ::
28032         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28033 CF_EOF
28034 fi
28035
28036 cat >> Makefile <<CF_EOF
28037
28038 distclean ::
28039         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28040         rm -f headers.sh headers.sed mk_shared_lib.sh
28041         rm -f edit_man.* man_alias.*
28042         rm -rf \${DIRS_TO_MAKE}
28043 CF_EOF
28044
28045 # Special case: tack's manpage lives in its own directory.
28046 if test "x$cf_with_manpages" = xyes; then
28047 if test "x$cf_with_tack" = "xyes"; then
28048 cat >> Makefile <<CF_EOF
28049
28050 install.man \\
28051 uninstall.man ::
28052         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28053 CF_EOF
28054 fi
28055 fi
28056
28057 rm -f headers.sed headers.sh
28058
28059 echo creating headers.sh
28060 cat >headers.sh <<CF_EOF
28061 #! $SHELL
28062 # This shell script is generated by the 'configure' script.  It is invoked in a
28063 # subdirectory of the build tree.  It generates a sed-script in the parent
28064 # directory that is used to adjust includes for header files that reside in a
28065 # subdirectory of /usr/include, etc.
28066 PRG=""
28067 while test \$# != 3
28068 do
28069 PRG="\$PRG \$1"; shift
28070 done
28071 DST=\$1
28072 REF=\$2
28073 SRC=\$3
28074 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28075 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28076 echo installing \$SRC in \$DST
28077 CF_EOF
28078
28079 if test $WITH_CURSES_H = yes; then
28080         cat >>headers.sh <<CF_EOF
28081 case \$DST in
28082 (/*/include/*)
28083         END=\`basename \$DST\`
28084         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28085         do
28086                 NAME=\`basename \$i\`
28087                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28088         done
28089         ;;
28090 (*)
28091         echo "" >> \$TMPSED
28092         ;;
28093 esac
28094 CF_EOF
28095
28096 else
28097         cat >>headers.sh <<CF_EOF
28098 case \$DST in
28099 (/*/include/*)
28100         END=\`basename \$DST\`
28101         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28102         do
28103                 NAME=\`basename \$i\`
28104                 if test "\$NAME" = "curses.h"
28105                 then
28106                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28107                         NAME=ncurses.h
28108                 fi
28109                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28110         done
28111         ;;
28112 (*)
28113         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28114         ;;
28115 esac
28116 CF_EOF
28117 fi
28118 cat >>headers.sh <<CF_EOF
28119 rm -f \$TMPSRC
28120 sed -f \$TMPSED \$SRC > \$TMPSRC
28121 NAME=\`basename \$SRC\`
28122 CF_EOF
28123 if test $WITH_CURSES_H != yes; then
28124         cat >>headers.sh <<CF_EOF
28125 test "\$NAME" = "curses.h" && NAME=ncurses.h
28126 CF_EOF
28127 fi
28128 cat >>headers.sh <<CF_EOF
28129 # Just in case someone gzip'd manpages, remove the conflicting copy.
28130 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28131
28132 eval \$PRG \$TMPSRC \$DST/\$NAME
28133 rm -f \$TMPSRC \$TMPSED
28134 CF_EOF
28135
28136 chmod 0755 headers.sh
28137
28138 for cf_dir in $SRC_SUBDIRS
28139 do
28140         if test ! -d $srcdir/$cf_dir ; then
28141                 continue
28142         fi
28143
28144         if test -f $srcdir/$cf_dir/headers; then
28145                 $AWK -f $srcdir/mk-hdr.awk \
28146                         subset="$LIB_SUBSETS" \
28147                         compat="$WITH_CURSES_H" \
28148                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28149         fi
28150
28151         if test -f $srcdir/$cf_dir/modules; then
28152                 if test "$cf_dir" != "c++" ; then
28153                         cat >>$cf_dir/Makefile <<"CF_EOF"
28154 depend : ${AUTO_SRC}
28155         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28156
28157 # DO NOT DELETE THIS LINE -- make depend depends on it.
28158 CF_EOF
28159                 fi
28160         fi
28161 done
28162
28163 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28164 if test -z "$USE_OLD_MAKERULES" ; then
28165         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28166 fi
28167 fi
28168  ;;
28169   esac
28170 done
28171 EOF
28172
28173 cat >>$CONFIG_STATUS <<\EOF
28174
28175 { (exit 0); exit 0; }
28176 EOF
28177 chmod +x $CONFIG_STATUS
28178 ac_clean_files=$ac_clean_files_save
28179
28180 # configure is writing to config.log, and then calls config.status.
28181 # config.status does its own redirection, appending to config.log.
28182 # Unfortunately, on DOS this fails, as config.log is still kept open
28183 # by configure, so config.status won't be able to write to it; its
28184 # output is simply discarded.  So we exec the FD to /dev/null,
28185 # effectively closing config.log, so it can be properly (re)opened and
28186 # appended to by config.status.  When coming back to configure, we
28187 # need to make the FD available again.
28188 if test "$no_create" != yes; then
28189   ac_cs_success=:
28190   exec 5>/dev/null
28191   $SHELL $CONFIG_STATUS || ac_cs_success=false
28192   exec 5>>config.log
28193   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28194   # would make configure fail if this is the last instruction.
28195   $ac_cs_success || { (exit 1); exit 1; }
28196 fi
28197 ${MAKE:-make} preinstall